Posted by daniel
on April 13, 2005 at 7:48 AM PDT
Does Java on the Desktop Matter? . . . also
Weblogs: optimize a Swing app by slowing it down, Strongly Typed Java Delegates, Daylight savings and koders.com
Also in Java Today: Tame your Names and Aspectwerkz 2.0
Projects and Communities
Free MIDP 2.0 emulator and Tiger with or without Tiger
Forum posts: code changes for testing and more on the Warnings API
Does Java on the Desktop Matter?
Bill Bumgarner has written a blog titled Why Java on the Desktop Just Doesn't Matter . Before you click on the story (I hope it's not too late), I want to provide a bit of context for Bill - he's one of the good guys. As you can see in this post on the origin of the magic number oxCAFEBABE he's been a "Java user since the day Sun released the original JDK source (which I helped port to the NeXT)".
Toward the end of the most recent post he also points out that " Java is a great general purpose language. I have written tens of thousands of lines of Java code for various random web and web related applications and enjoyed doing so quite a bit. If you remember, I was one of the handful of developers in the WebObjects community that fully embraced the move to Java."
So BBum isn't an anti-Java reactionary. He is building on John Carmack's recent post about J2ME in which he writes "there is just no excuse for having 10+ millisecond granularity in timing. Given that the java paradigm is sort of thread-happy anyway, having a real scheduler that Does The Right Thing with priorities and hardware interfacing would be an obvious thing." Bill agrees that " the very architecture of Java naturally incurs latency throughout any Java realized UI [and that] For UI development, that is a deal killer."
As a postscript - check out the comments on Bill's post. It is, in a way, heartening to see passionate Java developers leap to the defense of Java on the Desktop.
" Sometimes the best way to figure out how to speed up an application is to slow it way, way down."
href="http://weblogs.java.net"> Weblogs , gives an example using DebugGraphics of how you might Optimize a Swing App by Slowing It Down . "Because software developers and quality testers tend to have very fast systems so they can multi-task effectively, an unfortunate side-effect is that they tend to run their applications faster than their customers do. As a result, it's easy to overlook inefficient and redundant GUI operations as long as the result looks and feels okay on a fast system. Slow your system down enough, however, and these problems leap out at you, demanding attention."
Alex Winston strives to correct problematic implementations of delegates as he demonstrates in Strongly Typed Java Delegates . He concludes " As I attempted to set out to solve type safe delegates in java I initially thought it would be quite difficult but as mentioned, with a little imagination and the magic of cglib2 anything is possible. Say goodbye to type unsafe delegates."
When does daylight savings time begin and end? It's hard for any software to keep up as it can vary from country to country from year to year. Even within some countries there are regions that don't follow the generally accepted practice. In Y2K, redux Michael Nielsen notes that "the actual time zone (and DST) info is in a external file in [jre]/lib/zi/* (that's good), but it's not plain text (that's bad -- for my curiousity, anyway). "
Scott Schram blogs about
koders.com Searches Open Source Projects . He used koders.com to look for source code related to the problem he was trying to solve. "Koders.com could also be used when confronting an apparently awkward API to see if anyone has an elegant solution or as a rough guide to the popularity of an API."
In Also in
Java Today , Mike Clark has started a news series called "Code Craft" for Better Software Magazine. The debut article, Tame the Name talks about the importance of choosing a name for a class that is "pronounceable, expressive, and contextual". Even names for "Variables should describe the data they hold or the object they reference. If variables dont help you remember what they represent, then they need to be renamed."
David Teare says that in order for Aspect-Oriented Programming frameworks to take hold in the Enterprise, "these frameworks must integrate well with the other frameworks that are already being used within enterprise systems." But more than that, they have to be able to solve real problems in ways that other approaches cannot. In a feature article from dev2dev.bea.com, Quick Start Guide to Enterprise AOP with Aspectwerkz 2.0 , he introduces a blogging web application with tightly coupled logging and performance profiling code interweaved throughout the program. He shows how AOP can decouple this code, while still playing nicely with the logging and monitoring frameworks.
In Projects and
Communities , Michael Powers has a free MIDP 2.0 emulator that is pure Java and includes preverify 2.0 for Mac OS X. To demo your MIDlet, use the free Java WebStart demonstrator which you can use by adding a link to the WebStart emulator .
The Mac Java Community page notes that Apple will ship Mac OS X 10.4 'Tiger' on April 29th. Apple's version of J2SE 5.0, also called 'Tiger', will require 10.4 but Apple's pages only mention Java 1.4.2. The java-dev list includes a thread on whether J2SE 5.0 will be included with Mac OS X .
Mason starts a thread with the title Here's a better reason for it... in today's Forums
"JUnit testing. It's nice to have your TestCase be able to check that fooMethod() does, in fact return barObject, but you'd never in your life want any other class to actually be able to directly access fooMethod(), it's just too dangerous. "
On the Warnings API thread, seanreilly writes
"Some colleagues and I were having a discussion about exceptions vs. warnings several months ago (for a completely different paradigm). In this discussion, we found it helpful to describe exceptions in terms of warnings, instead of the other way around. Instead of thinking of a warning as a special kind of exception, an exception is a special kind of warning; one that terminates the current thread of execution."
In today's java.net
News Headlines :
Registered users can submit news items for the
href="http://today.java.net/today/news/">java.net News Page using our
form . All submissions go through an editorial review before being
posted to the site. You can also subscribe to the
href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News RSS
Current and upcoming Java
Registered users can submit event listings for the
href="http://www.java.net/events">java.net Events Page using our
href="http://today.java.net/cs/user/create/e"> events submission form.
All submissions go through an editorial review before being posted to the
Archives and Subscriptions: This blog is delivered weekdays as
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
Does Java on the Desktop Matter?