Journal Sections:
• embedded • hardware • java • life • mac-osx • opinion • photography • software •
• java
- Turning the Web on its head - let's have the server call the clientCode Camp is not just for geeks, hackers, and code monkeys; and while you may find some of them at UC San Diego on June 28 and 29, Code Camp is first and foremost a place for software developers to come together, share ideas and experiences, and learn from their peers.
This will be my 2nd San Diego Code Camp, which compared to the Code Camp up North at Cal State Fullerton, is much more focused on Microsoft and .net related technologies. However, I'm still hopeful that this topic will fill a room: Turning the Web on its head - let's have the server call the client.
We will take the accepted view that a Web-Client calls (via HTTP GET or POST) a server and turn it on its head. Let's have the server call the client. It is really not that far fetched, to imaging a scenario where the server, when it has determined that something exciting just happened (e.g., the Dow Jones Industrial Avg. Index jumped 100 points) calls the Web Client, instead of clients constantly polling the server (even when the DOW barely moves). - Java 6 on the MacIt had to happen eventually, Apple finally released Java SE 6 for the Mac - well not for all of Macs, only for Macs running Mac OS X 10.5 [Leopard] - and not for all those Macs either, only for Macs with Intel processors - and not for all those Macs either, only for Macs with a 64-bit Intel processor.
- Turning the Web on its head - let's have the server call the clientCode Camp is not just for geeks, hackers, and code monkeys; and while you may find some of them at Cal State Fullerton on January 26 and 27, Code Camp is first and foremost a place for software developers to come together, share ideas and experiences, and learn from their peers.
This will be the 3rd time for me, driving up to Cal State Fullerton, and for the 3rd time, I have been given the early morning spot for my talk. Now, like probably most participants, I would not consider myself a morning person - still, I'm confident that this topic will fill a room: Turning the Web on its head - let's have the server call the client.
We will take the accepted view that a Web-Client calls (via HTTP GET or POST) a server and turn it on its head. Let's have the server call the client. It is really not that far fetched, to imaging a scenario where the server, when it has determined that something exciting just happened (e.g., the Dow Jones Industrial Avg. Index jumped 100 points) calls the Web Client, instead of clients constantly polling the server (even when the DOW barely moves).
Sounds interesting and a couple of implementation ideas may come to mind. After looking briefly into some xml and binary web service protocols, we will take a closer look at the notification mechanism, provided by Java's management extensions and eventually take a really close look at a full featured implementation of the above mentioned problem.
Interestingly, even when looking at both, the client and the server part of this solution, there isn't really all that much code to write, which means that even in the little time we have, all the concept and patterns used, can be looked at and discussed. Honestly, all the code, (client and server) that makes this 'Stock Quote Client' an event-consumer, instead of a stupid poller, will be shown.- CodeCamp - Fullerton 2008
- Wolf Paulus: Turning the Web on its head - let's have the server call the client
- Saturday, January 2008
- Cal State Fullerton, Room UH335, 8:45 AM
- Conference Presentation Slides: [PDF Slides, 1.7MB]
- Java 6 still missing on Mac OS XLike so many other Java developers enjoying a Macintosh as their primary computer, I installed the new Mac OS X v10.5 a.k.a Leopard this morning. No matter if you got it at the store last night, delivered by FedEx, or via download as part of your ADC subscription, the official Gold Master release (9A581) does not contain the long awaited Java 6 Runtime.
Apple updated the Java version in OS X v10.5 from 1.5.0_07 to 1.5.0_13 but Java 6 is nowhere to be found in Leopard nor anywhere on Apple's website. Previously available Java 1.6 developer preview releases also have been removed and don't seem to be available at this time.
The hypothetical question 'What would you do, if Java 6 on Mac OS X would never be ?' that I had asked just a couple days ago, seems to have turned into a much more actual one today.
Given that Apple has not released any time frame for when to expect Java 6 on OS X, as a Java developer, I have to ask myself at what point developing on Mac becomes disadvantages. While the flawlessly working beautiful machines with their secure Unix underpinning provide an obvious upper-hand over Java Developers on Windows boxes, having to work with a Java Development Kit and Runtime that is now years behind of what's available on Windows, Linux, and Solaris becomes a real burden.
Honestly, the unavailability of Java 6 in OS X Leopard has put all of us Java Developers on a Mac, into a position that becomes a little harder to explain and to defend every day.
--
Wolf
- What would you do, if Java 6 on Mac OS X would never be ?

Only four days, until Mac OS X 10.5 Leopard launches and it still has not been confirmed that Java 6 will be part of the latest Mac OS distribution. In fact, chances are, it won't.
Take for instance James Gosling's recent blog entry, where he proudly tells us that he no longer uses a Mac laptop and that the Solaris folks have made 'huge' strides in Solaris's usability on a laptop. However, his reason for dismissing his Mac is manly that the Mac hasn't been keeping up as a developer's machine.
OK, you may think that the timing of his blog post is just a coincidence, anyway, James is right. Java JDK 6 is available for Windows and Linux for many, many months now but it still isn't on the Mac; and while someone responded that a beta of JDK 6 is available at http://developer.apple.com/, it is rumored that this isn't the case anymore and that the Java 6 developer preview has been removed.
I'm a purposely vague here, since the last time I wrote something related, an almost immediate phone call from a company in Cupertino, had me edit (cripple) my article severely...
It is also 'rumored' that the latest beta of OS X 10.5 Leopard, which was made available to developers about four weeks ago, did not include Java 6 but shipped with Java 5 installed instead.
Mac OS X is arguably predominately used on client computers, which is not the place where Java has a great success story to tell and besides selling MacBooks and MacBook Pros to Java Developers, there may not be a reason for Apple to further invest in maintaining a Java VM and JDK.
So there is some indication that Java Developers on the Mac (which includes yours truly) may be up for a big surprise on Friday, when the next big cat purrs; and while there is still hope, why not hypothetically try to answer that question, 'What would you as a Java Developer on the Mac do, if Java 6 never arrived?'
- SwiXml 1.6 (Beta 1)
The first distribution of what will eventually become Swixml 1.6 has just been made available on the
Swixml.org Website and also put into the SubVersion repository on Java.net.
Thanks to Karl Tauber of JFormDesigner, Swixml now supports the JGoodie FormLayout.
Of course, a few small bugs have been fixed along the way as well and a couple improvements have found its way into the codebase.
Please share your experience with the new release over in the Swixml user and developer forums. Moreover, if you develop layouts, using the new FormLayout support, please send me your java-code, xml-descriptor and also a screenshot. I would love to include them into the sample code section and also put them on the Swixml page to make more samples available for users who just start with Swixml. - Swixml is used in GlassFish's openInstaller Framework
GlassFish is the open source community based implementation of Java EE 5. GlassFish has a few tools projects, one of which is openInstaller.
openInstaller is an open source community project building a free and comprehensive next generation installer framework. While the initial development of openInstaller was done by Sun Microsystems, it is now available under the open source Common Development and Distribution License (CDDL).
The openInstaller project provides the framework for developers to create cross platform installations; it is a part of the GlassFish community of projects, and now includes and uses the Swixml, which I had created a couple years back. Swixml is a GUI generating engine that uses Declarative Programming to define Graphical User Interfaces.
- JavaOne 2007 Wrap-up, Final Thoughts, and Open Questions
After four exhausting but inspiring days at JavaOne 2007 it's good to be back in San Diego. I flew out of SFO Friday evening, still thinking about the final general session, hosted by James Gosling early Friday morning. Gosling had the pleasure to show all kinds of cool projects, gadgets, and devices, like small and also not so small robots, all featuring Java of course.
However, I couldn't shake the feeling that he either hadn't seen some of the projects before, or had already forgotten about them; you be the judge what would be worse.
Thor Norbye, Sr. Engineer at Sun and member of the Java Posse, once again was part of the show. This time he demonstrated the Ruby on Rails support in the upcoming NetBeans 6.0. Looking at the topics Thor covered in previous years (2005, Thor demonstrated Java Studio Creator 2, in 2006, he showed the Visual Basic language support in Java Studio Creator) however, it remains at least questionable how relevant NetBeans will become in the Rails community.
- Tough Crowd at JavaOne?While I thought that there were some important announcements made during today's keynote at Sun's JavaOne conference, the crowd really didn't seem to find any of the things mentioned exciting at all.
When it comes to excite a crowd, keynote speaker Rich Green certainly is no Steve Jobs and attendees didn't line up hours before the keynote, in fact lots of people were still eating their breakfast while the keynote was well on it's way. Well, blame it on the Moscone Center's huge underground Hall, which makes you feel like sitting in a huge underground parking structure and don't provide much of an atmosphere. However, neither James Gosling nor Jonathan Schwartz, who all were on stage during the keynote, could really move the audience.
So what else happened today?
Sun announced to have completed the open-sourcing of Java, to have made the JavaOne conference carbon neutral, to have printed the conference material on 40% post consumer waste recycled paper, printed on with environmentally friendly soy ink, another scripting language dubbed JavaFX (an AJAX-Killer that will Radically Simplifies Content Authoring (TM), to work hard on Java Servlet's 3.0....
Servlets 3.0. Hm, now I'm sure we all have some ideas how to improve or add to the servlet spec. However, getting rid of the web.xml deployment descriptor and doing everything in code through annotations instead, wouldn't be on my list. Actually, I like to have the DD around, which gives the guys how actually have to deploy and run the web applications we write, the means to enable or disable certain servlets or add or remove some filters etc.
After a rough start, which saw almost every demo crash, (why Richard Blair trys to demo Java 6 stuff on a Mac is beyond me), there was plenty of beer and good food in the JavaOne Pavilion, spreading hope that everything will be good from here on out. - Is enthusiasm, energy, and creativity enough to catch up to competitors who may not have the same level of compassion but instead have a strong commercial interest?
Spending two days at the Desktop Matters conference, sharing ideas and experiencing a newly re-energized group of hardcore Java Desktop developers first hand was truly outstanding. Java luminary Ben Galbraith had organized this small but very intense 2-day conference under the umbrella of Jay Zimmerman's No-Fluff-Just-Stuff Symposium Tour.
Personally, I felt much honored to be given the opportunity to give a talk about Swixml, the DSL (domain specific language) and GUI generating engine for Swing applications. And just looking at the agenda gives a pretty good idea about what I mean with intense; all talks were short and speakers didn't waste any time with the usual partially introductionary stuff and instead focused on their core message.
The whole event seemed like a strong, colorful firework of concepts and ideas, all pointing to the same direction: despite the entire buzz around AJAX, desktop applications still matter, especially when it comes to high quality, visually oriented applications. The visual impression a user gets from an application, projects directly on to the company making or providing the app. Reason enough for Apple for instance, to spend time, money, and effort, to create iTunes as a native desktop application for Windows and OS X.
It was encouraging to see that the group of top quality people that Sun has assembled around Hans Muller and Chet Haase seems the strongest (in quantity and quality) it has ever been. Also Apple's continued commitment to porting Java Swing to the Mac OS X platform was appreciated much; no surprise, considering that at least 70% of the participants brought an Apple Laptop to the conference.
A good summary of most of the topics discussed at the conference can be found at InfoWorld.
The newly found confidence in the Java Desktop manifests itself in the announced Nimbus look-and-feel, a cross platform look-and-feel that Swing developers could be proud of. Applications deployed with this look-and-feel will look distinctively different from native applications but will look the same on Windows, Linux, and OS X.
- XML Schema for Swixml
Writing a Swixml declaration file is not that hard, if you know your javax.swing components.
However, getting a little support from your XML-Editor or IDE certainly doesn't hurt.
Getting IntelliSense help sometimes doesn't require much more than pointing your editor to a DTD or XML Schema to pop-up element and attribute names as needed; or simply adding an xsi:schemaLocation attribute to the root element might do the trick.
Anyway, I've generated the XML-Schema for all built-in Swixml elements and attributes and made it available here: http://www.swixml.org/2007/swixml.xsd
It is complete, concerning elements and their attributes, and while the schema already has more than 2700 lines (which tells a story about the complexity of Swing), it does not include containment-rules, e.g. that you shouldn't add a button into a label, nor does it validate the attribute values other than booleans.
- Java on OS X, slowly fading awayMost of the great and compelling desktop applications for the Mac are written in Objective-C, a somewhat strange language but still very similar to C and C++. Objective-C was branched from the GCC GNU compiler and therefore is free and open software, with the code of the GCC Apple branch made available here: http://gcc.gnu.org/viewcvs/branches/apple/trunk/gcc/ Most of the code in this branch is between 8 and 13 months old, which may only suggest that the repository does not get update very often, still Objective-C gets a major overhaul for the first time in a very long time. The Objective-C language is being changed and not in a small way, like David shows in his recent article at informit.com:
- Objective-C is now be able to create managed code, meaning like C# and Java, Objective-C object falling out of scope will be garbage collected by a Runtime Engine and not being released by developer written code. Objective-C adds __strong and __weak type qualifiers for pointers, notifying the runtime garbage collector of how to deal with it.
- Like David also mentions, the dot notation to access properties (just like one would do in C++) has been added too.
- And there is another example of Objective-C borrowing a feature from a different programming language: automatic generation of property accessors.
A property just needs to be annotated in the Interface (yes, Objective-C like C and C++, separates definition and implementation) like@property int aProperty;
as readable or read-write, and accessor methods (setters and /or getters) will be generated automatically using this implementation:@property (ivar = anInstanceVariable, copies, setter = aSetMethod:) int aProperty;
- Swixml
What was planned for many months, finally became reality this weekend; a new Swixml distribution was uploaded and is now available at Swixml.org. And while this is mainly a maintenance release, there are many long planned features in the queue that will be integrated in the next couple of weeks. The API and TAG documentation has been updated on the site and miscellaneous content has been added, e.g. check the developer/user opinions, to read some newly added quotes from your peers.
Version control
With the help of the java.net admin team, the old source code repository was replaced and we moved from CVS to SubVersion, and is available again here: https://swixml.dev.java.net/source/browse/swixml/
E.g., to check out source code now, you'd use:
svn checkout https://swixml.dev.java.net/svn/swixml/trunk swixml --username guestLunarPages, one of the best there is
LunarPages is a web hosting service, located in La Habra, California. It may not be the cheapest but it's simply one of the best and most reliable hosting services out there. Even their most affordable plan already provides 35 GB Storage and 800 GB Data Transfer.
Thanks to the great people at LunarPages' customer support, for the first time ever, I have all domains (swixml.org, tiffanyscreens.com, carlsbadcubes.com, and wolfpaulus.com) easily manageable in a single account.
Moving all domains into a single account also meant moving the Swixml user and developer forums, which are based on Simple Machines Forum, to the new server. Luckily, Simple Machines released SMF 1.1.1 on December 16 and we were able to use there latest release together with TreetopClimber's cool looking BlueLine theme.
Something I was looking forward to for quite a while now: the forums are now also available in an RSS feed: orDesktop Matters
Ben Galbraith, Dion Almaer, and the No Fluff Just Stuff Java Symposium (NFJS) team have announced the Desktop Matters Conference, a one-day conference focusing exclusively on the needs of Java Desktop development.
SwiXml, among many other related topics will be discussed at the Desktop Matters Conference, March 9 in San Jose, CA.
"This will be a fantastic opportunity for the Java Desktop community to come together to learn about the latest in Java 6 and the various community and third-party frameworks supporting Swing development and discuss the future of the platform. If you're doing anything with Java Swing, or your considering Swing for an upcoming project, don't miss this unique opportunity to learn from the experts in the field." -
Swixml available at ibiblio
With more project using Swixml now, it was time to get it uploaded into ibiblio, or to be more precise, into the java-repository located here: http://www.ibiblio.org/maven/.
We are proud to see Swixml being used in JXTA and Dreamcatcher
A couple of days ago some developers from the JXTA and the Dreamcatcher project contacted me and asked to have Swixml uploaded into ibiblio. Since these guys are building with Maven, having a library in the standard repository really helps.
Fortunately, there isn't too much work involved and it's also well explained here. The swixml.pom file is in CVS and the Swixml ANT built file has been updated to generate a Maven-friendly bundle.
Swixml, now available at http://www.ibiblio.org/maven/org.swixml/, ready to be used for all the developers who like to built with Maven. - Declarative Programming, emphasizing UI Generation at RuntimeOn Saturday, I was given the chance to talk at the 2006 Southern California CodeCamp.
My talk was all about Declarative Programming in Java with an emphasize on GUI generation at runtime using XUL motors like Thinlet and Swixml, where Graphical User Interfaces are described in XML documents that are parsed and rendered at runtime.
This late binding of the GUI has many advantages. E.g., enabling features, which are based on a license code or a user's role, does not have to be hard coded anymore. Instead an XML document describing the application's GUI could be dynamically loaded.
While open-source projects like Thinlet and Swixml focus mainly on the GUI, they are also good examples for how declarative programming can be done in Java.
Presentation slides are available here: Declarative Programming, emphasizing UI Generation at Runtime - IntelliJ 5.0.2 has been released.Like I have mentioned here before, a few years back I was given the opportunity to work with an incredibly talented group of engineers in St. Petersburg, Russia. While this was at the end of the dot-com bubble and long after Mr. Gorbachev had torn down that wall, Russia still felt so strangely different than any place else I had lived or visited. Looking back however, it's always the people you met that keep the memory alive, even more so if one manages to stay in touch, may it be just via email or Y!-Messenger.
After Artificial-Life, the Boston, MA headquartered company had imploded, I returned from my adventure working in Russia and re-joined Cardiff Software (what became later Verity, Inc.). Two really smart guys (Kirill Kalishev, Sergey Zhulin) of the Russian team I had led, joined JetBrains, the Prague, Czech Republic based software company, which had just opened an office in St. Petersburg.
- JavaOne SwiXML presentation onlineFinally, Sun posted PDF formatted session documentation of all JavaOne 2005 sessions here:
http://developers.sun.com/learning/javaoneonline/2005/
Even if you went to JavaOne, you probably missed Hans Muller's Defining Swing GUIs Declaratively session and his take on Swixml. The PDF version of his slides is now available here:
http://www.swixml.org/TS-7122.pdf

- How private are private fields after all?Last week, I sent the following brain teaser:
Can you write a void hack(Object obj) method that would change foo's private member variable, so that the output looked like this?
- Apache Tomcat - The Shine is GoneAfter using Tomcat as the preferred Java-Servlet-Container for the last couple of years, I have been using Version 5.0.x built-in clustering support for only a few months now.
Single server servlet programming and deploying was almost always Tomcat independent; one hardly needed to look at Tomcat's source-code and while Tomcat's documentation always sucked, any Servlet.jar file's java-doc was good enough to write programs that would work well inside the container.
If I needed to find out about certain tags in one of the descriptors like server.xml, web.xml, context.xml, etc. there was always BEA's Web site to look for a helping hand.
With clustering all that changed
Documentation about Tomcat-Clustering is almost none-existent on the Apache site. This "how-to" is as detailed as it gets there. But no problem, we are talking about open-source, right? All we have to do is to look at the code and we know what's going on, right?
Well, not exactly. The code in the clustering package is a mess. No documentation in the source files, not a single javadoc tag to be found.
Now, there are open-source projects out there, containing well-written code and documentation; Jason Hunter's JDOM or Marc De Scheemaecker Nano-XML come to mind. I had expected so much more when it comes to an established project like Tomcat, hosted on the prestigious Apache site.
- Better, Faster, Lighter JavaThere is a good presentation (audio and slides) titled "Better, Faster, Lighter Java" available at JavaLobby.com. It's by Bruce Tate, who specializes in persistence frameworks and lightweight development processes and technologies.
If you have ever been to one of the No-Fluff-Just-Stuff conferences, you may already know him. He's a great guy - check him out.
BTW, the presentation was created with Articulate Presenter, which converts Power-Points into Flash and adds his voice - cool stuff.
On the other hand it seems to be very easy to add voice with PowerPoint (using its Record Narration feature) and exporting the whole presentation into QuickTime .mov format.
Presentation: "Better, Faster, Lighter Java" by Bruce Tate
Presenter: Bruce Tate - President, J2Life, LLC
URL Link: http://www.javalobby.com/eps/bflj/ - Generation vs ReflectionThe country seems to be sharply divided more than ever. There is the current leadership, favoring preemptive wars, to pro-actively generate and compile before the fact - on the other side there are the two almost equally named challengers preferring to reflect over what has happened in recent history and trying to respond dynamically with never seen before flexibility.
No, this is not about the upcoming election of the 44th President of the United States. I am taking about two different sides chosen by Software Developers, trying to find solution for some of today's most interesting problems.
The big gorillas a.k.a. Microsoft and IBM are still trying to promote code generation, demoting software engineers to "assistant to the generator": the pure slaves that need to work with generated code know all too well the generated ToDo comments and the infamous comments that read like this: /* .. automatically generated. Do not edit! .. */
Microsoft was even granted a patent (US Patent No. 6,748,582), covering the technology that integrates certain comments left in the source code of an application under development.
- XSLT the Good the Bad and the UglyXSLT (eXtensible Stylesheet Language) is a powerful tool, which I have used several times over the last 4 years. Still, even after all those years, XSLT doesn't come easy to me and I'm only considering it when the output format is XML, XHTML, or TEXT and the target document can be generated in single transformation.
More complex XSLT scripts may be hard to write but I found them even harder to document, localize, and maintain.
JSP, JDOM and JAXEN
As an alternative to XSLT, I have used JSP. JSP is a scripting language and comes with many of the advantages that XSLT gives you, i.e. JSP can make use of XPath by using JDOM and JAXEN. JSP also comes with many of the advantages that JAVA gives you, i.e. extensive Java class libraries, powerful tools and most of all, JSP are debug-able. However, more complex JSPs seem to have almost the same aforementioned problems when it comes to maintainability and documentation.
Tag-Libraries to the Rescue
Lets imagine a server providing XML documents, which contain the data that needs to be displayed in a highly dynamic and customizable WebUI. Even with STUTS and JSF around, my preferred approach for creating that user interface would still go something like this:
- Code InspectionI recently got the chance to participate in another code inspection, in which among other things, the following line of code was heavily criticized for using String concatenation on constants and not using a StringBuffer object for the string operation in general.
FindFile.FindFileInClasspath( kPropFilePrefix + "*"+ kPropFileSuffix + kKeyProperties, vPropFiles );
This is from a J2EE project and the code is used in a background thread and executes every couple of seconds.
Photo Store
Subscribe