Search |
||
Asynchronous and SynchronousPosted by daniel on October 24, 2003 at 7:50 AM PDT
Much of the perceived performance problems with Swing can be addressed by working better with the Swing single threading model. Jonathan Simon writes that you need to "execute code in the appropriate thread" and take advantage of "asynchronous execution using SwingUtilities.invokeLater()." This reminded me of a couple years back when Blake Stone was a panelist in one of my "Java on the Mac" sessions at MacWorld San Francisco. At that time everyone "knew" that Swing was slow, that Macs were slow, and that Swing on a Mac was deadly. Blake demo'ed JBuilder running on Mac OS X. Although he was primarily showing the benefits of their latest release, he took the time to make the following point. JBuilder was a very large pure Java application that was responsive and looked pretty good (as tools go). In Jonathan Simon's feature article Rethinking Swing Threading he takes a close look at some of what he refers to as the synchronous verses asynchronous problem. He spends the first half of the article setting up the problem and showing a common solution to it. The problem with the commonly applied solution is that it involves
It's interesting that Jonathan's event-driven approach requires increased cohesion. As he says in the conclusion
The next line grabbed my attention a bit. He asserts that "It certainly takes more effort up front to design and build an event-driven client, but over time, that up-front cost is far outweighed by the flexibility and maintainability of the resulting system." Do you think this is true? Do you need to do this work up front or is it appropriate to hold this optimization until it is needed? In today's featured Weblogs .Jayson Falkner answers questions About the new JSP EL. In particular he says that the EL audience is JSP 2.0 and above developers "who want to more easily code and maintain a JSP, especially when working with more than one developer." He says things like the JSP EL are used outside of Java and JSP because
James Todd looks ahead at the December release of JXTA:03Q4[aka Timpani]. For fun, Felipe Leme publishes a recipe for the national drink of Brazil in A taste of Java . This is the recipe that Brazilian JUG leader Bruno Souza provided at the end of his JavaOne presentation. Warning - Kimmy-the-wonderwife and I have only had this drink when we are staying home. Continuing with the Friday fun, I followed a trackback from my blog entry yesterday and found Matthew Lanham's posts on The Silent Penguin . His October 24 post "So where's the problem?" presented a requirements document for a problem as complex as any other that a developer faces each day: dressing yourself and three wet children after swimming.
As any who have attempted to solve this problem know, an Agile approach is best and refactoring is required. In Also in Java Today , John Zukowski shows you how to convert between the old and new sets of Java collections. From old to new, you can treat a You can write your help files using XML defined by a subset of DocBook and then translate the resulting files to JavaHelp files that can be accessed from your application. Austin King shows you how to transform your files using XSL and Saxon and the JavaHelp utilities in Creating an Online Help System with javaHelp and DocBook. In Projects and Communities , the Java User Groups community highlights the Denver JUG and their next meeting. The featured JavaPedia page is the Java Audio page. As always, feel free to contribute to the listing. 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 by news director Steve Mallet before being posted to the site. You can also subscribe to the java.net News RSS feed. Current and upcoming Java Events:
Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site. This blog is delivered weekdays as the Java Today RSS feed. Once this page is no longer featured as the front page of Java Today it will be archived at http://today.java.net/today/archive/index_10242003.html. You can access other past issues in the java.net Archive. »
Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|