Skip navigation
kfarnham

Ready Steady Go Blog

Posted by kfarnham Oct 31, 2005

Take a crack at Mustang's bytecode verifier

Your first hint that today's first announcement is a big deal: just eight hours after it went public, and 90 minutes after it was on the java.net front page, the Crack The Verifierinitiative got Slashdotted.

Crack The Verifier comes from the J2SE team, which has been dropping weekly builds of Mustang for public review and consumption. Now it's time to expose the new bytecode verifier to public view. As the CTV page explains, "the new Mustang JDK includes a new approach to verification called the Type Checking Verifier that includes a performance optimization breakthrough. But the bytecode verifier is at the heart of Java security, so a new implementation needs a very strenuous review and analysis." You can learn more about the ideas behind the new verifier at What is the Type Checking Verifier? And if you're interested in seeing if this approach is really up to snuff, you can apply your attacking skills in Crack the Verifier - Challenge to see if you can find any holes.

But, you might be asking, why is the heart and soul of Java being thrown to the wolves in such a manner? Graham Hamilton talks about the motivations behind CTV in his blog entry Help Crack The Java Verifier:

As part of Mustang we will be delivering a whole new classfile verifier implementation based on an entirely new verification approach. The classfile verifier is the very heart of the whole Java sandbox model, so replacing both the implementation and the basic verification model is a Really Big Deal. See Gilad Bracha's blog for an overview of the new verifier plus links to the spec. The new verifier is faster and smaller than the classic verifier, but at the same time it doesn't have the ten years of reassuring shakedown history that we have with the classic verifier.

The new verifier led us to an interesting test of our new development philosophy. Should we delay exposing the new verifier for as long as possible? Or should we push it out, advertise it, and ask for the community's help in reviewing it? Well, I will confess that many of us had an initial fit of the heebie-jeebies about publishing the source code for the new verifier. "But what if someone finds an ugly security hole?" Gasp!

But that question does kind of answer itself, doesn't it? If someone spots a problem we can fix it and we can fix it before we finalize the release. Happiness!

We think the new verifier model is sound and we are taking various steps to review the actual implementation code. But the more eyes that can look at this before it goes into production use, the better.


Now, did I say that CTV was today's first announcement? There's more for this Monday. In this week's Spotlight, we feature the Planning JavaOne 2006 Forum, which offers an opportunity for java.net members to suggest the content and direction of the JavaOne 2006conference. There are separate discussions for each of the major tracks (which may be used as the categories in the Call For Papers): Web Tier, Tools, Core Enterprise, Desktop, Core Platform, Mobile and Embedded Devices, and Cool Stuff. A Grab Bag discussion offers an opportunity to post other ideas for JavaOne that don't fit into one particular track.


Kicking off one of the JavaOne 2006 track discussions, the welcome message for the Cool Stuff discussion says: "Please post your thoughts and ideas for the Cool Stuff [track at JavaOne 2006] here. This is a tough one to "keyword". The track's charter is very broad, and virtually any interesting work qualifies for a session. Past topics (Keywords?) included, robotic arm control, scripting languages , an interactive music game device, server APIs for mobile services, platform extensions for debugging and enhanced scalability, the latest in Remote Method Invocation (RMI), JiniTM network technology, aspect-oriented programming, Grid computing..."

Elsewhere in the Forums,cbutterfield discusses an interesting GUI edge case inSplashScreen: request ability to set location (2nd try): "The new SplashScreen capability addresses a real need. For my application, one more feature would be very helpful -- the ability to control the splash screen location. The current behavior is (presumably) fine for desktop apps. In my application, (involving an embedded processor) the end-user sees only the upper left quadrant of the nominal full screen (because only that portion is displayed on their reduced size wrist-worn or heads-up display). During normal operations, we maintain the application windows in the viewable (upper left) portion of the full screen. It would be nice to be able to move the splash screen to that same area."


Here's a bit of forward-looking Forum news: on Wednesday, we'll be re-launching our Book Club forum, with an extended discussion and analysis of Bruce Tate's thought-provoking and controversial Beyond Java. If you want to read ahead to be ready for the discussion, but you don't have the book, you can check it out as part of the Safari Bookshelf, our online book service, which also offers a 14-day free trial.


Also in Projects and Communities: are you interested in using the NetBeans IDE to develop applications for the JBoss application server? The article Using NetBeans with the JBoss Getting Started Guide will show you how - it is intended as a comparison to this online JBoss document Getting Started with JBoss 4.0. Using an existing JBoss application it shows how to create a project and then use the IDE to browse, build, deploy, and debug.


Santiago Pericas-Geertsen writes about Fast Infoset in the Real World in today's Weblogs: "It usually takes times for new ideas and technologies to be adopted by the industry. However, Fast Infoset (FI), a binary encoding for the XML infoset, is growing very quickly. A good example of this is a recently founded company, Inversoft, which has developed an XML-based protocol and is using FI as a space/time efficient encoding."

Andreas Schaefer offers praise for openness in Sun lets you Scratch the Itch in the JDK 1.6: "After complaining about shortcomings in the Java JDK for some time I took the opportunity to actually try to fix one of the problems is encountered and send a patch to Sun. Looking back I have to give kudos to Sun how relatively easy it is to become a contributor and that they really want to keep the developers in the loop not like in the "good old" days where submitting a bug report meant that I just disappeared in a black hole and if you were lucky it reappeared later."

In 'Close' icons on a JTabbedPane w/o UI interference, Joerg Plewe writes: "Many apps require a 'close' icon on a tab of a JTabbedPane. Most solutions require manipulation of the L&F classes. There is another option that works without interference with the UI using proactive icons."


In Also in Java Today, AJAX offers a richer experience in the browser, but it also works against the browser in sometimes uncomfortable ways. In particular, AJAX applications typically run within a single page and don't withstand forward/back navigation particularly well. Brad Neuberg provides an answer in AJAX: How to Handle Bookmarks and Back Buttons, offering a "Really Simple History" framework based on two clever principles: "First, a hidden HTML form is used to allow for a large transient session cache of client-side information; this cache is robust against navigation to and away from the page. Second, a combination of hyperlink anchors and hidden iframes is used to intercept and record browser history events, tying into the back and forward buttons."

"While the multi-line selectbox typically provides a better look and feel when the choices are limited, a group of checkboxes is the better choice for any enterprise application where selection boxes must be rendered dynamically and contain preselection functionality. Fortunately, creating a group of dynamic checkboxes is easy to do with the Struts framework." In Dynamic checkboxes with Struts, Danilo Gurovich shows how to use two important Struts tags to make it work.



 

In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Take a crack at Mustang's bytecode verifier  
kfarnham

Ever Open Door Blog

Posted by kfarnham Oct 28, 2005

Tracking and appreciating Mustang contributions

One of the developing stories you may have been following on the front page this year involves contributions to Mustang. At first, it was a breakthrough just to be able to see the Mustang source, build it yourself, and try things out. But many have moved on to the next step: fixing bugs by adding or changing the Mustang code and recompiling it.

Last month, timbell kicked off a forum thread called JDK collaboration bug fixes in recent Mustang builds, which listed the bugs that had been fixed by contributors outside of Sun, and thanked them for their contributions.

The thread has been updated a few times since then, but there have been calls for more frequent and more visible updates.

Folks, your wishes have been granted. In a post yesterday, brinkley announced that:

There is now a JDK Community Contribution Bug Status page at http://download.java.net/jdk/JDK-Contribution.htmlwhere anyone can find the status of their contributed bug fix. The list will be updated weekly. If your bug isn't on the list, let us know so we can track it down.

So there you go: if there's a known bug you're itching to fix, get the code from the Mustang project, read up on how to collaborate, have a crack at it, and watch that page to see when your fix gets integrated.


Also in today's Forums,jportway offers PropertyChangeEmitter - a modest proposal: "Hopefully this won't be too contentious. Can we please have a PropertyChangeEmitter interface for marking classes that can generate property change events that's in java.beans where it belongs ? There's an interface for this but it's way off in the java media APIs for some crazy reason. It would be a real help for those of us who work with tools that deal with Javabeans etc."


In Projects and Communities, the Java Communications Community has posted the announcement Aepona Announces Full Complement of JAVA Support, describing how the telecom service delivery company is working with the Mobicents project on an OSA-Parlay resource adapter, expected to be available in Q1 2006.

The GUI Commands project provides a generic command pattern for Swing GUIs. This approach allows you to set the attributes for GUI widgets with XML, use different appearances for the same command in different contexts, and to use groups to create menus, popups, toolbars, etc. A Java Web Start demo is also available.


The latest java.net Poll asks "How appropriate is Java for beginning programmers?" Cast your vote on the front page, then visit the results page for results and discussion.


Kirill Grouchnikov has a scathingly funny report on "Totally splendid variable-renaming facility" in Visual Studio 2005 in today's Weblogs, in which he annotates "A funny read for Swing (and not only) Java programmers from .NET Developer's Group talk delivered by Charles Petzold, the author of 'Programming Windows' book with more than 30 years experience in programming."

Tom White has a suggestion for User-Friendly XML Config: "Using the xml-stylesheet processing instruction in XML config files makes them much easier on the eye."

Calvin Austin notes A neat firefox tool for developers: "You've just finished your latest struts or jsp project and now ready for deployment. Here is a new open source tool to make testing and reporting user issues a little easier"


In Also in Java Today, the article JBoss Lays Out SOA Roadmap for 2006 reports: "JBoss is lining up a two-prong approach to SOA for 2006, the firm told attendees at its JBoss Barcelona user meeting this week. First, JBoss will build up (and out) its core J2EE app server stack by adding the Drools Open Source Java business rules engine, as well as with enhancements to its JEMS enterprise middleware system. Second, JBoss'; SOA end-to-end vision will also require partnerships with key enterprise software firms, with Microsoft just the first JBoss interop partnership."

"Grid computing is an approach to distributed computing that spans not only locations but also organizations, machine architectures, and software boundaries to provide increased power, collaboration, and information access to everyone connected to a grid. Distributed resources, such as cycles, storage, and information, can be accessed from and provided to any location in the grid." Sounds great, but how do you use it? In Constructing Web Services with the Globus Toolkit Version 4, Birali Hakizumwami introduces the Globus Toolkit, which brings grid computing concepts to a more familiar web services representation.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Tracking and appreciating Mustang contributions  
kfarnham

Give a Little Bit Blog

Posted by kfarnham Oct 27, 2005

Adapting AJAX Incrementally

One protest against new frameworks and tools is how often the baby gets thrown out with the bath water. If you're already invested in one approach, switching a new one often requires throwing away some or all of your existing work. Switch to Ruby on Rails and you have to throw out all your existing Java knowledge too. Is this truly necessary?

Today's Feature Articlestakes more of an incrementalist approach. In Sprinkle Some AJAX Magic in Your Struts Web Application, Paul Browne looks at how you can start adding AJAX features to the client side of a Struts-based web application, without having to throw out your old work, or Struts itself. As he points out "Since AJAX is a technique, not a framework, it is straightforward to add it to Struts."

This incremental approach to working the new into the old "allows us to reuse our existing investment, not only in code but also in developer skills. As a nice by-product, it also allows us to write cleaner, more reusable, Java Struts applications."


John Reynolds has a little fun at AJAX's expense in today's Weblogs. In AJAXOffice, the next big thing, he asserts: "Contrary to Jonathan Schwartz's 'common sense' views, rewriting OpenOffice in AJAX will revolutionize the software industry, reduce global warming, and promote good posture."

Kohsuke Kawaguchi has some useful advice about Tools for java.net project owners: "Those of us who run projects on java.net knows how painful the java.net web interface can be sometimes. Simple things like adding a person to your project take multiple mouse clicks, and when pages load slowly (like just now!), it can quickly kill your productivity. Today, I'm going to talk about the java.net tools that solve this problem."

In Java significance, Felipe Gaucho writes: "These days I was explaining to a cartoon designer about the need of a logo for my OpenSource projects, and he asked me about the theme he should use in order to create such logos. I gave him some words like freedom, technology and JAVA and we started to discuss about something different, something very creative. 'Java?' he asked me - 'Yes, Java I answered' - the strange spot of this conversation was due to the several meanings for this exotic word: Java."

In Also in Java Today, Thinking in Javaauthor Bruce Eckel is asking for some help with the next edition, via his Artima blog entry Use cases for Generics. "Trying to pick them apart in previous weblogs and in the chapter, I finally realized that each example of generics that you see is usually comprised of multiple use cases, which can make them confusing to learn from. So I've started a list of use cases, where I try to focus on only one issue of generics for each item in the list. What I'm hoping you will do is to look over this list and see if there are any (A) improvements and (B) additions that you can make."

New uses for aspect-oriented programming are described in Add Object Cache Monitoring Using JMX and Aspects, in which Srini Penchikala describes his company's strategy for using and monitoring an object cache. "We wanted to use the Java Management Extensions (JMX) technology for this requirement, but didn't want to change any existing application code because we weren't sure how much overhead the monitoring code would add. We decided to use Aspect Oriented Programming (AOP) techniques to dynamically introduce JMX code into existing Java classes and get the cache statistics that way."


In Projects and Communities, the article Sun's Jini Upgrade To Ease Integration Dev interviews the Jini Technology Team about the recently-released and Apache-licensed Jini Technology Starter Kit 2.1, as well as Jini's applicability in realms such as grid computing, edge networking, and e-business applications.

The JDK Communityhome page is featuring the SDN article Use Profile Feedback To Improve Performance, which describes how to use information collected by the profiler in a subsequent re-compile of the code, allowing the compiler to make optimizations based on how the code actually executes at runtime.


In today's Forums,linuxhippy wants to know How to get statistic about Locks? :I know the Mustang-debug-build has one of those favourite -XX+Print options for lock-statistics, however I've read it once and now I can't remember anymore. Does anybody know the parameter name for to enable printing lock statistic?"

Continuing the debate Re: Pass by reference - why not?, tobega writes: "If you are getting multiple unrelated values out of a method, you have a SERIOUS problem in the design of your code.... Trying to make Java more like C is totally breaking the whole idea of Java, especially when you start talking about pointer-like constructs. I would rather go the other way, i.e. even Objects passed as parameters should not be allowed to be modified (at least not without a compiler check that the caller understands this will happen)"

In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Adapting AJAX Incrementally  
kfarnham

Where There's A Will Blog

Posted by kfarnham Oct 26, 2005

Performance on the brain

An odd thing I noticed after posting the separate elements of today's page is how many of them are concerned with performance. JXTA developers are talking about switching to derby and wondering what the performance is like, there's an Also In Java Today article about optimizing synchronization performance, and both the featured forum posts are about Mustang performance issues and the expense of adding a proposed pass-by-reference feature and of the== test performed as part of String comparisons.

Do you suppose developers are this performance-conscious in other languages, or has the Java community just gotten hypersensitive to the "Java is Slow" crowd that is so noisy on Slashdot and elsewhere?

I figure it can't be that slow, not when so many of the hot agile languages are typically run atop a JVM: Groovy, BeanShell, Python (as Jython), Ruby (as JRuby), JavaScript (as Rhino) etc. Do you suppose the Slashdot trolls would give us a pass for writing something in one of these languages and running it on the JVM without their knowledge? Sounds like a Pepsi Challengewaiting to happen...


In today's Forums,kcpeppe spells out performance costs of a proposed feature in Re: Pass by reference - why not? "Pass by reference is a valid programming model. That said it is not the Java programming model. To switch the Java programming model to pass by reference would break many things. Pass by reference is not safe and precludes one from making many of the assumptions that result in many of the speedups that we see from hotspot. Pass by reference may even break current GC. So this is not a matter of let the programmer decide."

In Re: String.compareTo(String anotherString), sjasjawrites: "As far as I can figure out Hotspot doesn't really use the Java version of compareTo(), it uses hand-optimized assembly. Even with all that, yes, the "==" comparison speeds up identical string comparisons. The trouble is it slows down every other string comparison, since the "==" check is executed for every string comparison. So the question becomes: in real programs (not artificial microbenchmarks), what percentage of String.compareTo calls really compare the exact same objects? A small percentage makes the extra check hurt more than help."


In Projects and Communities, a recent post on the discuss@jxta.org list says that derby is being evaluated as a possible xindice replacement. This could enable a pluggable db architecture and enhancements to JXTA's query language. The thread asks those who've used derby to comment on its stability, scalability, performance, and resource consumption.

The nominations phase of the JCP 2005 Elections remains open to eligible members through Sunday, October 30. The Executive Committee guides the evolution of Java, and consists of both major stake-holders and other community members. All JCP JSPA 2 Members are eligible to take part in the election.


In Also in Java Today, Brian Goetz writes "Uncontended locking performance has improved with nearly every JVM version. Mustang continues this trend by improving both the raw performance of uncontended and contended locking and introducing optimizations that can eliminate many lock operations." In Synchronization optimizations in Mustang, Goetz looks at the two primary locking scenarios: locks that are heavily contended, and those that face little or no contention. "The JVM has separate code paths for contended ("slow path") and uncontended ("fast path") lock acquisition. A lot of effort has already gone into optimizing the fast path; Mustang further improves both the fast path and the slow path and adds a number of optimizations that can eliminate some locking entirely."

Ruby on Rails is emerging as a challenger to Java's dominance in building web applications -- the recently-released Beyond Javadevotes two entire chapters to RoR, which it presents as a compelling combination for developing the kinds of web applications that have, at least until now, been the bread-and-butter of Java development. In the ONLamp article What Is Ruby on Rails, Curt Hibbs looks at the ideas behind RoR and how they contribute to high productivity and reduced development time.


Eamonn McManus shows off new JMX features in today's Weblogs. In Adding Descriptors to MBeans in Mustang, he writes: "Descriptors allow you to give additional information about MBeans to management clients. For example, a Descriptor on an MBean attribute might say what units it is measured in, or what its minimum and maximum possible values are. As of Mustang (Java SE 6), Descriptors are a basic part of the JMX API and are available in all types of MBeans. Here's the easiest way to use them."

Romain Guy is getting Twice the IDE: "Using Eclipse for the code, NetBeans for profiling, how cool is that? Well, it is, especially when you have a dual screen setup. I know a lot of developers do have such a setup today. Mine is a bit weird though..."

Finally, in CVSspam: Very Cool CVS Notification Tool, Tom Ball writes: "Code-reviews get a lot more automatic with this cool CVS notification tool."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Performance on the brain  
kfarnham

No Inbetween Blog

Posted by kfarnham Oct 25, 2005

Think entity beans don't support inheritance? Think again.

Sometimes authors have to sell a skeptical editor on the concept of an article. This is the case with an article today, which shows how to achieve inheritance with EJB entity beans. My first reaction as an editor was "Is this such a big deal? If inheritance is a big deal to you, can't you just use a POJO-based framework?"

The key, in the case of today's Feature Article, is that this fundamentally misunderstands the question. Maybe an entity bean, understood as an object, doesn't support inheritance, but who's talking about objects? In Component Inheritance in EJB 2.0 re-frames the question around the concept of a component:

A component is a typed, deployable unit of functionality that adheres to a contract of specified interfaces and deployment rules with a component model framework. A component has no observable state despite any instances or data it may create. Further, a component such as an entity bean is not simply its interfaces, EntityBean class, and descriptor files, but also any objects, code, or other resources created by the container in its deployment.

From this, you can open your mind enough to get to the point where inheritance works:

Component inheritance can be confusing and difficult to grasp for OOP developers due to choices in implementation and demarcation. Some implementations, such as ours, rely in part on object inheritance. Other choices might use delegation, proxies, or other devices that may not fit the object-oriented inheritance definition. The hierarchy mapping is also specified in a less overt manner. In Java's object inheritance, the relationship is clearly marked by the key word extends. Component inheritance might be declared in an XML file, as a metadata key, or via some other manner--it may not be evident in the code at all.

The article goes on to explain why you would want component inheritance and, finally, how to achieve it in EJB 2.0


Swing documentation, communication, and plain weirdness are up for review in today's Weblogs, in which Alexander Potochkin relates The story of one "not a bug": "Recently I came across one interesting bug 4413412 which seems to discover very odd Swing behaviors and really looks like a bug. Anyway after a little investigation I closed it as not a defect."

Kohsuke Kawaguchi creates a Hangman game by using Dalma: "Dalma is a workflow engine that lets you write conversational programs quickly. Today, I added a little hangman game as a sample to Dalma."

In 18 years of toil, a lot of help from the compiler, and a small but rare personal distinction, Satya Komatineni relates "How in 18 years the code I wrote ran the first time."


In Also in Java Today, the O'Reilly Network Databases site points out Andrew Gilfrin's blog entry A MySQL Mantra in which he passes along some sage wisdom about working with Oracle -- try to use a single line of SQL, then try as little PLSQL as possible, then try Java, etc. -- and adapts this line of thinking to MySQL.

"The paper 'A First-Class Approach to Genericity' introduces the idea of the mixin, which seems to be quite a powerful concept, and then shows that you can't do it with Java generics." In Mixins: Something Else You Can't Do With Java Generics?, Bruce Eckel (author of Thinking in Java ) asks "I wonder if anyone has any alternative approaches to this problem."


In Projects and Communities, the blueprints project now has an extensive AJAX FAQ for the Java Developer. This J2EE-oriented FAQ covers available AJAX libraries, discusses issues with security, usability, and internationalization, and covers advanced issues like concurrency, saving state, sending images, and polling.

In the article JAXP validation, Java and XMLauthor Brett McLaughlin looks at the improvements made to the Java API for XML Parsing (JAXP) in J2SE 5.0, including validation support, support for XML schema and RELAX NG, and more. "All of these improvements finally give Java developers an industrial-strength solution for XML validation."


In today's Forums,neutel offers up an XMPP Resource Adaptor for Mobicents: "I've just added to CVS one initial version of a XMPP Resource Adaptor. In this version two types of connections are supported, client-server and component-server. To implement the component-server connection the smack library had to be changed, so, it is very important to replace the smack library in mobicents/lib for the one in ra/xmppra/lib. Comments and suggestions are welcomed."

grantsmith continues to track Mustang breakage inRe: Recent builds: problem with Intellij IDEA: "Build 57 still fails. It's been two builds since the rollback was planned. Any clue as to when it will be implemented?"

In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Think entity beans don't support inheritance? Think again.  
kfarnham

The Meaning Blog

Posted by kfarnham Oct 24, 2005

What makes an expressive computer language?

Is fealty to a natural language an advantage for a programming language? Bruce Tate, in Beyond Javasays "Ruby has a beautiful syntax. It reads like English, and it miraculously stays out of your way." But is that a good thing? Some of us in Mac circles have long bashed the straining-to-be-English AppleScript as "the world's only read-only programming language" (typically contrasting it with Perl, the insidious write-only language).

Fernando Lozano takes this assumption directly to task in his weblog, What makes programming languages easier?, in which he writes:

Natural language is imprecise, ambiguous, and its real meaning has to be inferred by the reader. Not all people who reads an article will understand exactly the same thing the author intended to tell them. This doesn't look to me as a good way to express computer instructions that should produce a reliable and predictable result.

In fact, being similar to a specific natural language has the potential to be a hazard to everyone who doesn't speak that language. Of this, Fernando writes:

Actually, I think we non-English speakers (I'm Brazillian, my language is Portuguese) have a little advantage over Americans and other native English speakers: we don't fall into the mistake of trying to read a computer program as if it were natural language.

The funny thing is, I don't even see the "English-ness" of Ruby, and it seems a peculiar trait if it does exist, given that Ruby's creator is Japanese. But back to the Fernando's main point: doesn't resembling a natural language make a computer language less precise? Or, to take a contrarian position to its extreme, does this mean assembly language is the most precise language, since it unambiguously specifies which instruction the CPU is supposed to execute in any given state?

Somehow the sense of what really matters is still out there, waiting to be defined. Do you know what it is? Or are we foolishly seeking the 100 year language?


Also in today's Weblogs, Konstantin I. Boudnik has an in-flight epiphany in Java. Quality. Metrics (part 3): "Sitting here I got an idea, that "quality" isn't about something good for anyone. It's more about a reasonably acceptable level of things and services. It's like these two entries in a flight's menu and both are "reasonably" good."

In WebStart and 29 seconds, James Todd discovers and takes advantage of new Java Web Start features: "It does pay to periodically revisit "what you (think you) know" and tune accordingly. As such, following are some findings I uncoverred based on real world, end user Java WebStart deployments of which the gory details are captured via the relevant developer list."


rickcarson is working through Web Start problems in today's Forums, In Re: Web start to actually work, he says: "Turns out that my suspicion was correct. 1.5 won't run 1.4 classes at all because the class file format changes. So much for that. To solve my intallation woes (webstart not working, manually downloading and running the JREs from Sun not working, web start console crashing and refusing to start [seriously, the list goes on]), I fiddled with the J2SE parameter in the jnlp file. When I specified an exact version (ie stripped the + off the end of 1.4.0+)* then webstart would go and grab that version and install it and use it to run the app... yes, even the ones that were crashing if I downloaded them and ran the installer myself. Weird. Looks like you shouldn't install any of the JREs 'by hand'."

mthornton has seen some good results getting File System information via JNDI: "Having suggested this I have created a simple JNDI provider for the Windows file system that uses some JNI to obtain file information. Although currently very incomplete, I can test the performance against using java.io.File to enumerate the files and directories. The values of t are the elapsed time measured by System.nanoTime, while the percentages are the elapsed time relative to the faster code. Thus scanning using the JNDI context is 2.5 times faster than using File.list and File.isDirectory."


This week's Spotlightfeatures the Jini Technology Starter Kit 2.1: "Announced at the Ninth Jini Community Meeting, the Jini Technology Starter Kit 2.1 is the first to be released under the terms of an Apache license. The kit, available from the downloads page offers an implementation of JavaSpace05, along with ease-of-development and ease-of-deployment improvements, plus support for multiple IP addresses and URL-based deployments."


In Projects and Communities, the 58th issue of the JavaTools Community Newsletter has been posted, featuring new projects that joined the community in the last week and a tip on how to use RSS for reading project forums and mailing lists. The newsletter also has an extensive round-up of tool-related news from around the web.

The Portlet Community is highlighting the SDN article Configuring IDE's for Portal Development and Deployment, which shows how to use Sun Java Studio Enterprise 8 and Ant to build a portal and deploy it onto multiple servers (such as development, staging, and production servers).


Portlets take center stage in Also in Java Today: "When speaking of Web application development today, it's difficult to ignore the overwhelming influence of the Portlet Specification (JSR-168). Even before the specification was formally finalized by the expert group, the Java world saw older CMS application implementing it and new portal software arrivals in the market. The proverbial "gold rush" to develop new applications as portlets, refactor existing applications to comply with the specification, and deploy new Web sites on portal software is not without good reason." In Are Portals the 'Magic Bullet' of Web Application Development?, Julien Viet and Roy Russo provide an overview of portals and portlets and point out some of their advantages.

"In the last three years, a number of new standards related to information security have been developed. The most recognized of these are Web Services Security (WSS), the Security Assertion Markup Language (SAML), and the Extensible Access Control Markup Language (XACML)." Are those three more standards than you currently understand? The dev2dev article Demystifying Security Standards reveals the stories, purposes, and concepts behind each.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



What makes an expressive computer language?  
kfarnham

We're Turning Again Blog

Posted by kfarnham Oct 21, 2005

Skepticism and "Beyond Java"

Typically, we let a few days elapse before posting something to the Also in Java Today section on the front page. This comes from a desire not to compete with other sites in the Java community - we'd like to direct people to interesting Java-related content around the web, not poach hits or bookmarkage from the other Java sites out there. Because of this policy, we usually run stuff from O'Reilly Network's ONJava the week after it's posted there.

But today, some of our bloggers are already reacting to an ONJava article that appeared Wednesday night, so I thought it best to move up its scheduled date and point you to it, along with the blogging and discussions that it's kicking off here on java.net.

So, to follow the thread, start with Technologies to Watch: A Look at Four That May Challenge Java's Development Dominance, in which Beyond Javaauthor Bruce Tate writes: "In Beyond Java, I make the case that Java's not dead yet, but for the first time in nearly a decade, we're seeing compelling innovation happen beyond the borders of Java. These four technologies will play an important role in the near future. Watch them closely."

Just in case you don't follow the link and don't mind my spoiling the surprise, the "big four" he cites are:

  • Dynamic Languages
  • Continuation Servers
  • Convention Over Configuration
  • Metaprogramming

 

In today's Weblogs, Vikram Goyal's Making it easy for everybody disputes some of Tate's assertions about code readability in Ruby versus Java:

On one hand, the keepers of the Java flame are making the language harder and harder to understand and use (Generics anyone?). On the other, Bruce wants it so simplified that he wants it to read like spoken English ("Ruby may not be to your liking, but it's a pretty clean language, and it's much closer to English than Java."). Like English?

No hablo inglés

Yes, for those who don't understand Spanish (neither do I) the sentence above reads "I don't speak English". So is there a Ruby in Spanish? It gives "programming languages" a whole new meaning. :)



Meanwhile, John Reynolds infers some of the book's ideas from the article and, in Beyond Java, but not beyond the JVM, is concerned the idea might be taken too far:

Java may lose its dominance as our day-to-day language of choice, domain-specific development environment/tools are a natural progression, and something that we should embrace. What we shouldn't embrace is the demise of the JVM. The JVM can support any number of languages, as Javascript (Rhino), Jython, and Groovy demonstrate. There is no need to throw this baby out with the bath water.

I wonder, what's the bigger question: where Java goes from here, or where Java developers go from here. Please let us know what you think in comments here, on the weblogs' comments, and in the forums.


Also in today's Weblogs, Santiago Pericas-Geertsen asks Did you know about Japex? "Japex is a simple yet powerful tool to write Java-based micro-benchmarks. It is similar in spirit to JUnit in that if factors out most of the repetitive programming logic that is necessary to write in micro-benchmarks. This logic includes loading and initializing multiple drivers, warming up the VM, timing the inner loop, etc. Take it for a spin!"


Also in Also in Java Today, J2SE 5.0 introduced many additions to the collections API that you need to be aware of to properly implement generic custom collections that work seamlessly with multiple types and the new "for each" construct. In Creating Custom Generic Collections with J2SE 5.0, Jeff Heaton says " it's relatively easy to create collections that are compatible with the new constructs" and that " you'll find that such collection classes will integrate seamlessly into J2SE 5.0."


The latest java.net Pollasks "Which language feature would you like to see removed from Java?" Cast your vote on the front page, then check the results page for results and discussion.


In Projects and Communities, the JavaDesktop Community's latest Swing Sightings Preview features ShoppingStar, a rich client for shopping Amazon.com that supports tracking and comparing prices and price histories, and building your own library within ShoppingStar. All Amazon localizations are supported. You can try it out via itsWeb Start launcher.

The blog QTJ 10/16/05 WTF? tracks a problem with QuickTime for Java on Windows, in which a "QTJava expired" error is reported if the system date is October 16 or later. The problem has been quietly fixed and the non-expired QTJ is now included with full installs of QuickTime or the iTunes+QuickTime combo installer.

 

In today's Forums, tlund_ has some feedback in the thread Re: Need help with research for graduate class: "Now to the A questions. They all depend on how you are using Java of course. If you are a server app developer, then you probably won't use these features at all. I mainly write JSP/servlet apps, but have a few small desktop projects. In my opinion, Java has never been big on the desktop, but maybe that will change with Mustang But new desktop features are important nonetheless."

carlavmott has GlassFish answers and a call for contributions in Re: Dual Installation with Sun Web App Server 8.1: "The GlassFish getting started guide does list the default administration values which will tell you where to start. But Abhijit is right, there is no more documentation on this currently so please post."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Skepticism and "Beyond Java"  
kfarnham

Beauty Knows No Pain Blog

Posted by kfarnham Oct 20, 2005

Whatever happened to desktop JavaBeans anyway?

One of the remarkable things in the title of today's Feature Article,Accessing a PDF Document with the Acrobat Viewer JavaBean, is the word JavaBean. When was the last time you saw anyone talking about beans not in the EJB context, but in the original GUI context of "a reusable software component that is written in Java programming language [and] can be visually manipulated in builder tools"?

But as described by author Deepak Vohra, that's exactly what the Adobe Acrobat Viewer JavaBean provides: create aViewer object, plop it into a GUI, and you have an instant PDF display. The host program doesn't even need to provide controls, as the viewer widget offers its own toolbar, zoom buttons, and pop-up menu. That said, Deepak shows how you can duplicate these commands with calls from your own code, such as your own buttons or menu items.

Philosophically, this still has an oddly-appealing code smell to it. While many Java hand-coded GUIs start with the model and then instantiate a widget, the paradigm here seems to be to put the widget into your GUI and then wire it up to the PDF document (effectively the model) that you want to display. Want to show a different PDF? Leave the widget where it is and just make an "open" call to wire it up to the new PDF file or URL. That seems a lot more typical of the workflow of visual GUI builders, something that have never really caught on in the Java space... a pity too, because it's a really pleasant way to work once you get your head around the concept.

The BeanBox is long gone, but will this style of Java desktop development catch on again? How does Matisse do it? Or is there another GUI builder that's worth tracking?


Kirill Grouchnikov brings a much-admired Mac GUI concept cross-platform with his L&F in today's Weblogs In Providing visual indication of changed contents in Swing frames, he writes: "Have a Swing editing application and wish to provide visual indication that contents of some internal frame (or the main frame itself) have changed? Here's how you can do it, and not only on Mac."

"Forget the 'PC' as we know it for $100, but why not a new, more ubiquitous gadget?" Bruce Boyes thinks the embedded space is right for The $100 PC in another guise?

Rich Unger reports I just ported V-Builder to NetBeans Platform 5.0: "A few folks have asked how you move an application from the cluster build harness on 4.x to the 5.0 platform. The way I did it was to create a new module using the IDE, and just copy my source code in. Then use the IDE's facility for adding module dependencies based on what doesn't compile right away."

In Also in Java Today, Jim Waldo bites off a huge question in the Artima blog What Is XML? "The time has come to face the demons and answer the question. Let me tell you what I think the role of XML is going to be in all this...or at least start what will no doubt be a series of posts trying to make it clear what I think of XML, what I think the role of XML should be, and other assorted subjects. Those of you who know me, or have heard me speak, or have read some of what I have written in the past, may have the impression that I don't think much of XML. There is a sense in which that is true, but like so much in this world, the whole story is much more complex than that."

Frank Teti digs further into security issues in The Power of JAAS: Security System Alternatives, a follow-up to an earlier TheServerSide article. "That article identified key interfaces within a J2EE compliant application server that need to be configured in order to build secure applications focusing on RBAC, which is an integral part of Identity Management. However, the article did not discuss, in detail, alternatives to using LDAP directly for Java Authentication and Authorization Service (JAAS) security, such as a Trust Association, one of the more popular system alternatives. Essentially, the power of JAAS is in its ability to use almost any underlying security system. One of those approaches is to use a Trust Association Interceptor (TAI) instead of direct LDAP access."



 

The Projects and Communities section has a major announcement from the Ninth Jini Community Meeting: the Jini Technology Starter Kit has been released under the Apache License 2.0. The new JTSK 2.1 is available from starterkit.jini.org, and is based on work done in the Porter project. New features include JavaSpaces extension, Ant build support, a graphical installer, a runtime environment validity checker, and more.

Linux magazine has posted Jacques Surveyer's review of NetBeans 4.1, praising NetBeans' GUI organization builder before digging in more deeply to investigate its support for J2EE development. He criticizes the difficulty of using non-default application servers, but concludes "I find that working in NetBeans is fast and the Ant rebuilds are both smart and quick"


kamg has an important warning about Mustang builds in today's Forums. In Build problems on Solaris 10 sparc, he writes: "Just wanted to give everyone a heads-up. Starting with build 56, anyone who builds the server VM on older or unpatched versions of Solaris 10 may come up against a build error due to a bug in dtrace. If it happens a pretty detailed explanation should be displayed in the build output, but the long and short of it is that you'll need to either disable dtrace probes in that build by setting the environment variable HOTSPOT_DISABLE_DTRACE_PROBES, or make sure to use an updated or patched OS. I believe Solaris 10 update 1, build 15 and later will work, but if you have an earlier one, try to apply these patches: 118822-19 and 118844-19."

eduardomartins offers some architectural designs for Mobicents in Re: Presence Service for Mobicents: "Ok, I made a new diagram regarding Ivelin's ideas, which breaks the Presence Service to 3 *components*. You can check it out here. This possibility for the final architecture is close to what I first thought but some people argue that one service should have *only* one Root SBB. The way I see is this are 2 services, the generic presence service and the specific presence protocol translator, the first can be reached from SLEE directly and from network, using the service the second provides. Please tell us your opinion."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Whatever happened to desktop JavaBeans anyway?  
kfarnham

Broken Hearts Are For... Blog

Posted by kfarnham Oct 19, 2005

Buyer's remorse for Generics and Autoboxing?

We knew Generics were coming. There was an implementation of it that could be used with Java 1.4, during the long wait for the J2SE 5 betas and ultimately its final version. So, really, just now people are starting to say that it was a bad idea?

What happened? Did the silent majority get this one wrong? I remember five years ago when it was the most popular item on the bug parade, I didn't really think much of it. I thought that if there really is a critical problem in getting untyped objects from Collections, that to be completely honest, I was far more likely to just do an instanceof on stuff I pulled from the Collection, or to just catch the ClassCastExceptionand live with it, rather than learning a completely new syntax to avoid the problem. 99 times out of 100, my code was the only one populating the Collection, so the chances of getting an unexpected type of object out of the Collection was zero.

So I voted all my bug votes for Java Media Framework stuff that never got looked at. That and the un-deprecation ofServletRequest.getParameter()... bonus points for anyone who sees how that relates to generics, but I digress.

Anyways, maybe there were people with principled objections to Generics, but it seems more people just shrugged and said "yeah, whatever" and plugged away with our work. Generics arrived and suddenly everyone realizes that they're probably more trouble than they're worth. Bruce Tate, in Beyond Java, even sees them as typical of what he believes are Java pathologies:

Java 5 is strongly touted as perhaps the most innovative major release of Java in half a decade. I do agree that it's going to have a significant impact. I'm not at all convinced that all of the impact will be positive. I regularly attend a conference called NoFluffJustStuff. The experts at the conference sit on a panel and answer questions. One of my favorite questions deals with new features in the language. The whole panel agrees that generics, as implemented, are a bad idea. That usually shocks the audience.

If you think about it, the Java generics Java Specification Request (JSR) introduces a whole lot of syntax to solve a marginal problem with no corresponding change to the Java virtual machine (JVM). I'm guessing that the typical Java developer rarely gets a class cast exception. And there are plenty of opportunities. Most of the objects in a typical Java application are usually in collections anyway. Whenever you take them out of the collection, you've got to cast them from Object anyway. At that point, type safety gives you about as much protection as a lap belt in a burning, plummeting 747. Yet, the generics syntax is invasive, and the implementation is worse. In an age when more and more experts assert that dynamic typing leads to simpler applications and productive programmers, Java developers are learning how to build stronger enforcement for static types.

I'm bringing this up because it's come up in multiple discussions in the forums. The thread Comparison operators by value kicks off with ideas about how to resolve some problems with = and == introduced by autoboxing. The thread moves on to consider whether Autoboxing as a whole is a mistake, and then brings in Generics as a fellow poster child for well-meaning features gone wrong. Userkcpeppe writes:

No matter the conservative approach (which is the correct one for production) is to not change unless there is a compelling reason and the change will do no harm. I'm sorry but from where I stand, Generics do not meet that bar and autoboxing falls way below it. To be fair, I've seen cases where they can help but these are really use a few edge cases. I don't think the main core language should be designed by exception. n'uff said on this subject!

'nuff said? Do you think features like autoboxing and Generics are misguided? Has Java gone off the rails? Please join in the forum discussions and let us know what you think.


Also in today's Forums,rickcarson speaks up for the advantages of Java's openness as part of the feature discussion in Re: Need help with research for graduate class: "I think that if features do not work as documented they should not be included. This was one of the nice things about Java in the early days, and part of the reason why I jumped ship away from the M$FT offerings. In VB or the win32api if something doesn't work as advertised you have two choices: either the frustration of fiddling with it till it works (hello blue screen! hope you saved recently!), or giving up and telling the client it can't be done. A classic example was the ASP Dictionary object, which spat back random garbage, even with only a couple of items in it. Whereas with Java you can look under the hood to see what is happening."


Hans Muller has surprising news in today's Weblogs. In Official: Swing is the Dominant GUI Toolkit, he writes: "The most recent Evans Data Corporation developer survey had this to about Swing: 'Java Swing with 47% use, has surpassed WinForms as the dominant GUI development toolkit'. We are number one!"

Daniel Brookshier has An interview with Brian Koontz, creator of the Open Source Technology program at North Lake College: "Open Source for college credit? Yes, it's true! Daniel interviews Brian Koontz, Computer Science program coordinator and OSS zealot at North Lake College. Brian created a certificate program for Open Source Technology at North Lake College in Texas. Daniel Brookshier interviews Brian about the certificate and the open source impact of open source."

Finally, Chet Haase lightens things up with some Swing humor inTwo Items Walk into a ToolBar...


In Also in Java Today, Bruce Tate and Justin Gehtland are back with updated content from Spring: A Developer's Notebook. In What Is Spring, Part 2, they show how to use Spring's Web MVC framework to build a web GUI for a simple bike shop example. This article is excerpted from the updated, current version of the book, which corrects errors from the earliest printings.

Robin Miller goes against some currently popular thinking in the NewsForge article Three reasons why Internet-based applications are a bad idea: "We've all heard the hype about how Sun and Google may someday, somehow, produce a version of StarOffice or OpenOffice.org that you'll access online through your browser instead of installing an office suite on your hard drive. Even though I think 'The Network is the Computer' makes a fine marketing slogan, I am still going to keep most of my software where it belongs: on my own computer. Here are three reasons why."


In Projects and Communities, the Robotics Community's Terminology projecthopes to clear up misused and overloaded terminology in the field of robotics by collecting terms and historical data, defining terms accurately, and presenting recommended modern-day usage. The results of the project will be made available under a Creative Commons license

The JAX-WSA project hosts the reference implementation for JSR 261, Java APIs for XML Web Services Addressing, which defines APIs and a framework to support transport-neutral addressing of Web services. The project hosts the early draft of the spec, javadocs, and a weekly build of the reference implementation.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Buyer's remorse for Generics and Autoboxing?  
kfarnham

On the Bus Blog

Posted by kfarnham Oct 18, 2005

Riding the Enterprise Service Bus

The Enterprise Service Bus (ESB) "has evolved out of necessity, and hence there are no issues of adoption and acceptance." That ought to satisfy critics of "ivory tower" type standards enterprise development, right?

Practically speaking, ESB offers a layer over existing standards, allowing disparate systems to communicate and coordinate. Author Binildas C. A. explains:

When it comes to integration, it is more easily said than done. This is because there exists no de-facto standard for integration end points. The scenario worsens when we try to do integration at the enterprise level or across enterprises. Each application will have its own way of exposing services. And we cannot revamp all of these applications in a day or two. Instead, the practical approach is to define a top-level integration infrastructure. The Enterprise Service Bus (ESB) is one such middleware infrastructure that provides, at the application platform level, pipes for information to flow and handshake with applications in silos.

In the Feature Article, Service Provisioning Through ESB, he goes on to define ESB as a de-coupling of enterprise services from the transport systems used to communicate between them. This allows you to develop deeply distributed systems without getting hung up on the messaging details. The article goes on to show how to use a J2EE ESB implementation, Mule, to run an ESB-style application.



 

Planning the feature set of your next release? In Also in Java Today, the Joel on Software entry Set Your Priorities starts by arguing that the wrong things to do are to add features just because they've been promised to a customer and to add what seems inevitable. His alternative approach offers a novel way to get consensus and to expose the cost/benefit trade-offs of new features: "Mike Conte taught me this system during the planning of Excel 5, where it only took a couple of hours even with a couple of dozen people in a conference room. The cool thing was that the roughly 50% of the features that we didn't have time to do were really stupid features, and Excel was better because it didn't have them."

Misconceptions and FUD? Senior Director and Chair of the Java Community Process (JCP), Onno Kluyt discusses widely-held beliefs about the JCP in the interview Ensuring Speed and Openness at the Java Community Process. He discusses the JCP's openness and the balancing of innovation and standarization, saying "Sometimes, experimentation is needed, in which case 'innovate, implement, standardize' may be a better way to come to consensus."


In Projects and Communities, the Java Tools Communityproject JavaCheckeris a static Java source code analyzer, which can spot coding errors like inappropriate exception handling (empty catch blocks and throwing of generic Exceptions), hiding and style defects, contract violations, synchronization defects, and more.

The Portlet Community notes the recent release of Stringbeans 3.0. This web services platform offers support for JSR-168 portlets and the Web Services for Remote Portlets (WSRP) standard. It also offers bridges to JSF and Struts, an interceptor framework for AOP-style development, and more.


Sayed Hashimi wants to know about Your build tool experience in today's Weblogs: "I was wondering what is your experience with build tools. What build tool do you use at your orginization and what do you think of it? Specifically how do you use your build tool currently? What challenges have you faced, and how did you overcome it? What is your build tool lacking?"

Felipe Gaucho takes a look at OpenSource Management in Practice: "Management models are a fever of this time - CMM, PMBOK, XP and several other magical formulas induce you to think about sophisticated levels of planning and scheduling as a pre-requisite of a successful project, isn't it? This blog entry just reports a personal experience using different approaches in OS project management and its results."

In Persistence Stew II: JDJ Article (JDBC - The Indipensible Component of Persistence Mechanisms), Jonathan Bruce writes about his "JDJ Article on the importance of picking the best-of-breed components no matter what ORM mechanism works for you."


tberthel adds some perspective to the many international salary reports in the Re: Application devlopers salary discussion in today's Forums. He writes: "Many of the posts are using average income not the pay of an Application Developer. Also, many of them ignore exchange rates. In the real world dollars only have a value based on their location. So if you're in Brazil, Argentina, China, or India your dollar buys more. It's relative to your location. So India, China, Brazil, and Argentina App Devs are making a killing despite their USD amount."

kohsuke offers some help Re: namespace definitions in XML output using JAXB2.0: "The default printer of the JAXB RI prints out all 'known' namespaces upfront. This is because it generally improves the performance. One quick way around the problem would be for you to use a custom writer and filter out things that you think unnecessary. For example, you can marshal it to DOM, remove some unused namespace declarations, and write the DOM tree out. Or you can implement a SAX filter if you need more performance than DOM."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Riding the Enterprise Service Bus  

Announcing your project

I'll assume for the purposes of this blog that project owners actually want to get the word out about their projects: that they want their stuff to be used, they want feedback (bug reports or encouraging forum posts), that they want other programmers to commit code. Maybe there's a case where this isn't true, but if so, why host on an open source site like java.net? That'd kind of be missing the point of collaboration.

So, you want people to find out about your project... how do you get on the front page?

I'm glad you asked. We just updated the Publicize Your Project page, which has a permalink in the left nav of all java.net pages, and is also the focus of this week's Spotlight. This page describes the major sections of front page -- feature articles, spotlights, projects and communities, java news items, etc. -- and shows you how to get your project promoted through whichever of these channels is appropriate to you. The new update covers forums, weblogs, and the idea of using your project's web space for hosting arbitrary kinds of web content like tutorials and how-to's: the weekly JavaTools Community Newsletter is a good example of this approach.

As you seek to work with the community on your projects, please make use of these tools and let us know how we can help you.


James Gosling has a shout-out in today's Weblogs. In Fault Containment: an unsung hero, he writes: "As I suffered through the nth application crash of the day, I couldn't help thinking of my favorite underappreciated Java feature: fault containment. Between try{}catch and the tight memory model, failures tend to happen close to where the error is, and they can be caught with a very good chance that there has been no corruption of neighbouring data structures."

Greg Murray has an AJAX FAQ for the Java Developer: "In the land where Java flows freely I have encountered many that are not familiar with AJAX and ask many of the same questions. As I started to note down common questions they became an FAQ. Questions include many topics such as usability, JavaScript libraries, AJAX response formats, sending images, partial submits, internationalization, and much more. See the AJAX FAQ for the Java Developer."

In Developing Java project - a team effort, Kirill Grouchnikov writes: "Every year, a couple of 'golden hammers' die and a couple of new 'golden hammers' are (re)invented. Bloggers proclaim the new kings, consultants rush in for a quick buck, managers start believing that they will be able to ship the next version on time... Where does it leave us, the guys who actually get stuck with these hammers?"


mustangqa puts out a call for feedback in today'sForums:Need help with research for graduate class describes the situation: "I'm doing a project for a college course on Software Quality Engineering. We've been assigned to perform SQE tasks on an open-source project and I've chosen Mustang for this. For anyone who would be willing to help, I'd be very grateful if you could answer some questions about the new features that are going to be included in this release of Java. If you can help, please either post a response to this message or send your reply to my mustangqa@verizon.net email address. I've selected a small number of new features and am asking two questions about each one: how likely are you to use that feature at some point in the future, and how important that you believe it is for the feature to be bug-free / work as documented."

In Re: Comparison operators by value, kcpeppe tempers calls to fix autoboxing. "Yes, you are absolutely correct in your assesment of autoboxing. This is but one of the reasons that I started editorializing against Autoboxing before the 1.5 was released. Autoboxing has been ill thought out. But unfortunately we 'needed' it for its cool factor! The biggest problem that said.. 'humm, maybe we should think about this again before releasing them into the wild ' is the does 0 == null or does 0 == 0 question. That the answer to this question is intractible suggests that autoboxing is the wrong answer to a real problem. In fact, Smalltalk supports primitive math operations. It does so without exposing the details of primitives to developers. I'm not suggesting that Smalltalk had all the answers to these questions however, it does indicate that there is a much better way to notationally handle primitives. Unfortunately the gene is out of the bottle and there is no putting it back."

In Also in Java Today, Figuring out a remote problem can be made simpler by creating a checklist of preconditions and tests to run against a troublesome system. Running this automatically can save you and your users time in finding the problem. Surprisingly, Ant is remarkably well equipped to run a wide battery of tests. In Diagnostic Tests with Ant, Koen Vervloesem shows how to set up an Ant-powered battery of diagnostics to figure out what's wrong before you spend hours on the phone with an angry customer.

In his Artima blog entry Back to Generics: Contravariance and Erasure, Bruce Eckel (author of Thinking in Java) writes: "The Concurrency chapter is finished (hurray!), and now I re-wade into the mysteries of Java Generics. The chapter isn't looking as bad as I was remembering, but there are still some issues that I'm struggling to understand and explain."


In Projects and Communities, Daniel Brookshier's weblog entry New Projects in the Education and Learning Community highlights some early-October additions to the GELC, including an open source "clicker" implementation, a project for comparing path-planning algorithms, algebra computation software, an open-source grading system, and more.

The article Automate your team's build and unit-testing process shows how to set up a Linux system to build your code and run unit tests every time the code changes. This approach uses daemontools to keep CruiseControl running as a service. It also shows how to work with Maven and manage dependencies between projects.

 

In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Announcing your project  
kfarnham

Crystal Ball Blog

Posted by kfarnham Oct 14, 2005

Discovering the Next Big Thing

Where did the AJAX wave come from? Or, last year, Hibernate? I'm not asking about how these are coded -- after all, one is an informal collection of practices, the other an open-source project -- I'm asking how is it that so many people came to be so aware of and enthusiastic about these two. After all, they are two of the biggest developments in the Java landscape in the last eighteen months.

With AJAX, it's not like things started with a press release, feature article, developer blog or anything like that: I think we all saw Google Maps for the first time and wondered "How the heck did they do that?!" That seems typical of Google, though, famous for letting their actions do the talking for them. I seem to remember the first word I got ofGoogle Talk came on the O'Reilly Editors List, from people who'd noticed the appearance oftalk.google.com and discovered the standard Jabber ports were open and operational.

Trying to understand where the buzz comes from is what's behind the latest java.net Poll, which asks "What is your preferred source for learning about new products and projects?" Please cast your vote on the front page, then visit the results page for results and discussion.


In today's Forums,linuxhippy redirects the discussion in Re: Best x86 processor for float/double performance: "To be honest when really writing number-crunching code I would recommend writing the low-level code which does actually the crunching in C and only the suoftware arround it in Java - this is the way we wrote our applications and we was able to nearly double performance. The reason is that modern C-compilers are able to vectorize code, which means they can e.g. pack 4 integers into an SSE register and perform the same instruction in one cycle on all 4 data elements, which the server-jvm is till now not able to optimize. Another problem with our code was random array access which could not be optimized away by hotspot."

riccardocossu is tyring to get an international sense of Application devlopers salary: "I read this article linked on java.net: Survey: Some AppDev Pay May Have Peaked. There I can read: 'By development language, programmers in CICS and COBOL shops fare best, drawing average salaries of $72,100 and $70,200, respectively. VB programmers came in at $65,100, while Java was ranked at $63,500' In the past weeks I read more articles on the same subject, but these salaries look very high to me, compared to what seems to be the average in Italy: I mean, in Italy a Java programmer usually gets no more than 30-35K Euros per year (gross income), which is about 40,000 U.S. dollars (I don't know whether this is gross or net income). Most of them (me included, I have over 2 years of experience and a CS degree) take much less (18-25K gross). Is it that IT professional in Italy are much less appreciated or am I missing something - just to know?"


Andreas Schaefer tests Drools Performance Limits in today's Weblogs: "I had the chance to test the Rules Engine Drools and even tough I like it I concluded that Drools did not perform as we had expected. The main reason to drop Drools where that the number of elements participating in the rules where not confined to a small number. My tests showed that Drools is fine when either the number of elements in the test is small or when the many of the possible combinations can be removed because of failing conditions."

In Blog Bridge and performant Swing applications, David Herron considers how better programming techniques will improve Java desktop applications, using Blogbbridge as an example. "Blogbridge, if you don't know about the application, is a really good RSS/newsfeed aggregator that runs on your desktop. Unlike webservice style aggregators, you have a real GUI with some nice and interesting features. As a Java app it will run on any platform having Java."

In The Open-Source Jini Landscape, Sebastian Lohmeier writes "About half a year after Sun released the Jini Starter Kit under an open-source license it is time for an overview over open-source Jini projects."


In Projects and Communities, Forever For Now's Java SE 6.0 Aesthetics Preview takes a look at the look of Mustang, carefully examining the current state of visuals on Mustang, running on Ubuntu Linux. The article takes a particularly close look at the state of subpixel rendering on LCD displays and the GTK look and feel as updated for Mustang.

The latest version of the Java API for XML Processing (JAXP), 1.3, is included in J2SE 5.0, and the article Easy and Efficient XML Processing: Upgrade to JAXP 1.3 helps put it to good use by highlighting JAXP's XPath and schema support, security enhancements, and more.


In Also in Java Today, Justin Gehtland and Bruce Tate, authors ofSpring: A Developer's Notebook, define Spring as "a lightweight container, with wrappers that make it easy to use many different services and frameworks. Lightweight containers accept any JavaBean, instead of specific types of components." In What Is Spring, Part 1, they show how to automate and Spring-enable an application. This article is the revised first chapter of the book, and corrects errata from the first printing.

Want to "learn how to combine the power of annotations with aspects to provision enterprise services declaratively, in an EJB 3.0-compatible manner, while still providing container independence"? Author Rod Coffin invites you to Try Declarative Programming with Annotations and Aspects. The article shows how to write an EJB 3.0 compatible bean and provision it with declarative transaction management, security, and resource injection by writing a few simple aspects.



 

In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Discovering the Next Big Thing  
kfarnham

Itch In My Brain Blog

Posted by kfarnham Oct 13, 2005

Is it still OO if we don't get to subclass?

Our "(Not So) Stupid Questions" series returns today with the Feature Article, Inheritance vs. Interfaces, which asks the question "When should I implement an interface, over inheriting from a parent class?" Seems simple enough, right? But there's a story here about how much times have changed. Take a look through your favorite object heirarchy -- say, Component to Container toJComponent to JButton -- and look at all the extra stuff you pick up. Ken Arnold has rather famously complained that the major Swing classes have hundreds of methods, most of them inherited and most of them irrelevant to the typical developer's use of the class. Sounds like a strike against inheritance. In fact, we ran a feature a few months back called Breaking the Last Dependency which was determined to eliminate dependencies on concrete classes. The Java community's sense of design smell seems to have tilted heavily against inheritance in recent years.

But is this really practical? Aren't there times you should inherit common functionality? Should we be using delegation instead?

We've tried not to load down this piece with too much of our own commentary, because the point of the "(Not So) Stupid Questions" is for you to weigh in with your comments in the talkback section. Please let us know what you think, and why.


In Projects and Communities, the SDN tutorial Developing a Portlet Application "explains how to use the Sun Java Studio Creator integrated development environment (IDE) to develop a JSR-168 compliant JavaServer Faces (JSF) portlet application to provide content for a portal." The tutorial introduces the view/edit/help modes of portlets, and shows how to set values on a portal page by working with a session bean.

Put on your headphones or turn up your speakers as NetBeans' Roman Strobl offers aNetBeans IDE 5.0 Beta Demo. This Javalobby Expert Presentation is a like a conference session on your desktop - you'll see the slides as Roman narrates. His presentation covers the Matisse GUI builder, new editing features, CVS improvements, enterprise development, plug-in support, and more.


Dalma debuts in today's Weblogs. InIntroducing Dalma Project, Kohsuke Kawaguchi explains: "I've been working on a workflow engine that lets you to write asynchronous, conversational programs in a very productive way."

Kelly O'Hair has a guide for Building the JDK 6.0 on Windows XP: "You too can leap tall builds in a single bounded thread, be faster than a speeding html bullet item, and yes, even build JDK 6.0."

Finally, in Open Source Contributions, Jacob Hookom says "All of this JBoss finger pointing is getting old."


In Also in Java Today, the O'Reilly Network Databases site is featuring Josh Berkus' latest "Database Soup" entry, InnoDB and the Compromise of Dual Licensing, in which the author says Oracle's purchase of Innobase rattles not only MySQL, but the whole idea of dual-licensing. "Suddenly the whole MySQL it's-GPL-but-you-can-pay-for-a-commercial-license house of cards is feeling a draft, and you can see people thinking: what would happen if Oracle bought MySQL? [...] What would it matter if GPL MySQL was still out there, if all of the developers were working for (or restricted by non-compete with) Oracle, who also owned the trademark, the web and SCM servers, and the original copyrights?"

Most mobile Java games today employ 2D, but the emergence of 3D-capable portable devices like the PSP point the way to a 3D future on the device. In the first part of a series, Claus Höfele's 3D graphics for Java mobile devices, Part 1: M3G's immediate mode takes an initial look at the Mobile 3D Graphics (M3G) API, by introducing the low-level "immediate" mode for rendering 3D objects, allowing you to control lighting, camera, and materials.


In today's Forums,kgh has a reminder about Mustang feedback in Re: Recent builds: problem with Intellij IDEA: "Everyone: We really do want to make sure that Mustang is fully compatible with Tiger so that all existing applications can run unchanged. So if people hit situations where they are seeing problems with an existing application because of some change in Mustang, then please let us know and we will try to get things fixed!"

In Re: JDK collaboration bug fixes in recent Mustang builds,cayhorstmann writes: "Thanks for the update! I now see a couple of my submissions "in play". However, I am still looking for one submission, a fix to bug 4827318 that also includes an enhancement of interest to the ACM Java Task Force. The enhancement modifies the program launcher. if "public void main(String[])" exists and is not static, and the class has a default constructor, the launcher calls the default constructor and the non-static main. Of course, if main is static, the launcher does what it always did."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Is it still OO if we don't get to subclass?  
kfarnham

If I Didn't Try Blog

Posted by kfarnham Oct 12, 2005

Join the Mustang bug (fix) parade!

If you've been following along with John O'Conner's Blog, you'll recall that he's currently relating, in a series of dispatches, his effort to become a Mustang contribor and to start with some simple fixes.

The obvious message: if he can do it, you and I can do it too.

In his most recent entry, he reports that he has been granted contributor access, and now is up against the question of what he's actually going to fix. Several comments on his blog offer ideas for simple, popular bugs that could be fixed in a straightforward fashion. This coincides with several threads in the forums. One, JDK collaboration bug fixes in recent Mustang builds, offers a periodic listing of outside contributions to Mustang, and Hunting wabbits... erm, bugs is a request for a list of "smallish" bugs that would be good places for contributors to start.

This is an interesting series to follow, and it'll be great to see John's code in a future Mustang source snapshot.


The Mustang contribution story continues in today's Forums. In Re: JDK collaboration bug fixes in recent Mustang buildsmthornton writes: "A few suggestions for small bugs have been posted to John O'Conner's blog. Also some possible fixes for bug 4117557 (in top 25) are quite simple, but there may be more trouble deciding what is the appropriate way to fix it. The 'simple' solution would be to prevent user.dir from being changed from within an application (throw an exception), and if specified on the command line, the launcher can just change the current directory to the given value before proceeding further."

kriegj stands up for Generics in Re: Java Generics and the Kiss principle: "In all of my development, I often found that I would leave comments in the JavaDoc like "This must only contain objects of type [blah]". Generics gives me a simple way to let the compiler know these restrictions, so that it can detect violations at compile time. Previously, these bugs would not be caught until runtime. In fact, as a result of my efforts to retrofit generics to all of our code I managed to find one or two bugs of this type that had hitherto remained hidden. I have managed to specify our APIs a lot more rigorously and I have a lot more confidence in the robustness of our implementation."


In today's Weblogs. Andreas Schaefer contrasts Open-Source vs. Big Bucks: "What a disappointment! After feeling betrayed by the JBoss Inc. with the trademark lawsuits now also Linus Torwald seems to do the same thing with Linux. Yesterday I was attending a presentation about Java 6 (Mustang) and some of the discussions turned around Sun and open-source. Finally, I guess, I have to admit that maybe Sun is more trustworthy company with respect to open-source than some of the bigger open-source projects."

In The story of the write cache and half a worm, David Van Couvering offers "A cautionary tale about performance testing and database durability and consistency."

Gregg Sporar has some NetBeans JSP development advice in Creating a Data Source and a Connection Pool: "My blog the other day about using the HTML/JSP palette left out a step: creating the data source and the connection pool."


In Also in Java Today, Is the next step in web application development to move up the stack from the API level to the tool level? The Eclipse Web Tools Platform (WTP) "provides a set of well-rounded and tightly integrated tools that simplify the creation of often complex web and J2EE applications." In Eclipse Web Tools, Lawrence Mandel and Jeffrey Liu show how to build a common EJB-DataStore-JSP web application in Eclipse, letting Eclipse and WTP do most of the heavy lifting.

"Many developers are still sceptical about the benefits Business Process Management (BPM) systems and workflow engines. BPM visionaries and management executives seem unable to pass their enthusiasm about BPM to developers." In Simplified BPM for Developers, the first of a promised series of blog entries on the topic, JBoss' Tom Baeyens lays out what BPM is and what it brings to the table for developers.


In Projects and Communities, the Games Showcase Forum offers a place where members of the Java Games Community can show off their work, and discover Java games written by other developers. Topic areas include sports, shooters, RPG's, mobile games, tech demos, and more.

The 56th JavaTools Community Newsletter announces the graduation of Jen from the community incubator. Jen "is a high-level Class transformation and generation library" which tries to abstract common use cases into just a few method calls.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Join the Mustang bug (fix) parade!  
kfarnham

Fix Your Gaze Blog

Posted by kfarnham Oct 11, 2005

Looking for bugs in new places

Do you give much thought to configuration files? Do you think of them as part of your application, on par with the Java code itself? On the one hand, this is pretty much obvious: take away the config files and your program may not work at all, so of course they're "part" of your app. On the other hand, they're obviously relegated to second-class status in developers' eyes, because you don't see tools falling over themselves to expose, support, and debug config files with anywhere near the functionality provided to source code files.

Still, we've moved from the idea of a configuration entries as simple things like "default directory for saving files" to uses that express business logic: Drools uses them for the rules themselves, and Hibernate stores the critical object-relational mapping in external config files. This is great for making quick changes in the field, but are we exercising due diligence in making sure these files areright, at least as much diligence as we're applying to our Java source code?

This is the problem considered in today's Feature Article,Unit Testing Hibernate Mapping Configurations. In it, Johannes Brodwall uses JUnit to carefully step through a process of writing a test, then a Data Access Object, then wiring it up to Hibernate, etc., all for the purpose of fully exposing your data mapping, including the Hibernate configs, to unit testing. Once everything compiles and still doesn't work, he shows how to examine and understand the error messages to understand what is happening in the mapping configs, and what you need to do about it:

Unit tests for Hibernate configuration are very useful whenever the mapping or the mapped classes change. A properly written test of the Hibernate configuration will help you if you add, rename, or remove a field in the class but forget to update the Hibernate mapping file. During development, testing the configuration early can help you get the trickier bits of Hibernate, such as inheritance and relationships, right from the start, saving you lots of debugging effort down the line.


In Projects and Communities, the JCP Elections are underway, with the ratificationphase open to eligible members through Oct. 17. The Executive Committee guides the evolution of Java, and consists of both major stake-holders and other community members. All JCP JSPA 2 Members are eligible to take part in the ratification, nomination, and voting processes.

Java Developer Journal has a "Post-Google" Q&A With Sun About the Java Desktop, in which Thorsten Laux, Director of Java Desktop Engineering for Sun, discusses the recently-announced Sun-Google partnership, including the value of JRE downloads, Google's JCP participation, surprising Java desktop development statistics, and the role of OpenOffice.


In today's Forums,coxcu is trying to understand a performance problem inSwing CPU-bound in sun.awt.windows.WToolkit.eventLoop: "Every once in a while, I'll have a Swing application that is CPU bound on Windows. So, I'll profile it with -agentlib:hprof=cpu=samples or something similar. [..] Judging by the profile, sun.awt.windows.WToolkit.eventLoop is clearly the problem. Yet, I have no idea what it is doing or why it is being invoked so much. What should my next step be? Is there some way of determining what the real problem is?"

mvatkina answers questions about GlassFish's EJB 3.0 readiness in Re: EJB 3.0 EntityBeans: "This is work in progress. As such it has some features still to be added. Any preview edition is what it is - a preview, in particular if the spec itself is being changed. EJB3.0 persistence support in GlassFish uses .par archive format for packaging, and does not survive server restart. You can try to use SolarMetric's EJB 3.0 implementation for application managed entity managers, but most probably it won't work for the container managed option, as the spec does not define full pluggability at this time."


In Also in Java Today, the article Open Source and Web 2.0 recaps a panel discussion at the Web 2.0 conference hosted by O'Reilly Media founder Tim O'Reilly and featuring Sun President and COO Jonathan Schwartz and Mozilla Foundation President Mitchell Baker. In discussing the value proposition of open source, Schwartz said "everything Sun does will be open sourced. Everything." He and Baker also commented on Sun's model of renting out CPU time for one dollar per CPU hour.

An SOA success story, Service-Oriented Architecture (SOA) Takes a New Route describes the creation of a "credit aggregation management system" for use in 80% of U.S. auto dealerships. The system uses an SOA approach to coordinate disparate credit application, loan verification, and credit-reporting systems. The article interviews T. N. Subramaniam, chief architect and director of technology for RouteOne and Sun's Ashok Mollin about this project and other SOA topics.


Romain Guy reveals an Unexpected Java Tool in today's Weblogs: "While looking for an efficient graphing tool for Windows, I discovered a very interesting feature of Maple..."

William C. Wake checks in with a NASAGA 2005 conference trip report: "NASAGA - North American Simulation and Games Association - had its conference Oct. 5-8, 2005, in Machester, NH, USA. I was at the NASAGA conference, and posted this quick report."

The Mustang contribution odyssey takes a positive turn in John O'Conner's latest dispatch, Contributing to Mustang: Contributor status granted: "After only two days, my faxed contributor agreement was processed, and I'm an official contributor."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Looking for bugs in new places  
kfarnham

Everybody Else is Wrong Blog

Posted by kfarnham Oct 10, 2005

Debunking Java performance myths

OK, just skip straight to it: Java theory and practice: Urban performance legends, revisitedby Brian Goetz, featured in the Also in Java Today section. This puts to rest a lot of widely-believed bad information about object allocation performance, and retires once-good advice that is no longer recommended.

While you're at it, enjoy the Slashdot discussion associated with this article. My favorite part is that when browsing the comments for scores of 3 or higher, more than 85% of the comments are filtered out. As eager as the Slashdot readership is to comment on the Java performance story, they're apparenly barely able to score moderation points from their peers. So many anti-Java posts, so little of value posted. So who's surprised?

Oh well, a week from now, when someone else is posting "Garbage collection in Java is slow" as a matter of commonly-accepted fact (a big lie is more like it), they'll only have themselves to blame for their ignorance.

James Gosling pivots off the Slashdot discussion to offer an amusing case study of his own. In the weblog posting Java Urban Performance Legends, he writes:

There was a funny incident at a recent developer event where some folks had a booth where they where demo-ing a high end industrial strength C compiler and had a benchmark that they had transliterated into Java. They were comparing their compiler to GCC and Java. GCC was running at about 2/3 the performance of this high end compiler; the Java version was running at about 2/3 the performance of the GCC version. Folks were gathered around the booth and someone noticed that the script they were using to run the Java version didn't have optimisation turned on. A few seconds with vi to add the "-server" switch and Java's performance jumped up to match the fancy C compiler. This got the pro-GCC crowd all excited, so a bunch of them started fiddling with its command line switches. They got a bit of improvement, but not much (the original selection had been pretty good).


By the way, Happy Columbus Day, Canadian Thanksgiving, and Sports Day (Taiiku no hi).


Also in today's Weblogs. Felipe Gaucho wonders if we're Using elephant bullets to kill small ants: "Few years ago people produced bank applications with less than 1Mb of memory (do you remember ambar screens?). Nowadays, any computer without 1Gb RAM seems useless for the developers... If one starts a simple project without thinking about its size, a system could depend on 10 Mb or more just to read mail and save files, and that's a quality concern."

Andreas Schaefer sees a culture conflict in JBoss: Big Bucks vs. Open-Source: "So far Marc Fleury and the rest of the JBoss Inc. could hide their business agenda behind the JBoss open-source project but finally they feel that they can afford to let the business take over because they are now so successful."


In Also in Java Today, O'Reilly Media founder Tim O'Reilly writes, "In the year and a half since, the term 'Web 2.0' has clearly taken hold, with more than 9.5 million citations in Google. But there's still a huge amount of disagreement about just what Web 2.0 means, with some people decrying it as a meaningless marketing buzzword, and others accepting it as the new conventional wisdom." In What Is Web 2.0, O'Reilly clears away the clutter by identifying the guiding principles that are behind this movement, and he includes examples of how applications and businesses have risen and fallen based on their adherence to or ignorance of these ideas.


This week's java.net Spotlight, features the NetBeans Mobility Pack:"Got questions about the NetBeans Mobility Pack? This week, the Sun Developer Network's Ask The Experts event is featuring Product Line Manager Matt Volpi and Technical Lead Petr Suchomel answering your questions about this J2ME coding / testing / debugging tool, including questions on the the recently-released NetBeans Mobility Pack 5.0 Beta. This event runs from Monday to Friday, October 10-14."


In Projects and Communities, the Java Web Services and XML Community home page notes the commentary SOA: Still Kicking Tyres?, which notes inconsistent stats estimating SOA adoption. "Most organizations seems to have 'plan' to adopt SOA, though I suspect many of these are the same plans they had to adopt Web Services before SOA became a more fashionable term."

The article Building A Complete NetBeans Platform Application shows how to use NetBeans to build a desktop application, creating and combining modules that make up the application. The code originally was a stand-alone Swing application, and the article shows how this "port" exposes differences between typical Swing practices and "The NetBeans Way".


In today's Forums,amitkulz proposes a Cool new lint option: redundant casts and feedback: "On hindsight, I think it would have really helped if instead of pointing to the exact line of warning i.e add(E) unchecked conversion , javac should also suggest solution in the warning [...] Is this too much to ask? javac knows what the problem is at this point. It maybe (may not be?) just a cosmetic improvement, but it would help to go directly to the offending line number and clean it up. Without Angelika Langer's FAQ I would have taken a bit longer to understand what was wrong."

In Re: Proper Number abstractions and arithmetics,mthornton writes: "The proposed support could easily be provided for a closed collection of Number classes. Allowing custom Number classes to be included would be more difficult, but not impractical. However the simpler option would probably suffice for many potential users. So just add Fraction and BigFraction classes and then hard code the arithmetic methods to behave in the obvious manner. So Integer div Integer results in either a (Big)Fraction or an Integer. The existing MathContext class could be extended to provide additional control where required."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Debunking Java performance myths  
kfarnham

State of Confusion Blog

Posted by kfarnham Oct 7, 2005

Blame the "Bean"

Sometimes I wonder if it's just too easy to heap scorn on EJB 2.1. Maybe it was bold to do so when Spring and Hibernate went their "better, faster, lighter" way, and maybe it was made acceptable by the EJB 3.0 spec smoothing over more baroque aspects of EJB to make it less of a hassle to work with. Setting aside the fact that lots of people have gotten EJB 2.1 to deliver for them, I still constantly see writers who are generous, even gratiuitous, in slamming EJB 2.1.

Which is fine, of course. I like opinionated writing. Here's my question: if EJB 2.1 was such a fiasco, something that everyone seems to agree on now, how did we go down this road, and how do we avoid doing it again?

You're welcome to whatever opinions you might have about the JCP, "ivory tower" design methodologies, open source, etc. John Reynolds thinks the whole thing can be traced to a single word:

Java Bean was a cute pun. What better name for a nice little package of Java functionality; but when you look at the Sun's definition for Java Bean, it becomes pretty clear that the original analogy didn't anticipate Enterprise Java [...] If the word "Service" had been used instead of the word "Bean", J2EE would have made more sense.

In his blog entry How Beans side-tracked Enterprise Java, John spells out how to re-imagine Remote and Entity beans in terms of services, and how things fall into place when you do.

Also in today's Weblogs, Kirill Grouchnikov continues his presentation of an Office-like "ribbon" GUI in Ribbon and smart resizing: "In my previous entry, the Java implementation of Office 12 Ribbon component was introduced. This entry shows much more mature version, complete with gallery buttons, in-ribbon galleries and smart resizing."

Hans Muller ambitiously tries to blog about Open Source Bluegrass: "Here's a blog that purports to tie three themes together: music, the open source movement, and the effect of type parameters on the java.util classes. The fact that it achieves none of these things should not stop you from reading it."


The new java.net Pollasks "How many technical conferences do you plan to attend in the next 12 months?" Cast your vote on the front page, then visit theresults page for results and discussion.


In Projects and Communities, the Java Web Services and XML Community page is featuring Subbu Allamaraju's weblog review ofXML and WS Talks at BEA World 2005, which discusses SOAP extensibility vs. REST, changing schema, the proper role of extensions, and versioning web services.

The Deployment project is a SwingLabs effort "to provide tools for simplifying the process of deploying desktop applications. The project's initial focus will be on providing Ant tasks, a JNLP download servlet, and detailed documentation. Future tool ideas include tools necessary for making executable Java applications."


In Also in Java Today, the Integration Developer News article Survey: Some AppDev Pay May Have Peaked reports: "Despite signs that new SOA and web services projects seem to be gaining corporate acceptance, the uptick in new projects doesn’t seem to be boosting salaries increases for appdev programmers or managers. Enterprise Systems 2005 IT Salary Survey finds a wide range of hands-on and manager salaries may have peaked in 2004, in fact. While the Enterprise Systems 2005 IT Salary Survey find the IT job market 'strengthening' over the past year, it’s far for clear sailing for a wide range of IT professionals, including those in application development."

How do you test J2EE application performance? Do you just have as many testers as are available run the app? Do you throw it under an unrealistic load just to stress test it? Matt Macaux says you need a plan: "As with any software development process, you must gather requirements, understand the business needs, and lay out a formal schedule well in advance of the actual testing. The requirements for the performance testing should be driven by the needs of the business and should be explained with a set of use cases." In the dev2dev article Approaches to Performance Testing, Matt shows the differences between benchmark, soak, and peak-rest testing, and what each one can show you.


In today's Forums,danielmd wants to know How do i get a Flash movie to play on a Netbeans Plugin? "Hi all, I'm trying to get a flash movie to play on a NetBeans plugin, or help system. As far as i know the only HTML renderer that NetBeans supports is the Swing Html renderer that does not support Flash movies. Is there any other Renderer that i can use that will allow me to do something like this? Can i use another renderer to do this in a way that does not break consistency with the IDE? Is JDIC an option? All the best any clues, workarounds, ideas, just post away."

jwenting criticizes a proposal Re: javac or new tool to create native wrapper: "Sigh, more people trying to have Sun solve their own configuration problems. And for what platforms? I develop on Windows for deployment to half a dozen different platforms, most of which do NOT have a JVM supplied by Sun. Sun (and every other development kit maker) would have to supply a native compiler for every single platform on which a JVM can be deployed, which is completely unrealistic."

In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Blame the "Bean"  
kfarnham

Get Back On Line Blog

Posted by kfarnham Oct 6, 2005

Re-discovering RMI

Back in Java 1.1, RMI was great. Even when it wasn't. And what wasn't great was something you figured out when you'd already committed and it was way too late to turn back. For me, it was the choice to use two-way RMI, allowing a server to call back to clients on a LAN with an event-like scheme. Really pretty code. It's just that it had a tendency to not work across internal firewalls. Also, when the server had multiple IP addresses -- one each for the ethernet port, modem port, and a satellite receiver card that we streamed data to -- knowing which one the RMI registry would bind to was a non-deterministic proposition. And of course, network admins never saw a port they didn't want to block, which clashed with RMI's desire to grab any open port to bind a service to.

A lot of these problems have been addressed over the years, as RMI has continued to evolve.

RMI is the underpinnings of distributed Java. At this point, it's easy to develop a J2EE application and not even realize all the RMI calls you're making. Many J2EE API's can be, but are not required to be, implemented with RMI. The fact that so many actually are implemented with RMI speaks to just how far it gets you.

So what's new with RMI? In todays Feature Article, Krishnan Viswanath looks at three key features of The New RMI:

Introduced with Java 1.1, RMI has been steadily evolving with every major release and has seen the introduction of three new important features with the release of Java 5.0. The new features include support for dynamic stub generation, RMI over SSL, and the ability to launch a Java RMI sever as an extended Internet service (xinetd) daemon in Unix systems. I


In Projects and Communities, on Saturday, autonomous vehicles will compete in the 2005 DARPA Grand Challenge. The Java-powerd dune buggy Tommywill be one of the participants, and the interview Java and Robotics: A Conversation With Tommy Architect Paul J. Perrone reveals some of the ways Java is being used in the project.

Blogger David Coldrick has updated his guide to Java development on the popular Linux distro, Ubuntu. In Java Development on Ubuntu - Part 1 - Installing Java he shows how to work with the Debian package managers like synaptics or apt-get and the "fakeroot" tool to create a Debian JDK package.


In Also in Java Today, the Java Contactless Communication API (JSR 257) enables mobile devices to communicate via short-range wireless means, such as RFID, infrared light, or even Bluetooth, and presents such devices via a simple, homogeneous interface to Java applications.The Web Within an Arm's Reach explains the role of the Java Contactless Communication API in the emerging field of near-field communications, and provides an example of reading data from any contactless target, including an RFID tag.

Last week's announcement of a collaboration between JBoss and Microsoft was greeted with a mixture of surprise and alarm. In JBoss and Microsoft, JBoss CEO Marc Fleury says that although the two companies are on "opposite sides of the open source philosophical divide", the collaboration's goal is to enable JBoss to run better on Windows. "Ironically, Java is what enables so many of you to run Windows with our apps: the end-user gets to choose what platform he deploys on and Windows Server gets to compete on the serverside just like any other OS. Thank Java for that unlikely cooperation."


David Van Couvering shares some lessons learned about dealing with the community in today's Weblogs. In Open Source Development: Diplomacy Training, he writes: "Making changes in open source projects requires consensus, consensus, consensus. My lessons in trying to introduce a model for sharing code in Apache Derby."

In a followup to his SOA blog, James Gosling says Only solve the problems you need to solve: "I got a lot of email about my previous post, a lot of it centered on JINI, RMI and CORBA. Not too many months ago, during the hypon flux storm [by analogy with bogon flux] surrounding SOA and Web Services it was worth one's life to mention that folks had been successfully implementing SOAs for years. That has calmed down significantly."

"James Gosling asks if SOA is Real Meat. The answer probably requires a change of perspective." John Reynolds explains this inSOA: Real Meat, and Potatoes too


In today's Forums,losangeles is asking a non-obvious question about How to obtain source code: "I just have a stupid question. I'd like to get the source code of mustang, but I can only get the source snapshots e.g. jdk-6_0-ea-src-b53-jrl-22_sep_2005.jar and I can't get it to work and I don't have the tools that are needed to build it etc. I only want the files, that contain the source of the different Classes, Intefaces, etc. just as in previous versions of JDK that included a src directory. Is this somehow possible?"

In Re: javac: new feature ==> add more synchronization/deadlock checks jwenting writes: "The compiler can't know in which scenarios you're going to use your class, and therefore can't be expected to guarantee thread safety. Thread safety isn't a code syntax or grammar issue anyway and therefore not the compiler's responsibility (just as it's not up to the compiler to guarantee you can never get an NPE when calling a method with a null argument). Indeed put down the debugger and learn to design your software with thread safety in mind."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Re-discovering RMI  
kfarnham

Misfits Blog

Posted by kfarnham Oct 5, 2005

Asserting Java's place in Web 2.0

The Web 2.0 Conferencekicks off in San Francisco today -- check out the Conference Coverage page for updates and developments -- and it provides a moment to think about what Java's role in this evolving online experience will be.

Seriously, think about it for a minute. Java is well-equipped to deliver on a lot of the Web 2.0 ideals, if only the tech elite will take a fresh look at it.

It's hard to shake the idea that Java isn't cool anymore, whatever that means and whatever value being cool might have. Java is an entrenched tool of business, and an absolutely indispensable skill-set for millions of people who make a living from it, developing real products that provide real value. All of which probably works against it in the mind of the clever and inspired hacker who's supposedly all but destined to create the Next Big Thing. Some are very happy to dismiss Java as a cleaned-up C++ with lots of CORBA-ish tendencies (Paul Graham, in Java's Cover, and later in Hackers and Painters, makes these kinds of arguments).

OK, well, given all this talk about what great things are going to be done in the future, let's give a little credit to what's going on right now. Web 2.0 is all about open participation? I'll see your rhetoric and raise you 18,000 Java-based open source projects (2,300on java.net, another 16,000on SourceForge, which benefitted from a many-year head start). Shall I throw in the Java Community Process, which allows industry, professionals, and qualified individuals to steer the future of the platform?

Rich user experience and freeing software from the tyranny of the single device? Been there, done that, bought the J2ME game.

I'll have more to say about this elsewhere, but the idea that Java is being ignored for the sake of demonstrably inferior options is too annoying for just one blog.


Graham Hamilton clarifies yesterday's big Sun-Google announcement in today's Weblogs. In Java SE and the Google Toolbar, he writes: "Sun has announced an agreement with Google to distribute the Google toolbar along with consumer Java SE downloads from java.com. Here's what is happening and why."

James Gosling is wondering about service-oriented architectures. In SOA: Buzzworld Whiplash or Real Meat?, he says: "There are a lot of corporations, analysts, consultants, experts, "experts" and pundits saying a lot of things about SOA, without a lot of consistancy about the meaning of the term. When you expand the acronym to 'Service Oriented Architecture' you get a pretty good, but broad, picture."

John O'Conner continues his quest to participate in Mustang. In his latest update, Contributing to Mustang: Waiting on a fax reply, he writes: "After sending in the fax, one must wait for a reply. Hopefully, I'll be bumped to 'contributor' status. "


In Also in Java Today, Java Developer Journal analyzes yesterday's partnership announcement in Sun-Google Partnership: Is It About Money, or About Microsoft? Noting the announcement that Google Toolbar will be included as an option in downloads fromjava.com, author Jeremy Geelan goes on to say: "But the key to this partnership more likely lies in the second part of the announcement, which was that the companies 'have agreed to explore opportunities to promote and enhance Sun technologies, like the JRE and the OpenOffice.org productivity suite.'" He also notes that Google CEO Dr. Eric Schmidt's statement that the two companies would explore further collaboration "must surely have sent tremors through the entire Redmond campus."

Have you been looking for a way to get your application to perform some task at regular intervals? Do you need to do something not just every n seconds, but at cron-like intervals, say "weekdays at 3 a.m."? This isn't particularly straightforward with Dates and Threads, and such an approach won't survive a restart anyway. Fortunately, the Quartz framework, part of the Open Symphony collection of projects, makes this type of job scheduling a snap. In What Is Quartz, Chuck Cavaness explains the history and ideas behind Quartz, looks at its architecture, and shows you how to put it to work.


In Projects and Communities, the NetBeans IDE 4.1/5.0 Profiler Tutorial introduces the NetBeans Profiler, showing the reader how to monitor heap memory size, garbage collection statistics, thread count and thread states. It also shows how to check the CPU time used by a method and monitor object creation. The article is for use with Milestones 8 or 9 of the profiler.

The Java Graphics Scripting Language (JGSL) project offers "a simple yet powerful language that will allow non-programmers to access the graphics capabilities of Java." The language is meant as a means of teaching computers to non-techincal users. Version 1.0 of JGSL is available and offers a framework for future expansion.


More Mustang ideas in today's Forums...darcy has a Proposal for Number sublcass API changes: "Looking at bugs/enhancement #s: 4838318, 4951623, 4951621 (and others) I propose adding the following Constructors/methods to the Number subclasses to reduce the number of calls to toString (and thus reduce the amount of garbage generated). I picked this subset of the java API since it is fairly compact and stand alone (doing the whole java.* api would be huge!) Good/bad idea? Comments?"

maretzke has a publicity-themed announcement in Mobicents mentioned in German "Java-Spektrum" magazine: "One of the leading German Java magazines published an introduction on JAIN SLEE in their latest issue. The article mentions Mobicents as a free and open source implementation of JAIN SLEE. The article is free for download. Ah, it is a German article. However, the last page of the PDF contains a table of available implementations"


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Asserting Java's place in Web 2.0  
kfarnham

Artificial Man Blog

Posted by kfarnham Oct 4, 2005

The continuing consideration of our intellectual successors.

"There seems to be an increasing level of this thing we cannot adequately define but are very capable of testing for various purposes: intelligence. Whether silicon based or human, the general level of intelligence is rising. The difference between our digital offspring and ourselves is one of degree, not direction."

In today's Feature Article,The Artisan and the Artilect, Part 2 Max Goff continues his consideration of intelligence, natural and artificial, and the implicit possibility (or is it an inevitability) that Moore's Law will eventually lead to an artificial intelligence more capable than our own. In this installment, he considers a question of "how do you get there from here?" In other words, was the emergence of natural intelligence strictly an evolutionary process of good luck? And does buying that require a leap of faith? And if that's not plausible, how else do you get there?

Thinking about these issues is important because it's the critical step in creating the so-called "artilect", the superior artificial intelligence: figure out what's so special about the human brain, and then do version 2.0. This premise sets up the forthcoming final installment of the series, considering the clash of wills that can be expected to accompany that effort.


You need to read today's Weblogs very carefully if you're to understand Bruce Tate's story about Joe, the Amazing Coding Monkey. By way of description, he blurbs "What an amazing couple of weeks. Beyond Java became generally available last week, and my pet monkey learned to code." But there's a lot more to it than that.

In A Read-only database?, Bernt Johnsen writes: "A read only database can be a useful thing. This application could be implemented as a small Java application on top of a SQL database. And yes, it's easy to make such an application with Apache Derby."

Osvaldo Pinali Doederlein wonders about the consequences as Tomcat goes Native: "The new version of Apache Tomcat will support a library of native code to speend some things up. Is this the end of the PureJava dogma?"


In Projects and Communities, developers looking to get involved with the Mobicents VoIP project can now learn the API from the Mobicents Examples 1.0 Beta 1, which offer a Resource Adapter tutorial by Michael Maretzke and a SLEE "wake-up call" example by Francesco Moggia.

Noting that there is currently a Java Sound implementation in J2SE without a JSR spec, the Java Sound JSR Projectaims to develop a JSR for sampled and generated sound. The project seeks support from corporations, professionals, and others.


In Also in Java Today, "We've all heard about the simplicity and power of the EJB 3.0 specification. And because this has proven to be true, we can't help but think that performance must be rather poor. After all, all that simplicity must come at a price." With this premise in mind, Peter Zadrozny and Raghu R. Kodali took Oracle's EJB 3.0 implementation and assessed its performance at common EJB tasks, such as using the Data Access Object and Session Facade patterns. In The Performance of EJB 3.0, they report that the results are very encouraging

Ever written a speech-driven application? They're few and far between. Aimee Silva blames this on the lack of a standard, well-known architecture: "To create robust voice applications, voice developers have had to be familiar with many languages, techniques, architectures, and processes. Compounding this problem, voice applications are often built using proprietary markup languages." In Creating Voice Applications with Reusable Dialog Components she shows how J2EE, JSP, and Struts developers can build voice apps with VoiceXML and the Reusable Dialog Component (RDC) open source project.


In today's Forums,prunge discusses a handy optimization in Re: Final as default modifier for method parameters: "I make it part of my coding style now to use the final modifier on all method parameters. Yes it does lengthen the parameter code a bit but I have found the benefits are worth it. While I do agree that the value of method parameters should not be modified, a language change to accomodate enforcing this IMHO would not be worth it. A very useful tool to enforce this coding style is CheckStyle. It has plug-ins available for most popular IDEs and build systems (Ant, Maven, etc.) and I have set it up so it flags any non-final method parameter as a problem (it shows up as a warning in the IDE). This is very valuable for enforcing this style, expecially when I started coding this way and would forget to make method parameters final half the time."

In Swing/JSP Compatiblity, smartinumcp writes: "Has any project given serious interest to developing a standard to allow client and web based versions for JSP and Swing. The current frameworks (struts, spring) actually push more work on the developer for the front-end then supporting multi-client environments. Our XML configuration seem targeted towards the server and persistence layers. Without a true standard at the HTML and desktop client level we will still remain bound to manual writing or rewriting code. I recommend Sun takes some of the lead on this to combat one of .NET's key strength and to keep the maintainability of our code for future iterations."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



The continuing consideration of our intellectual successors.  
kfarnham

Definite Maybe Blog

Posted by kfarnham Oct 3, 2005

Processes for making better software. We think.

The three weblogson today's front page might not immediately seem related, but they all have something in common: they're about the processes of programming that aren't just a matter of slamming down code to achieve some task. All of them address issues of quality and performance, but do so through the lens of how you write code, and how you assess what you've done. Does it work? Can you prove that it works? Is it fast? Good. Then a manager says: "Now change it."

This is the kind of thing they don't necessarily teach in school, and that you might not pick up from the typical open-source project, though process really ought to be a major part of both. Throw down code as fast as possible with no regard for quality for a year or two and you'll be lucky if it runs at all. But that's not an experience that's easily imparted by a one-quarter programming class in college, or by an open-source project owner who's already committing his or her precious free time to get something out.

Konstantin I. Boudnik continues his series on quality in Java. Quality. Metrics (part 2), of which he says: "Moving closer to the promises given in this blog, I will discuss some not totally innovative, but still interesting, techniques of improving quality development effectiveness.". He goes on to discuss code coverage and how his team is using it on their project. Apparently, there's a big audience for this message, as Konstantin writes:

Surprisingly, my last post was rated #1 by Google for 'java quality' search and lasted in this position for a few days. My friends were wondering how much I had paid to gain this honorable position. Honestly: I didn't pay a penny for it and I only have to thank those of you, who spent time reading it. So, thank you! I also hope not to disappoint you this time.

For analyzing problems at runtime, you may want to dump and inspect the heap, which Kelly O'Hair discusses in his blog entry Heap Dump Snapshots: "When tracking out of memory errors or just trying to understand why your application uses so much memory, heap dump snapshots can help." He also points out how the classic Heap Analysis Tool (HAT) has evolved into the jhattool that is part of the latest Mustang builds.

Extreme Programming is supposed to improve code quality indirectly, by improving process. But Vikram Goyal says it's time for him to get Off the XP bandwagon: "For some time now I went on the Agile programming bandwagon convinced that it was the next best thing since sliced bread. After a sustained year of practicing it, I am off the wagon. It is annoying, superficial and doesn't necessarily produce better results than traditional programming." This blog has attracted a number of talkbacks, both concurring with and disputing Vikram's criticisms.


Code coverage is also on the minds of developers in today'sForums. In Re: Code coverage, Mem-leak and performance tools,johnbchicago writes: "I've used Emma quite extensively and really like the html format of its reports. I've just found metacheck. I haven't tried it yet, but here's a description of it: "Metacheck is java code checking tool that read and parses results of 'real' code checkers, writes these results to a uniform lay-out and generates a meta result." The FAQ claims it can parse results from the following code checkers: checkstyle, cpd, findbugs, jcsc, lint4j, hammurapi, pmd, qj-pro, and revjava. Since I was running many of those tools separately, this was a dream come true. I'll post later on whether it lives up to the claims."

ran7377 is one of several puzzled Re: How can javaw take over XP?: "I also have a similar problem. I run XP SP2 with dual Pentium 4, 3.2 GHz processors and 2.0 GB of RAM. My sound card is Soundblaster Audigy 2zS and within 10 minutes of playing a POGO game my sound goes (however I can play music) then within a few minutes my system freezes and there is absolutely no movement whatsoever from the system and I cannot do anything but a hard re-boot. It also started doing the same thing using Adobe, Word, Excel, Corel and AutoCAD(losing all data). I disabled everything and tried a process of elimination and concluded it was my sound card although the problem stopped and Creative could not find a fault. Tonight I went to play a game that would not run with Microsoft and enabled Sun and within 10 minutes my sound died. I changed back to Microsoft and have now uninstalled the Sun. Is there not a fix out there for this?"

This week's Spotlightfeatures Flying Saucer: "The xhtmlrenderer project, better known as 'Flying Saucer', offers an XHTML renderer with extensive CSS support, completely written in Java. The most recent release offers better support for float and clear, absolute positioning, absolute units like inches and centimeters, percentage width and height values, image browsing, directory listing, and more. A Java Web Start browser demois available, showing off many of these new features."


In Projects and Communities, the Java BluePrints project hasannounced the first early access version of its Java BluePrints Solutions Catalog for Java EE 5. "This release includes design guidelines, code, and applications for AJAX and JSF applications." You can download the new catalog after accepting its click-through license.

The TrueZIP project offers an API that makes dealing with ZIP files more convenient than using java.util.zip, by allowing you to treat zip entries as if they were individual files or directories, instead of reading or writing all of the zip at once. It also offers such conveniences as cat(), copy(), archiveCopy() and more.


In Also in Java Today, the Integration Developer News article Nokia Eyes Mega-List of Mobile Java Tools describes Nokia's recent moves in the tool space: "Nokia, working with the Eclipse Foundation, wants to get the Java community to roll up its sleeve on providing architects/devs better support for building mobile apps. The mobile phone giant has proposed to Eclipse the creation of a Mobile Tools for Java project, which would be a broad-brush campaign to improve runtime, design and UI tools for all types of Java-based mobile apps -- both entertainment and for the extended enterprise."

"Thousands of companies all over the world are giving J2SE 5.0 a try, and they like what they see. New language features, enhanced class libraries, better tool support, and desktop enhancements are just some of the reasons why many companies are making the switch." In Sun Microsystems Talks With Li Moore of Google, the software engineer discusses his company's use of Java and its switch from J2SE 1.4 to 5.0.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Processes for making better software. We think.  

Filter Blog

By date: