Print

Java 7: Sun's good grooming



Andrew Binstock
Email
September 1, 2008 —  (Page 1 of 2)

The other day, I heard a technologist exclaim in frustration, “Why have people not yet migrated to Java 5?” I certainly sympathize.

Released in late 2004, Java 5 contains numerous valuable additions that make programming easier and better, especially for the SE and EE editions. The improvements include annotations, generics, enums, autoboxing, variable number of arguments and static imports. I can honestly say that I have used all of these features for years, and they now are an integral part of how I think of Java. And when I look at legacy Java code, I can generally tell that it predates Java 5 because I can see the struggles that went into it to provide the capabilities that shipped in version 5. Java 5 has proven itself; sites should adopt it. Skipping Java 6, however—that I do understand. Its changes were incremental.

The upcoming Java 7 shows all the signs of being a major release, on the order of Java 5. It has numerous features that will make Java easier to develop with, and that will lead to cleaner, better code. Let’s look at some of them.

Better modularity. Java’s package system, while workable, is hardly ideal. For example, despite having hierarchical names, packages are not hierarchical (that is, package a.b.c is not part of package a.b). In addition, there is no way to qualify packages as public or private, or to obtain visibility somewhere between the two. New features called superpackages (JSR 294) and Java modules (JSR 277) provide greater control over how packages are integrated, how modules are versioned, and what access other classes and modules can have. These changes are implemented at the language level.

A higher-level module standard—JSR 291, which is not part of Java 7 but which is gaining wide acceptance—is OSGi. Developed for embedded applications, it has emerged in the past few years as an application framework and is currently the framework for Eclipse. It provides a smooth way of loading and managing plug-ins (“bundles” in OSGi parlance) into a backplane. Interbundle dependencies, hot loading and unloading are all supported. As reported in an earlier issue (“Storm brews over proposed Java spec”), there are still collisions between the OSGi folks and JSR 277 designs. But most parties expect that the two teams will eventually find a solution that gives Java better packaging plus a standardized plug-in framework.



Related Search Term(s): Java, Sun

Pages 1 2 


Share this link: http://sdt.bz/32737
 
Most Read  Latest News  Resources

close
NEXT ARTICLE
Sun releases Java EE 6
Enterprise Java arrives, along with an updated NetBeans IDE and an enterprise version of the GlassFish application server Read More...
 
 
 




News on Monday  more>>
Android Developer News  more>>
SharePoint Tech Report  more>>
Big Data TechReport  more>>

   
 
 

 


Download Current Issue
MAY 2013 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?