The Source for Java Technology Collaboration
User: Password:



Joshua Marinacci's Blog

Deployment Archives


LA-stravaganza

Posted by joshy on September 17, 2006 at 01:38 PM | Permalink | Comments (16)

One of the great things about my job is that I get to go speak to customers and other groups of Java developers. Even more amazing than the fact that Sun pays me to do this is that people actually show up to listen to me. I'm sure you've all had those times where you feel like you are still the dumb kid who just graduated and somehow you have to make everyone around you think you actually know what you are talking about. While I know that I'm a Java expert and have interesting things to say, a little part of me is still scared. What if I say the wrong thing? What if someone asks me a question that I can't answer. What if I walk into a room full of SWT lovers?! The agony!

No one? Hmmm. Maybe it's just me. :)

Anyway, last week Richard Bair and I drove down for a cheap, whirlwind tour of LA to visit five customer sites and two Java Users Groups. I am pleased to say that our trip went very well. We had an engaging and exhausting week meeting with some great Java developers, dispelling myths and out of date information about desktop Java, and seeing how people use desktop Java in the real world.

I won't go over every stop we made, but I will cover the highlights and lessons we learned.

  • Our presentation got better as we went along. This is no surprise of course, but interesting. Our last presentation of the week: to the OC JUG, was much better than our first: to the LA JUG. After giving it seven times we knew the material, knew what to focus on, and most importantly knew what to skip over.
  • Java 5 adoption is going great! When I spoke at the LA JUG a year ago I saw about 25% using Java 5 and 75% using 1.4. Last week the numbers were reversed.
  • A lot of people don't know about Java Web Start. This surprised me because I've known about it for years (and written several different articles on it), but at most sites the developers didn't know about Webstart or only heard a few details. Clearly we need to do more to get the word out.
  • Developers who use WebStart love it. At one customer site, where they use 1.5 and WebStart for everything on the desktop they said "Java Webstart has been a huge win for us". The developers are in LA and the customers are in New York. They can fix a bug in the afternoon, push out a new version that evening, then the customers are updated the next morning. That's what we like to hear!
  • Most people don't know about Matisse for Netbeans 5.x. A lot of developers had tried Netbeans in the 3.x series and never touched it again. We demoed Matisse running in Netbeans 5.0 and really turned some heads. I think we are making headway.
  • Developers want two way editing of GUI code. Matisse, like every successful GUI builder I have ever seen, saves the UI definition to a non-editible store of some kind. Several developers asked about two way editing of existing code. This is a question for you guys: is two way editing really what you need, or would a standard, cross-tool, XML format address your concerns?
  • Trusted Solaris is cool! I've never heard of this product, but apparently we (Sun) make a version of Solaris that is very secure and can isolate applications from each other based on their security level. You could have one window that is classified as Secret and another as Top Secret. It can even manage what you type and copy to ensure you don't accidentally give out classified information (assuming I understand how this works). Obviously this is not something most people need, but if you need then it you really need it, and we make it.
  • Everyone loves Aerith. Aerith is probably the best demo we've ever done. Everyone we show it to loves it and wants to learn more about how to do these types of tricks. It's really turned a lot of heads.
  • I need to learn Flex. On several occasions someone mentioned Flash/Flex. We have a lot to learn from them.
  • Swing is making headway. The speed, look and feel fidelity, and feature improvements (like SwingWorker) in Swing are being noticed. We don't see SWT making the inroads that it was a couple of years ago. This is a sign that we are doing the right things.
  • We should do more road trips. It's exhausting but rewarding work. I wish we could take more trips like this to meet with developers in the real world. But then we'd never get any real work done. Always a balance, it is.

So I'd say the trip was successful. We received lots of great feedback and made people excited about desktop Java, Netbeans, and Java 6. So where should we go next?



The Power of the Desktop Java Stack

Posted by joshy on May 17, 2005 at 08:20 AM | Permalink | Comments (7)

Big Brother, a screenshot client + webservice

The last year or so has seen a lot of growth for Java on the Desktop. The peformance, features, and deployment story is getting a lot better, but to what end? So we have a killer platform that lets you build cool desktop applications. So what? What can you do with it? More importantly, what can you do with it that you can't do (or can't do as easily) with another client solution like .Net, C++. What about webapps? What can we do with Java that we couldn't do easily with Perl, ASPs, PHP, Javascript and HTML? Well, this is sort of a trick question. I've asked: what can we do that is better than other client side or server side technologies allow. The answer is to be on both sides at once.

I've built an example application to show you what I mean. It's called Big Brother and it watches you. More specifically it takes captures of your screen, generates thumbnails, then uploads the images to a webservice that lets you link to the image from another webpage. It contains a webservice with a simple REST-y API (basically one POST and one GET) and a JNLP launched application to take the screenshots and do basic configuration. Here is a live view of my own desktop, updated every 10 seconds. When I'm not logged in then the thumbnail is still there (on the webserver), but won't be updated until I log in again.

A live view of my desktop

Easy for Developers

My goal was to make it as simple as possible for both programmers and end users. As a programmer you get a simple API that you could call from any language, not just Java. However I've provided a Java client that looks pretty good and will cover most needs. You can retrieve images using another GET call and submit then with a POST (with the image Base64 encoded). There are usernames but no passwords since I wanted to make this as open as possible. It's just a technology demonstration so it should be easy for new developers to get started. There's a great set of posts on O'Reilly, here and here about how to make APIs as open (and sucessful) as possible. I highly recommend you read them if you plan to make your own publically accessible web service.

Easy for End Users

For the end user, it's an auto-launched application that has as few options as possible. It tells you where your thumbnails will be stored, allowing you to embed the image in your own homepage with just a link. The user doesn't need to know about programming or how the webservice works. Just drop a link in your homepage and you're done. Couldn't be easier!

Easy to develop

The most amazing thing about the app isn't what it does, but how easy it was to build. BigBrother took me four hours to make. The vast majority of this time was figuring out how to safely get a binary file to a servlet using a post (I found a single class implementation of Base64 encoding that did the trick very nicely). I have since spent time tweaking the UI, adding features, finding graphics, and making a website; but the app itself was up and running very quickly.

With Swing, Java Web Start, and Java2D on the client, Servlets and JSPs on the server, and great network classes inbetween, we have a complete development stack. Everything you need to build a killer app is right there. You don't need to use another language, and almost any missing feature can be found in an easily integrated 3rd party jar. And because the Java stack has such great standards support you aren't restricted to just Java either. You can write the client or server portion in another language that supports the usual webstandards of XML, HTTP, HTML, etc. I could even embed a scripting language into my app, letting other developers hack on it.

Application Ideas

If rich clients are going to replace (or, more likely, enhance) existing web applications then they need to do things that webapps can't. I've been thinking along these lines for a while, looking for interesting applications I could build which would leverage the strenghts of Java on both sides of the NIC and make something new. Some sort of a hybrid application. Here are some idea's I've come up with. These are just play things, but get us thinking in the right direction.

  • Control iTunes remotely from the web. We've got the hooks already.
  • Deploy a pre-configured VNC client with an SSH tunnel to let me fix my mom's computer.
  • make an iCal like app for ToDo lists. Publish the lists via FTP, WebDAV, etc. You can edit your lists using the rich client, and then share them using a web page or a rich client.

To find out more about Big Brother go to the home page. To Launch Big Brother right now using webstart (it's signed and needs system access to take the screen shots), then start it here.

The obligatory screenshots:



mouth.whereIs().put(new Money())

Posted by joshy on September 10, 2004 at 07:48 AM | Permalink | Comments (5)

Hmm. Perhaps it should have been mouth.getLocation() instead. That would present a more consistent BadJoke API. :)

For the last two weeks I've been talking about MiniApps: small programs that utilize rapid web deployment, do simple things well, make our lives easier, and brew Konfabulator-esqe programs is here today, we just need to get together and actually build some of 'em. C'est facile, n'est pas? Of course I'm a big important developer and way, way too busy to spend my time on these sorts of trivial small applications, right? :) I 'spose if I'm going to advocate this type of development to the Java community then I should actually build one. With that in mind I present:

MiniApp #1: RSI Buster

I have had bouts of carpal tunnel syndrome in the past, but it's been acting up a lot recently. Probably because I'm typing more emails at work instead of coding and working on more articles at home. Double your typing. Double your pain.The new office, keyboard, and keyboard tray all help; but there's no substitute for simply letting your wrists rest.

If you read Jono Bacon's excellent recent article, Alleviate RSI the Hacker Way, you may have downloaded some applications that interrupt you every few minutes to let your wrists relax. The big problem with these progrms (well, besides to the fact they aren't written in Java :) is that they ask you to wait a few seconds to let your arms cool down, but they don't give you anything to do while you wait! What can I do for 30 seconds that doesn't involve using my hands? Simple: read something.

My own open source project, Flying Saucer, the xhtml renderer, just reached a big milestone: R3. It is finally good enough, and fast enough, to render most validating xhtml content with a lot of style. Looking for a sample application I came up with the idea of providing a blurb of styled text to read while letting my wrists rest. This is also a good exploration of thick clients that combine the best of desktop apps with web programming. I created a JSP that wraps the standard unix fortune program, then adds a splash of color and fonts to make it look nicer. But enough with the synergy talk, lets get to the program.

Here is the link to RSI Buster a web startable MiniApp for helping you deal with RSI. It will stop you every 15 minutes with a small window containing some fortune output. For those of you without Java Web Start, here is a screenshot.


RSI Buster: fortune screen

Note: this app is signed and requires you to give it security permissions. This is due to a bug in the CSS support library for Flying Saucer. It doesn't really access the filesystem but it thinks it needs to. I should have a fix for this soon

When the main window is dismissed you will still see a small mini-window that you can drag around. Since I use a laptop with an external hi-res monitor I keep RSI Buster on the extra screen to my side, along with my email and iTunes. If you right click on the mini-app you'll get a menu to quit or reload the fortune.


RSI Buster: mini screen

If any of you are interested in the code to see how it works or build enhancements, just shoot me an email.



Unleash the MiniApp

Posted by joshy on August 23, 2004 at 08:21 AM | Permalink | Comments (15)

It's gonna be a busy week so I'll keep this short. I've been thinking a lot about moveable applications and the idea of rich clients. This is mainly on my mind because the Flying Saucer team has been hard at work on the next version of XHTMLRenderer. (We're shooting for an August 31st release) An embedded rendering component has pretty much one core use: applications with both GUI and html interfaces. But what do they look like? What creatures live in that shadowy borderland between the desktop and the web?

The obvious example is the iTunes Music store. Having an HTMLish component lets Apple embed visually rich content which can change without requiring a software update. But iTunes still has as a desktop interface that satisfies the core function, playing and organizing music, better than a purely webbased program ever could. But this is old news. What else is out there? And why don't I have them?

I think that we should have a Konfabulator / Dashboard equivalent in Java. They each approach the same idea, small easy to write/install/use applications, from different sides. Konfabulator starts with a desktop program and adds internet dynamic content (like rss feeds and webservices), then makes it pretty with web-era graphics and animation. Dashboard starts with pretty webpages and pulls them out of the webbrowser into separately launchable programs with more local control than HTML and Javascript typically allow. I'd like to see us do something like this in Java.

I want to be able to hit Ctrl-Alt-F2 to get my RSS headlines to popup. F3 gives me my MP3 player and F4 for an internet wide Online Help search. (With first priority for JavaDocs of course). F5 would be a MiniApp implementation of Frink, the coolest calculator I have ever seen. (It performs conversions between any unit, letting you definitively calculate the density of the alien mothership from Independence Day). These are MiniApps (TM) I want to see.

Imagine a constantly running program that manages MiniApps. It could be visualized as a dock, taskbar, or sliding Expose' sheet. Or maybe all three! Every program implements a simple common API, say a subclass of org.javadesktop.MiniApp. The MiniApps would run in a sandbox similar to WebStart apps or Applets with crossplatform APIs for user alerts, preferences, and webservice access. Since everything runs inside the same JVM (with the appropriate safety mechanisms), we could avoid the 25MB hit that each separate Swing instance and runtime.

Every MiniApp has the ability to access web resources but runs locally, even when disconnected. Think of it as the best of Gnome Panel applets combined with server based web programs.

Here's a few more ideas for MiniApps:

  • Local Weather, Movie, and Traffic Listings with alerts, like an accident that's going to block my exit on 285 for the next four hours!
  • SuperRef: search through the dictionary, thesaurus, and quotation index to make my articles appear smarter than they actually ar.
  • MiniCal: which ties to Outlook/iCal and alerts when it's time for lunch.
  • MiniSheet: for quick calculations. Is there enough in my bank account to buy that new SouthPark DVD?
  • MiniDraw: annotate the current screen with a precise description of why feature X doesn't match the documentation, automatically CCed to the developer list
  • InstaFlame. Lets me compose short blog entries as the ideas arrive and post immediately to my blog without starting up new software or having to reconsider my ill-conceived opinion.
  • eBayLert. Tell me when I'm about to be scooped on that valuable 1961 vintage Jetson's Lunchbox.
  • SafariSearch. Let me search through books and documentation in my current Safari subscription. I want to know the syntax of JComponent.repaint() and I want to know now!

And of course the best thing about MiniApps is that they would be written in 100% Java, letting the minis run on any platform without fear of malware or viruses



Java's got a Bad Rep: The Rebuttal

Posted by joshy on May 03, 2004 at 01:40 PM | Permalink | Comments (14)

So it's been a week and I've seen a lot of response to my last entry. One commentor in particular asked for a point by point rebuttal; which struck me as a spectacularly good idea. Here are the bulk of the arguments and my responses.

The Arguments

  • Java isn't Free / Open Source / GPL / RMS-friendly
  • Why use Java when there are plenty of native languages / environments to choose from.
  • Java is missing templates / preprocessors / lambda functions / other advanced language feature that only backwards cave-dwelling languages lack.
  • There aren't any applications written in Java. It must be a failure.
  • Java / Swing is slow, looks bad, and doesn't feel native, doesn't let me do cool stuff like animation, 3D, or sound.

Here we go.

The Rebuttal

(1) Since it's such a huge (and apparently controversial) topic, I am covering the open sourcing issue separately in this other post. However, in summary, opensourcing doesn't solve our problems and buys us very little, in exchange for a lot of new problems. Follow the link for a full analysis.

(2) Why use Java when there are plenty of native toolsets to choose from? Well, first of all, it's better than a lot of them. If you want to write an application (not a script or a device driver) then Java provides you with a good toolset, great libraries, and a clean language which learned from the mistakes of the past. It's simply a good applications language that can make your programmers more productive.

Java can also be "write once, run anywhere". For people who need to support multiple platforms, especially more esoteric ones where you could never hire a native expert (say the palm pilot, or win 98), or if you simply don't want the headache of dealing with bizarre version issues, then Java provides you with a consistent platform to code against. It's compile once, run anywhere features are especially important in the age of ubiquitous networks with code flying over the wire. Java Webstart has been a godsend to companies with locked down desktops spread over the globe. (potentially running eight different versions and patch levels of Windows).

So why use Java? Because its better than a lot of the alternatives for writing applications.

(3) Java is missing language features. This is probably more a matter of taste than anything else, but Java isn't lacking features because no one thought to add them. Nothing in Java is new. Every part of the system, from language to library to VM, was carefully considered against the 20 year history of OO languages. Preprocessors were left out for a reason. So were pointers. Java is missing a lot of the more esoteric features, but most of those features aren't used in day to day programming anyway. A few of them, like generics, are slowly becoming more mainstream, and Sun is adding them as people ask for it. Remember, computer languages evolve slower than hardware or software platforms. It took 20 years for inheritance and polymorphism to become common place (and it's till not as common as you might think). The features Java is supposedly lacking we really shouldn't miss. And if there's something you just have to have, then you can use one of many addons to provide it like XDoclet and Shark, safe in the knowledge that if it compiles to Java bytecode then everyone can use it.

(4) Nobody uses Java. This simply isn't true. Probably 99% of Java applications are either serverside (where the user doesn't know or care what the application is written in) or are made for internal corporate use. As Eric Raymond pointed out: "there is empirical evidence that approximately 95% of code is still written in-house". Most Java applications, even Swing apps, are for corporate use. In these environments the robustness, productivity, and easy of deployment more than make up for Java's other flaws. There are plenty of high quality applications that people don't know are written in Java, and that's really the problem. Especially on the desktop I'd like to see more highlighting of Java success stories (and more ways to get the word out!)

(5) Java is slow, ugly, and doesn't do modern native things. I've saved this for last because I think it's the biggest problem. Java has this impression because, well, it was slow and ugly. Back when Java debuted nothing worked properly, applets were slow to load, and AWT used a horrid subset of the available widget set on each platform, all of which looked different and ugly.

Today the situation has changed. Swing has gone through several revisions to become a powerful toolkit, if complex. The speed issues have mostly gone away from improving the libraries and a decade of faster processors. Even on my now aging iBook I run jEdit quite nicely and have written tens of thousands of lines of code with it.

Swing itself has also matured (and gotten prettier). Most of the big bugs have been fixed. Quite a few attractive Look and Feels are available from Sun and 3rd parties. A lot of the missing functionality from the early days is finall in place. It is entirely possible to make great desktop applications, even consumer apps, with Java. We just need to get people to realize it.

The plan

Despite all of my argument preceding, Java still has an image problem. People still think that you can't write good desktop applications in Java because they don't see them. So what can we do? Show them! And keep building more!

First, we need to show off the good apps. Get the word out. I think we need a place to highlight great applications. Perhaps a sidebar on Java.net with a new application each day. The only requirement is that it be a desktop application with a downloadable demo. This spot should have it's own RSS feed and archive. Then we have to start the publicity. Get other sites to link. Make a download.com for Java apps.

Second, create a place to collect all of the tips and tricks it takes to make a quality desktop application. I've started a Wiki node here with a framework of what we should pull together: exe packaging, good look and feels, swing tutorials and articles, how to work with different kinds of media. Contribute whatever you know. We need to fill out the missing pieces.

Third, start a contest for quality Swing applications along the lines of O'Reilly's MacOSX app contest. We should have different categories for commercial and open source, full applications and mini programs, and maybe further sub-classification (word processing, media and graphics, personal organization). We'll probably need to get a corporate sponsor for this.

We all know that Java can make great software on the server. It's time to reclaim the desktop. (Wiki Here)



Does Java have a bad reputation?

Posted by joshy on April 26, 2004 at 03:03 PM | Permalink | Comments (31)

I recently read on Slashdot (something I promised myself I was going to do less) about Miguel de Icaza's comments on Longhorn. It was a pretty interesting read and makes me think I should read up on XAML and Avalon, Microsoft's new technologies for making advanced rich web applications. What struck me as particularly jarring, however, was this thread where someone asked about Java as a webapplication stack to compete with Microsoft or an as yet unwritten opensource toolkit. Most of the readers jumped on this and attacked Java from all sides. What particularly worries me was not that so many of these readers are opposed to Java, but that their arguments are almost completely wrong. Take a look at some of these comments:

Stock Java is not an option because it lacks a few things: the easy-to-build functionality of a web page (XAML) and the advanced graphics and rendering of Avalon.
and this one:
However, it really does not matter what is going on in the java world. Java had its chance, and failed. Java the language has outgrown the Java the (virtual) machine. Java the language is now being extended in weak syntatic ways, think of generics where it is possible to corrupt generic containers because the support is only syntax deep.
and this one
Java is faster now, and computers are faster now, but technical analyses of .NET and the CLR tend to indicate that it is better thought out than Java. No wonder, since it came substantially later than Java, but that doesn't change the fact.

If Sun brings us a Java 3 in the near future which addresses these performance and scalability issues (among others) then this post will be irrelevant (well I guess it is already, welcome to slashdot right?) but right now it makes more sense to emulate the CLR and the non-Windows portions of .NET. Since Java is not open source, and the open source world would like to have something like Java but open, and .NET and the CLR are superior to Java (arguably anyway) why not implement .NET? If Microsoft changes their implementation to a point which destroys compatibility, there is still room for Mono to provide a cross-platform runtime environment which will run on Windows.
and this one
The main problem that I, personally, see with Java-based apps, is the non-native widget set. I have to admit, I honestly detest Swing/AWT stuff. Swing even more. Not only is the default theme ugly IMO, but even if you make it *look* like WinXP or Gtk or whatever, it doesn't *feel* like it.
and this one
Java is a minor cleanup of a horrible set of object oriented extensions of a 35 year old high level assembler. Perl/Python/Eiffel/Tcl-Tk show what Java could have been and where it could have gone. Furthermore, even as a cleanup of C++ it got too many things wrong, as illustrated by the numerous minor bug patches in Java "the next generation", more commonly known as C#
And these were all comments that were rated 2 or higher.

I'm starting to really wonder why Java, or at least Java on the desktop, has such an image problem? If you are talking about rich web enabled applications that run on your desktop and on the web, then Java should be at the top of the list. Do we need a PR agent or something?





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds