posted by Fred McCann on Tue 17th Feb 2004 20:26 UTC
"Port Cocoa to Java, Page 2/3"
Porting Cocoa to Java Solves the Java Community's Fat Client Dilemma

Any Java developer can rattle off a list of reasons why Java is great for server side development, but that list is very short when it comes to fat clients. The current GUI API for Java applications, Swing, is lacking.

Swing applications are slow. There is debate over whether this is perceived or actual performance, but it doesn't change the fact that most Swing apps feel sluggish compared to native applications. Furthermore, developing Swing applications is generally more complex than developing GUI applications in other frameworks.

Swing is over-designed, requiring too many objects to accomplish simple tasks. Layout is also a problem. Layout managers solve some problems but introduce many others. There is also a critical lack of WYSIWYG editors for Swing interfaces. While some of these development tools exist, developers frequently have to streamline generated code to make the application efficient and responsive.

Swing's final problem is the look and feel. The native Swing skin, while functional, feels very different than the underlying operating system and can cause dissonance. While Swing provides skins that imitate the native system, they are often not quite right. Also, these look and feels are emulated; they don't change as the operating system changes.

Eclipse's Standard Widget Toolkit (from the Eclipse project) is another option for GUI Java applications. SWT applications are far more responsive than Swing applications, but SWT has its own problems.

There is a similar lack of WYSIWYG tools for SWT. Also writing GUI applications with SWT requires programming the event loop and managing memory directly; something not common among modern object oriented GUI frameworks. SWT is also a work in progress. While it is stable on some platforms (Windows for example), it is still immature on other operating systems.

Porting the Cocoa application framework to Java would benefit the entire community. It's simpler than Swing and more encapsulated than SWT. It's also stable and proven; the framework has been around since the NeXTStep days. Cocoa was originally designed to be cross platform. Considering it has already been ported to Windows, I bet they can make it work on the Java virtual machine. Apple's Interface Builder is also a first class WYSIWYG tool for rapid, quality GUI development. It's arguably better than Microsoft's visual tools.

Java is already accepted in the server space but it is lagging far behind in the client space. The reason is because of performance and development time. It's far too easy to throw together apps in Visual Basic and assume they will never need to run anywhere but Windows. This is big reason why businesses are chained to Windows. While increased processor performance and more memory will tame Java GUI performance, there is still a very real lack of GUI development tools and frameworks to facilitate rapid development. Apple could step in with their interface expertise and put Java GUI applications on the map. With the benefits of Cocoa, Java can be a serious GUI platform. With the ease of Apple's development tools, Java could even be used for rapid prototyping and development.

Why should Apple devote resources to port Cocoa to Java? Obviously they recognize that Java developers and the Java language are important, otherwise they wouldn't have created the Java-Objective-C bridge. But the bridge allows developers to leverage Java know-how to create Mac OS X only applications. Why should they port their framework and give it away to the Java community?

Table of contents
  1. "Port Cocoa to Java, Page 1/3"
  2. "Port Cocoa to Java, Page 2/3"
  3. "Port Cocoa to Java, Page 3/3"
e p (0)    76 Comment(s)

Related Articles

posted by Adam S on Mon 17th Nov 2008 16:04, submitted by Moulinneuf
posted by Thom Holwerda on Thu 30th Oct 2008 20:44
posted by Thom Holwerda on Wed 22nd Oct 2008 22:36