Monday December 20, 2004 | Colm Smyth's Weblog Gestalt Blogology |
![]() |
|
Java in your hands
I've been giving some serious thought about buying a decent mobile phone (US: cellphone) with current Java capabilities. First of all, I started by looking at my local vendor pages and then looking for more detailed information about specific phones. It can be a lengthy process. However, since I knew I wanted Java capabilities, I wondered if the J2ME pages had more information and sure enough, they do. Here are some pointers I found useful that might get you started if you are thinking of developing for the increasingly powerful small devices via Java:
NetBeans 4.0 kicks!
NetBeans 4.0 has gone live. If you are a Java developer, you need to give yourself some time to take a serious look at it. I just did and the uninstall for Eclipse is running as I write this. Why? Because NetBeans 4 is a major release in every sense. The features summary tells the full story; 4.0 gives the demanding Java developer (and who isn't demanding?) a complete and current IDE...
It still has the other features I want like CVS support and a Swing GUI builder, but one innovation I really like is the use of Ant to store and represent all project configuration. This means that as a developer, I can use the NetBeans IDE to create and build projects, but a release engineer can use the standard Ant command-line tool to build my project exactly the same way. And it's nice to know that NetBeans 4.1 is already in EA1 quality with the final release due in April next year bringing full-featured J2EE support. (2004-12-18 10:36:58.0) Permalink Comments [2]
Java and J# - serialisation is interoperable
Interesting to see an MSDN blog that claims to demonstrate interoperability between an object serialised by a Java app and a J# app de-serialising it. Sample code included. Of course you can't use RMI between Java and J#, but you could exchange the object via HTTP-GET, a message service (via JMS), web services or even the filesystem. It's not clear if there are limits to this interoperability, but it's an interesting achievement. I'm sticking with Swing for desktop apps so that I can use Java end-to-end, but it's nice to know there are some ways for a .NET client to interoperate say with J2EE. (2004-12-10 08:23:34.0) Permalink
LizardTech choose Java for ubiquity
Another company announced a Java-based product just last night (and is choosing to open-source). LizardTech have created a very efficient readonly file format, particularly for geospatial and document imaging markets. They will develop a thin open-source viewer for this format, using Java to reach the broadest set of platforms. See the article on OSDir for more information. (2004-12-07 01:52:39.0) Permalink
MediaFrame - Phat server, Smart client, All Java
The impending launch of MediaFrame has got to be interesting. It's a media streaming server (Mpeg-1, with Mpeg-4 soon) and a thin client with programmable UI controls (including a JavaScript API for browser embedding) - it's GPL, and it's end-to-end Java. The impressive feature list, combined with the portability of Java sounds like a killer app as more of us get our music and movies from the network. Read more about the launch and existing customers here. (2004-12-06 13:59:41.0) Permalink
Java Libraries for Web File Protocols (http, webdav, ftp)
I recently needed to develop a pure-Java prototype application that supported multiple web protocols. The JDK comes with built-in support that meet the needs of many application developers who primarily want to interact with web protocols using URLs (effectively the same way that a end-user uses a browser). If you have tried the standard JDK libraries and you need more, the table below contains a summary of my brief investigations and the libraries I chose to use. You'll notice I favoured Jakarta's libraries - that's because they're generally very functional, well supported and they have open-source licenses that permit use and contribution by both open and closed source developers.
If you want an abstract API that sits on top of other web protocols, take a look at the Filesystems API in the NetBeans Open APIs suite; the Explorer and Modules APIs also look useful. I hope to find some time to probe NetBeans in more depth one of these dark winter evenings. I can recommend the Hamsam Instant Messaging API abstraction for Yahoo, MSN and AOL support. Smack completes the IM picture by providing XMPP (Jabber) suppport.Finally, if you're looking for an implementation for another protocol, freshmeat "java protocol -GPL" is certainly not the worst place to start, especially if you drill-down further using the advanced search option. (2004-11-29 10:38:54.0) Permalink
Design by Contract in C# and Java
A Microsoft labs project called Spec# has developed a pre-compiler for C# that supports the design-by-contract feature of Eiffel, and adds the capability of the C/C++ "const" keyword. Interestingly, the same post highlights a 3 year old project I wasn't aware of called iContract that provides similar features for Java. A little background: 12 years ago (back when Bertrand Meyer was the god of Object-Orientation, when Bjarne Stroustrup was at best the regent to the OO throne, and Java was an inkling in James Gosling's eye ;) I sampled but never seriously used the Eiffel language with it's unique focus on design by contract. Eiffel syntax directly allows the constraints or contract of a method to be expressed in a literate natural style within the implementation code. At first glance, the pre-conditions ("require" keyword), post-conditions ("ensure") and invariants ("invariant") seem like they are analogues of C's "assert.h" or even Java assertions, but they are an advance in two main ways:
All of these constraints can be removed from the compiled code; Java has one important advantage here in that the assertions can be enabled or disabled at runtime. So Spec# and iContract have similar features. Where they differ is in maturity (iContract has been around since 2001) and in syntax:
/** * @pre f >= 0.0 * @post Math.abs((return * return) - f) < 0.001 */ So iContract looks like it's worth trying. If you want a blast of nostalgia, you can program in Eiffel and target the JRE - the SmartEiffel project includes a compiler for Java bytecode. I haven't looked at it too closely, but if it allows you to use Java API's from Eiffel, it could be worth looking at. (2004-11-17 09:02:50.0) Permalink
Java and open-source - to the point
Newsforge has an exceptionally insightful article on Java and open-source, from which I will just quote the conclusion: Businesses and developers who fret about whether or not Java is or will become open source are missing the point. The free availability and near ubiquity of Java in the enterprise software market means that the open source software being created with Java is much more interesting than the open source status of Java. Companies basing their business on Java software must have a well defined strategy about open source. A simple "ignore" or "accept" will not do. Companies as different as Sun and BEA see business value in open source, yet engage open source in very different ways. To succeed today, you must know how to match your business' value with the value of open source. (2004-11-15 14:26:00.0) Permalink
More open-source capabilities for Java on the desktop
The Tiger release of Java just blew me away, but I'm always looking for even more ways to create portable Java applications that integrate really well with native desktops. Well, here's another one to add to that starter set of desktop Java components I described earlier. Janel is a native Windows executable that launches your Java application jar using the JRE, classpath and other parameters described in a text properties file. Two cool aspects to this approach:
One tiny feature request: it would be nice if Janel had a configuration option to display a splash screen image (one that doesn't stay on top). (2004-11-03 11:35:02.0) Permalink
Java and Desktop/Platform Integration
Ok, we all know that Java has the goal of enabling application portability to the most important platforms and devices, which in turn enables the largest possible market or user base for the application. But every now and again, I wanted to write a really slick desktop app that needed to do something on a platform that I could not do using a J2SE API. Shock, horror! Although JNI is fine as a low-level universal bridge to native API's, it limits portability to the platforms supported by that native API. For those cases, it would be nice to have a portable Java API (perhaps not part of J2SE) but which includes appropriate a native backend "driver" to each of the platforms I need to integrate with (a little like Java Media Framework and its platform performance packs). Well, the good news is that there are excellent solutions for many use cases, and there are some standard techniques for writing your own portable abstract API for use in your Java applications. I wish there was a good site to locate them all, but I don't know one - so I'd like to share a few of the best ones that I know about with you. JDICThe JDIC (Java Desktop Integration Components) project provides a set of independent API's under a common license (LGPL) and allow a portable Java application to use native features on many desktop platforms; your 100% pure Java code can:
The JDIC Packager is incredibly useful; if you create a Java Web Start (JNLP) setup to allow your application to be installed from any browser, you can use Packager to automatically create a native installer for Windows (MSI), Linux (RPM) and Solaris (PKG). Stunning stuff! There are other JDIC projects in the incubator phase, including a Screensaver
SDK (wrapper to allow a 100% pure Java screensaver to be integrated
into the native screensaver system on Windows or X11 (Linux/Solaris)
systems and the Tray
Icon API (which appears in some respects to be even better
than Systray for Java). Java Service WrapperJDIC is far and away not the only resource for developers who need desktop integration. There is also the very useful Java Service Wrapper which can enable a Java application to:
While JDIC provides API's that allow you to use features of the platform, Java Service Wrapper enhances your existing application to make it run better and more reliably on multiple platforms - very nice, to put it mildly. OpenOffice.org technologies
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||