跳过导航

editor

八月 2005 上个月 下个月
kfarnham

What Goes On Blog

发贴人 kfarnham 2005-8-31

Sanity checking simple code

Jeff Friesen's BlueJ article, posted yesterday, reminds me of one of my favorite tools when I was getting started in Java. In BlueJ, this is called the "Code Pad", a simple text area where you can input some Java code and execute it immediately. This allows you to test simple things, do some sanity tests, etc., without having to write a whole class.

This reminded me of the "Java Diddler", shown below, that shipped with Apple's Java SDK for the Classic Mac OS.

Classic Mac OS Java Diddler

The appeal of such a tool is that you don't have to write a whole class to wrap a couple of lines of test code and, depending on your workflow, pollute your history with the compiles for this test (it's always fun to discover later that the reason your code changes aren't taking is because you've blindly hit the up arrow in the terminal and re-compiled the wrong source over and over again).

Does such a tool matter when you're writing something like an EJB or some other object that's meaningless outside of its container? Maybe not, but those are the situations that cause problems for unit testing too, and maybe part of the reason we've seen a pull back towards POJO's and away from objects that are useless outside of potentially-complex, potentially-expensive containers.

By the way, are there little standalone compile-and-run scratchpads out there that you're using? Are they applications, applets, servlets, or something else entirely? This seems like a handy idea for a Dashboard or Konfabulator widget (hint, hint).


Chet Haase has a preview (with screenshot!) of things to come, in today's Weblogs. In Mustang, Swing, and NetBeans on Windows Vista: Looking Good! he writes, "I've been playing around with the Windows Vista Beta1 release lately, seeing how we're doing for compatibility and native look and feel. There are some minor issues that need to be fixed, but in general we're looking great."

Eamonn McManus has some tips for Compiling the JMX API in Mustang: "The Java SE sources are downloadable from java.net, and you can change and extend them within the constraints of the relevant licenses. But building the whole of Java SE is a major undertaking. Here's how to build just the JMX API. The same ideas would apply to building other subsets of Java SE that are Java-language-only."

In The next generation of languages, Malcolm Davis writes: "One of the first comments I heard when Java arrived was 'why are we still dealing with 3GLs?' Third generation languages (3GL) have been around a long time. 10 years later, there are still rumblings on why Java, and what is the next generation of languages."


In Also in Java Today, Thinking In Java author Bruce EckelreviewsJava Puzzlers, the top seller at the JavaOne bookstore, and uses his review as a springboard to explore some of Java's more pronounced fiascoes: "One of the most interesting aspects of the book is what these two, who are about as close to the center of the Java universe as you can get, quietly said at the end of some of the puzzle solutions, in their 'lessons for language designers.' Which is to say, 'if you are designing your own language, here's something you should do instead of what Java did.' Which is to say 'where Java didn't get it right,' in the gentlest possible terms."

Internationalization requires being able to show local character sets and format currencies and dates in accordance with local customs, but the big problem is how to dynamically adjust all the messages in your application to the user's language. This is especially tricky when dealing with dynamically generated messages, since different languages may require a different word order. Internationalization, Part 2, an excerpt from Java Examples in a Nutshell, 3rd Edition shows how you can deal with these problems in your Java application.


In Projects and Communities, the Portlet Community notes a new option for portlet deployment: Tapestry Portlet Support. "Portlet support is new in Tapestry 4.0. To a large degree, Tapestry has been re-architected to support portlets. Portlet support in Tapestry is native. This means that Tapestry is, under the covers, using the true Portlet API as it is intended to be used.

From the Mac Java Community: the Quaqua Look and Feel polishes the default Mac OS X L&F by bringing it more closely in line with Apple Human Interface Guidelines (AHIG). Improvements include better-aligned JComponents, alternating row shading for JLists and JTables, and more native-like JFileChoosers and JColorChoosers.


In today's Forums,snowbird0 has a problem with allocating huge stacks for Mustang. Setting the Java heap memory in the Java Control Panelclarifies: "I am not sure if I made myself clear: The Java Control Panel is completely unusable on Windows XP with heap memory configured at 256m - but that's the least problem. The bigger problem is that you just can't get enough memory."

In the Mobicents forum, ivelin has more thoughts Re: Google Talk conferencing: "Their dev site says that the call setup protocol is an extension of Jabber's XMPP, which they plan to document. Google also claims SIP and SIMPLE will be supported in a future version. As far as taking over the world, it will be very interesting to follow how Skype, Microsoft Messanger and Google Talk stack up in a year when they will all be SIP enabled."


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.



Sanity checking simple code  
kfarnham

BlueJ Way Blog

发贴人 kfarnham 2005-8-30

Advanced features of the beginner's IDE

Jeff Friesen's first article on BlueJ, an IDE aimed at students and others learning Java, kicked off a lengthy talkback discussion about the value of shielding students from Java's command-line and other low-level "pipe". One crowd said that BlueJ and IDE's like it "teach the tool" instead of teaching Java itself. Others, including the author, argued that there's little value bogging students down in tricky stuff like classpaths and public static void main (String[] args) on Day 1.

Does BlueJ teach good programming practices? Jeff makes the case for it in today's Feature Article. In Java Tech: The Sweet Song of the BlueJ, Part 2 he looks at BlueJ's support for debugging and unit testing, advanced topics presented in a beginner-friendly way. He also shows off BlueJ's extensibility, and the Code Pad, a useful little scratch pad for testing out code ideas.


There are big, open questions in today's Forums.euxx thinks aloud in Annotating 3rd party classes: "If you think about this, even EJB 3 specification keep the notion of the deployment descriptor that can potentially override annotations from the bytecode. Basically these deloyment descriptors are just another layer on top of bytecode annotations, but the implementation is very specific for EJB 3 needs. It would be great to have a generic layer that would provide abstraction to transparently retrieve annotations defined in both bytecode and in externalized annotation definition. So, 3rd party code can be annotated without code modification."

An obviously-frustrated gbilodeau has some Post-project questions: "I'm sure you all know the feeling. You've joined a team working on a large-scale J2EE system. The foundations are shaky, the technologies outdated. Nobody knows what an interface is, and even less JUnit. You've spent several months trying to fix things up and yet end up convinced that it would be easier to simply rewrite the whole thing. By yourself. How do you react to this feeling?"


Annotations also kick off today's Weblogs. Ed Burns suggests Using EJB Annotations Outside of EJB: "The Common Annotations and EJB 3 JSRs both provide a number of annotations that are useful to enterprise Java developers. This blog entry examines the use of two from EJB3 that I feel really should be in Common Annotations: @PostConstruct and @PreDestroy."

N. Alex Rupp is Looking for a home for my SnipSnap: "It's nearly impossible to find the 'perfect fit' for Java web hosting. All kinds of hosting companies provide 'Java support', but they charge too much for WAY too little, and the important features are all wrong. So, I put the question before the public: if a guy were looking to host a SnipSnap on Tomcat and have his own JVM, where's the best place to do this?"

Want to improve the appearance of your project? Kirill Grouchnikov suggests Personalizing your java.net project site - using icons for address bar and bookmarks: "We are all familiar with custom icons for the webpages that we surf. These icons are shown in the address bar, in tab that shows the page (in Firefox) and in bookmarks. However, i haven't seen a single java.net community, blog or project page that features such an icon."


In Also in Java Today... Are you working too hard to improve the footprint and performance of your J2ME application? Perhaps you have overlooked a readily available Java tool. In Use Obfuscation to Improve the Size, Performance, and Security of Your J2ME Applications Jim White argues for an obfuscation-based approach to crunch large, human-readable field and class names into a more compact form. The results: "while you cannot always expect to reap a 40 percent reduction in your application, there is a good chance that an obfuscator is going to get you a significant chunk of space back. This has the impact of making it easier to obtain your application over the air and the application will load into memory faster when executed."

Thinking big? Become.com's Java Technology Web Crawler: A Massively Scaled Java Technology Application reports on Become.com, an innovative shopping search engine "that has created a Java web crawler that passes through three billion pages in seven days, and may be the most sophisticated and massively-scaled Java application in existence."


In Projects and Communities, the new Java Games Community Forums reacts to the open-sourcing of Quake3 Arena with the discussion Quake3 Source released! - Who is going to port to Java? Topics discussed include JNI/JOGL concerns and what value such an effort would have.

The Javapediapage MemoryLeakcollects resources of interest to developers working on memory-management problems. The page's resources includes a collection of articles on finding an eliminating Java memory leaks, as well as links to memory management tools.


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.



Advanced features of the beginner's IDE  
kfarnham

Carry That Weight Blog

发贴人 kfarnham 2005-8-29

What does "active in java.net projects" mean anyways?

The results of the current java.net poll are kind of interesting. Asked "How active are you in java.net projects?", the current results show 68% saying they're not involved in projects. That it's the highest response isn't too surprising -- coding and reporting bugs is work -- but the overall distribution is not what I expected when I wrote the poll. For example, the current #2 choice is "Project Owner". With a finite number of projects (over 2,100 at last count), there is a fairly limited number of people who could choose this option.

I think what I expected was more of a classic "pyramid"-type distribution, with a small number of project owners, a larger number of coders (i.e., people who contribute code, but don't actually own the project), and still-larger numbers of participants who contribute not with code but with feedback (bug reports and general discussion). Yet so far, only a few report being code contributors and bug reporters.

It's still early, with less than 200 votes cast, so the results may change, but it still gives you some things to chew on. Are many projects contributed to only by their owners? Are people pulling down code and not discussing it or filing bug reports on it?

To this point, there were a couple of talkbacks to the poll choices. pdfalcon1 writes:

Hey, listen. I read your sites, I download stuff, I install it and experiment sometimes and I use what I can see works well in our systems. That's a contribution, isn't it?

Interesting. I didn't think to include just downloading as an option, and on further reflection, I probably still wouldn't. The question is phrased as "How active are you injava.net projects" [emphasis mine], and I don't know if downloading and using code is really a form of activity in the project.

pdfalcon1 says "That's a contribution, isn't it?" No offense, but I don't think it is. If you're not offering feedback, in the form of bug reports, enhancement requests, or even a simple "hey, this works great for me" on the message board, then I don't see what's being conrtributed other than a tick on the download counter.

Is there anything wrong with that? Not at all -- project owners want their stuff to be used. But I don't see it as activity in the project. So I think "not active" is the proper poll option in that case.

Feel free to follow up in the comments, either on this blog or in the poll dicsussion.


AJAX tops today's Weblogs. In AJAX Solutions Online : A demo is better than 1000 words, Greg Murray writes: "The BluePrints Solutions Catalog has been updated this week. In it are many solutions on AJAX that cover show the programming model we are proposing for AJAX applications that run on the Java Enterprise Edition platform."

Roger Brinkley reminds us of JavaHelp's popularity in When 12% is really greater than 50%: "The 2005 WritersUA Skills and Technologies Survey shows JavaHelp as valuable or invaluable to 12% of the respondents. But a careful look shows that the 12% is actually over 50% of the java repondents."

Waiting for C# to replace Java? Keep waiting. In C# The saga continues and a testing competition, Calvin Austin writes "I read a report that contained the data point that C# only has 15% marketshare in the enterprise. Also news on a testing competition."


In this week's Spotlight, we have a tool to help manage your java.net project: the Logger project offers java.net project owners access to the Apache log files for their projects. The service works by adding specially-named users as observers to your project. For example, adding weekly_logger will cause a weekly log file to be sent to the project owner. You can also receive stats reports that provide a simple HTML overview of which files are being accessed, as seen in this example.


In Also in Java Today, support in the Java language for multilingual and multicountry environments is strong, but it's not foolproof. If you're not careful, mistaken assumptions in three key areas can make their way into your code and cause it to be U.S.-centric. The article Internationalization Road Hazards identifies these internationalization gotchas and gives you some techniques to help your applications become more usable across the globe.

"How many hundreds of J2EE-EJB web applications have been written that capture information from a web page and store it in a database? What really keeps developers awake at night is trying to write and maintain the complex business logic in their applications. This is a problem not only for new applications, but increasingly, for long-lived, business-critical apps whose internal logic needs to change frequently, often at very short notice." InUsing Drools in Your Enterprise Java Application, Paul Browne argues for using a rule-engine as a business logic framework, in between your application's presentation and persistence frameworks.


In Projects and Communities, Monday is the last day for commercial Jini licensees to vote on the Porter Proposals, Part 2. The proposed changes are all security-related, touching on Jini activation, JERI, and trust verifiers. Proposals that pass this vote will be presented to individual licensees for approval in a Jini Community Decision Process (JDP) vote.

The most recent Java Tools Community Newsletter announces the graduation of JDBAdmin from the community's incubator. This project describes itself as a web application to "browse database information and content using the mechanisms allowed by its JDBC driver", in the fashion of phpmyadmin, phporacleadmin, etc.


In today's Forums,sameer_t kicks off a discussion on StAX parsing performance StAX 1.0 White Paper: Streaming API's for XML Parsers JSR-173 introduces new Streaming API's for XML (StAX) which is a standardized Java based API for pull-parsing XML developed though the community process. This document describes the Sun Java System Streaming XML Parser (SJSSXP) which is a freely available implementation of JSR-173 and which discusses some of its performance characteristics. Any feedback or comments can be posted to this thread.

johnreynolds talks about his line of reasoning http://forums.java.net/jive/thread.jspa?messageID=22875&tstart=0#22875: "Where 'standards' compete, like JSF and Tapestry, my business brain is going to have to go with the "Sun" standard... but only because it has more tool support, and it's 'good enough'. That's what it really boils down to: Which standard provides the 'better' solution. 'Better' includes ease of development, ease of learning, and ease of long-term maintenance."


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 does "active in java.net projects" mean anyways?  

A burst of Swing activity

Usually when I pick items for the front page, I look for balance: a little enterprise here, a dash of J2ME there, mix up the patterns and the testing between the AIJT's and P&C's... that way, there's something for everyone, and a sense of Java's breadth, ubuiquity, and applicability.

But the last few weblogs offered such a rare occurrance, a cosmic alignment, that I just couldn't resist: three blogs, all on the same day, on the same topic. Sure, it happens when there's news (like when Harmony was announced and everyone rushed to praise/condemn it), but this is a case where all the bloggers are acting independently. Moreover, they're blogging about Swing, the much-used and sometimes-bashed GUI framework whose story seemed to have been told years ago, and yet hangs around, perhaps because it's so flexible and extensible.

In the first of today's Swing Weblog trifecta, Romain Guy praises Kickin', rockin', jammin' FX for Swing: "SwingLabs provides a variety of awesome components and frameworks. It now brings cool eye-candy effects for your Swing apps."

Hans Muller says Using Swing's JFormattedTextField for integers is not as trivial as it should be: "Recently, the javadesktop.org JDNC forum has hosted some spirited discussion about using Swing JFormattedTextFields for decimal input/output. I'd written a blog on a similar topic about 8 months ago and forgotten to actually publish it. So here it is!"

As for the future of Swing, Scott Violet asks Should we generify Swing's filtering and sorting?: "We want to know, will generifying Swing's filtering and sorting API in mustang help or confuse you?"


In Also in Java Today, O'Reilly's ITConversations Pick of the Week brings you "new ideas through your headphones" from the ITConversationssite. In Developer Testing, "Kent Beck describes the situation in which companies wait until the day that the software isn't 'shaking' and that's the day they do a release." This presentation was recorded at the Developer Testing Forum held in Palo Alto, California, November 17th, 2004.

Java is built to support internationalization, but is your application using its features? In Internationalization, Part 1, an excerpt from Java Examples in a Nutshell, 3rd Edition, David Flanagan looks at Java's support for displaying text in the local language, and for using local standards for time, currency, and other customs that may vary from one locale to another.


The new java.net pollasks "How active are you in java.net projects?" Cast your vote on the front page, then join the discussion on the results page.


In Projects and Communities, if you maintain a project, you may have dealt with a mailing list problem where a non-subscriber tries to post to a moderated list. As Kohsuke Kawaguchi explains in Handling moderation e-mails automatically, he and Ryan Shoemaker have created an auto-responder to ask such posters to subscribe first.

Two key web application JSR's have reached propsed final draft status: JavaServer Faces 1.2and JavaServer pages 2.1. Ed Burns' blog has a high-level overview of the changes in each, and solicits feedback via the java.sun.com JSF forum. The new features are already available in GlassFish's JSF implementation.


In today's Forums, the Mobicentsforum is talking about the new Google Talk. In Google Talk - Jabber RA? ivelin writes: "Google got on the VoIP bandwagon too. A few weeks after Yahoo! made their move. http://www.google.com/talk/ The initial feedback I am hearing on Google Talk is: Good: 1) Supports Jabber's XMPP, which is open source and well supported 2) Plans to implement SIP for IM and Voice 3) Supports many free clients. Not so good: 4) Uses a proprietary extension to XMPP for voice, but it will be documented 5) Echo cancelation is not implemented yet So, anyone interested to write a Jabber RA?"

The Your Java Career forum has a new thread on Migrations: "Have you recently come to Java from another language? Are you thinking about leaving Java in favor of some other language? This topic is meant to discuss migrating to or from Java: how to do it, where to go for more information, what effect it will have on your career, etc."


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.



A burst of Swing activity  
kfarnham

Calling You Blog

发贴人 kfarnham 2005-8-25

Simplifying AJAX client-server connections

Feel free to jump on the AJAX bandwagon. Surely you've heard of AJAX by now, and if you haven't, the concept can be expressed in two words: Google Maps. Notice how when you click arrows or the map and satellite buttons that the whole page doesn't reload, and that only part of the page refreshes, and quickly? Mostly done with client-side scrpiting and newer browser features. Why it's almost as rich an experience as (gasp!) a Java applet.

And the name? Dreadful. Short for "Asychnronous JavaScript with XML", which tells a user how it works, not what it does. I guess there wasn't a clever way to make a contraction out of "You know, like Google Maps".

Problem is, pleasant as this is for the end-user, it's notoriously difficult to wrangle the XMLHttpRequests, parse DOM's and do the rest of the client-side work, not to mention keeping things in sync with the server side.

Direct Web Remoting, hosted on java.net, offers some help. Creator Joe Walker says its mantra is "Easy AJAX for Java":

DWR is a Java open source library which helps developers wanting to write web sites that include AJAX technology. It allows code in a web browser to use Java functions running on a web server as if it was in the browser.

In the Feature Article, Developing AJAX Applications the Easy Way, Joe develops both sides of a chat system with DWR, starting with a simple servlet and, from that, the client-side JavaScript calls that look like simple method calls. The resulting system is just 100 lines of code, client and server.


Roger Kitain's announcement of Open JavaServer Faces tops ... in today's Weblogs. "I'm pleased to announce that Sun's implementation of JavaServer Faces is now open source, and it is available under the Common Development and Distribution License (CDDL)."

William C. Wake continues his conference summary in Agile '05 conference, part 2: "More from the Agile 05 conference... John Major described a project that was doing custom programming of lab workflows as part of the Human Genome Project. This was an environment with lots of churn: biology, instruments, J2EE."

David Walend's tutorial Connecting to a Command Line Process addresses challenges working with Graphviz: "Part of this project was adding a tographviz package to JDigraph to encapsulate interaction with the dot language and the Graphviz command line. I built some fairly elaborate code to wrap around the Graphviz command line. I created the GraphvizControl.java class to bundle it all up. It makes for a nice blog article."


In Also in Java Today, the O'Reilly Network databases site has picked up on Edmon Begoli's ITToolbox blog entry Use JSTL for conditional row coloring: "This entry is for J2EE Web Developers. I will provide an example on how to do an interleaved row coloring for the tabular data display. I will use JSTL 1.1 for JSP 2.0 syntax."

Still on Java 1.4? "The J2SE 1.4 platform was great, but J2SE 5.0 is even better. Although you may not need to migrate your product to this updated platform, you may want to move anyway." The SDN article Reasons to Migrate to J2SE 5.0 (Tiger) summarizes the language changes, new and enhanced class libraries, tool support, desktop enhancements, and other reasons to make the switch to Tiger.


In Projects and Communities, Dick Wall's Developer.com article Building a J2ME Application in NetBeans 4.1 "will show you how to use NetBeans 4.1 and the Mobility Pack to write a Java Mobile Edition application quickly and easily. It will demonstrate the simple GUI creation and storage facilities available to a mobile application developer."

From the Java Enterprise Community: the Java BluePrints Solutions Catalog project has announced its latest release. This version covers AJAX, web services in a service-oriented architecture (SOA), web tier design with JSF, and business tier design. The catalog can be downloadedfrom the project site.


In today's Forums,calum is interested in some URLClassLoader changes: "It would be really helpful to be able to selectively remove entries from the jar: protocol scheme used by URLClassLoader - having a URL -> jar cache is okay except when you want to indicate that a new version has been deployed and you want to update it in the cache. Currently, to get the new version you have to restart your app. This is really important for RMI applications, etc."

The Your Java Career forum has started a discussion of Desktop Careers: "Is it practical to have a career focusing solely on Java Desktop development? What kinds of applications do you build, and what GUI toolkits are you using? Do your applications run on multiple platforms? This topic is for everyone who gets paid to know AWT, Swing, SWT, JGoodies, etc., and whose work launches with a double-click, not as part of a server's startup script."


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.



Simplifying AJAX client-server connections  
kfarnham

One Trick Pony Blog

发贴人 kfarnham 2005-8-24

How does your career affect your development choices?

We've kicked off a new forum today, focusing on the choices you're making in your careers vis-a-vis Java. The point of the Your Java Career forum (part of The Programming Profession) is not to talk about theory, but instead about the real things you're experiencing as Java developers. This includes (but is not limited to) the kinds of tools and frameworks you choose to work with, the things you're doing to stay up to date, the kinds of work you pursue, etc. Or are you even planning to continue programming in Java at all?

We've seeded the discussion with a few threads, which we'll feature on the front page throughout the week. You can also, as a registered user, start new topics of your own. Our first kick-off topic is Real J2EE or "de facto" J2EE: "What's more important for your work (and getting work): the Sun-certified J2EE standards (J2EE, JMX, JSF), or the 'de facto' standards that have emerged from various open-source projects (Spring, Struts, Hibernate, etc.)? Do you put one on your resume but use another in your code? Please use this discussion to talk about what matters to you in your enterprise development."


Also in today's Forums,bitmaster has some GlassFish answers Re: deployment application via HTTP requests: "Yes is the answer to your question. But the question you're going to ask next is 'how? and that's a bit trickier. Glassfish supports out-of-the-box deployment over HTTP and deployment via a local pathname, in addition to its autodeploy support (akin to JBoss). All of this functionality is exposed via the Admin Console (port 4848, for those playing along at home) but are not (AFAIK) rolled into an Ant task like you're describing. I'd bet dollars to donuts there is a JMX api that will accomplish this, especially in light of the work JSR-88 (javax.deployment), but couldn't provide you with any Glassfish-specific URLs or getting started guides.


In Also in Java Today, is bytecode manipulation a liability for AOP? In the dev2dev article JRockit JVM Support for AOP, Part 1, Jonas Bonér, Alexandre Vasseur, and Joakim Dahlstedt argue that the costs of bytecode manipulation are holding back Aspect-Oriented Programming, which is often implemented with bytecode manipulation. "We believe that JVM support for AOP is the natural solution to those problems. We are proposing a subscription-based API that we have implemented in the JRockit JVM, which is closely integrated with the JVM method dispatch internals."

In the interview Former Sun CTO Sees Flaws in EJB 3, Hibernate, Peter Yared, former CTO for Sun's J2EE app server unit says Java/J2EE may lose out to Open Source technologies in the future. "Yared also says EJB 3.0 and Hibernate just doesn't go far enough to cure some of Java's core ills," and that "devs will need tools to define application flow, XML Schema to represent data sources, XPath to specify queries, and XForms to define dynamic Web pages. Further, he said, all logic should be automatically encapsulated as language-agnostic Web Services, which can be written in Python, PHP, Perl, or Java." To top it off, he says Java's platform independence no longer matters, and that "developers should be very comfortable running C++ again."


In Projects and Communities, the Mac Java Community notes the CNet article Intel plans to test Mac development tools, in which Intel says it will release beta versions of its compiler and performance libraries for Mac OS X later this year. This may be of interest to those developing JNI-based Java applications and who are concerned with the Mac's upcoming transition to an Intel x86 chipset

The Password Synchronization Agent (PWsynch) "synchronizes password values bi-directionally between any LDAP-V3 compliant directory server and Windows directories, namely Windows 2000 Active Directory (AD) and NT SAM (NT) Registry." This allows for single sign-on and easier password updating on multi-platform backends.


Kelly O'Hair points out tutorials and examples for VM Agents and JVM TI in today's Weblogs: "Creation of Virtual Machine agents improved with the new Java Virtual Machine (tm) Tool Interface (JVM TI) in JDK 5.0. If you are curious how VM agents work read on, but beware, native code lurks here."

William C. Wake summarizes conference activity in Agile '05 conference, part 1, which features: "Brian Marick / Bob Martin keynote, open space, Dave West on Metaphor, and the Tim Lister evening talk."

Mohamed Abdelaziz offers some help Demystifying Pipes, JxtaSockets, JxtaMulticastSocket, and JxtaBiDiPipes: "Lately there has been several inquiries about JXTA's PipeService, and companion utilities (JxtaSocket, JxtaMulticastSocket, and JxtaBiDiPipe) on JXTA's discussion lists, hence this blog to shed more light on the PipeService and utilities provided, and their inherit features."


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.



How does your career affect your development choices?  

Can your prototype be too good?

Desktop developers usually need, as a basic requirement of their trade, to create a visual representation of their GUI before they code it. Visual prototyping lets you experiment with workflows, discover inconsistencies, and work out hard parts in advance.

It is also, unfortunately, a great way to blow your schedule.

The obvious problem with the pretty, significantly-functional prototype is that it takes real time and effort to develop this one-off, throw-away prototype, much of which won't actually be re-used in the final version. The more subtle, and far worse problem, is that management sees a functioning GUI and assumes that the one-off throw-away prototype is the final, working product.

Uh oh.

In the Feature Article Interaction Happens: Prototyping Techniques, Jonathan Simon looks at the prototyping options available to developers, ranging in fidelity from the elaborate clickable prototype to the simple paper prototype, comparing the benefits and possible problems of each. He also shows you some intermediate options that you might not have considered, and helps analyze the various trade-offs involved with each approach.


Meeraj Kunnumpurath asks Does Java need friends? in today's Weblogs, but it's not necessarily what you think: "The access modifiers currently supported in Java allows granting access to members within a class to members within the same class, members within the sub-classes, classes belonging to the same package and all the other classes through the private, protected, package and public visibility modifiers. However, in certain scenarios you may want to have more flexible visibility mechanisms."

Kirill Grouchnikov is bothered by pieces not fitting together inMustang synergy - the sum is less than the total of the parts?: "Various parts of Mustang (such as JAXB 2.0) are available for download right here at java.net. But what about playing together with Mustang itself?"

How long is your String? is a reality-check from John O'Conner: "Yes, it's a trick question, but it's one you should consider seriously: How long is your String? When you ask a String for its length with myString.length() the method will return the number of char code units in the String. That's ok, but it may not be telling you exactly what you wanted."


In Also in Java Today , despite, or perhaps because of, the wide adoption of annotations, some are having second thoughts about where this J2SE 5.0 metadata feature is taking us. In Annotations: Don't Mess With Java, Robin Sharp writes: "Annotations are a major kludge on the landscape. They don't fit and we don't need them; but you just know that they'll be picked up by framework junkies and abused horribly."

In the eWeek opinion piece Free Java: Sun Struggles to Come to Terms with Open Source, Jason Brooks gauges the sentiment at O'Reilly's Open Source Convention and says "OSCON attendees seem more interested in Java than Solaris, and Sun's best move could be giving them what they want." Comparing the conference's Java-related sessions, he looks at the prospects for open-source Java, and the effects of not currently being open-source.


News from the Java Communications Community kicks off today's Projects and Communities, "Open Cloud generously contributed a fully functional SLEE development tool to the Mobicents project. The tool, [eclipslee], is an Eclipse plugin which simplifies the process of creating and deploying VoIP services... The Mobicents team greatly appreciates the contribution."

Showing off Java desktop prowess, Swing Sightings #22 is out, providing 140 screenshots from 21 different applications, five of which are available via Java Web Start. "They're here because, based on the descriptions and the screenshots on their web sites, they look like good examples of what is possible with Swing."


In today's Forums, usermadhukonda details some database performance considerations in Re: Java EE postings (reprised): "To give a little bit more insight into what happens on the database side with prepared statements(enabling statement caching), I will give an example using Oracle Database. In Oracle, every sql statement executed goes thru a phase called 'parsing'. It is this parsing phase, where a sql statement will be evaluated for syntax, semantics, security, optimal execution path, and allocation of memory areas. There are 2 types of parsing (Soft and Hard parsing). If the db finds the statement in the memory, it is soft parsing. Or if it is a new statement or a cache miss, then it is hard parsing. Hard parsing is what you need to avoid."

jarouch thinks Java should have unsigned numeric primitives. In Re: Please add types uint, ulong etc..., he writes: "Sorry, but language without basic numeric operation.. Question is - why we dont have unsigned types. Answer: Just because they was not implemented in OAK soon enough.. They were in plan. http://www.artima.com/weblogs/viewpost.jsp?thread=7555Unfortunately, the same end had things like assertions and pre/postconditions in definitions. Btw. still used argument is - we need readable code. Do you realy think that idioms like (x & 0xff) help to reach it?"


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.



Can your prototype be too good?  

I18N, L10N, and T9N

The Java mindset usually seizes on internationalization in terms of ensuring that code behaves correctly in different locales, which means being flexible about currency and time conventions, being able to display two-byte Unicode characters, and reading and displaying localized text instead of hard coding it into the source.

Which is great, but who's doing the localization? Who's responsible for all that translation?

An I18N project that makes perfect sense from the developers' point of view may be completely impractical for everyone else. Throwing a huge ResourceBundle over the wall -- or 100 little ones -- and hoping to get back a working localization is wishful thinking indeed. The effort is not as easy as it might appear.

Fortunately, there's some Java help for this too. In this week'sSpotlight, we introduce the Open Language Toolsproject. Their philosophy is that "we believe that computers are tools that can help people - in our case, we want computers to help translators. Anything that can be done to help translators improve the quality of their work, or reduce the amount of time it takes to do translation is definitely within the scope of this project." The project currently has two major efforts: an XLIFF translation editor, and a number of XLIFF file filters to handle working with documentation file formats (HTML, JSP, OpenOffice.org, etc.) and software formats (Java properties and ResourceBundles, among others).


An open letter from Rich Unger kicks off today's Weblogs In Sun's inconsistent attitude towards the LGPL, he writes: Both proprietary software companies and many OSS projects (including NetBeans) won't touch LGPL'ed libraries. Whether their concerns are valid or not (I think they are), we're left in the ridiculous scenario where one Sun OSS project (NetBeans) cannot make use of other Sun OSS projects.

Java Client Group architect Chet Haase is looking for some feedback to help improve desktop app startup performance. In Persistent Questions, he asks, "how do you persist your app preferences? In our search to tune startup performance, it would be helpful to know what developers need us to optimize."

John "jbob" Bobowicz says Open Media Commons turns the tables on DRM: "When Jonathan Schwartz talked about the 'Age Of Participation' back during Java One 2005, he wasn't kidding. Now it seems that Java sits squarely in the middle and has it's sights set on Digital Rights Management with the announcement of the Open Media Commons initiative."


In Also in Java Today, the Java Data Objects (JDO) specification, Java Specification Request (JSR) 12, defines an API for a standard way to transparently persist plain Java technology object and database access. Using JDO, Java application developers can write code to access the underlying data store without using any database-specific code. JDO is designed to work in multiple tiers of an enterprise architecture including the Java Platform, Standard Edition (Java SE, formerly known as J2SE), web tier, and application servers. The article Getting Started with Java Data Objects covers the essentials of JDO and offers sample code to give a flavor of the effort involved in using JDO to persist your Java technology objects.

"The ASM bytecode manipulation framework is written in Java and uses a visitor-based approach to generate bytecode and drive transformations of existing classes. It allows developers to avoid dealing directly with a class constant pool and offsets within method bytecode, thus hiding bytecode complexity from the developer and providing better performance." In Introduction to the ASM 2.0 Bytecode Framework, Eugene Kuleshov shows what's new in the 2.0 version of ASM, looks at its support for J2SE 5.0 features like annotations and generics, and shows a sample application to analyze the class dependencies of any JAR file.


In Projects and Communities, members of the JXTA Community may want to save the dates of September 26-27, which is when the JXTA Kitchen is being held on Sun's Santa Clara campus. The event allows you to hear from the JXTA team, work on your code with JXTA experts, and have a one-on-one with a JXTA team member.

An announcement on the jini-users list proclaims the availability of version 1.1 of the Flavio project, which provides Jini service management based on Java Management Extensions (JMX). Flavio 1.1 is released under the Apache License (v2) and provides a Jini-based JSR-160 JMX connector.


In today's Forums,zixle is reconsidering Mustang design thoughts Re: RowSorter and related classes: "On the way home for work I was thinking this one through and had another thought. I'm not sure that visually adding/removing a column should in anyway change the filters. Consider the case where the developer has widgets outside the scope of the table controlling the filter. For example, I choose to see all email messages that have a status of important. Even if the status column isn't visible I expect the filter to still apply."

In another interesting point from the Performanceforum, tmarble shares more Java EE postings (reprised): "In the past, most appservers have either used traditional I/O (which drastically limits their scaling) or have used a C-based HTTP interface (which gives them good scalability but eliminates their portability). Sun's 9.0 appserver (available now through GlassFish as an open source project through Sun's CDDL) will use NIO to achieve scalability *and* portability by relying solely on Java code. In our tests so far, we've out-scaled all C-based HTTP connectors that we've been able to test."


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.



I18N, L10N, and T9N  
kfarnham

Look Back in Anger Blog

发贴人 kfarnham 2005-8-19

Take count, literally, of your Java efforts

Today's java.net poll is one that won't lead to easy interpretation, but I thought it would be interesting to put out there anyways: How many lines of Java code do you think you've ever written?

There are a lot of factors that will figure into each reader's answer. You can argue that Java is intrinsically verbose, so we as Java programmers tend to write a lot more lines of code than would be necessary with other languages. Not that this is a bad thing: Java gets interesting where a lot of languages get unreadable and unmaintainable (I'm talking to you, perl). There's also the factors of how long you've been programming, how many different projects you've worked on, and whether you've written a lot of new code or maintained existing code. All of these factor in to a pretty wide range of Java experience, which is why I phrased the answers in terms of orders of magnitude: thousands, tens of thousands, hundreds of thousands, and millions.

If you're really not keeping close track -- and you should, because it can be helpful on a resume to express the size of a project in terms of LoC -- then it's pretty easy to tally up lines of code with the wc command in your favorite flavor of 'nix (including Mac OS X, and cygwin for Windows). For example, I took a look-see at how many LoC I wrote for a book last year:

wc `find . -name '*.java'`

The results (in lines, words, and characters, respectively) came out to be:

8737 29428 315626 total

This really surprised me: I didn't think I'd written thatmuch code for the book. The whole book is only 200-some pages.

One other thing to chew on: how much of the code that you've written is still in use? How much of it was ever in use? It burns me up to think of the thousands of lines I wrote for mismanaged, doomed projects that would never see the light of day, or that got "released" to a user-base of approximately zero. I'll bet a lot of you feel the same way... feel free to comment on this blog if you're so inclined.

After mentally tallying your LoC and casting your vote on the front page, please visit the results page to join in the discussion with your fellow java.net community members.


Feel free to sing along with today's Weblogs, in which Kirill Grouchnikov offers some Backstreet boyz "404 File not found" lyrics "After their first single on FTP, appropiately titled "Incomplete", the boy-band is planning their next single. Here is preview of the lyrics."

Navaneeth Krishnan offers an Online demo: Quick' n Easy Portlets using the Sun Java Studio Creator 2: "From elevator hacks to something more connected to my work.I was recently asked to create a quick presentation on how to use the Sun Java Studio Creator 2 to create JSR 168 portlets. You might find it useful too."

Also in the NetBeans tutorial vein, Brian Leonard shows how Amazon Web Services meets the Amazon Rain Forest: "Use this tutorial to see how easy it is to run the Amazon web services Java sample project from within NetBeans. Or, join us in person at one of our world tour locations to see it live for yourself."


In Also in Java Today, "there's a natural conflict between testers and programmers because of the difference in perspective each role has." In short, programmers tend to be creators with a sense of optimism, and testers are investigators with a determined pessimism. Poorly managed, these opposing forces can clash in unproductive ways. In the Mac DevCenter article How to End Wars Between Testers and Programmers, Scott Berkun (author of The Art of Project Management) looks at how to build relationships, set common goals, and establish cooperative leadership to prevent counter-productive squabbling.

"A monitoring server is critical to any server-side infrastructure, be it an e-commerce or a telecom solution." But that doesn't mean you're necessarily going to use Java Management Extensions (JMX). Narendra Venkataraman writes "I found JMX solutions to be overkill for my requirements, so I decided to implement a lightweight Java framework that could be easily extended and customized to build a monitoring system." In When JMX Is Overkill, Build a Lightweight Monitoring Framework, he shows how to build a do-it-yourself monitoring system using an extensible object-oriented framework


In Projects and Communities, the latest Java Tools Community Newsletter has tips on how to attract users to your project. Their advice for successful projects includes creating and maintaining an informative home page, graduating from the incubator as soon as possible, and publicizing via the RSS feed, the Java Tools Projects Directory, and the java.net front page.

The JDK Communityhome page has a link to Peter von der Ahe's blog about compiling javac with the latest Mustang builds. Peter has added an ant build script to build b47 of Mustang, so creating javac, javadoc, and apt is as simple as typing ant. It also creates a classes directory that you can use in the 1.6 javac's bootclasspath.


In today's Forums,jwenting dismisses calls for more syntactic sugar inRe: "string" primitive: "If you want string primitives use a non-OO language. I'd rather see ALL primitives dropped than see more of them introduced. And no, I am not screaming for that to happen. If I want that I'll use a language that has no primitives. Learn to use the tools you have instead of whining and screaming for destroying the language by turning it into something else entirely."

robc explains some JAXB design thinking in Re: Varying Endpoint Address in Client: "WSDL bindings are extensible. Moreover, with WS-Policy starting to be deployed, it's going to be even more complex to capture all the details in annotations, except in simple cases. We could have designed a mix of annotations and XML-based descriptors to capture all the information, but that's error -prone and quite static anyway. Either approach would have lead us to playing catch-up with the latest WSDL extensions with no end in sight."


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 count, literally, of your Java efforts  
kfarnham

New Killer Star Blog

发贴人 kfarnham 2005-8-18

Make or break time for EJB?

Why are there alternatives to Enterprise JavaBeans? With the benefit of incumbency, not to mention marketing by the creators of Java and J2EE, EJB's should be a slam dunk. Yet many developers abandoned EJB's in recent years, in favor of alternatives, most obviously Spring, but there are others. Would these frameworks exist if not as a response to, if not rebellion against, the complexities of EJB? That's the simplistic scenario of course: some developers decided they were sick of EJB's verbosity and pomposity and decided to lighten things up. On the other hand, it's not hard to imagine these other frameworks popping up of their own accord, simply choosing different approaches, or not trying to solve all the same problems.

In other words, hating EJB is not required. You can, if you like, but it's not necessary or sufficient for being a Java enterprise developer.

Besides, EJB is changing. Version 3.0 breaks with many traditions, freeing developers from deployment descriptors, boilerplate methods, and other hassles, in favor of annotation-powered declarative programming. In today's Featured Article,What's New in EJB 3.0 Krishna Srinivasan looks at how 3.0 offers a startlingly new way to develop EJB's, while maintaining much of what's right with the existing framework.


Tom Ball has A Good Use for Finalizers in today's Weblogs: "Tom describes a way finalizer methods can be used to warn of bad code usage: what a lot of library engineers do is add a fallback routine in a finalize method to check whether a resource has been released, and if not, release it during finalization. It's an ugly hack, but often necessary to avoid granting Tumbling Duke-like powers to their client programs."

If you notice some Unmarshaller performance improvements in JAXB RI 2.0, you can thank Kohsuke Kawaguchi: "I recently rewrote the JAXB 2.0 unmarshaller in an attempt to get a better performance. I've been thinking about the design for a long time (and a jury duty helped!), so the actual implementation was easier than I thought."

David Herron is back with More looking at open source quality processes: "Like I said in my previous posting, I'm looking at the quality processes in open source projects. I'm studying how we in the Java quality team might be more open about what we're doing."


In Also in Java Today, Java Business Integration (JSR 208) defines container services that enable system integration via Web service technologies and XML message exchanges. In the interview Service-Oriented Java Business Integration, JBI Spec Lead Ron Ten-Hove discusses how JBI will impact enterprise Java developers.

In Record Movies with Java Media Framework (JMF), Gal Ratner offers an introduction to the Java Media Framework by way of an example that records video from a webcam. "The most difficult aspect of recording a movie from a webcam was making sure the proper ingredients were put in the correct order... If anyone is learning or exploring JMF, this tutorial will improve his or her working knowledge of the framework."


In Projects and Communities, the JDDAC home page notes the article Embedded Java Controllers, in which D. Jay Newman looks at Systronix Java controllers and their use for Robotics. He shows the code for a simple motor controller for R/C servos, noting that "pretty much everything in this article applies to other embedded systems as well."

"The NetBeans Profiler team is proud to announce the availability of the Profiler Milestone 8 release for NetBeans 4.1." The Profiler offers CPU, memory and threads profiling as well as basic JVM monitoring, tightly integrated into the IDE. The latest stable version can be downloaded from the Profiler project page, and is described further in a Gregg Sporar weblog.


In today's Forums,zixle describes some of his thinking Re: RowSorter and related classes: "In doing the mustang sorting/filtering API I thought long and hard on this issue, as well as talking to various folks. One of the common way to tackle sorting/filtering is to create a generic model adapter. If you want sorting, that becomes a model. If you want filtering you create a specific model for that. If you want both sorting and filtering you create two different models one wrapping the other. This approach has been proven to work. I strayed away from it for two reasons..."

fuerte wants Java to have Nullable Types (like in C# 2.0): "Please see this [article] first. This is a great new feature, which makes database programming much easier. I think that is essential, as the article says. As a side note, I wish that Java eventually gets full support for value types like int/Integer and string/String. int should be a synonym for Integer and string synonym for String. Comparing strings with == should compare the value, not the object reference. Likewise, comparing Integers with == and != should always compare the value, not the reference."


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.



Make or break time for EJB?  
kfarnham

Changes Blog

发贴人 kfarnham 2005-8-17

Do we need an isolation layer for unit tests?

There are lots of cases where you want to use an "isolation layer", a genericized API that keeps you from being trapped in theVendor Lock-in Anti-Pattern. This approach allows you to write to the interface provided by the isolation layer, and avoid hard-coding anything that ties you into a specific API. J2EE's Data Access Object (DAO) is arguably an example of this, though it serves other purposes as well, such as allowing you to switch persistence strategies (more on this in a little bit).

So, if you're dutifully putting your persistence behind an isolation layer... why are you writing unit tests that lock you into JUnit? Not that JUnit is profoundly defective or anything, but to disavow vendor lock-in for one aspect of your development and profoundly embrace it for another seems confused at best.

OpenSymphonyfounder Hani Suleiman takes a whack at this problem in Migrating to TestNG, which we feature in Also in Java Today . Discussing the hazards of moving to TestNG, he writes:

One key blocker to TestNG's adoption is the huge mass of existing legacy JUnit tests. Most projects have hundreds, if not thousands of JUnit tests already written. Another is that most IDE's include JUnit support built-in, where it is possible to run any collection tests in methods, classes, and packages.

[...]

As for migration, it is often difficult to put forth a business case for investing more than minimal time and effort in achieving this. So clearly, for TestNG to achieve wider adoption, there must be a clearly documented and easy path for migration.

In his article from TheServerSide, Hani spells out a process by which you can test the waters of TestNG, gradually or quickly moving a JUnit-based project over to TestNG. While his article is not a comparison of the two testing frameworks, he does point out some of the advantages to be enjoyed by those who complete the switch.


In another Also in Java Today item, the Data Access Object (DAO) pattern advocates using a common API for accessing a data source, so you can hide the implementation from the caller. This also allows you to switch from one implementation to another, such as from simple file-based persistence in development to an enterprise-class RDBMS in production. In iBatis DAO, Sunil Patil writes: "iBatis Data Access Object (DAO) is an open source framework now hosted by Apache and targeted at solving these type of problems. It provides you with an infrastructure for creating applications based on the DAO pattern."


Humorously inaccurate predictions begin today's Weblogs. In C# could be major, Calvin Austin writes: "'C# could be major', 'Microsoft C# gets an A'. These were the headlines 5 years ago... what happened?"

In Pluggable ID/IDREF handling in JAXB 2.0, Kohsuke Kawaguchi writes "it's often convenient to be able to define a sophisticated reference integrity mechanism that goes beyond ID/IDREF. Jeremy Haile, one of the JAXB users, convinced me that we should do this in the RI. While it took me a month to get back to this, I was finally able to implement it. That's what I'm going to talk about today."

Navaneeth Krishnan collects Folksonomy, Ajax FUD and crazy elevator hacks: "If you are interested in social software, here is a discussion you must listen to. Also, "Using the XMLHttpRequest Object and AJAX to Spy On You" is plain FUD."


In Projects and Communities, the next Jini Community Webinar is scheduled for next Wednesday, 8/24, and will feature Calum Shaw-Mackay talking about Neon, a framework for hosting agent-based components across a grid. Previous webinars' materials are also available at the webinar site.

The JavaDesktop Community project thereallm aims to "create a secure, scaleable, streamlined, semantically-rich system of standards-compliant transactions among heterogeneous entities." The developers say it is "intended to be a realization of the 'semantic web'."


bmesserer is trying to clarify Glassfish features (esp. Java EE 5/EJB3) in today's Forums: "Okay, understand that... but wouldn't it be good if the developers provided some "starting point" on what (features of Java EE 5) they already implemented/are working on? At least _they_ should know what they did/still need to do (?). From this "feature list" it would be ok to proceed as suggested, but finding out what works by unit test, from zero, seems to me like a waste of effort (since we'd need to discover everything from zero that the developers already know). I'm well aware that this approach would result in great coverage by unit-tests but on the other hand this would mean I'd have to commit quite some time to glassfish before I can test on it... sure, I'd like to but sadly I'm paid to write _our_ application, not glassfish. If it already works more or less I may be allowed to invest some time into project glassfish but from zero? Understand my problem?"

Continuing the jump-start of the Performance forum, tmarble talks about issues related to Maximum Memory in Java: "For windows you are limited to 2 GB... See Moazam Rajas' blog for details. Presumably this will be fixed with Vista... But then I hope that M$ changes their plans to hobble performance of OpenGL. On Linux and Solaris we can get very close to the 4 GB barrier with the 32-bit JVM and beyond with the 64-bit JVM."


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.



Do we need an isolation layer for unit tests?  
kfarnham

Space Oddity Blog

发贴人 kfarnham 2005-8-16

Retrieving and manipulating NASA imagery

There's lots of great data out there on the web, but pulling it down and manipulating it can still be a challenge. Today's feature article uses Earth imagery made available by NASA, but parsing the descriptor formats and working with the pixels still requires some manual work on the part of the developer. Fortunately, Java's wide collection of libraries -- from network and IO classes to retrieve the data, to JOGL to do high performance manipulation of the pixels -- is more than up to the task.

You've seen the beautiful images of Earth from space taken by NASA astronauts and satellites. By viewing a series of images one after another like frames of a movie, you can replay and study changes due to weather, natural events, and human activities. In the Feature Article, Earth Animations for Education from NASA, Tom Gaskins describes how to write Java software that uses the OpenGL graphics interface to display these images on a 3D globe.


Gregg Sporar has some NetBeans news in today's Weblogs. In Profiler Milestone 8 Now Available, he writes: "The latest milestone build of the NetBeans Profiler is now available. It has some important enhancements. The most important one to me is the automatic exclusion of server code when profiling a web application. This is just the default - you can enable profiling of the server's code if you want."

Richard Bair challenges the conventional wisdom that bashes theNot Invented Here mindset: "'Not Invented Here', a clever phrase often used as a pejorative to indicate that somebody (usually due to ego?) would rather reinvent the wheel and write their own implementation than leverage an existing (and by implication, better) implementation. In this entry I try to shed some light on real technical reasons why 'rolling your own' may be better than relying on somebody else's implementation."

Kirill Grouchnikov has some solutions for Showing licenses for your application: "Most of the nowadays open-source and commercial products extensively use other products. These tools come in variety of licenses, most of which require you to include the corresponding licenses along with the executable version of your own library. Here is how you can show licenses for bundled third-party libraries in a single user-friendly window."


In Also in Java Today , the article Introducing the JDesktop Integration Components introduces the JDesktop Integration Components (JDIC), an open source project that's building components that bridge the gap between native applications and their Java counterparts. JDIC's single Java API lets your applications tap into native OS features while maintaining cross-platform support. It currently offers native Web browser (Internet Explorer or Mozilla) support, system tray support, file-extension integration, and other desktop features.

"The list of cool and useful applications seems to be growing daily, with sites such as Flickr, Google Maps, The WebORB Presentation Server, etc. Those sites and others have created an avalanche of AJAX hype. To be fair, the technology does have the potential to improve the online experience. For all its goodness, however, something smells a little funny about this holy grail of Web communication; like beer and chocolate before it, there is an evil side to what -- on the surface -- seems pure and innocent." InUsing the XMLHttpRequest Object and AJAX to Spy On You, Earle Castledine says "while the XMLHttpRequest object and AJAX can provide huge user and developer benefits, there are some issues you probably haven't thought about yet -- but it's time everyone did."


In Projects and Communities, the XML Config Readerproject offers an open-source extension of Java ResourceBundle class to read configuration data directly from an XML file. The data is read into a hashtable and can be retrieved with simple getString(), getInt(), and getDouble() method calls.

The Portet Community has noted the recent release of several portlet suites and portlet containers, including Stringbeans 3.0 RC 2 (which introduces WSRP support), Kosmos 0.1.0RC1 (project management portlets), and Apache Pluto 1.0.1 RC 4 (the reference implementation of JSR168).


Mobicents collaboration is in the works in today's Forums. In SIP RA Type, ben_evans writes: "Hi all, my name is Ben Evans and I work at Open Cloud writing SIP RAs and services. I see has Ranga mentioned me in an earlier thread - we have talked in the past about cooperating on a common JAIN SIP RA Type definition, however not much has been done yet, so I would like to kick off a discussion here. My goal would be for us to converge on a "standard" RA Type so that SIP SBBs can be easily portable between Mobicents and Open Cloud's Rhino SLEE, and others. I think they are probably pretty similar already, both based on the SLEE spec recommendation, so this should not be too difficult."

tmarble reposts some important considerations Re: Java EE postings: "In many environments when we look at performance, database performance turns out to be at least as crucial as appserver performance per se. One of the most significant ways this manifests itself is in JDBC statement caching. Statement caching allows the database to reuse the SQL plan for a particular query, which greatly improves the performance of the database (and hence your appserver). It's crucial that you write your Java EE application to allow statement caching. If you're using CMP (or something else where the containter generates the JDBC calls), you can be assured that your appserver does the right thing. If you are writing servlets with your own JDBC calls, it's up to you: you must use prepared statements, and the text of the prepared statement must be the same in order for statement caching to 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 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.



Retrieving and manipulating NASA imagery  
kfarnham

Under Pressure Blog

发贴人 kfarnham 2005-8-15

Focusing on Java performance

Sick of the "Java is slow" crowd yet? These assertions of Java non-performance are so predictable, I swear such posts on Slashdot are generated by 'bots (in my mind, most of these comments are perl scripts generating posts about how great PHP is). What's worse is when even Java people don't get it. I worked with some colleagues who were absolutely shocked that compiling their code with GCJ only gave them a 5% performance improvement... as if they believed the code would not be compiled (by a JIT, by HotSpot, etc.) otherwise.

But there's no avoiding that Java performance is under a microscope, from within and without, and it's critically important that Java's performance, while remarkable, continue to improve.

To this end, there is a performance project on java.net, and it has just kicked off a wide ranging discussion in the Forums. In the initial post, Tom Marble writes:

This is *the* place to talk about performance issues throughout the stack: hardware, OS, Java Platform, Application Server, Web Services, and Desktop, grid engine, etc. I'll update the main performance page soon: https://performance.dev.java.net/

Please join the conversation with your insights on performance issues, across the Java spectrum.


Also in today's Forums,s690716 wants a JSR for accessing imaging devices (TWAIN, SANE, VFW, V4L): "It's time to support standard imaging APIs like TWAIN. After a long time you can use output devices like printers (javax.print) on different systems... but the input for image data (without JNI) is not supported. standard apis like twain, sane and wia are available and should supported and used by java. The JMF still has support for some properitary video devices. Imaging devices like scanners are not supported yet (neither in image i/o nor in jai). The standard hint/workaround 'use JNI' is not helpful..."

In today's Weblogs. Richard Bair explains SwingLabs and Swing You may have heard of SwingLabs, but how does it relate to Swing? Have you wondered about the contribution process, or why the JCA is required? In this blog I describe the relation between Swing and SwingLabs.

In Straining the bath water (in search of lost babies), John Reynolds says: "Innovation in web component frameworks is a wonderful thing, but there seem to be a lot of babies headed down the drain. Why another Java web component framework? Why not evolve (fix) one of the existing web component frameworks? "

David Herron is thinking about Open source quality organizations: "Today I spent a few hours looking at the presence of quality organizations in different open source projects. Typically you think of an open source project has being some software developers scratching an itch, and so the processes circle around the software developers. So I expected to find little presence of quality organizations within the various open source projects. The results of my search surprised me. In some instances anyway. "


In Also in Java Today , Joshua Marinacci expands on Swing Hacks in Hacking Swing with Undocumented Classes and Properties. He writes, "This article will show you six undocumented features, classes, and properties that let you hack into Swing. I've based the article on hacks that didn't make it into 'Swing Hacks' for one reason or another. Some of them were too short to be full hacks on their own. Some didn't fit nicely into a particular chapter. Some are new things I've learned since publishing the book (technology stands still for no one)."

Ars Technica has a short article on AJAX: the cross-platform successor to Java: "Whatever AJAX is, it uses a collection of acronyms, HTML, XML, CSS, DOM, etc., and JavaScript to create a unique genre of web page. This 'web page' has the look and feel of an application running under a traditional operating system, though it functions (in theory) independent of a given OS. [...] Today, Google Maps is probably the best known implementation of AJAX, recognized by the ability to scroll and zoom maps without the biggest drawback of traditional web pages: refresh." Comparing AJAX to Java as a client-side technology, it continues, "what does a traditional consumer mapping application do that Google Maps does not, and how many people use that specialized functionality? That is the question to ask. The answer is the 80/20 Java based word processor debate, and we all know how that turned out. "


In Projects and Communities, Daniel Brookshier's blog Making the art of Java really about art interviews the founder of the TilePileproject, which helps artists create glass tile murals, by breaking down the mural image into the smaller pieces that can be analyzed by color and eventually assembled into the complete work.

Apple has updated two of their sample code projects to show how to create Universal Binaries for the native parts of JNI-based Java applications. The samples, MyFirstJNIProject and CWCocoaComponent require no code changes to run on Intel-based Developer Transition Systems


In this week's Spotlight: The Cajo project offers "a small, free library, enabling powerful dynamic multi-machine cooperation, both within, and between, Java applications." The framework makes no syntactic distinction between local and remote objects, and thus requires no code changes to distribute processing across the network. Applications can transfer their user interface to any Java-capable client. The project claims "This architecture can fulfill the true promise of Java: Turn the network into one seamless, evolving computer; link everything, from mainframes, to mobile phones." Cajo is also featured in the links of the Wikipedia article on Computer cluster.


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.



Focusing on Java performance  

Java Web Start article hits a nerve

I don't usually blog about the same thing two days in a row, but Joshua Marinacci's Java Sketchbook: Getting Started with Java Web Start article has generated a remarkable number of talkbacks in a single day (26 at last count). And aside from a small amount of flameage on a thread about security, most of it hits on substantial concerns people have with what Web Start does and what it could or should do.

I think deployment is a real pain point in Java SE development, perhaps even a bigger issue than the endlessly debated visual fidelity of AWT vs. Swing vs. SWT. It's hard to see how users are going to get bent out of shape over an application "just not looking right" when it's absurdly impractical to launch the app in the first place, or when that situation makes developers take their platform-independent Java code and place it in a single-platform application launcher.

Java Web Start is one answer to some of these problems (and Joshua's part two will go into further depth on JWS), but there are others. You can turn to double-clickable JARs, native bundlers, shell scripts / batch files and more, depending on your needs... and your needs may not be well served by any of these approaches. Indeed, few of those options address broader deployment issues, like versioning, updating, and document association (some of which are being addressed by efforts like JDIC).

I think you could write a book on Java deployment issues. Maybe if Joshy would take the hint -- :-) -- he will...


Java Web Start in Mustang is a topic in today's Forums. In Webstart changes in Mustang, prunge writes "Webstart looks much more user friendly in Mustang when compared to 1.5. However I have some issues with it [...] The 'downloading application' screen looks better now. However, I do miss the number of Kb downloaded and the estimated time remaining messages. Especially on dial-up, users would like to see an approximation of how much time is left for downloading if it is going to take more than 10 seconds. It is also good to see the number of Kb downloaded and the total size of the app. It's probably right that users no longer have to see the names of the JARs being downloaded - end users don't care about this."

The "true" Checklists: XML Performance, kohsukewrites: "While I knew that there are some documents named 'Patterns and Practices' from Microsoft, I didn't know that there is a section for XML Performance. Sadly, I was scarcely satisfied by that document. The checklist is so insufficient, and some of them are missing the points (and some are even worse for performance). So here I put the "true" checklists to save misinformed .NET XML developers."


In today's Weblogs, Romain Guy says he could Get to love web development: "Last week I wrote an article about Wicket and I spent some time discovering and taming it. And I have to confess this: I love it."



Scott Andersen worries about Breadth, not depth in computer science education: "What in the world is going on?! Have we become so specialized even at the college level that we can't speak intelligently or have a reasonable intuition for things that border our comfort zone?"

 

David Walend has been playing around with GraphViz Class Diagrams: "Last week, Kohsuke Kawaguchi suggested that we could use GraphViz to generate class diagrams automatically. I built it out of parts on my workbench over a few evenings."

In Also in Java Today: "Pooling is great - except it's not very tunable, it's hard to map end users back to connections in the pool, and if a connection ever becomes invalid inside the pool, expunging only that connection from the pool is nearly impossible; JDBC 4.0 addresses all these drawbacks." In JDBC 4.0: A Significant Advance on the Standard and Features Worth the Wait, John Goodson describes the highlights of the JDBC 4.0 proposal (JSR 221), which is slated to be part of Mustang.

"In Java programming, composition is straightforward and almost foolproof. With specifications, however, it's still possible for all kinds of unexpected interactions to take place. Further, the number of technical specifications seems to be steadily increasing with time, so that chances of conflicts continue to rise." This problem is shown in the XML space in Micah Dubinko's XML.com article, Composition, which looks at unintended consequences in the XLink and xml:id proposals.


In Projects and Communities, the 48th Java Tools Community Newsletter announces the graduation of the TrueZip project from the community incubator. "Using this library a Java application can read/write access a ZIP or JAR file and its entries like an ordinary directory with the entries as the directory contents." The API provides classes which are compatible with equivalent classes in the java.io package.

The article JXTA Technology Brings the Internet Back to Its Origin notes the effect that the inherently centralized DNS has had on the initially de-centralized internet, and how JXTA repsresents a return to the internet's original philosophy: "JXTA technology was designed to address many of today's Internet limitations and return control to the edge of the network, where it initially started.


The new java.net Poll asks Does humor belong in javadocs? Cast your vote on the front page, then join the discussion on the results page.


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.



Java Web Start article hits a nerve  
kfarnham

Start Me Up Blog

发贴人 kfarnham 2005-8-10

From web link to double-clickable

Ten years ago, it would have been hard to imagine that Java would be a huge success without Java desktop applications gaining significant traction. Working with the AWT and (later) JavaBeans, it seemed like we'd be writing cross-platform GUI's, replacing the platform-dependent applications that required expensive and difficult ports (or, more often, just writing apps for one platform).

The reasons for this situation are varied -- the rise of the web application, the particulars of the various GUI toolkits, etc. -- but one significant blocker has been the lack of a rich deployment model. From day one, the designated way to launch a Java SE application has been some variant of java ClassName as a command-line argument. Aside from implying that all platforms have command lines (the "classic" Mac OS didn't!), that says nothing about double-clickability, icons, versioning, document association, etc., to say nothing about figuring out whether Java is even available on the machine, and how to install it if it isn't.

One option to provide some of this is Java Web Start. As columnist Joshua Marinacci writes in our Feature Article,Java Sketchbook: Getting Started with Java Web Start:

Java Web Start (JWS) is a technology that lets you deploy a desktop Java application directly from a web page. It provides security, safety, and automatic updates when you roll out new versions. It will even give your program an icon on the desktop. In short, Java Web Start gives you the power of a desktop app with the ease of deployment users expect from a web app.

In part one of his Web Start series, he shows the basics of providing an application via JWS. Part two will cover security, optimization, and polish.


Richard Bair has an update on SwingLabs - Direction and Status in today's Weblogs: "I often get asked about SwingLabs -- what is it? When will it be stable? How do I get the sources? Who's contributing? What will it contain? In this entry I give a brief overview and attempt to describe our direction and status as a project."

Kohsuke Kawaguchi says We deserve a better proxy support!: "Nowadays many Java tools need to access HTTP resources, yet their support for proxies are pathetic. We the Java developers deserve better!"

In Open Source for Capitalists, Part 1 - Free prize inside Daniel Brookshier writes: "How do you make money from open source? Daniel Brookshier starts a journey to answer this question with an idea called: Free Prize Inside."


In Projects and Communities, the Java Specification Requests Community notes that JSR 121: Application Isolation API Specification has reached Final Draft stage. "This is an API for initiating and controlling computations isolated from each other to varying degrees. Some API semantics are similar to those of ThreadGroup.

The Mac Java Community notes the article What Is NeoOffice/J (and Can It Replace MS Office), which introduces this Mac variant of OpenOffice.org that uses Java to handle its UI. The article also includes an interview with lead developer Patrick Luby, who discusses the effects of Apple's Intel migration and the end of Cocoa-Java.


In Also in Java Today , the Work Manager API offers a solution for performing parallel processing directly within a managed environment. You can leverage this new offering to implement parallel processing within a J2EE container. In The Work Manager API: Parallel Processing Within a J2EE Container, Rahul Tyagi, writes "with the Work Manager API, developers can design robust applications for executing tasks in parallel, listen to work lifecycle events, and add the dependency of task completion to other tasks."

In a blog entry on Artima, Bruce Eckel asks What Is Consulting? "Lots of people that call themselves consultants do things that I would not personally consider consulting. I think consulting is when you have some kind of special expertise -- come by through hard struggle and learning -- that you transfer to a group of people, in a relatively short period of time, and in a way that is unique for that group. I also think that consulting involves addressing particular issues faced by that group." As he notes, though, this is not necessarily how consulting is defined or practiced by many in the industry


In today's Forums,linuxhippy is concerned about Fast (applet) startup time On my windows-box applets that start up with Tiger in 11s take more than 23s on Mustang which is a total regression (both are warm starts) which is than twice as long. I hope this will become better in future - although I understand that for mustang the goals are for now different than providing fast startup I hope this will at least not get worse than Tiger.

Meanwhile, wahjava notes problems with Support for Unicode in Mustang: "I've pointed out some of the Unicode problems in J2SE 6.0 (downloaded around February 2005). We can't pass Unicode (Wide Character) command-line arguments to the java launcher. We can't pass Unicode (Wide Character) command-line arguments to the processes launched by java (e.g. through java.lang.ProcessBuilder class). Actually, the problem is due to the portability layer created for Unix/Windows stuff. e.g. In Unix (esp. Linux), Unicode command line arguments are passed as UTF-8 whereas in Windows, passed as UTF-16 characters."


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.



From web link to double-clickable  
kfarnham

Shine A Light Blog

发贴人 kfarnham 2005-8-9

Instead of cursing the darkness...

If you use QuickTime on Mac or Windows and have paid for the "Pro" features -- editing, saving movies from web pages, full-screen playback -- then you're probably aware that every few major versions and without prior warning, your registration key stops working and Apple asks you for another 30 bucks. It happened when they released Mac OS X 10.4 ("Tiger"), which doesn't offer a way to not upgrade to QuickTime 7, meaning Pro users had to either stay on 10.3, go without QuickTime Pro features in 10.4, or pay up.

Elliotte Rusty Harold (of Café Au Lait fame, and author of many Java books) had enough and declared that he was "mad as hell":

There's another, much bigger company that's pissed me off lately by asking for another $29.95 more for a product I'd already paid for, just to support the new release of their own operating system. In this case, there's no good open source alternative to this product; but I'm in a position to do something about that. After about a week of part time coding, I've already reimplemented more than half of their application, and I've added a couple of features they don't have to boot.

The result of this effort is Amateur, an open-source re-implementation of the QuickTime Player Pro application, coded with QuickTime for Java. In its third developer release, this JavaDesktop Community project already offers a Mac double-clickable application, at a modest 550 KB, that offers most of the features of the real QT Player, including basic playback and editing, undo/redo, full-screen playback and more. There's no Windows double-clickable yet, but he estimates it would take just a few hours -- having done a little QTJ myself (wink), I think it's probably a matter of minutes, not hours, as the basic QTJ features do work really well across platforms, and QuickTime 7 now includes QTJ by default on Windows.


Also in today's Projects and Communities, the JavaPediaentry for Barcode will be useful for anyone whose application, server-side or client-side, needs to generate barcodes. The page collects open-source Java, native, and commercial barcode generation libraries, and links to standards bodies and other external sites with more information.


In today's Weblogs, Xiaobin Lu discusses what the Java Performance Team is doing on a particuar issue wherePerception == Reality: "One of the issues we have run into our work on the Java performance team is the difference between the physical memory size of a process and the perceived size of that process. "Perceived" footprint is the number reported by the operating system (by tools such as "ps" and "top" on Unix/Linux, and "Task Manager" on Windows) that a process takes up in RAM."

Navaneeth Krishnan has thoughts about encapsulation in SOA -- A Realization?: "I think the SOA hype is essentially a realization. The IT industry has realized that today's cutting edge technology is tomorrow's legacy. And that systems we create today ought to work with systems to be developed in the future."

In IntelliJ IDEA 5.0 and custom look-and-feel, Kirill Grouchnikov says "IntelliJ IDEA 5.0 was released a week ago. Here's how you can set your favourite look-and-feel to make you feel at home."


In Also in Java Today , annotations let you specify metadata as part of your source code. With this feature, you can embed tool instructions in your code rather than creating separate configuration files that you then need to maintain in parallel to the source code. But, as Java consultant Dennis Sosnoski explains in Annotations vs. Configuration Files, configuration files still have their uses, especially for aspect-like functions that cut across the source code structure of an application.

Hibernate 3 allows developers to make much greater use of "formula," as either an attribute or an element, in many more elements than were permitted in Hibernate 2. According to Dai Yifan, this opens up new opportunities for Hibernate developers: "This adds much flexibility to object-relational (O-R) mapping, and thus allows further fine-grained interpretation of complex data models." In Hibernate 3 Formulas, he shows how to use formula to achieve polymorphism, joins, and other useful combinations.


In today's Forums,bmesserer has questions about Glassfish features (esp. Java EE 5/EJB3): "I'm not sure, maybe its just me who didn't find it but could anyone involved/responsible for glassfish please post a "feature matrix" or sort of a change log for the published builds? I'm currently working (testing) Java EE 5 and - at first - couldn't find anything whether glassfish supports the draft-features or to what degree. Only by going through these forums have I found that it at least supports a subset of JavaEE5 or... well, whatever. I won't just use "trial and error" to check whether the (as said, Java EE 5, especially EJB3) features I use in my app are supported or not (you know, when working with a new platform its difficult to distinguish my own faults from glassfish's); believing some postings in this forum, the Java EE 5 implementation is quite complete and implements "the latest draft" (whichever this may be) - maybe I could already test (?)."

In Re: Javac compiler option to build Windows native exe,danielmd has more thoughts about third-party libraries and tools: "Still I hate the SUN licensing scheme of see but don't touch, they should allow for projects like GCJ to use their libraries or provide something like partial library distribution something like IBM does with SWT, for SWING. I hate SWT by the way it is an aberration, one of those forks that in time will be hated by all GUI developers. It works well for one kind of application, it is just so problem domain specific in its design that will never be a good general GUI library, unless they redesign it, and then it will look exactly like SWING."

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.



Instead of cursing the darkness...  

But if you try an alternate spelling sometime...

Some of the nicest and most natural elements of a human-computer interface can be quite hard to pull off. Consider the now-common example of the search engine's "Did you mean" feature, which catches a misspelling (or just a noticably low number/quality of hits), and proposes an alternate spelling that may generate more search results.

On the one hand, this is perfectly natural. If you send me an e-mail wanting to write an article about "Jave", I'm going to assume you mean "Java" (though I'll probably run a Google search for "Jave" anyways, just in case that's a new term I'm not familiar with). From the search engine's point of view, it needs to know not only what's in the search index, but also how to move around parts of search terms to maximize the number of results and maximize the relevance of those results. It's one of those things that comes naturally to the human mind, and is curiously tricky to get right in code.

Fortunately, there's help. In today's Feature Article, Tom White asks Did You Mean: Lucene?. He shows how to use the Lucene search engine and an expansion spell-checker API to offer "did you mean" functionality with a surprisingly compact amount of powerful code.


In today's Weblogs. Tim Boudreau reveals some NetBeans tweaks you've probably never heard of: "In its rich history, NetBeans has grown various command-line options that affect how some things work or look. I thought I'd share some useful ones..."

Bhakti Mehta notes that JAXB 2.0 and JAX-WS 2.0 are a part of Mustang (JDK 6.0): "To enable reasonable support for ease of development for the web services stack, JAXB 2.0 and JAX-WS 2.0 are now a part of the JSE 6.0 platform."

Starbucks and JavaServer Faces offers an analogy from Jacob Hookom: "I just got back from a trip out to Boston. Being away from home and our cappuccino maker, I found myself standing in line at Starbucks far too many times-- listening to all kinds of orders for 'coffee'."


In Also in Java Today , "Mock objects have been a key technique for enabling automated unit testing of object-oriented software. However, when we expand the scope of testing into the realm of distributed systems, unique problems arise from the increased complexity." In Mock Objects and Distributed Testing, Brian Gilstrap reviews mock objects and discusses some of the problems that arise when extending the use of mock objects to distributed systems. He also offers some approaches that can help in managing the complexity.

Ready to take a Java enabled device out for a spin? "Siemens VDO Automotive, in conjunction with BMW, has enabled the BMW 7, 6, and 5 series of cars with its Top Level Architecture (TLA), a Java technology-based software platform that provides for the seamless addition and integration of location-based services, web services, and multimedia functionality throughout the vehicle's entire life cycle." The article The Network on Wheels -- Java Developers, Start Your Programming Engines! looks at the architecture of this Java platform and what kinds of applications can run on it.


In Projects and Communities, the Java Web Services & XML Community project XHTML Transcoderquickly converts broken HTML into spec-compliant XHTML. Among the fixes it applies are lower-casing tags and attributes, correcting tag nesting order, terminating unclosed elements, and terminating empty tags... while maintaining other languages in the code like JSP.

Public API's are a big part of the web's future... and so are good tools. In Running the Amazon Web Services Sample Application In NetBeans, Brian Leonard shows how to take an Amazon-provided sample application use it with NetBeans. Along with setting up NetBeans and building the application, he also shows how to use the debugger to step through problematic code.


In today's Forums, marcomanno is concerned about Single Threaded Rendering and D3D, Windows Vista and OpenGL: "After reading about OpenGL being slower and limited to version 1.4 and being implemented using DirectX in Windows Vista I'm a bit worried about the usefullness of Single Threaded Rendering using OGL under Windows. I think it is essential to implement it using D3D as soon as possible. When do you plan to implement STR for D3D."

biehl has Questions about silliness(?) in the Java API's: "Why (oh why), is there a TimeUnit.SECOND.sleep(500), and not Thread.sleep(TimeUnit.SECOND, 500) - or even better Thread.getCurrentThread().sleep(TimeUnit.SECOND, 500) Why (oh, why), is InetAddress.getByAddress on byte's (and not on shorts - or anything else for which >127 is a valid value) and why is it not a vararg - InetAddress.getByAddress(Short... bytes)"


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.



But if you try an alternate spelling sometime...  
kfarnham

Time Is On My Side Blog

发贴人 kfarnham 2005-8-8

The Hotspot/JIT vs. static compilation debate continues

The forum topic Javac compiler option to build Windows native exe continues to expand. On the one hand, we have posts like this one from jwenting that are on the original topic of giving javac a simple means of generating a single-platform launcher or double-clickable:

My main deployment platform is Linux, with secondary deployments on AIX and Windows, and the occasional deployment on SCO Unix, Solaris, and HP. 90% of my customers won't be able to run that exe, every one of them can run a classfile deployed in an executable jar (or for GUI applications optionally JNLP). Making platform specific extensions should be the responsibility of 3rd party tools providers and operating system manufacturers, not Sun.

But one of the interesting implications of such an upfront compilation is that such an approach is either going to be a simple JVM-launcher (and thus still require the user to hava Java installed), or must be statically compiled. This latter option is rife with unintended consequences, according to a post by sjasja:

This is why Hotspot does binary compilation!!!!! Hotspot compiles Java into the exact same binary machine instructions as a static compiler does. Except that because Hotspot has access to run-time information, Hotspot can compile into even faster code and optimize more! Dynamic compilers can do things like "virtual" function inlining, which static compilers can't do.

The thread also addresses the deployment pain felt by many trying to just get a Java application onto the user's desktop, and how compiling an .exe addresses that, at least for the Windows audience. We'll have more on desktop deployment in a feature article later this week.


Also in today's Forums,javakiddy is working through some MIDlet-pause problems in J2ME: Optimising pause(): "Apologies for the slight off-topic nature of this post, but there doesn't appear to be a dedicated J2ME/MIDP forum. While recently experimenting with J2ME, I noticed that the current Displayable object is retained by the KVM (or rather the LCDUI) when a MIDlet is paused. I found this out quite by chance, as one of my MIDlets - 'SudokuME' - threw a NullPointerException upon being resumed. Like a good little boy I had re-referenced all unnecessary data when the MIDlet was paused: anything I could reload or reconstruct was ditched. However, the previous Displayable was restored when the MIDlet resumed, except now the data upon which it depended had been GC'd, hence the exception. The problem here is setting the display (a) doesn't have an immediate effect, and (b) cannot be set to null anyway, as a null parameter merely re-activates the current Displayable (right?) So even if I so a setCurrent(null) inside pauseApp(), it isn't going to release the current display for GC."

In today's Weblogs, David Van Couvering writes about Jonathan Schwartz, C|Net, and me After Derby graduated last week, those of us working on Derby thought it would be a great time to get the word out about Derby and Sun's support of Derby. This is the story behind the C|Net story about Derby.

David Herron is Looking at 'findbugs': "The leader of the Findbugs project, Bill Pugh visited Sun this week. He gave talks to various teams about the tool, showing its usefulness. One of the talks was to the management of my team, the Java Quality Engineering organization."

Kohsuke Kawaguchi has A story of migration from JAXB 1.0 to 2.0: "Today, I've heard from a JAXB 2.0's customer that they had a successful transition from JAXB 1.0 to 2.0. It was from Rebecca Searls, who's working on the migration tool of Sun Java System Application Server 8."


In Also in Java Today, the lack of readily-available devs skilled in web services design and production continues to impede web services projects, according to the latest survey from Evans Data Corp. According to Lack of Skilled Devs Slows Web Services, Evans' Spring 2005 Web Services/SOA Development Survey found 1-in-5 IT managers said they can't find enough web services-savvy talent. Particularly acute, Evans found, is the shortage of skilled professionals "who understand the various specifications and the way to build the interfaces."

When requirements for business logic are piled atop one another, with "gotchas" and last-minute hacks assembled in ever more intricate if-then-else statements, the result is inevitably spaghetti code: hard to test, hard to maintain, and probably wrong anyway. Is there a better way to express this kind of logic? "One solution that is gaining traction is to use a rule engine. Rule engines are frameworks for organizing business logic that allow the developer to concentrate on things that are known to be true, rather than the low-level mechanics of making decisions." In Give Your Business Logic a Framework with Drools, Paul Browne looks at the open source Drools rule engine as a possible answer.


Today's Projects and Communities, features an item from the JavaDesktop Communityhome page: a recent Javalobby thread points to "an incredible collection of applets by Paul Falstad." They're worth a look even if you're not interested in oscillations and waves, quantum mechanics, or vector calculus.

Members of the Java Games Community have surely fought porting problems caused by incompatible handsets. In Focus On: Tira Wireless' Paul Schaut, GamesIndustry.biz discusses the Tira Jump Product Suite, which uses device-specific plug-ins to help isolate the developer from the idiosyncrasies of a device.


This week's Spotlightis on the JAXB RI Architecture Document Project: A sub-project of the JAXB RI project, the JAXB RI Architecture Document Project provides "a high-level map for developers who are interested in looking at / playing with the JAXB RI source code." This view is like "a map of the source code, which helps you understand the big picture and which part of the code you need to dive in to fix the problem at hand. This has been somewhat lacking in the JAXB RI for quite some time." Kohsuke Kawaguchi's weblog entry Pumping up javadoc discusses the custom taglets that allow the design documents and diagrams to stay up-to-date with the code.


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 Hotspot/JIT vs. static compilation debate continues  
kfarnham

No Action Blog

发贴人 kfarnham 2005-8-5

Java's curious disdain for serial connectivity

This is one I truly don't get: why serial device connectivity seems so utterly off the Java radar. An ongoing thread on the forums describes the experiences people have had using the effective, but barely-maintained, javax.comm API for serial communication. As fak writes in Re: improve javax.comm:

In College, I had to write a Java program that would receive input from a scale, and then do statistical analysis and generate some charts. I needed to use javax.com. But I could not believe that it did not come as a standard feature in J2SE. I mean, shouldn't a language that is supposed to be one of the best languages for desktop development, support serial and parallel communication as default? Not to mention that to date there is no USB support either.

Actually, there is a JSR for USB support: JSR 80: Java USB API, but it seems to have taken five years to get from JSR review to a final release. Moreover, having only a spec and a one-platform reference implementationmeans that this capability is nowhere near available to the desktop developer.

Not only is that a shame, I think it's really surprising. I keep seeing USB-based computer and consumer electronics devices that come with Windows-only drivers, leaving all of us on other platforms out in the cold. And yet, what do the makers have invested in the Windows platform? Nothing. They just want to sell stuff. Imagine if they could write their drivers in Java instead. They'd have access to more platforms, and be able to sell more stuff. This would also be a good reason for consumer electronics devices to have Java onboard, since it would provide extensibility to those devices "for free".

It's a free market, so there must be a reason this hasn't happened. Why is this not worth anyone's time or money? Please enlighten me in the talkbacks.


While we're on the topic, this is also the focus of the latestjava.net Poll, which asks "Which interface would you most like to use in Java?". Please cast your vote on the front page, then join the discussion on the results page.


Also in today's Forums,rjlorimer discusses synchronized and unsynchronized collections in Re: Simple performance improvement suggestions: "The fact is, while synchronization is very good, it still presents a potential overhead. The reality is that ArrayList and Vector are *very* similar in design (both extend from AbstractList, both add/remove/get implementations are nearly identical), and as such from an underlying implementation perspective, there is no opportunity for Vector to surpass ArrayList. That being said, Vector has synchronization applied to all external methods. Assuming that the lock is retrieved at runtime every time a method is called on Vector, there is going to be some overhead. I can't tell you how much (you are right in saying it is much better in 1.4 and beyond), but there is overhead associated there."


David Herron clarifies some applet issues in the first of today's Weblogs. His blog entry On supporting IE 7 in (Sun's) Java says "In last week's javalobby newsletter, Rick Ross openly asked about whether Sun would be supporting IE7 in Java. If you think about it that's kind of a silly question, because of course we will (eventually)."

David Van Couvering says Hello from OSCON 2005!: "It only seems appropriate that my first blog entry is at the O'Reilly Open Source Conference, a place where it seems everyone blogs. I came here because I've just recently gotten involved in the Apache Derby open source project, and want to learn as much as I can about the open source culture, community and tools."

Also at OSCON 2005, Scott Schram want to know if you're Curious about Ruby and Ruby on Rails? "Are you curious about Ruby? Do you have Ruby on Rails envy? OSCON 2005 bloggers report on Ruby Sessions."


In Also in Java Today, a new Eclipse plug-in will be released in August that's designed to speed up how Java/J2EE devs can map their applications code to underlying SQL databases. In the Integration Developer News article "Missing Piece" for Java Tools Due in August, the lead on the JSR220-ORM Project lead says object-relational mapping technologies are the "last missing piece" for getting rid of the pain Java/J2EE devs face when building complex apps.

Want transaction demarcation but don't want EJB 2.1 hassles? Think Spring! In the dev2dev article Implementing Transaction Suspension in Spring, Juergen Hoeller writes: "The Spring Framework offers full-fledged transaction demarcation facilities for both J2EE and non-J2EE environments, in particular declarative transactions for plain Java target objects. This enables convenient transaction demarcation without EJB, in a flexible and non-intrusive fashion. In contrast to EJBs, such transactional POJO application objects can easily be tested or reused outside a J2EE container."


In Projects and Communities, the Portlet Community home page notes that "the recently graduated Apache Portals Bridgesproject provides support for Portal independent and JSR-168 compliant Portlet development using common web frameworks like Struts, JSF, PHP, Perl and Velocity." Apache's page also has examples of the bridges in use.

From the Mac Java Community: the NeoWikicollects information related to NeoOffice/J, a Mac OS X port of OpenOffice.orgthat uses Java to provide a more Mac-like UI than X11. Of particular interest is the NeoOffice Development Roadmap which indicates concerns dealing with Apple's announced move to Intel CPU's.


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.



Java's curious disdain for serial connectivity  
kfarnham

Pump It Up Blog

发贴人 kfarnham 2005-8-3

Are webapp frameworks more elaborate than they need to be?

It's not hard to find web application frameworks that simultaneously claim to offer power and simplicity -- a great combination, but a rare one too -- and some of them are based on the idea of "components" or "controls":

JSF is touted to be the ultimate component framework for Java web application programming. Tapestry claims to be based on the idea of component development. And across enemy lines, ASP.NET generated a whole new market for web components.

With this, Michael Jouravlev begins his investigation into web components, but with a crucial difference: he omits the framework. In the Feature Article on today's front page, Building Web Components Without a Component Framework, he tears down the idea of a web component to its absolute basics: a resource, identified with a unique location, that maintains state, responds to events, and is able to render itself. He continues:

What is new in that, you may wonder? Nothing but good old HTTP with a twist. If you use JSP as the presentation layer for your web applications, this article may open some new possibilities.

Bored with static Javadocs? Kohsuke Kawaguchi's weblog Pumping up javadoc: JAXB RI architecture document says there's more to it than you might think: "Javadoc is a really powerful tool, and it's customizable. So I wrote a few taglets and customized the standard doclet to use it as my project architecture documentation tool. It's one show case of taking javadoc to the extreme.

Also in today's Weblogs, Gregg Sporar has some replies in Project Matisse: Some Comments: "My intent in writing last week's entry on Project Matisse was not to start a long-running debate. And I certainly don't want to start a flame war [...] while I have no interest in trying to change anyone's strongly-held opinions or beliefs I do, however, want to respond to some specific comments with a few clarifications and opinions of my own."

Masood Mortazavi is enthusiastic about Recursive Programming in Java: "If you think LISP or ML are the only prevalent languages for recursive programming, I think you're right from one point of view. From another point of view, you really need to take another look at Java."


In Also in Java Today, a recent Joel on Softwaremanifesto, Hitting the High Notes discusses the value of finding and hiring the "best programmers": "I want to answer just one question, because if this part isn't true, the whole theory falls apart. That question is, does it even make sense to talk about having the 'best programmers?' Is there so much variation between programmers that this even matters?" He considers what makes a great programmer and analyzes whether they make sense in a cost/benefit analysis, and whether a cost/benefit analysis even makes sense for software.

Java desktop developers have been clamoring for improvements to the various desktop-related packages in Java SE, and in Update: Desktop Java Features in Mustang, members of Sun's Desktop Java engineering team lay out what they're working on for Mustang. The major improvements, which are subject to change, are listed in five major areas: Swing, Java2D, internationalization, AWT, and deployment.


In Projects and Communities, the Java Tools Community is spotlighting Daffodil Replicator, a data synchronization tool that allows bi-directional synchronization of heterogeneous databases, provided each has JDBC drivers. It offers both snapshot- and merge- style replication.

Satya Komatineni's weblog entry JAXB 2.0 tutorial compiles material related to his JAXB presentation at OSCON 2005. Links include a JAXB tutorial and an abbreviated version of the presentation, complete with necessary links to the JWSDP and other related materials.


In today's Forums,rjlorimer has a suggestion for vertical tab text ideas and workarounds. In Re: Adobe like TabbedPane in Swing he points out "Perhaps more appropriately is to use the results of this bug already in Mustang! You can now use an arbitrary component as the tab contents. Should be a very simple process to adapt vertical text using this new feature."

sandoz has an update Re: Fast Infoset & J2ME: "As coincidence would have it a fork of the J2SE fast infoset (FISE) StAX implementation has been committed to the fi project workspace. This is called FIME and it is planned to modify the code to be more suitable for J2ME. Ias (Changshin Lee) has been responsible for this, as part of the larger work for Web services on J2ME"


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.



Are webapp frameworks more elaborate than they need to be?  
kfarnham

Watch Your Step Blog

发贴人 kfarnham 2005-8-3

Supporting developers for the long haul

I feel like everyone else must have a much better memory than I do. What else would explain the seemingly reasonable expectation that I should remember the specific workings of code that I wrote two years ago, so that I can answer a very detailed on the spot question about it?

Or... maybe I'm not the only one, am I?

Face it, hard as developing is, maintaining can be hard in its own ways. That clever/elegant/kick-ass reflection thing you did back in 2003 has a way of biting you in the butt when you thought you could get away for a three day weekend. "But," says tech support, "it's never thrown this exception before, so why's it throwing it now?" Quick! Try to remember why you wrote this code this way... heck, see if you can even remember the relevant class names.

This is a topic that John Reynolds explores in his weblog entryLonging for an Integrated Maintenance Environment:

An IME (Integrated Maintenance Environment) must help you remember the code (or learn it in the first place).

My preference would be for an environment that lets me run the application, and navigate from the running application to the underlying code.

From my "dream" IME, I want to "attach" a debugger to a running application and "catch" all of the code that is executed when I exercise the user interface. For example, if I click on the "Submit" button of a web-based form, I want my debugger to show me all the code that is executed (client-side JavaScript, server-side Java, SQL and stored-procedures). I want metrics to guide me to the methods that consume the most clock cycles. I want to be able to view the source code, edit it if necessary, and redeploy the application without breaking a sweat.

If you'd like to help John develop this concept, please read his blog and share your ideas in the talkbacks.


Also in today's Weblogs. Arun Gupta asks Application-level header faults - do you need them ?: "All practical use cases for transmitting headerfault details from service endpoint to client seem to be handled by the runtime. Do applications really need to throw an exception and know that it is a header fault?"

Eduardo Pelegri-Llopart announces some Openings in the WS and XML group available now: "The Web Services and XML group at Sun has several very interesting jobs available now in several geographic locations."


In Also in Java Today, previous installments of Emmanuel Proulx's ONJava series on Eclipse plugin development have explored Eclipse's extension points, but until now, there hasn't been much behind his "Invokotron" example. In Eclipse Plugins Exposed, Part 3: Customizing a Wizard, he puts some guts into Invokotron, saying "we will massage the plugin so that it does what we need it to do. This article discusses editor documents and shows how to customize a wizard."

The Observer pattern, most often seen in Swing development, is also very useful for decoupling components in situations other than GUI applications. However, some common pitfalls with registering or invoking listeners exist. In Be a good (event) listener, Java therapist Brian Goetz offers some feel-good advice on how to be a good listener -- and how to be nice to your listeners, too.


In Projects and Communities, the Jini Community's UPnP-Lookup-Serviceproject has just released a draft specification. The project describes itself as "a Jini Lookup Service that stores info about UPnP devices and their services. When a service proxy is requested, it returns a Java proxy that uses SOAP to talk directly to the UPnP device."

"With this much activity, one would think that J2ME would be the next best thing," says Vikram Goyal, whose weblog entry Current Activity in the J2ME World offers a round-up of the status of various JSR's of interest to the Embedded Java Community and others in the J2ME space.


In today's Forums,prunge supports a suggestion Re: Add a method setIconImages(Image images[]) to [J]Frame, [J]Dialog: "I agree. Usually I assume 32x32 and hope that it looks OK if it has to be scaled. The ability to retrieve preferred icon size(s) would be very useful. Setting multiple icons, as you said, would be necessary when differently sized icons are used in different places. One issue I can imagine is when a frame border is painted by a Swing L&F and the L&F is then changed. "

rjlorimer thinks through some synchronization issues Re: Simple performance improvement suggestions: "I disagree. Most of the reasons that it is hideously slow is due to bad default implementations of models (such as GapContent and ElementBuffer), both of which can be replaced by me, but probably can't be changed significantly without breaking backwards compatibility; there are still plenty of methods, however, that can be improved a.) in these default implementations to at least eek a little of performance out of these relatively weak implementations and b.) in methods surrounding those model interfaces that I'd just as soon not have to override and duplicate just to avoid usage of synchronized collections."


In today's java.net News Headlines :

Deal with dropouts

One of the mantras of network programming is that remote programs fail in ways that purely local ones don't. This often leads to a discussion of whether you should approach your network code with an RPC-like mindset that makes remote calls look like local ones, a messaging system that hurls data into the ether and may hope to get a response someday, or something else entirely (Jini?). The RPC vs. messaging discussion returns in Also in Java Today, but let's table that for a moment.

Imagine you want to build a system that allows people to spend money. That should have you thinking transactions, for reasons that are far too well-established to merit repeating. On the other hand, your system needs to allow people to spend moneyvia their mobile devices, which should have you thinkingsignal loss. Remote programming was fun enough when one party might crash or be disconnected -- having a party that may drop in and out of network adds another degree of risk and uncertainty.

To wit: how will you even know to rollback a failed transaction when the mobile client drops and doesn't come back?

In today's Feature Article,Taking Service-Oriented Architectures Mobile, Part 2: Mobile Transactions, Nigel Warren and Philip Bishop look at how to extend the basic principles of service-oriented architecture (SOA) to devices at the edge of the network. This article adds the ability for devices to become involved in atomic transactions, ensuring that all of the relevant resources that a system provides are coordinated and managed so that the overall state of the system remains consistent.


In Also in Java Today, maybe Messaging may not be the way to Build a Distributed System? B. Scott Andersen writes: "Eric Armstrong's recent article on Artima caught my eye and made me think a bit about the evolution of distributed programming techniques. In the beginning, there was the message. But what now?"

In Hibernate Criteria API: Multi-Criteria Search Made Easy, John Ferguson Smart says the traditional approach of putting together HQL queries on the fly is "cumbersome and error-prone". Is there an alternative? "Yes, there is: the Hibernate criteria API, a powerful and elegant technique for complex, dynamic search functionalities. Using the online accommodations database cited previously, this article examines the criteria API solution and its benefits.


James Gosling continues his consideration of floating point inaccuracies in today's Weblogs. In Transcendental Two, he writes: "There's a piece of historical baggage in the definition of sin/cos that is much older than just 'whatever the 8087 chip happened to do': why are the sin and cos functions defined based on parameters that are periodic in a transcendental number? Having the period be 2*pi is based on decades (centuries!) of mathematical standard practice."

Ben Galbraith sticks up for GUI builders in Successful GUI Building... Today: "The HackNot blog recently slammed the use of GUI builders; I think that sentiment is entirely wrong. Over the past year, I've experienced a very pleasant change in attitude, and whereas last year I would have voiced ambivilance about using GUI tools, today I think you'd be crazy to avoid them."

User Interface Optional? Vikram Goyal explains "why the best mobile device business applications will have no user interface at all."


An important deadline appears in today's Projects and Communities: today is the last day for nominations for the NetBeans Board Elections. The polling period begins tomorrow and runs for two weeks (until August 16), with results announced on August 17. Nominations need to be made on thenbdiscuss@netbeans.org mailing list; see the elections page for information on joining that list and participating

The JSR Communityproject jsr264-public offers an Order Management API, defining an interface to an Order Management component, with specific extensions for activation and work order management use-cases. The JSR is in the "Early Draft Review stage, meaning the public has access to a draft of the spec and feedback to the expert group is being actively sought.


In today's Forums,ewin is frustrated Re: improve javax.comm: "JavaComm is one of Sun's unloved children. It just got the absolute minimum maintenance over the years. It has serious design errors which haven't been corrected, and probably will never be corrected. E.g. the dreaded properties file, which makes it impossible to install JavaComm via WebStart, because WebStart can't move that file into the required location, but JavaComm again and again check the existence of the file."

A Sun Java System Application Server 8.1 UR1 dependency is a problem for brianpdoyle: "The latest weekly EA build requires Sun Java System Application Server 8.1 UR1. Is this dependency going to be something that is just temporary or something that other application servers will need to do to implement to support JAX-WS 2.0. Also is there a workaround for this dependency now so I can get it to work with Tomcat 5.5.4?"


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.



Deal with dropouts  

Appreciating useful enterprise frameworks

Some projects are so useful at providing a basic function, it's easy -- far too easy -- to take them for granted. For example, think of how ubuiquitous log4j is, or at least was until Java 1.4 finally gave us a built-in logging API. Same goes, in certain realms, for Doug Lea's util.concurrent, which proved so useful that it drove J2SE 5.0 to adopt a very similar concurrency API.

Let me call your attention to another widely useful framework, featured in this week's Spotlight: the Quartz project, part of the OpenSymphony collection of Java Enterprise components, offers a full-featured job scheduling system that can be integrated into a wide variety of J2SE and J2EE applications, regardless of size. Quartz allows you to schedule tens of thousands of tasks, and its advanced features include clustering and participation in container-managed transactions. Quartz is used by thousands of developers, driving both commercial applications and open-source projects.


In today's Weblogs. Eamonn McManus passes along some Good advice for coding listeners: "The consistently excellent Brian Goetz has written a new article in his Java Theory and Practice series entitled 'Be a good (event) listener'. Since listeners are an important part of the JMX API, here's how his advice applies there."

Jacob Hookom says It's Coming... [Very] Soon: "I was ecstatic over the interest in JavaServer Faces at JavaOne. There were a few talks on the new web tier alignment and where the JSF platform is heading for JEE 5, this is a short follow up to help answer some of the questions I've been reading online."

When engineers (sort-of) read licenses - a cautionary tale comes from Tim Boudreau, who writes: "My week began with a licensing discussion. While those tend to be endless, this one, I hope, can be finite. It started when Elliotte Rusty Harold wrote in his blog that NetBeans did not seem to be open source. NetBeans is open source, but I think the debate makes for a cautionary tale - one in which I'm as guilty as anyone of not reading carefully. The silver lining is we'll be getting rid of the obnoxious click-through license on the NetBeans download page."


In Also in Java Today, "Until recently, web service interactions were solely synchronous and request-response in nature. However, it soon became clear that the synchronous request-response type of interaction is a very small subset of messaging scenarios. Messaging is very important in constructing loosely coupled systems, and as a result, this limitation is critical." With this, Srinath Perera and Ajith Ranabahu explore the many forms messaging interactions can take, and in Web Services Messaging with Apache Axis2: Concepts and Techniques, they show how complex messaging scenarios can be built up from Axis2's two simple paradigms: fire-and-forget and request-response.

Now in its second milestone build, AspectJ 5 is a big leap forward for aspect-oriented programming on the Java™ platform. A major focus of AspectJ 5 is on providing support for the new Java language features introduced in Java 5, including annotations and generics. In addition, the language contains new features not tied to Java 5, such as an annotation-based style for writing aspects, improved load-time weaving, and a new aspect instantiation model. In AOP@Work: Introducing AspectJ 5, Adrian Colyer, lead developer on the project, introduces you to both the AspectJ 5 language and the release containing the AspectJ compiler and associated tools.


In Projects and Communities, the JDK Communtity has an important announcement in New Java SE Mustang Feature: Type Checking Verifier. Mustang's new verifier is much simpler and much faster. Developers should be aware that the new class files generated by javac won't work on older JVM's, and those doing byte code instrumentation will need to work with new code attributes or use a temporarily-available fall-back verifier.

Members of the Java Games Community may want to check out Game Developer's Magazine's 2005 Career Guide, aimed at professionals, recent graduates, and those wanting to get into the business. The guide, available on US newsstands and as a paid downloadable, includes a salary survey and articles on getting into the industry and what day-to-day game development is like.


In today's Forums,abies has some advice Re: Drawing 700.000 lines Use GeneralPath to preconstruct your lines and paint in one big batch. If your data is static, leave the GP and reuse it later, if not, you can still use same GP to fill it with new data. Be sure to specify initial capacity to GP. First try to do it with one big GP and check the performance improvement. Then, please try to do it in smaller batches - 16,32,64 lines per batch. I remember that few years ago, using one big batch was best for normal lines and 32-line batch was best for antialiased lines. GP should probably give you 4-5 times speedup.

In the Mobicents forum, maretzke has kicked off a discussiona about Skype RA ...: "Hey all, did some 'analysis' on Skype and their (what they call) API. I thought about a resource adapter that "talks" Skype. This could be useful to build a gateway between e.g. Skype and SIP. However, the Skype protocol today is quite limiting and the programming capabilites as well. Did somebody else spend already some thoughts on this?"

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.



Appreciating useful enterprise frameworks  

过滤博客

按日期: