The Portable MiniApp: Mortgage Calculator

Hey guys. A while back I started talking about something called a MiniApp and presented several examples (Weather, Christmas, Storm, and RSI Buster). I wrote another installment some time ago but never got around to finishing it because other projects (namely the book) took precedence. Now that Chris and I have turned in our final draft (yay!) I have more time to finish up the next MiniApp.

And don't worry. I'm going to have a big post addressing my last weblog on Swing issues.

Thinking about Java on the desktop I have been looking for things that Java does well but other technologies don't. What are the competitive advantages of Java and how can we exploit them? Something that I've always thought would be really cool is to have something in a webapp that I could take home with me. Something that exists on the web, but that I can pull off the web and use later, perhaps on my desktop or even pull it into a pda, cellphone, or mp3 player. With this in mind I present a combination Applet and Java WebStart MiniApp called Mortgage Calculator.

It's a simple mortgage calculator (I did a re-fi recently) that works as both an Applet embedded in the webpage and as an Application. Both versions use the same code base and they don't really care which environment they run in thanks to a clever base class that hides the differences (part of an application framework I'm working on).

Here is the applet:

codebase="" code="" archive="Mortgage.jar,miniapp.jar,joshy-common.jar" width="230" height="140">

And here is the webstart link (obviously you need a recent (1.4+) version of the JRE including Java Web Start.

(you must have Java WebStart installed)

Now, what would be really cool, is a button in the program itself that lets you download the webstart app directly. The concept here is that you can show a cool application in your webpage, and then, if the user likes it, they can launch it again via webstart and keep it.

Now of course it would be really, really cool if you could not only take the application down to your desktop but also to your PDA as some sort of MIDP application. This would be a little more difficult (due to the API differences) but not impossible. Of course most cellphones don't let you install MIDP apps directly from your computer, but the concept is there.

Any other ideas for MiniApps?

Talk to me about it on Twitter

Posted April 7th, 2005