Java 7: Sun's good grooming



Email    print   
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 Blog Resources

Add comment


Name*
Email*  
Country     


  • Comment
Loading




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>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
FEBRUARY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
GitHire: Use Headhunters to Find Your Perfect Programmer
Are you a hiring manager tired of scouring the job boards? Check out this new service that will find 5 people interested in your jobs.
02/03/2012 12:17 PM EST

Facebook claims hacker cred
Facebook's SEC S-1 filing form includes a short essay on the Hacker Way by Mark Zuckerberg himself.
02/02/2012 08:26 AM EST

Ryan Dahl steps down
Ryan Dahl, creator of Node.js, steps back from his position as gatekeeper for the project.
02/01/2012 04:58 PM EST

Bloomberg opens its API
Bloomberg's APIs could lead to a future standard for accessing market data.
02/01/2012 04:41 PM EST

The case for piracy
In the aftermath of SOPA and PIPA, some copyright holders have begun to embrace piracy as inevitable...and even beneficial.
01/30/2012 02:39 PM EST

Tablet sales boom, but applications lag
The installed base of tablet computers and e-book readers is growing rapidly, but no killer app has yet emerged -- hint, hint.
01/28/2012 05:48 PM EST

 
Events calendar tab
2/13/2012 to 2/16/2012
Santa Clara
TechWeb

2/26/2012 to 2/29/2012
San Francisco
BZ Media

2/27/2012 to 3/2/2012
San Francisco
RSA

3/4/2012 to 3/7/2012
Las Vegas
IBM Tivoli

3/5/2012 to 3/9/2012
San Francisco
TechWeb