Skip navigation
kfarnham

Squeeze Box Blog

Posted by kfarnham Jul 29, 2005

Let's put everything into Java?

There's an interesting discussion in the forums. It started with the topic Are you for or against "native XML support" in Dolphin?, but has expanded past that to include ideas for embedding other kinds of content in Java code, like SQL.

brucechapman kicks this kind of thinking up a level in Re: Are you for or against "native XML support" in Dolphin?:

Native XML in java sucks because it is so small minded. If anything is needed to solve this problem, then what is needed is a mechanism to support native ANYTHING. (Well anything that can be expressed in unicode anyway)

XML is one (and probably the most wanted and most obvious) of those anythings, But there is also SQL, regular expressions, and a myriad of other things that have their own syntax (like BNF, and ITU's ASN.1 - those are examples not ways of expressing the syntax) which for some people would be nice to have supported natively.


 

On the one hand, there's a definite appeal here -- if we're going to have efforts to embed different kinds of content into Java, it makes sense to have a common approach, since that would offer a consistent, predictable means of doing so. It would probably also eliminate overlapping and potentially incompatible appraoches among different embedding efforts. The fact that generics has already taken the angle braces so obviously needed by XML is one example of this.

On the other hand, at what point does this stop being Java? What is the learning curve like when you need to know not just Java, but anything that can be embedded into it, in order to read an arbitrary source file? Sure, I can think of some times when I'd rather have done something in LISP than Java, but how maintainable would it be for me to actually drop into LISP in the middle of a method? Then again, we already build up SQL statements in code today, and if this non-Java stuff were off in another file, how different is this scenario from needing XML deployment descriptors to be maintained in parallel with Java code today?

I suspect a lot of you have strong feelings about these issues. I hope you'll stop by the forum and let us all know what you think.


Also in today's Forums,kohsuke has some help Re: JAXB and xsd:include (common type libraries across multiple schemas): "What you are describing further (you got schema S2 that refers to S1. You want to generate Java code J1 from some schema S1, and then later generate Java code J2 from schema S2 and you want J2 to be using J1.) is what we call "separate compilation." The story of separate compilation in JAXB is still weak. Today what we are suggesting people to do is to have S2 generate both J1 and J2, and remove the duplicate pieces. Even if we improve the separate compilation story, it will probably start with namespace as the smallest unit."


This week's java.net Pollasks Have you ever used a non-Sun Java runtime? Cast your vote on the front page, then check out the results page for results and discussion.


In today's Weblogs. Ed Burns has an irc followup: let's try JXTA: "To follow up to my previous blog about the desire for irc.java.net, I'd like to talk about using Project JXTA in the interim (and perhaps indefinately, if people like it) to fill the gap."

In Project Matisse: An update, Gregg Sporar writes: "I did a demo of Project Matisse for the Austin Java User's Group. The feedback was overwhelmingly positive. Read on for an update on what it's like to use Project Matisse in its current state."

John O'Conner reveals Charset Pitfalls in JSP/Servlet Containers: "The J2SE platform has come a long way in internationalization. Some things are just easy...like entering your name in a Swing text field. Unicode prevails within the Java core. Unfortunately, entering non-ASCII text in the J2EE world isn't nearly as easy."


In Also in Java Today, Automatic garbage collection doesn't exempt you as a developer from the risks of memory leaks. Retain enough objects in caches, hashtables, and other such structures and you may find yourself memory constrained. According to Staffan Larsen, there are two things you need to do: learn best practices for writing non-leaking code, and employ a tool to find the leaks you do inadvertently create. In the dev2dev article Memory Leaks, Be Gone, he discusses how to write non-leaking code, and how to use the JRockit Management Console to find the leaks that get through.

Using business rules can help you develop more agile application; the power of business rules lies in their ability both to separate knowledge from its implementation logic and to be changed without changing source code. The specification for the Java Rule Engine API (JSR 94) defines a Java runtime API for rule engines by providing a simple API to access a rule engine from a Java client. Toward Rule-Based Applications article provides an overview of JSR 94 and discusses how to fit business rule technology into Java technology applications.


In Projects and Communities, the Portlet Community home page is highlighting the article Liferay open source portal 3.5 released. Liferay is an open-source portal "designed to deploy portlets that adhere to the Portlet API (JSR 168)." It also notes that Liferay integrates with Spring and has been used for a number of significant deployments.

Amy Roh's weblog announces FishEye for GlassFish: "FishEye delivers a unified view of your source repository that provides easy navigation, powerful search, historical reporting..." and that "GlassFish just started to support FishEye for its CVS repository and folks are finding this very useful."


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.



Let's put everything in Java?  
kfarnham

Join Together Blog

Posted by kfarnham Jul 27, 2005

How to make your project succeed

Just because you can easily kick off an open source project, should you? java.net makes it easy to get your project started, providing you with tools like mailing lists, forums, cvs, a web page, etc. But more important than all of that areyou, your code, and (later)your community.

The open-source landscape is littered with projects that were launched and subsequently abandoned. What happened? Did a hoped-for community not form? Did the project not address an important enough problem? Did the project founder just lose interest and move on?

It's critical to get your project off to a good start. The tools can help, but they can only do so much. The rest is up to you.

In our Feature Article, Creating and Managing an Open Source Project, Part 1, Michael Nascimento Santos takes these kinds of concerns to heart : "there are many hard decisions to be made, and some of them cannot be undone easily. Besides that, many of these projects fail miserably because of misconceptions people have. The aim of this series of articles is to explain when you should create your own open source project; how to do it, and how to organize it so it succeeds."

 

In today's Weblogs, James Gosling offers a " Transcendental Meditation": "I got into a conversation with some folks who've been moving a large sophisticated image processing application to Java. They've been getting great performance numbers, much to the surprise of the C crowd in their shop. With one exception..."

Programmer Friendly Pages are on Jacob Hookom's mind: "Everyone wants to be a little more designer friendly with web page development, but whoever said that maintaining HTML markup was easy? What will help programmers take back their web pages without offending your designers?"

In Rant: I found Subversion immature, Kohsuke Kawaguchi writes: "I just had a frustrating hour or so with Subversion. No, it's not that I have problems with its functionality (well, I actually do, but today isn't time to talk about that.) It's the lack of craftsmanship that bothers me."


In Also in Java Today, Artima blogger Eric Armstrong says Messaging is the Right Way to Build a Distributed System: "A message-based design is fundamentally the right way to think about building a distributed system, as opposed to code sharing, remote procedure calls, and the like. This article explains why." He stresses messaging's superiority to RPC-like systems in five important traits: transparency, testability, immunity and evolution, interoperability and evolution, and stateless scalability.

A recent News.com article says, "when it was first introduced, Sun Microsystems' Java software for cellular phones was supposed to let developers write a single program that could run on any handset. A half decade later, Sun's Java for cell phones, called the mobile information device profile, or MIDP, is used in half the world's 1.4 billion phones for downloading other bits of software. But writing a program that can run on any handset still isn't possible." The article "Write Once, Run Anywhere" Not Working for Phones says the cause of the problem lies with phone makers and service providers not willing to wait to hammer out a standard, and adding their own mutually-incompatible extensions instead.


In Projects and Communities, if you're not involved with a Java User Group, then check out John Reynolds' blog entry Austin (as in Texas) Java Users Group meeting for a taste of what you're missing. He discusses presentations on Matisse, EJB 3.0, annotations, generics, JavaOne impressions, and more.

The Java Tools Community has just published their 46th Tools Community Newsletter. The newsletter contains a tip on a German version of the Eclipse tutorial, highlights on various projects, and an announcement that the Pencil project has graduated from the community incubator.


fabiane asks What are your secret tools in today's Forums: "During JavaOne, the JavaTools Community in collaboration with the JUGs Community presented a BOF entitled " The Developer Tool Box: Jewels to Make Development More Productive, Easier, and Fun!". The idea was to present not very known Java development tools that we find useful and make our lives easier. Now the slides of the presentation are available for you to check what are the hidden gems we found in the develpment tools world. After our presentation, we discussed with the audience what are _their_ secret weapons in terms of development tools. This discussion resulted in a very interesting list of tools and we would like to continue this discussion on-line."

kellyohair works out some details Re: Improved Stack Trace: "There has been talk of an expanded LineNumberTable attribute in the debugger team, and as I understand it, the javac compiler is fully capable of adding this additional information. Once you have a full bytecode offset -> (line,column) mapping, things start to become possible in terms of identifying specific positions in lines. But as you can imagine, this isn't a small feat. It would need to be done in a way that doesn't bloat the classfiles too much, and a detailed specification of the attribute would need to be written up. Then the proper JVM TI and JDI changes need to be added to support such a thing."


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 to make your project succeed  
kfarnham

Summertime Blues Blog

Posted by kfarnham Jul 27, 2005

Is it the heat, post-JavaOne doldrums, or is everyone on vacation?

With apologies of those of you south of the Equator -- when it's already 80°F (26.5°C) at 5:15 AM in Atlanta, mid-winter Sydney looks mighty appealing right now -- these can't help but be the "dog days" of Summer. But it's not just the heat, or the humidity. There's also the fact that a lot of people are taking summer vacations, and projects both commercial and open-source, inevitably slow down when key people are away. Also, everyone who raced to put out a release in a JavaOne timeframe has now returned to work on the next release.

Heck, even video games are boring this time of year (naughty language alert... of course, you should probably expect that with Penny Arcade).

Contrarian logic says this is a great time to get noticed. Put out a new release of your project now and it'll get a lot more attention than it would, say, in the middle of JavaOne. So, if you're working on a new release, feel free to drop me a line or get your community manager to put it on your community's home page.

Oh, and keep cool.


In today's Weblogs. David Herron considers MVM from a quality viewpoint: "Chet mentioned in his posting the issue I have, from a Quality perspective that is. Namely: If that MVM process were to crash, it would take down all Java applications running on the system. All."

Carla Mott has some advice on Getting started with GlassFish: "I downloaded GlassFish and now what? I added a web application and instructions so that you can get a jump start on trying out new features in GlassFish."

In Jody Garnett's XML Standards as ObjectOriented Code Part I, "the relationship between the visitor pattern and XSLT is discussed with respect to GeoAPI and Geotools."

In Also in Java Today, Ruby on Rails is a relatively new Web application framework built on the Ruby language. It is billed as an alternative to existing enterprise frameworks, and its goal, in a nutshell, is to make your life -- or at least the Web development aspects of it -- easier. In Ruby on Rails and J2EE: Is there room for both?, Aaron Rustad compares and contrasts some of the key architectural features of Rails and traditional J2EE frameworks.

What Is Business Process Modeling? In the article of the same name, "Essential Business Process Modeling" author Mike Havey defines it as "a set of technologies and standards for the design, execution, administration, and monitoring of business processes." But instead of a single monolithic implementation, there exists an ad hoc architecture: "the realization of those sketchy flowcharts drawn by business analysts on whiteboards requires an architecture built on the best of BPM's many standards: BPEL, BPMN, and WS-CDL," and this collection of tools is the focus of his article.


In Projects and Communities, the Ninth Jini Community Meetingis being held in Chicago, October 19-20, and a call for papers has been announced. Proposed presentations are due September 6, and can cover Jini-related topics ranging from commercial uses and community projects to technical issues and design philosophy.

Members of the Embedded Java Community will find much to think about in Bruce Boyes' weblog entry First Java support for a DSP core?, which discusses the reported porting of a cleanroom JVM to a Digital Signal Processing (DSP) Core, and considers whether this could lead to greater standarization, reliability, or portability.


In today's Forums,laurapiersol clarifies some of the discussion in Re: Pass by reference - why not?: "Any new language feature will need to be understood by ALL programmers whether they use it or not. We all have to read other peoples code. Let's only promote features that add value and clarity to the language, not complexity. Do multiple return values add value and clarity without increasing complexity? Yes, yes, yes!"



philrace considers the gotchas of properties and API's colliding in Re: Subpixel anti-aliasing: enable it programmatically for Swing components: "We'll have to be careful not to have too many ways of specifying all these - or at least a clear and simple story on how these are resolved. A system property is certainly hacky compared to an API when you have the option but is nonetheless useful to some class of users (those who aren't updating the program source) and want all their Swing apps to look like the desktop. The requirement here is somewhat different." 

In today's java.net News Headlines :

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


Current and upcoming Java Events :

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


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



Is it the heat, post-JavaOne doldrums, or is everyone on vacation?  
kfarnham

Trick of the Light Blog

Posted by kfarnham Jul 26, 2005

Clearing up Java text at the sub-pixel level

When was the last time you used a CRT? Apologies, of course, to anyone still using one of these power-hungry, heat-spewing, desk-monopolizing monsters, but if you can get yourself over to LCD, chances are you'll be happier once you do. Aside from the aforementioned advantages of heat, power and size -- I'm still galled at the beastly 19" and 21" monsters on some of the desktops at the last place I worked -- there is also a certain elegance to the bright, flat LCD screen.

As it turns out, they also offer another intriguing advantage. The layout of red, green and blue color bands within each pixel is simple and predictable, which offers an opportunity for some graphic trickery that can be put to good use.

In today's Featured Article, Chet Haase looks at how the features of LCD monitors can be used to achieve text anti-aliasing at the sub-pixel level, which improves the appearance and readability of onscreen text beyond what can be achieved with regular anti-aliasing. This feature is coming to Java in Mustang, and in LCD Text: Anti-Aliasing on the Fringe, Chet shows how the effect works.


James Gosling wonders if you're Happily Subversive? in today's Weblogs: "I've been spending the last few days helping figure out what we (Sun) should do about version control for all of our source files. I'd love to hear from folks who have used SubVersion (with or without svk) for multi-million-line code bases with thousands of versions."

Kirill Grouchnikov has some advice on How to create scalable icons with Java2D: "Next time, instead of bundling multiple differently-sized versions of the same icon with your application, why not create them with Java2D on the fly?"

In JDIC@JavaOne 2005 and Deeper Desktop/Java Integration, George Zhang writes: Beginning with a late report of JDIC at JavaOne 2005, this article takes an exploration of missing features in the scope of desktop/Java integration and solicits inputs to prioritize them to enable deeper desktop/Java Integration.


In Also in Java Today, JSF Central editor-in-chief Kito D. Mann'sA Week at JavaOne: Spotlight on JSF has a thorough recap of the conference's JSF-related sessions, BoF's and pavilion-floor activities. Reflecting back on Java's 10th anniversary and JSF's recent prominence, he writes: "Has it really been that long since I saw the first applet on a web page and printed out the Java Language Specification? It was a long week, but the energy of the 15,000 attendees was fantastic, and JSF was truly the star of the show. It's quite clear that JSF has a bright future."

While XQuery was designed for querying large document bases, it serves as a fine tool for transforming simple documents as well. InJava theory and practice: Screen-scraping with XQuery Brian Goetz shows you how XQuery can be used effectively as an HTML screen-scraping engine. XQuery is the perfect tool for you if your goal is simplifying complex pages for display on small screens, or extracting elements from multiple pages to aggregate them together on a home-grown portal, or simply extracting data from Web pages because there is no other programmatic way to get the data.


In Projects and Communities, the Mobicents project, the first open-source SLEE implementation, will be the focus of the sessionWriting VoIP Applications with Service Building Blocks at theOpen Source VoIP Communications Summit on September 19, co-located with theFall VON conference.

A nice trick for JavaDesktop Communitydevelopers: Joshua Marinacci's weblog entry Using Java2D to build a Stacked Image Editor shows how to build a multi-layer image editor, using Java2D affine transformations as a simple and efficient alternative to doing a genuine 3D effect.


In today's Forums,alexanderschunk would like a Javac compiler option to build Windows native exe: "For example, if you are using java on a windows platform it should be possible to have a compiler switch that would automatically generate Windows exe files instead of java byte code if the developer so whishes. That would minimize the job for developers to look for other solutions - i.g. writing a batch script, building a jar manifesto etc. - to just passing a compiler option."

Making JAXB just a little more graphical,kirillcool has a GUI for viewing schema dependencies: "Visualize your schema dependencies describes a new addition to the JAXB Workshopproject. You are most welcome to try it out and suggest ways to improve 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 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.



Clearing up Java text at the sub-pixel level  
kfarnham

Won't Get Fooled Again Blog

Posted by kfarnham Jul 25, 2005

Keeping an eye on Java's future

Today, I'm going to blog about an interesting discussion on Generics in the forums, though it will take me a bit to get to the item we featured on the front page.

Part of the problem is that I couldn't reproduce the post that started the thread, as the publishing system kept trying to turn the generic angle-brace markers (e.g., List<E>) into parsed angle braces -- i.e., it saw them as tags. So let me quote some of alexanderschunk's original post:

This is a general thread on the new Java Generics feature as it was introduced in Tiger and implemented in Mustang.

I post this because i come from a C++ background where Generics - or Templates - were introduced in order to be able to write one class template or method template that could be used for any types of objects of type T.

However, the Generics approach in C++ was - no matter how powerful it was - it did not lead programmers to write more readable or simpler code rather than more complicated and confusing code. I know this from experience ;=)

After an example from the JDK source, he continues:

This kind of code is neither easy to read nor easy to understand - what kind of object/class is T and why does it need to extendEnum<T>.

The use of T o or Enum<E o>indicating that T may be of any kind ofObject is straightforward and may be a good add-value to OOP programming but it should be constrained to that.

If you start applying things like polymorphism to Generics -<T extends Enum<E>> - things are getting complicated.

In fact i do not see a benefit to use Generics at all and they do not make Java programming any easier. I would love to see that Java keeps on going the Kiss way.

The discussion continues on the merits of Generics, but there's a very good comment that mthornton makes:

Generics didn't appear in Java overnight. JSR 14 was many years in progress, with any number of opportunities for the community to comment on the proposals. Yet vocal opposition was rarely heard until the final months of the JDK 5 beta and after final release.

Like or hate Generics, you have to admit that he's very right on this point. The Add Generic Types to the Java Language JSR started way back in 1999, and if you google for java generics and a year, you can find plenty of evidence that information about Generics was well-disseminated long in advance: here's an ONJava introduction to Generics from 2001.

So, what's happening now in Java that you should be aware of? Well, the plans for J2EE 5.0 and Java SE 6.0 were presented at JavaOne and are readily available in many forms: JavaOne slides, the JCP, java.net blogs that spell out the major pieces of Mustang, or, for that matter, the Mustang source-drops on java.net.

You don't have to like every change that comes with the next version of Java, but if you get involved now, you have the opportunity to make it better. At the very least, if you take a look now, you won't be surprised later.


Continuing the discussion in today's Forums,mcnepp has this to say Re: Java Generics and the Kiss principle: "I wholeheartedly agree: Introducing Generics without proper runtime support was probably the biggest single mistake in the history of Java. This hurts all the more because all the other features introduced with Java 5 (annotations, enhanced for, enums, covariant return types, variable argument lists) are huge improvements, each of them easy to use and without negative side-effects on other aspects of the language. So developers are facing the tough decision of either not using any of the new features or being flooded by warnings due to a half-baked generics implementation."

chris_e_brown has questions on Subpixel anti-aliasing: enable it programmatically for Swing components: "Having read Phil's Font Fixes ...and having downloaded Mustang b44, browsed the source, and read through the JavaDocs, I can't see how to enable subpixel anti-aliasing when it's not "inherited" from the desktop. I'm using Windows 2000, and am trying to create a simple "Hello World" JFrame with a few JLabels and JButtons to try this feature out. I can see how text should be rendered on a surface such as a JPanel by overriding paintComponent() and the Graphics2D object, but I can't see how to force other components (labels, buttons, tables, and so on) to use this "


In this week's Spotlight: "The Mobicentsproject offers the first open-source certified implementation of JAIN SLEE 1.0, which "brings to telecom application developers what J2EE brings to Web and Enterprise application developers." JAIN SLEE allows popular building blocks such as SIP to be plugged into a framework as resource adapters. It also enables the composition of Service Building Blocks (SBB's) for call control, billing, administration and more. Mobicents is also applicable to problem domains requiring high volume, low latency signalling, including financial trading and online gaming."


In today's Weblogs, Tim Boudreau discusses Why I'm Proud of the NetBeans Community Awards: "A couple weeks ago, at NetBeans Day in San Francisco, we gave out awards for outstanding contribution to the community. The winners got a framed Duke poster...and a really nice workstation... "

John Reynolds wonders about Faces and Flash: "I came across an announcement for IBM's Faces for Laszlo this morning. I haven't had time to delve into the details, but my impression is that they're "filling in" some of the missing Rich Internet Application pieces that I've wanted for a long time."

John O'Conner announces a Programmer's Retirement: "Every profession has its share of workers who continue past their prime years of productivity. Maybe you've seen one...the overweight police officer who looks more at home in a Crispy Creme shop than in his cruiser. I'm thinking software engineers have to 'throw in the towel' sometime before 40...before the ol' brain loses too many working cells."


In Also in Java Today, "Have you ever wondered why there are six types of Transaction demarcation attributes (NotSupported, Required, Supports, RequiresNew, Mandatory, and Never) supported in beans using container-managed transactions (CMT), but if you're using bean-managed transactions (BMT), the only functionality the EJB spec provides is to begin and commit/roll back transactions via the UserTransaction interface?" This question concerned Dmitri Maximovich, since it meant that BMT beans couldn't suspend and resume transactions. Or can they? In Bean-Managed Transaction Suspension in J2EE, he shows how different J2EE servers expose the Java Transaction API's TransactionManager, which offers suspend and resume functionality to your EJB's.

Many developers need to capture transaction times for high-volume transactional systems, but have avoided using Java's System.currentTimeMillis() due to rumors of poor performance. In Bring Java's System.currentTimeMillis() Back into the Fold for Transaction Monitoring Javid Jamae shows why currentTimeMillis() has gotten a bad rap.


In Projects and Communities, the Portlets Community home page is hosting an online excerpt (PDF, 828 KB) from the book Building Portals with the Java Portlet API by Jeff Linwood and Dave Minter, including complete chapters introducing the portlet API, portlet life cycles, and portlet packaging and deployment descriptors.

Bruce Boyes' weblog entry Real Soon Now: mesh network standards reports on the mesh network standardization process, which will allow "practical distributed control and communication applications utilizing standardized wireless communications."


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.



Keeping an eye on Java's future  

The many motivations of Java

One of the obvious yet seldom-appreciated facets of dealing with other members in the Java community is that we're not all in this for the same reasons. When open-source can be as passionate as an evangelical crusade or as mundane as a day-job -- and may literally be both -- it's not a safe bet that you're coding Java applications in the same way and for the same reasons as the next guy or gal over. Did you get started because you wanted to write apps for Windows users without actually writing Windows apps per se? Did you join in because there was so much activity in the Java community? Or was it an online job advertisement (or a hundred of them) that called your attention to Java?

Wrapping up in the form of a big question: why are we doing this?

Of course, when we stumble over big questions in our editorial chats, we often interject "that should be a poll!" So, today's java.net poll asks "What do you like most about being a Java developer?" Cast your voice on the front page, then visit the results page to join in the discussion.

In today's Weblogs. Scott Ellsworth argues Generics considered keen: "Ken Arnold makes a good case for generics being poorly thought out. I take issue, though, with the claim that we should avoid them."

Malcolm Davis's JavaOne postmortem notes that "The pdf's for JavaOne technical sessions are now available for download. However, there is more to JavaOne than technical sessions, including the BOF, Pavilion, and people."

Some ideas on Cleaning up an MBean when its resource dies from Eamonn McManus: "A frequent way of using MBeans is to connect an MBean to another Java object that represents the resource being managed. When that resource goes away, we want the MBean to go away too. One way to achieve that is to create a "weak" MBean that detects when the resource is no longer referenced. That's not necessarily the best way."


In Also in Java Today, with a tip of the hat to Lewis Carroll's "Jabberwocky", Hacknot's Beware The GUI Builder considers, and ultimately rejects, the appeal of graphic applications to help build GUI's: "Attempting to use them in the prescribed manner is generally a bad idea. They shield the programmer from coding details that they must eventually conquer anyway, introduce an unnecessary tool dependency into the development cycle, and discourage re-use."

DOM, SAX, StAX? Don't entirely care? Chances are you already know about JAXP, the Java API for XML Processing. Rahul Srivastava says "JAXP is a lightweight API to process XML documents by being agnostic of the underlying XML processor, which are pluggable," and in the XML.com article The Evolution of JAXP, he shows off the many tasks to which JAXP can be applied.


In Projects and Communities, Will Iverson's weblog entry Comments on Ajax and Web Frameworks, collects comments from developers using web frameworks and/or AJAX to build their applications. The feedback includes requests for an AJAX/JavaScript abstraction, and an appropriate component framework.

A success story from the JXTA Community: In a post to the JXTA dev list, Stephen Montgomery describes the success of the Chinook platform. Chinook is an open-source, peer-to-peer platform for bioinformatics analysis. The platform was recently featured in Nature Methods, a journal for life sciences and chemistry.


In today's Forums,brucechapman has a practical suggestion Re: Are you for or against "native XML support" in Dolphin?: "To have a play with XML Literals in Java SE 5, see the Rapt Library's DomLiteral. To download the jar file go to theirdocument list. So is it any use? Not generally, but it is GREAT for writing unit tests for code that processes XML. You can put the test XML data inside the unit test source code, and that makes the test code much easier to read and write."

kohsuke updates the Java WS & XML Community News forum with the news that Sun plans to make all its software free: From InfoWorld: Sun plans to make all its software free: Sun Microsystems president and COO Jonathan Schwartz on Thursday cited the company's plans to eventually offer all of its software for free as a way to build communities around its technologies. "The net upside of that is we get more people engaged in our community," Schwartz said of Sun's plans while speaking at the AlwaysOn conference here. Sun currently offers its Solaris operating system components freely via open source. Technologies such as Java also are downloadable at no charge. "We've been trying to faithfully explore how to deliver our products and technologies for free," Schwartz said.


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 many motivations of Java  
kfarnham

Strung Out on Strings Blog

Posted by kfarnham Jul 21, 2005

Rethinking how to teach programming

For some time, it's been clear that Java is not the most straightforward thing to teach. Specifically, how can you stress object orientation and then tell students the first thing they have to write is the procedural public static void main (String[]), which has the unpleasant side effect of prematurely introducing Strings, staticmethods, and arrays? Teaching Java is in serious need of a rethink, as previously noted by Daniel Steinberg, among others. Many of the solutions involve introducing Java by way of an environment that puts classes and objects front and center and hides some of the extraneous "yeah but"s that will only confuse things at first.

One of these environments is the subject of today's Feature Article. In Java Tech: The Sweet Song of the BlueJ, Part 1, Jeff Friesen takes an initial look at BlueJ, an educational development environment. He says:

BlueJ is easy to use; students can begin working with BlueJ without needing a lengthy introduction to the environment. BlueJ lets students visually and interactively create classes and interconnect them. Students can then instantiate objects from those classes, invoke methods, specify arguments to those methods via dialogs, view return values via dialogs, and visually inspect object state. This product is freely available, a benefit to students who cannot afford costly licenses (BlueJ cannot be sold for profit).


 

Joshua Marinacci is wowed by Fold N' Drop in today's Weblogs: "This has to be one of the coolest frame hacks I've run across. I also think this is a great use of a gestural interface techniques. The idea is that you can fold windows down to access what is behind them."

Brian Leonard asks Are there GlassFish in Prague, and can you buy them on eBay?, explaining: "I'm talking about Project GlassFish. It has relevance to Prague because it was during our team trip there in May that I worked feverishly to ensure the project didn't go live without tools support - a necessity to any successful project, right? "

Bob Lee has a question about Package Scoping And Unit Testing: Why don't more programmers use package-private scope? Package scoping can ease testing without cluttering your public API."


In Also in Java Today, Artima blogger Eric Armstrong writes: "Now that I've gotten myself onto the Groovy mailing list, I'm getting involved in language discussions again. I love those. The axe I generally grind in those discussions is readability. To me, that is an overlooked strength of the Java language that goes a long way towards explaining its popularity as a vehicle for production applications and for teaching. A recent discussion reminded me of a trick I use to make method calls more readable in Java--which can become something of a problem when the list of parameters contains booleans and numeric primitives." In Readable Method Calls in Java, he shows how this trick works.

Thanks to JDBC, it's possible to bridge OpenOffice.org to a database. In Hooking OOo to MySQL, Rob Reilly writes: "by combining the power of these two open source applications you can do things like generating personalized sales letters from the customer data stored on your servers. Let's walk through the process using OOo's database wizard."


In Projects and Communities, the Mac Java Community home page is linking to Apple CocoaComponent sample code: "The QDCocoaComponent shows how to use QuickTime'sSequenceGrabber to get captured video into a Java component, and QCCocoaComponent shows how to use a QCView in order to view Quartz Composer files in Swing."

The JavaDesktop page is publicizing a "Swing Sighting": Kinabaloo Software makes a standalone javadoc viewer called Java Guru, which is also available as part of their TJI IDE. Kinabaloo folks say: "Java Guru provides a fast and versatile way to access the Java API and API documentation... suitable for beginners and advanced users alike."


In today's Forums,hr_stoyanov has a lot of questions about Things in the JAX-WS EA2 docs: Here are a few additional findings, you might want to look into:1) APT docs: Is the sourcePath attribute always required? It does look so, even though there can be nested 2) APT docs: Is the -Averbose=true used at all? There seems to be a verbose attribute anyway... 3) The sun-jaxws.xml has urlpattern, but there is another standard one in the web.xml descriptor for the servlet. What is the relation between the two? Do we need to specify the servlet class (and context listener) in web.xml at all? 4) Are the portable beans generated by APT and WSGEN (keep="true") the same? 5) There are a bunch of references to "JAX-RPC 2.0" in the jaxws 2.0 docs.

kfarnham

Piece by Piece Blog

Posted by kfarnham Jul 20, 2005

The building blocks of Mustang

First off, your eyes / glasses / contact lenses are not fooling you: the colors on java.net have changed. The new look is meant to help distinguish java.net as an independent site, which it is, as well as be attractive in its own right. Let us know what you think in the talkbacks below.

Mustang isn't due until the third quarter of next year, but it's decision time for what's going into this next rev of the Java Standard Edition. Surely everyone has his or her own set of longed-for JSR's (oh, wherefore art thou, JSR 80: Java USB API?), while keeping in mind the point, often made on the forums, that Java SE is already very big and adding more API's to it has a significant cost.

Today's big news from the JDK Community is that the set of component JSR's to appear in Java SE 6 (Mustang) has been selected. They're listed in Mark Reinhold's weblog entry Mustang Component JSR's, which has links to each of the JSR's selected by the expert group, along with a brief discussion of how this list differs from early proposals. These changes show why some web services API's made the cut, and the Smart Card I/O API (JSR 268) didn't.

Also in Projects and Communities, Slides are now available (in PDF) for presentations offered at the Jini(TM) Technology: An SOA Delivering Java Dynamic Networking event, co-sponsored by Sun and the NYJavaSIG. Topics include Jini marketing, JavaSpaces, the Jini Community, and Jini as an SOA architecture.

In today's Weblogs. David Herron talks about Accessibility for test automation: "I've spent more than a few brain cycles thinking about GUI test automation. It's been so much that at times I've been worried about my sanity - how many people do you know daydream about the minute details of GUI interactions, looking for ways to drive the interaction by a program?"

Vikram Goyal blogs on MIDP + DoJa = Mojo for Sun?: "NTT DoCoMo and Sun combine to update NTT's DoJa Java platform. Why, you may ask. Why not upgrade DoJa to MIDP 2.0 instead, rather than creating a separate breed of the J2ME platform?

Figuring out Native XML support in Dolphin is the topic of Kirill Grouchnikov's latest blog entry: "One of the big changes tentatively proposed for Dolphin is native XML support in the language. What do we have now, what can we expect and what would you like to see?"


In Also in Java Today, JUnit is great, but it has its limits for distributed programming. Specifically, it's meant to run in one JVM on one machine--not the best thing for verifying behavior of complex systems on multiple machines, or for automating testing across several platforms. However, the Pisces project improves this situation by creating a distributed environment for JUnit testing. In Taking JUnit Out of the Box, Amir Shevat introduces Pisces and shows how to put it to work for you.

"Read almost any software developer journal or website and we're told that responsible developers write test cases. If those developers are Java developers then, most likely, they use JUnit for those test cases. JUnit is probably the oldest and certainly the most popular Java-based testing framework around. However, other frameworks have been built to address various faults and deficiencies with JUnit." Justin Lee's Test Framework Comparison introduces and analyzes the strengths and weaknesses of JUnit 3.x, JTiger, and TestNG.


In today's Forums,laurapiersol makes the case Re: Multiple return values: "Multiple return values are a great feature that really could and should be added to Java. All this talk on how its "not object oriented" and "just return a Point class where needed" definitely doesn't match my programming experience. Multiple values ARE and MUST BE returned by functions that perform multiple calculations in the same formula. No way to change the math so its just a fact. If you accept the FACT that certain formulas calculate multiple results then the only question is how to return the multiple results."

Support for named code blocks is an idea advocated byeuxx: "This would allow to access information about method slicing in the runtime or after compilation. From a bytecode point of view, this can actually be implemented as a new attribute that would have values for start and end offsets within the method bytecode (similar to try/catch) and also value for the block annotation."


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 building blocks of Mustang  
kfarnham

Only the Strong Survive Blog

Posted by kfarnham Jul 19, 2005

Where is AI leading us?

In his previous series, "The Blacksmith and the Bookkeeper" (parts 1,2, and 3), Max Goff looked at two professions of the old world, one of which has perished while the other flourished. Now he's taking a look to the future of Artificial Intelligence in the form of two new personalities, the creative and intrinsically human "artisan", and the superior artificial intelligence that humanity seems destined to create, the "artilect". The latter could the end-product of what he sees as a new era in AI:

What makes this phase "new?" Two characteristics epitomize the new phase in AI; the two terms in question also happen to serve as the juxtaposed entities in the title of this series: the artisan and the artilect. The artisan-like characteristics of this new phase in AI represent the unique semiotic skills of humanity, which form the basis for our claim to intelligence itself. It is the "engineering is the art of the possible" school of craftsmanship, which has taken raw learning and turned it into commerce. Indeed, all commercial instantiations of AI in the past decade have been enabled by the artisan component of the human complex. To now seed AI itself with the creative essence of homo sapiens clearly marks the beginning of a remarkable new phase.

In today's Feature Article,The Artisan and the Artilect, Part 1 he examines the argument that mankind is compelled to create an intelligence greater than its own, where this may lead, and whether we'll have a place in our own future.


In today's Weblogs, James Gosling looks at what happens when Moore's Law meets Pricing: "There's a great article in the Economist this month about the current mess that's happening in software pricing. Moore's law's predictions about the number of transistors on a chip look like they'll continue to hold for quite a while, but we're quickly losing the ability to translate that into clock rate."

In STR-Crazier: Performance Improvements in Mustang, Chris Campbell says "Performance of the OpenGL-based Java2D pipeline has improved considerably in recent Mustang builds... And there's still room for improvement. (Pretty chart included...)"

Jim Driscoll explains Open Sourcing the Rest of App Server: "As you know, we've open sourced Sun's AS PE. Recently, some people have taken us to task on not doing the rest of it too. Leaving aside the 'geez, are we ever going to not get flack' factor, I thought I'd post this..."

In Also in Java Today, the JavaSpaces technology is a high-level tool for building distributed applications, and it can also be used as a coordination tool. A marked departure from classic distributed models that rely on message passing or RMI, the JavaSpaces model views a distributed application as a collection of processes that cooperate through the flow of objects into and out of one or more spaces. In Getting Started With JavaSpaces Technology, you'll learn how JavaSpaces programming differs from other kinds of distributed application development, and how to get started developing JavaSpaces applications.

Despite its name, the Web browser is good for more than just browsing the Web. More and more projects use the browser as a secondary or, in many cases, primary means of communicating with the program. The main drawback of this approach is that it requires the user to configure and maintain his own Web server, or else requires the program to come bundled with a Web server. Jetty, a small open source Web server written entirely in Java, is simple for both programmers and users, making it a good choice for bundled Web server. The NewsForge article Jetty and the future of browser-based applications offers a simple introduction to writing Java or XML code to serve up content.

In Projects and Communities, The Java Games Community projectJInput offers a pure-Java, platform-independent API for game controller discovery and polled input. It can handle arbitrary controllers and returns both human and machine understandable descriptions of the inputs available.

A recent weblog by Marina Sum, Worth a look: AJAX technology, discusses a recent article on using AJAX with portals, and an interviewwhich talks about adapting Sun Java Studio Creator to support AJAX.


In today's Forums,ssinai continues the thread Re: Bigger is worse for Java 6+: "A few months ago, there was a discussion on Joshua Marinucci's Swing blog about why people didn't ship Swing desktop apps. Unlike on this thread, almost everyone agreed that JRE size and distribution were major problems. The desktop app I am working on is less than 1 MB in byte-code, and about 4-5 MB in machine code. It's pathetic to have to include a 15 MB JRE along with the application. (I almost can't believe that the minimum JRE size for Mustang is purported to be 50 MB.) The issue of sending the user to the JRE download site to get a 7 MB JRE came up, but was quickly shot down, for good reason."

kellyohair has some answers Re: Dtrace and mustang: "We are currently working out the issues of being able to create the probes on a Solaris 8 machine, which means we need some kind of DTrace compiler for Solaris 8. Keep in mind that using DTrace is still and will always be a Solaris 10 only feature, we are only talking about the DTrace compiler part of DTrace. Hopefully we can have this resolved in the next few months and everyone with Solaris 10, SPARC, X86, and AMD64 can use the official Mustang DTrace probes."


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.



Where is AI leading us?  
kfarnham

C's A Beauty(?) Blog

Posted by kfarnham Jul 18, 2005

Re-appreciating Java style and conventions

So I'm working on a project that will eventually be open-sourced here on java.net if I can get the time to get enough interesting code working... no, I don't want to give away too much yet... and it involves working with straight C, so I can expose some stuff to Java.

Having worked only in Java for eight years, and having not done straight C since college, this is a heck of a wake up call. Everything that I'm used to doing right, doing the Java way, isn't there. For example: let's say you have several lines of code, each of which may fail for various reasons. In Java, thetry and catch allow you to collect the exception handling in one place. Not in C, you don't. The QuickTime tradition (darn, said too much) is that you have to get a return code from every call, compare it to the no-error flag, and thengoto... no, really, I'm serious!... gotosome labelled block where you figure out what you've allocated and initialized and de-allocate and de-initialize it.

Yuck.

And did I mention the concept of passing an empty pointer as a parameter to a function, and looking at the contents of that pointer after the call? Yep. After all, it can't return you a pointer -- the ability to return a value is already taken, by the error handling (see above). So you mix inputs and outputs in your parameter list, and if you're a Java programmer, you cringe a little bit.

Anyways, this isn't to bash C -- it's fast, fast, fast, after all, and a lingua franca of code. But I'm going to be really happy when I only see these calls from the Java side of the bridge.


This week's Spotlightis on the Java Tools Projects Directory, which "seeks to provide an easy way to discover the tools that belong to the Java Tools Community, providing the ability to search for tools by description keywords or related topics. Tools are also classified under various categories depending on status, topic, etc., and include a link through which you can check the RSS feeds of projects directly with your browser or other RSS client."


In today's Weblogs. Kirill Grouchnikov wonders Porting small library from Java 5.0 to Java 1.4 - could it be any harder?: Last evening I set out to port one of my (rather small) libraries from Java 5.0 to Java 1.4. Twenty four hours later - a lot of frustration, a lot of uncontrolled eyebrow pluckings, and a day well spent.

Jody Garnett has a Mad Metadata Plan: "The use of Extensible-Interface pattern for an origional take on the metadata problem plaguing the spatial world (see EOGEO for background). Thanks to those at OSG'05 for the inspiration. Now if only someone will pay me to solve this problem."

A reply to Greg Murray in Simon Brown's I have Servlets: "In Got Servlets?, Greg is asking what we'd like to see in the next major revision of the Java Servlets specification. In no particular order, here are my initial thoughts."


In Also in Java Today, Many web applications allow the user to upload a file from their local storage via a browser interface, but this common task isn't supported by default in JavaServer Faces. Fortunately, several add-ons like Apache Commons File Upload and Apache MyFaces provide this functionality to JSF developers. In Upload Files with JSF and MyFaces, Andrei Cioroianu demonstrates this with a JSF-based application that accepts and manipulates an uploaded file.

In part five of an interview series with Artima's Bill Venners,Design Patterns co-author Erich Gamma talks about Eclipse'sCulture of Shipping: "In software, having cool ideas is nice, but shipping them is what counts. For us it only counts if you have shipped the thing. That's really the mindset we have. And given that you focus on shipping, we never want to be in a mode of always being two years away from shipping. You need to have a short-term deliverable. You also plan, decide and act with this mindset. You are very risk- aware -- you know what you can do so you can still ship on time with quality."


In Projects and Communities, Daniel Brookshier's blog entry New: 3D Math, Viet Nam eLearning, Vocabulary & Open Grade Book in Global Education & Learning Community highlights four new projects in the GELC, submitted from different parts of the world.

The Web Services and XML Community project GT2WMS is an implementation of the Open GIS Consortium's Web Map Service (WMS) specification, implemented using GeoTools version 2. This allows web services to provide geographic maps in response to simple HTTP requests.


In today's Forums,cowwoc explains his needs Re: Install on demand: "I strongly believe that if my target audience consisted of dial-up users and I did *not* distributed a stripped-down JRE I would have absolutely no customer base, period. It's sorta like trying to get handheld users to install the full J2SE on their hardware, it's impossible. That's why Sun came along with J2ME. This is why they need to step up again for this new niche."

aviadbd has an idea for JDBC's future, or: DataSet relations?: "What about creating a set of annotations to note one-to-many or many-to-many relations in the database? For example, I could say @Query("select id, name, age from students") [and] @Relation("Classes", "select name from classes c, class_student cs where student_id = {id}") Or something similar, where the first parameter of@Relation is the relation name, the second parameter is the selection statement. The parameters for the selection statement come from the parent DataSet - id, in this case, is the id value of the Student instance. Then, when using the DataSet instance, you could call the getChildRecords(String relationName) method to get all the classroom records."


In today's java.net News Headlines :

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


Current and upcoming Java Events :

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


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



Re-appreciating Java style and conventions  
kfarnham

Oh Yeah! Blog

Posted by kfarnham Jul 14, 2005

Perl? Java? Yes!

Perl and Java seem like unlikely bedfellows. If you measure lines of code, I think Java gets interesting right about the point that Perl stops being manageable. As always with these generalizations, your mileage may vary. Still, that's one of the reasons we have many different languages, each with their own sweet spots of functionality.

But why not have the best of both worlds? Rather than using Java's rather ornate regular expressions package, sometimes you do just want to throw down one or two lines of Perl code and be done with it, and then be able to continue with your Java work.

This is what led Raphael Mudge to create Sleep, a Perl-like language implemented in and with tight ties to Java. In the Feature Article,Perl on Java? An Introduction to the Sleep Language, he writes: "Perl is an incredibly powerful language for text and data processing. Perl excels at taking input, extracting stuff from it, chewing it up several hundred times, and finally, outputting the mess however the programmer would like. Perl is often referred to as the duct tape of the internet. This is due to its many uses as a "glue"-type language." He goes on to show how Sleep can provide this type of "glue" for disparate parts of your Java work.


Jim Driscoll addresses the Newest Concern on Sun's Open Source Strategy in today's Weblogs. "OK, there's a new concern that a few people raised about Sun's Open Source strategy - the Joint Copyright assignment. I'll try to explain why its not a Sun Evil Plot(tm), and why we're doing what we're doing. I'll also give other examples in industry of folks who are doing the same thing, and explain why."

Kohsuke Kawaguchi has some advice for Invoking XJC from command line: "The JAXB RI distribution ships with xjc.sh and xjc.bat for invoking XJC from a command prompt. JWSDP also has xjc.sh and xjc.bat, but their contents are different. I'm sure these files are there for a reason, but personally, I hate those scripts. There's easier way to invoke XJC from command-line."

Raising interest in J2ME? Vikram Goyal says "it will only take one well thought, commercially successful, mainstream application that will help lift the J2ME market. I am sure that the day is not too far."


In Also in Java Today , relational databases return rows, object databases return objects. But what if a database returned XML? Alexander Prokhorenko and Olexiy Prokhorenko write: "although XML-oriented databases are already on the market, they are not yet ubiquitous. Keeping in mind the popularity of XML, the developers of relational databases are moving forward by adding XML compatibility to their products." In the dev2dev feature XML as a Bridge between SQL and Web Applications, they show how this approach can be made to work, and the advantages of taking this XML and producing dynamic web pages by simply applying XSL to it.

"Similarly to how XML became the well-known standard adapted by many software vendors for data exchange, Resource Description Framework (RDF) is going in the same direction for describing and interchanging metadata." The article Easily maintain RDF metadata models explains how to use custom utilities developed with the Jena RDF API for managing RDF models stored in either a relational database or a file.


In Projects and Communities, the Open Language Toolsare a set of translation tools that aim to make the task of translating software and documentation a lot easier. Initially, they comprise of a full-featured XLIFF Translation Editor and a set of XLIFF file-filters for a number of documentation and software file formats.

One limitation of java.lang.reflect.Proxy is that it can only accept interfaces. The Dunamis framework uses a dynamic delegation pattern to provide Proxy-like behavior to abstract and concrete classes. This Patterns Community project is described further in an ONJava article.


In today's Forums,dbolla criticizes the thinking behind the assertion Re: Bigger is worse for Java 6+: "When I see this kind of bold statement I really start thinking of the reasons for the original post. Did the original post try to solve a problem ? Was it spreading FUD ? For what I understand the post says: Java is big -> therefore -> people do not use it. As a further claim .NET does not need downloading -> therefore -> people will use it. To me this is just professional FUD. A positive approach would be: How can we campaign to have Java in every desktop in the same way as Flash is available ?"

bitmaster is working through a GlassFish problem where build fails on ReadOnlyBeanContainer: "I have tried multiple checkouts on multiple machines and it looks like HEAD has a syntax error in appserv-core/src/java/com/sun/ejb/containers/ReadOnlyBeanContainer.java. The inner class EntityContainer.CacheProperties is private and thus inaccessible to ReadOnlyBeanContainer according to my javac. I am compiling with JDK1.5.0_04, so maybe this is a visibility change introduced in Java5. I have a patch..."


The new java.net poll asks "Which Java platform are you personally most interested in?" 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 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.



Perl? Java? Yes!  
kfarnham

For Your Pleasure Blog

Posted by kfarnham Jul 14, 2005

Wide-open feedback channels

Not every feature request can be phrased as, well, a "feature request". If everything has to go through the SDN Bug Database, then it has to be condensed down to a specific report or request. Sometimes, what you know is the ultimate functionality you want, or a feel for what needs to be improved, and you as a requester shouldn't be responsible for phrasing just how it should be accomplished. It takes a while to get from "somehow reflection and deployment descriptors don't really do it for me" to something like the flexible annotation feature that appeared in J2SE 5.0.

What's missing, I think, is an opportunity for discussion, a chance to throw out some ideas, build on the good parts, knock down the bad parts, etc. That's one place where java.net can help. Theforums sitehas forums on Mustang(for discussing "major features, such as language enhancements, new packages, or modifications to existing ones"), and feedback forums for both Mustang snapshots and the JDK in general.

Moreover, many of our bloggers work on Java and its various extensions, and have been generous with their time and accessibility. Two examples of that can be found in today's Weblogs. In Got Servlets?, Greg Murray lists some of the suggestions currently on the table (multipart support, improved security, self-registration, improved security, annotation support), and adds "As the Servlet specification lead I would also like to invite suggestions from the community at large. How are you using Servlets? Where do you want them to go?"

Meanwhile, Eamonn McManus, technical lead of the JMX team, writes about JavaOne feedback about JMX technology: "I'm back from JavaOne, which was great. One of the reasons it was great was that I got a huge amount of feedback about what people would like to see in future versions of the JMX API."


Also in today's Weblogs, James Gosling considers some of the catapult- and trebuchet-inspired devices used in this year's JavaOne t-shirt hurling contest and concludes Leonardo thought of it first...


In Also in Java Today: Have you started enough projects to find yourself repeating the same steps in setting up Ant tasks for building/packaging/deploying your code/documentation/automated testing/etc.? Do you really need to invent the wheel again, and are you even reinventing it the best way? Maven offers a complete project-building environment to get you up and running faster, letting you code more and administer less. In the PDF excerpt Maven Jump-Start, the first chapter of "Maven: A Developer's Notebook," Vincent Massol and Timothy M. O'Brien show you how to install Maven, kick off your first build, and start customizing it to suit your needs.

J2ME and PHP are both powerful technologies used to develop applications for mobile devices and Web applications, respectively. In Obtaining Wireless News with J2ME and PHP, Alessandro Lacava shows how to make them work together by developing a simple and useful application that retrieves the latest news from the Web and displays it on a mobile device.


In Projects and Communities, Arun Gupta's weblog entry JWSDP 1.6 - doclit sample offers helpful guidance to members of the Java Web Services & XML Community by taking the HelloWorld example from JWSDP 1.6 and converting it from an rpc/encoded WSDL to doc/literal.

If AWT, Swing, and SWT aren't enough, developers of Java GUI's for Linux have another option: working directly with GNOME. The article Developing GNOME Applications with Java shows you how to load GNOME libraries into Java and build GUI's with XML markup instead of code.


In today's Forums,fabiane offers a Welcome! to the Java Development Tools forum: "Would you like to discuss Java Development Tools? Would you like to ask questions about tools? Or give your opinion about an specific tool? The JavaTools Forum is your space to talk, ask, learn and give your opinion about everything related to Java Development Tools. Welcome to the forum!"

netsql says Bigger is worse for Java 6+: "Java is moving in opposite directions of where the developers want it. We want better/faster/lighter Java. Heavy is not the way; remove the bloat even if not every middle manager at Sun gets all their features in. Let's fix it please."


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.



Wide-open feedback channels  
kfarnham

The Bogus Man Blog

Posted by kfarnham Jul 13, 2005

One of Java's top detractors changes his tune?

Veteran computer columnist John C. Dvorak has never held a particularly high opinion of Java. As early as 1996, he branded it a "Born Loser", and speculated in 2002 that IBM might be "toast", in part because of its embrace of Java. In 2003, he declaredthat "Java is OUT and Flash is IN". Not for nothing does Rodey Green's classic Java Glossaryhave an entry for "Dvorak" as a common noun, meaning "a rude epithet to describe an ignorant Java basher, after the PC Mag colmunist John Dvorak."

But maybe the tide is turning. In 2002, he acknowledged"I was also too critical of Java ('Born Loser') as well as some other solid trends. Java is not the world beater that it was predicted to be, but it remains important." He's gone even further in a recent interview in which he says:

I'm not going to say it's transforming but I'm going to say it's popular. Once it achieved critical mass of acceptance, then you have so much code being developed that can be shared and swapped around and you have a code base that's growing and growing, so it becomes incredibly important.


 

This caught the attention of Malcom Davis, who writes in today'sWeblogs, "did this guy really say this? The tone of the message was that Java was a novelty. That somehow everybody started writing Java software, and the momentum carried Java up the ladder of success." In How did Java end up on top?, Malcom further analyzes this turnaround and asks how it is that Java has come to quash one of its harshest critics.


Also in today's Weblogs, Jim Driscoll reiterates One more time: CDDL is Open Source: "Apparently, Marc Fleury is either the most misquoted CEO in history, or he really doesn't know what Open Source is. Weird..."

The JBoss CEO's recent interview also prompted John Reynolds' blog Who will pay for innovation?: "Back in 1973, a young Bill Gates was demonized for asking the following: 'Who can afford to do professional work for nothing? What hobbyist can put 3-man years into programming, finding all bugs, documenting his product and distribute for free?' In 2005, Marc Fleury voiced a similar thought in a BusinessWeek interview: 'No one is going to work for free.'"


In Also in Java Today, Budi Kurniawan argues for the usefulness of generics in J2SE 5.0: "Generics enable stricter type checking at compile time. Used especially in the Collections framework, generics make two contributions. First, they add type checking to collection types at compile time, so that the type of objects that a collection can hold is restricted to the type passed to it. For example, you can now create an instance of java.util.List that holds strings and will not accept Integers or other types. Second, generics eliminate the need for type casting when retrieving an element from a collection." In Generics in J2SE 5.0, he offers a thorough introduction to the feature as implemented in the Collections framework, and shows you how to make your own classes generics-aware.

JavaServer Faces was designed to help developers quickly develop Web applications, but does JSF deliver? In Can JSF speed up Web Application Development?, Steve Small looks for an answer to that question by experimenting with Sun Microsystems' Java Studio Creator, an IDE based on JavaServer Faces, to see how quickly he can build a Web application.


In Projects and Communities, The JDK Community's home page now links to resources for the JDK-related sessions and BOF's at JavaOne 2005. If you couldn't go, or if you need a refresher, you'll find slides, links to further reading, and forums where you can follow-up in more detail.

Members of the Portlet Community may want to check out the article Asynchronous Rendering of Portlet Content With AJAX Technology, which introduces the popular AJAX technology and demonstrates its applicability to portlets with a sample portlet that renders its content through AJAX.


In today's Forums,peterkessler has an answer Re: Please, how do I use Incremental garbage collection with huge memory (>3 Gb) ?: "The -Xincgc collector in JDK-1.4.2 (also known as -XX:+UseTrainGC) is not '64-bit clean', so you can't use it in the 64-bit JVM (e.g., with -d64). That limits you to heaps less than 4GB (less than 2GB on many operating systems). You could move to JDK-1.5.0, where -Xincgc invokes the concurrent mark-sweep collector (also known as -XX:+UseConcMarkSweepGC). Or you could try the -XX:+UseConcMarkSweepGC in the JDK-1.4.2 JVM. That had some bugs (fixed by JDK-1.5.0), but it might work for you. "

dirkp has a question about Storing component properties in XML: "I have written my own little report wizard for in in-house used system. I want to know if anyone can give me an example of how to use XML to store the various settings (ComboBox, CheckBox, TextField properties) of the report. I want to save this XML as a String in a database under each user so that the user can just select the "report settings" he wants and that will set all the components to the correct property states 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.



One of Java's top detractors changes his tune?  
kfarnham

Re-make / Re-model Blog

Posted by kfarnham Jul 12, 2005

Overhauling your GUI's so they make sense

Take off your developer hat for a minute, put on your user hat, and take a look at the really horrid user interfaces out there. You don't have to look far to find applications that are simply inept and downright painful to use. If you don't have any examples coming to mind, here are three different "user interface halls of shame" that collect the worst of the worst:

But how do you avoid developing a UI that, while functional, is a dud for your users? In today's Feature Article,Interaction Happens: Thinking Graphically, Jonathan Simon says: "Making a polished user interface is hard work. Interaction design takes experience and time, which are usually inconceivable luxuries."

He begins his "holistic" study of UI's with an address detail panel you've probably seen before: each field is on its own line, with a descriptive label next to it. You could even build something like this with reflection. And it makes perfect sense... to the developer.

To the end user, the layout is arbitrary, the labels unnecessary, and the whole thing takes up more space than necessary. Moreover, the user is probably used to dealing with addresses as they'd be laid out on an envelope, business card, or rolodex card, so why not present the data that way? Jonathan's article shows you how to do this with Swing, and then moves on to other cases where thinking more visually will help you make your GUI's more effective.

In today's Weblogs. Graham Hamilton has posted his Slides for JavaOne Technical Keynote: "Here are the PDF slides for the JavaOne 2005 Technical Keynote. The Technical Keynote is our attempt to provide a high level overview of the roadmaps and big directions for the core Java platform."

In Rethinking web development, or "Will I be spending the rest of my life writing JavaScript"?, Will Iverson asks: "If 'real developers' write code for the server, but Ajax means we are writing tightly coupled presentation tiers... who exactly is supposed to be writing and maintaining all of that DHTML and JavaScript? How do we get out of this mess?"

Bruce Boyes reports on Sandia Labs: UWB & AES demo for next generation secure wireless networks: "Sandia develops secure wireless technology using AES and UWB. A recent test moved streaming video over such a link, using only microwatts (compared to milliwatts for 802.11b/g) of RF power. Sounds almost too good to be true..."


In Also in Java Today , JSF is a framework built upon Java Servlets and JavaServer Pages (JSPs) technologies to provide a better Model-View-Controller (MVC) architecture. Since its release, JSF is gaining momentum in the web development community. The Apache Software Foundation has jumped on board also and has created their own open source implementation of JSF, called MyFaces. MyFaces provides much more than just a fully compliant implementation of JSF. The article Apache MyFaces Overviewtakes a look at MyFaces and discuss some of the features it provides that are above and beyond what is provided by the standard reference implementation from Sun.

In part four of an interview by Bill Venners, Erich Gamma talks about Patterns and Practice. The co-author of Design Patterns describes how design patterns are problem solution pairs, how design patterns help you understand intent and tradeoffs, and how to become a better designer through practice.


In Projects and Communities, the Java Distributed Data Acquisition and Control project has released version 0.5 of its JDDAC platform. The new release includes improved J2ME and metadata support, and is the version used by theNetBEAMS project.

The Mac Java Community's Mac Java FAQ Project seeks to collect "answers, information, and how-to's for Mac Java development", compiling information from developer mailing lists and other sources. Most of this new project's content thusfar is contained in its wiki FAQ.


In today's Forums,sahu is trying to figure out what's meant by chmod in Mustang: "While talking about Mustang, Graham Hamilton (at JavaOne) presented one slide with everything that is planned for Java SE6. I immediately spotted 'chmod'. Does anybody know what this exactly means? Is it for file permissions? Is it actually planned for Mustang? Or is it just there to fill up the slide and has no major impact on Mustang?"

peter_lawrey has an idea for a Named interface: "I suggest having a Named interface that returns a unique identifier as a String. This is a simple interface which I use all the time and many class in the standard libraries have a getName() method already. Here are some of the classes where such a method is already defined..."


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.



Overhauling your GUI's so they make sense  
kfarnham

Strictly Confidential Blog

Posted by kfarnham Jul 10, 2005

The process of the Java Community Process

Given the adage about never wanting to see sausage or laws getting made, do you really want to know how JSR's are created? I actually think the process is interesting because if you tour thecomplete list of JSR's at jcp.org you can recognize JSR's that have become parts of the core language (generics, assertions) and commonly-used extensions (JSF, concurrency). Keep looking and you'll also JSR's that have been withdrawn (JSR 61: Phonelets), rejected (JSR 20: Orthogonal Persistence, JSR 178: Mobile Game API), and others that appear dormant at best (JSR 104: XML Trust Service, supposedly forming an expert group since March, 2001).

What makes a JSR expert group succeed where many have failed? InSeven Secrets of the Star Spec Leads, featured in today's Projects and Communitiessection, Frank Sommers and Bill Venners collected the opinions of sixteen spec leads from various parts of the Java community, to find out what works. Do read the whole article, but in list form, the secrets are:

  1. Understand what you want
  2. Get the right people
  3. Delegate
  4. Foster communication
  5. Keep the ball visibly rolling
  6. Accomodate agendas without sacrificing technical excellence
  7. Learn from others

Few of us will be in the position of managing a JSR, but take a look at that list and see if it doesn't also make sense for project management on a lot of different levels.


Also in Projects and Communities, members of the Java Games Community who want to move beyond 2D sprites may want to check out Sony Ericsson's Mobile Java 3D Developer Resources page, which collects docs, tools, tips, tricks, and lists of devices that support Mobile Java 3D. It also hosts case studies and a Mobile Java 3D game gallery.


In today's Weblogs, William C. Wake has a Brief review - Fit for Developing Software: "This book is unique. While you can find information about Fit and fixtures on the web, what's on the web is much less readable than what this book provides. The book also gives you an extended example and helpful advice from two experts."

Bruce Boyes looks at Top Ten Myths of Embedded Security, and what Java offers: "This online article by by Mukesh Lulla, TeamF1 is a pretty good overview of the top 10 misconceptions about embedded security. It's worth mentioning here for a couple of reasons."

In Greetings, introducing myself, David Herron writes: "I work in the Java SE Quality Engineering team. What I expect to bring to the java.net blogs is exposure for the how Java is tested at Sun, and testing issues in general."


In Also in Java Today , The DevX article Cook Up Powerful Mail-Processing Scripts with Jython Procmail Recipes shows how to intercept e-mail on its way to a mailbox and perform processing on it to put selected values into a database, with Jython Procmail recipes. "Their ability to easily hook into existing Java APIs also makes recipes simple to implement."

EJB 3.0 offers a far simpler programming model than its convoluted predecessor, EJB 2.1, but will the developers who've moved to other frameworks be willing to come back? In POJO Application Frameworks: Spring Vs. EJB 3.0, Michael Yuan compares EJB 3.0 to the popular Spring framework, looking at their relative uses of annotations and descriptors and assessing the two in terms of practicality and power.


In today's Forums,pdoubleya offers a counter-argument Re: Install on demand: "One of the 'promises' of the Java 'Plaftorm' is that there actually is a platform you can build on and depend on. This was all sketched out before the mass of the population had reliable high-speed internet access. The upside is that once a version of the JDK is installed, *all* Java programs written for that JDK or earlier should find *all* of the JDK resources they were written to use. If you have automatic download, and the download fails, is interrupted, etc., the program/applet will not work, and a reasonable conclusion would be, 'Hmm. Java sucks.'"

alanstange has a question about Dtrace and mustang: "Can someone post a simple example of using Dtrace and Mustang (with build 39 or later)? I'm trying to get this to work using the provider syntax from some Javaone 05 notes and I'm missing something. Is there some command line options which enables the Dtrace providers?


In this week's Spotlight:Project Matisse: If you saw James Gosling's keynote and "toy show" at JavaOne (or if you read his blog about it), then you might be interested in trying out "Matisse", the new form designer for NetBeans. If so, check out Project Matisse - Java GUI easy & good looking "by default", which describes Matisse's goals and its integration into the latest NetBeans source.


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 process of the Java Community Process  

Size isn't everything

Back in Java 1.0, O'Reilly's Java in a Nutshellhandbook was a modest brown book, weighing in at 438 pages. The J2SE 5.0 edition is a desk-cracking 1225 pages, and it leaves out all of the desktop packages: AWT, Swing, JavaSound, etc. The book's preface notes that Java has grown from Java 1.0's 212 classes in 8 packages to J2SE 5.0's 3562 classes in 166 packages.

This immediately raises the question "Is Java too big for its own good?" After all, there is an astonishing amount ofstuff in here. How can a new programmer make any kind of sense of it or even know where to begin? On the other hand, surely each feature was demanded by someone out there, probably in a huffy forum post along the lines of "I can't believe Java doesn't support this... Sun better get its act together or I'm switching to Windows!" Stop me if you've seen that one before.

We've decided to make the question of "Is the Java SE API too big" the subject of the java.net poll for the next week. Please visit the front page and cast your vote, then join the discussion on the results page.

One thing that prompted us to make this the poll is an evolving discussion in the forums. The topic Add good open source layout mangers into JDK started back in November, but picked up recently with a proposal to addTableLayout to the JDK. This prompted replies that core Java is already too big and that any additions only increase the bloat.

In To the "Purists", alexlamsl makes the argument that discussion of proposed features needs to take place without always raising the problem of platform bloat as a universal objection: "I do understand your ideals about keeping a certain language platform compact hence maximising the ease of learning and deployment etc. However, what I would like to say is that this is a forum section which welcomes collects the general community's ideas and suggestions. Although it is trivial that not every single suggestion would get itself into the Java Language Platform, it is equally vital to let these ideas flow around and let others to argue back and forth so as to decide whether they are actually worth their values."


Also in today's Forums,dochez clarifies Mac OS support in glassfish...: "Did you build the workspace or just download the linux bits ? download[ing] the linux bits and trying to make it work on mac is not supported, you need to modify the asadmin.template in the lib/install/templates to add the derby property. the easiest at this point is to checkout the sources and build, then everything should be fine, otherwise wait for next week when I am hoping to get a Mac promotion."

Michael Nielsen offers another "future of java" entry in today's Weblogs. "Regarding recent musings on naming of Java SE 8. Looking at the trend, people are leaning towards the elephantine. I'd look further down the road: my vote, 'Phoenix'."

Apple's JavaOne BoF's "were surprisingly generous with details about how the Intel transition will (and won't) affect Mac Java programmers. Plus, making the "A-ha" video with your iSight."

Jody Garnett has a bit more on the Where 2.0 Conference, "with some notes for those considering location based services."


In Also in Java Today, Budi Kurniawan thinks servlet filters are great, but for one significant gotcha: you cannot change the request parameters of an incoming HttpServletRequest. This greatly hinders obviously beneficial uses, like validating or trimming the user's input before reaching any business logic. Fortunately, design patterns offer a solution, and in Decorating Servlet Request Objects, he shows how to get around this by using the Decorator pattern.

"Irrespective of the language programmers choose for expressing solutions, their wants and needs are similar. They need to be productive and efficient, with technologies that do not get in the way, but rather help them produce high-quality software." With this, Murugan Pal offers up the results of his survey of fellow SpikeSource developers in the ONLamp.com article What Developers Want.


In Projects and Communities, the latest Java Tools Community Newsletter announces the graduation of the JEvaluate project from the community incubator. JEvaluate is a library to evaluate mathematical expressions defined as String objects, and its syntax is not "programmer oriented", making it better suited for end-users.

If you saw James Gosling's JavaOne Thursday keynote or were at NetBeans Day the previous Sunday, you saw the Joplin music player when it was built in real-time onstage using the NetBeans/Matisse GUI builder. Please read about the Joplin project and consider joining 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 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.



Size isn't everything  
kfarnham

Apple's JavaOne BoF Blog

Posted by kfarnham Jul 7, 2005

Apple offered two surprise BoF's at JavaOne - a "surprise" because they hadn't previously been announced or expected and just appeared in the addendum and corrections to the JavaOne show schedule. Still, about a hundred developers managed to find their way over to the Marriott to see the show.

I got there too late to see the formal introductions on the first presentation, which was well into describing the affects of the Intel transition when I arrived. Also, if there was an NDA warning, I missed it, though the second BoF wasn't NDA and it would be impossible to enforce an NDA at these offsite BoFs anyways, so I don't seriously think Apple would say anything they didn't want to share.

The message about the Intel transition is, by and large, it just works. Of course, as a Java programmer, you'd expect this -- your code only sees the JVM, not the architecture underneath. The gotcha, of course, is that JNI native code needs to be recompiled, and you could have Java-side endianness hassles, depending on how you interact with JNI.

A little more interesting was the discussion of the various virtual machines for Mac OS X. Buried in this was the implicit announcement that 1.3.1 on OS X is end-of-life'd, as it won't be available on Intel-based Macs. If you depend on this Carbon-based JVM, it's time to work out any issues you have with 1.4.2 (or the nascent 5.0). The speakers also presented some performance comparisons of two Hotspot compilers: the "C1" that's currently available, and "C2" which apparently will only be available on MacIntel, not PowerPC. C2 is more aggressive in compiling Java bytecode into native code so it can run faster than C1, but depending on the choices it makes about what to compile and when, it may be slower than C1.

Personally, I'm still adjusting to the thought that the register-challenged x86 can so soundly trounce PowerPC to make the transition necessary, but I guess PowerPC really does have feet of clay.

They noted that the current game-plan gives them six VM's to support (and they didn't seem happy about that prospect):

                       
PowerPC JVM'sIntel JVM's
1.3.11.4.2
1.4.25.0 Hotspot C1
5.0 Hotspot C15.0 Hotspot C2

At the end of this BoF, they also showed how to set up XCode to work with the recently-released J2SE 5.0 instead of the default 1.4.2

In the Q&A, several attendees questioned... berated, actually... Apple's decision not to back-port J2SE 5.0 to Panther or earlier versions of Mac OS X. The Apple guys replied that they're always "forward looking" and that using the newest version of the OS lets them use the latest native SDK's to deliver a better JVM. Not mentioned was the fact that this has long been Apple's Java policy: Java 1.2 was never made available on the "classic" Mac OS, 1.4.2 was Panther-or-better, etc. So IMHO, you may not like it, but at least don't be surprised.

Part 2 was a show and tell. The demo I remember best was the CocoaComponent demo, which allows you to put native graphics into your Mac Java application in a reasonably straightforward manner. The demo showed various Quartz Composer compositions running in a Swing GUI. Surely the most amusing of these was the "Aha Video", which grabbed video from an iSight, dropped the frame rate, and used an effect to convert the video to white with black outlines, effectively aping the classic "Take On Me" music video with a live source (playing the song as an MP3 helped the effect too). The demo is available on ADC, as is another CocoaComponent demo which grabs from your capture device into an AWT window... something that the QuickTime for Java community has been begging to have back after it was removed from QTJ in the 2003 deprecatastrophe.

Surely I've forgotten stuff. Hopefully someone else who attended can point out other items of interest in the talkbacks below...

kfarnham

Game Over Blog

Posted by kfarnham Jul 7, 2005

Exploring J2ME's game API

Mobile device games may seem simple, but they're anything but trifling. Mobile gaming was estimated to be about a $US 3 billion market in 2004, on track to reach $US 18.5 billion by 2009. And Java is a huge part of that market, with J2ME increasingly ubiquitous on phones and well supported by game makers. The games are getting increasingly sophisticated too. Early efforts were largely inspired by puzzles and 70's and 80's arcade games, but more and more developers are trying to adapt the style of today's 3D games into the 2D sprite world of the phone. Some are even trying new ideas unique to the format: a mobile prequel to the classic PlayStation game "Final Fantasy VII" runs on Japanese i-mode handsets, and requires players to use the phone's camera to take pictures of certain colored objects to advance in the game.

If you've wanted to get into game development, now may be the time, and J2ME the place to do it.

You can learn more in today's Featured Article,J2ME Tutorial, Part 3: Exploring the Game API of MIDP 2.0, which introduces the gaming-oriented features added to MIDP 2.0. In this installment of the ongoing J2ME tutorial, Vikram Goyal shows off the classes of this API and uses them to develop a simple game, which you can code, compile, and play on your own device.


Catching up with an item you may have missed when our special JavaOne page was up, Ken Arnold weighs in with Generics Considered Harmful: "'Complexity budgets' are important. Too bad we didn't think that way earlier. The complexity of Java has been turbocharged to what seems to me relatively small benefit. I don't see that the value is there to justify the cost."

Also in today's Weblogs, Jonathan Bruce investigates what happens when XQuery meets Tivo: "JavaOne 2005 saw much chatter around XML bindings slatted for Dolphin, alignment around JBI but it also saw important presentations given on XQuery and what it means for today's Java developer. One of the more interesting sources of XML data is located underneath right under your TV. Your TIVO DVR is rich with XML data that are used to maintain the currently playing recorded programs and to manage a variety of content."

John Reynolds writes "It's likely that all Java EE app servers will soon be free." In Java EE app servers: Why pay for support?, he writes: "When all app servers are free, many companies will turn to selling ongoing support contracts, but will anyone pay for support?"


In Also in Java Today, months after the landmark agreement between Sun and Microsoft, there are still kinks yet to be worked out in integrating the companies' products. In Interoperability Frustrations Aired, InfoWorld's Paul Krill writes: "Interoperability between Java and Microsoft .Net systems remains very much a work in progress, if discussions at JavaOne were any indication. During an evening conference session entitled 'On the Couch with Sun and Microsoft,' officials from the two vendors went toe to toe with audience members frustrated over interoperability and with Web services in general.

Jim Farley, co-author of Java Enterprise in a Nutshell, 3rd Edition, notes that "the foundations of the Java ecosystem (the code, specs, tools, and so on) exist across a broad spectrum, running from formal, universal standards to informal, localized tools." Recognizing this continuum, he and his co-authors decided to push out their view of Java enterprise APIs, and as he explains in Java City: The Java Enterprise Ecosystem, this led them to cover de facto standards in the new edition, like Ant, Hibernate, and JUnit.


In Projects and Communities, Gregg Sporar's blog entry NetBeans Day 2005: A Huge Success recaps the highlights of theNetBeans Community's pre-JavaOne event. 550 attendees enjoyed technical presentations that included a preview of the Matisse-based MP3 player demo that James Gosling showed off later at JavaOne.

Sean Mullan's weblog notes the JSR 105 (XML Digital Signature API) Final Release. As described at the JCP site, a reference implementation is available as part of Java Web Services Developer Pack 1.6, with TCK and source for the RI available under the JDL.


In today's Forums, usersubanark wants to Install on demand: "I see many concerns of adding more and more classes into the JDK (thus increasing its size). At the same time each distributor shouldn't need to have their own copy of feature X if it is important. What is needed is a install on demand so that components that are shared by different applications are only installed once. Although web start has functionality like this, it is not used very much. This functionality should be available for non web start applications, and new components should be added to thier own library instead of including them in the JDK."

alanstange has a question on Dtrace and mustang: "Hello, can someone post a simple example of using Dtrace and Mustang (with build 39 or later)? I'm trying to get this to work using the provider syntax from some Javaone 05 notes and I'm missing something. Is there some command line options which enables the Dtrace providers?"


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.



Exploring J2ME's game API  
kfarnham

Silence and Motion Blog

Posted by kfarnham Jul 6, 2005

Getting the word out

In yesterday's blog, I made the point that a good time to make project-related announcements is pretty much any of the 51 weeks of the year that don't coincide with JavaOne, as announcements from Sun tend to drown out everyone else's announcements and releases. Today, I'd like to share another tip with you:

Tell us what you're up to. We want to know.

This was the theme of a brief presentation I made at the java.net community leader meeting that preceded JavaOne. In describing the various parts of the java.net home page, I stressed the ways in which we try to use the front page to promote projects and communities on the site. Single-day blurbs, week-long "spotlights", and feature articles are great ways to get the word out about your project.

So how do you let us know that your project has just issued a 1.0 release? Don't make us find it -- there are too many projects to look through every day. Instead, drop me an e-mail at cadamson@oreilly.com.

For example, Ivelin Ivanov sent me a note to let me know that the Java Communications Community project Mobicents has announced the release of version 1.0a of their JAIN-SLEE implementation. Mobicents is the only open-source implementation of this telecom middleware specification.

Also in Projects and Communities, One of the most popular Javapedia pages last month was the entry on ServiceOrientedArchitecture, which collects definitions, opinions, tutorials and other articles on the topic.


In today's Weblogs. Rich Unger takes on the ongoing IDE holy war in Eclipse vs. NetBeans *yawn*: "OK, I got your attention. Now, can we just forget this horse-race and go back to getting some actual work done? No? Oh, fine. So, JavaOne just ended, and everyone's talking about the buzz around these 2 products. There's enough hype around here to stuff a turkey."

Is GlassFish: Too Little, Too Late? Andreas Schafer writes: "After the magical dust of JavaOne has settled the reality is reappearing and we can start thinking about the results. Especially Sun's announcement (beside buying my current employer) of open-sourcing their application server was a hot topic here even though I did not quite trust all the fuss around it. Now over the long weekend I had time to figure out what happened and the result, quite frankly, is disillusioned and I get the feeling that this was just the last phase of this application's life cycle. "

Greg Murray stresses the role of XML in AJAX - X = No Dice: "This entry brings up some questions as to using XML as the content type in AJAX. Most of the focus I seen in the AJAX world seems to revolve around the JavaScript and DHTML operations on the client. Without the 'X" in AJAX you really can't have any rich interaction."


In Also in Java Today, 15,000 developers attended the JavaOne 2005 Conference, eager to learn and share knowledge and to get a glimpse of the future of Java. The ONJava article JavaOne 2005: Participate in the Future of Java details the announced roadmaps for the newly renamed "Java SE 6" and "Java EE 5," and shows how the Java community is being invited to participate in developing the platform going forward.

JavaServer Faces provides an alternative to Struts or Spring MVC for those who want a Web application framework that manages UI events in a Java Web application. JSF is now a standard part of the J2EE specification and provides a viable alternative to non-standard Web frameworks. In Face Up to Web Application Design Using JSF and MyFaces, Javid Jamae introduces JSF and uses a JSF-based game of "Hi-Lo" to show how it works.


In today's Forums,clearthought is calling for activism in Getting TableLayout in the JDK: "Actually, TableLayout is trying to get into the JDK. Check it out at its project page. You can even petition to get it into the JDK."

nickhomeaccount clarifies his thinking in kicking off a thread Re: Java DB: "My reason for raising the idea was that I think it would make unit testing easier. I work with a framework that only supports several commercial databases. I believe if the J2SE included a minimal relation database it would be likely that frameworks would support it, and it would make creating unit tests easier. I think putting a database in an optional package would still make it likely that frameworks would support 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 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.



Getting the word out  

It's not all about JavaOne after all...

This is why we encourage projects, particularly open-source efforts, not to make major announcements during the middle of JavaOne: Apache's Geronimo team has just announced that they've passed the TCK test suite, bringing this open-source and liberally-licensed J2EE server closer to full J2EE certification. Had this announcement come early last week, it could easily have been missed among all the other JavaOne week announcements. Instead, announcing it just after JavaOne -- going into a holiday-shortened week in the U.S. when Sun is closed anyways -- picks up better notice (such as this mention in the daily blog) and presumably more attention from potential users and even contributors.

Now if you're really smart, your project will time its next major announcement for mid-August, when there's nothinggoing on and we're dying for news.


In today's Featured Article, Eugene Kuleshov shows you how to Create a Simple IoC Container Using Annotations: "In this article, you will see how to use annotations to automatically resolve component dependencies. This can help to build a flexible container that can be used to inject dependencies into the custom components."

JavaOne wrap-ups and impressions, positive and not, are the focus of today's Weblogs: James Gosling writes about The last day of JavaOne: "My keynote was this morning, followed by a panel session and a blur of conversations with the press, customers and developers. I could write a book on what's gone on today, but I'm so tired after 4 incredible days that I'm not going to be able to do it all justice."

Kirill Grouchnikov was far less impressed. Describing JavaOne - what a cool, next-generation, Brazilian experience, he writes: "I swear to god, if i hear the word 'cool' one more time, i'll put a gun to my head and pull the trigger. But then, i look at my own nick and take a deep breath. There's a cartoon too."

Kathy Sierra says the proof of Java's well being is not in the proverbial pudding, but rather in the gift shop: In The JavaOne Store Metric, she writes: "If JavaOne logo merchandise sales are any indication of Java's continued success, Java is in fabulous shape."


In Also in Java Today , Java recently celebrated its 10th birthday, but where does it stand today and where is it going? In Java Turns 10: The Developer Retrospective, prominent developers and community luminaries (including Bruce Tate, Jack Herrington, Jim Waldo and others) talk about Java's history, the tools they use, the client-side story, things they'd like to see changed and, of course, whether Sun should open-source Java.

Chances are you use Ant--an ONJava survey showed that 94 percent of their readers use it--but are you getting the most out of it? As Les Hazlewood notes, "today's enterprise Java projects are complex in structure, functionality, and organization. They usually have a lot of source code and supporting artifacts (properties files, images, etc.) to manage." An ideal build system will help manage this complexity, by building only what's needed for specific tiers, by catching unintended dependencies, and by keeping configuration management hassle to a minimum. In An Ant Modular Build Environment for Enterprise Applications, Les Hazlewood shows you how to construct a more modular build that helps achieve these goals.


In Projects and Communities, the SWATO project has graduated from the incubator to a Java Enterprise Community project. SWATO (Shift Web Application TO...) is a set of reusable and well-integrated Java/JavaScript library that provides an easy way to shift the interaction of your web apps to an AJAX model.

The Jini Community's June 2005 Newsletter reports on Jini-related sessions and BoF's from JavaOne 2005, spotlights two Jini projects, and points to an introductory article that discusses the concept of leases and why they're so important to developing Jini services and clients.


In today's Forums,chet is looking for JavaOne feedback in the topic Desktop track: How'd it work for you?: "Having spent way too much effort this year helping to plan and execute the Desktop track this year, I'd love to know how well it worked for the folks that went. Any talks you really liked, or really didn't? Any topics you were happy we covered, or happy we didn't? Or topics you wish we had covered? How effective were the presentations? I'd like to see us keep improving the Desktop track (and the conference overall); let us know if you have ideas on what we can do next time around to improve it for you. "

User gwk wants to know why parts of GlassFish arenot pure java? "After downloading the Linux version of GlassFish I noticed there are indeed native parts (*.so) there. What are they for? I am running on FreeBSD which can emulate a Linux environment (mostly.. err, sometimes...). I have both a FreeBSD jdk 1.5 and a Linux one available ... What's the deal - can I expect the rest will work w/o the *.so?"


The latest Project Spotlight features the newest java.net community, the Robotics Community, which "made its debut at JavaOne, with robotics being the subject of two technical sessions at the conference."


The poll question for this holiday-shortened week is Do you plan to attend JavaOne 2006? Be sure to cast your opinion on the front 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 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.



It's not all about JavaOne after all...  
kfarnham

JavaOne Day 4 Blog

Posted by kfarnham Jul 1, 2005

I'll be ready to do this again after 11 months' rest...

Your editor is back in Atlanta after taking the red-eye home from JavaOne, operating on 90 minutes' airplane sleep, and will let this photo from Scott Schram serve as the wrap-up and farewell:

http://photos17.flickr.com/22649252_05ce6a04f8.jpg?v=0 

Please join us on Tuesday when we return to our regular java.net website.

I'll be ready to do this again after 11 months' rest...  

Filter Blog

By date: