The Source for Java Technology Collaboration
User: Password:



Joshua Marinacci's Blog

Mobility Archives


The Portable MiniApp: Mortgage Calculator

Posted by joshy on April 07, 2005 at 01:13 PM | Permalink | Comments (8)

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:

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?



Visions of truly portable applications.

Posted by joshy on September 05, 2004 at 09:58 PM | Permalink | Comments (7)

I've been thinking about the miniapps idea some more. I still think it's a good idea, but I want to extend it a bit. Miniapps are great and all, 'cause they're, well, mini.. but I want more. Java is supposed to by write once run anywhere, but in practice any given program only runs on one computer. I'm not talking about whether it can be on Mac or Windows. I mean that I typically install the software on one computer and that's it. If we've got this great portable runtime then why aren't our applications truely portable?

Okay, let me take this from another angle.

Imagine the future, 2005-AD, a child logs in to his Windows computer and recieves an email from a school friend containing an Applet. It's a cute little game, featuring sarcastic hyperbolic cartoon characters call Maroons, built right into a webpage, sent in an email.

Little Johnny plays for a few minutes, decides he likes the game and hits a button marked: Install. Now the program serializes itself, runs through a custom installer, and configures the right webstart preferences to fully install itself on the computer, all while continuing to run in a separate window. Johnny doesn't see any of this though. He just sees the program magically jump out of the email and into it's own window.

Later that day Little Johnny he's chatting with his sister, Sally, at college over IM. She's interested in the game so he drags the program into the chat window where it's instantly teleported to her iBook. Again she can run it or press the install button to save it locally.

The next day Sally prepares to go to a local cafe and study with a friend. Knowing that her friend is always late she decides to bring along the game her brother sent her. She drags the program into the iPod symbol on her computer where it is automatically synced on to her iPod-mini, adding a new menu item for Maroons.

Sally's friend finally shows up an hour late. He asks what she's playing. As she shows him the highscores list pops up. It contains the names Sally, Johnny, and Bobby (the boy who emailed it originally to Johnny), the high score list having been transferred along with the running game each time.

Finally Sally returns home, plugs her iPod in to her laptop and goes to sleep. In the background the game sends her scores to a p2p network where it syncs back to Johnny and Bobby's computers, but no where else.

What do you think? Can we get our favorite portable runtime to transport applications around in cute candy colored installable jars? I want my portable applications to really be portable: at the code, installer, and UI level.



2004: the year of the Net-App

Posted by joshy on January 05, 2004 at 01:33 PM | Permalink | Comments (5)

A lot of people have put out lists of what they expect to see for the new year. Instead of going across the industry I'm going to focus on one topic in particular: networked applications. I really think that 2004 is the year of the netapp. Now sure, I know what you're thinking: "I thought 1994 was the birth of the most popular networked application ever: the webbrowser. You're about ten years too late". I'm not talking about the webbrowser. It's a general purpose application that isn't very good at anything, but good enough for almost everything. I really think the last few years have shown a desire for specific networked applications that, in the long run, will blow the pants off ye old browser.

We've seen the apex of business applications. Crunching numbers and wordproccesors just don't interest people anymore. The growth is dealing with small nuggets of information, and lots of them. Most consumer apps involve media manipulation or communication in some form, almost always over a network. It's not quite 'the network is the computer', but it's certainly the case that 'without the network there is nothing for the computer to do'. Dedicated networked applications, not just general purpose webbrowsers, really seem to be the way to go.

But this is still a lot to cover in a blog entry. I'm going to narrow it down even more. Being a UI guy I have ask myself: what are they going to look like? Thinking about this over my vacation here are my predictions of what we will see in the coming wave of dedicated networked applications:

  • Search: Searching is important. By definition, networked apps give us access to something that our desktop can't, one of which is holding huge datasets. Thus searching those datasets will be of the utmost importance. I expect every application to have a search feature in it. Google has conditioned us think in terms of keywords ANDed together. iTunes has popularized incremental (keystroke) searching. I think eventually all GUI toolkits will have a custom search widget to support this behavior right out of the box. I also think that Lucene is one of the coolest open source libraries ever.
  • HTML will be heavily used. This means both the browsing metaphor where appropriate (bookmarks, forward and back buttons, clickable links) and literally HTML rendering in the middle of the application. The iTunes Music Store, Sherlock, RSS readers, and even chat applications are all using HTML for the display of formatted text and graphics. I think this trend will continue, especially as HTML rendering engines become more embedded in our operating systems and programming languages.
  • Connectedness All netapps need a sense of when they are online and when they aren't, and when to pass that information on. Since it will be a long time before we are permanently connected, and etiquette may dictate not even then, we will need connectedness built right into the UI. Chat apps have logged in / away / offline status indicators. Gnutella clients tell you when you are searching and when people are searching you. Even email tells you the state of the network with it's greyed out folders and a checked for mail alert sound. The sense of connection state will become integral to the UI.
  • Drag and drop I know, it's not a new UI component, but it's becoming more and more important. Since the desktop is rapidly becoming a set of portals into other servers and datasets, we need better ways of extracting and moving data between these datasets. All netapps will need to accept and produce drag and drop events for text, files, links, and images. This also implies ubiquitous media libraries with thumbnail previews. (Can you say QuickTime for Java?) DND support has been growing steadily in all UI toolkits, but I think we are at the point when they will finally become massively useful. Of course this will cause new problems with information overload. I'm hope to have a shelf on the side of my screen that can accept drags from any application and store them for later use. Is anyone at Apple listening?
  • Syncing While the technology is established it is only just now becoming ubiquitous. The link between desktop, server, and device is more common than ever and Palm has gotten everyone to accept syncing as a metaphor. (This dispite the fact that sync is not actually a word) Now phones sync addresses to Outlook, calendars sync through servers to other calendars, and iPods (my new christmas gift. thanks honey!) sync music from iTunes. Syncing is everywhere and many netapps will need some form of syncing worked into their feature list. I expect to see more syncing toolkits as we get too many devices needing custom conduits.
  • Discovery You know something is out there but you don't know what or where. This is why we've seen an explosion in discovery protocols lately. Really it's a meta search, a search for things to search. I expect to see rendezvous/zeroconf, jini, jxta, gnutella, and other discovery protocols integrated into reusable libraries. Perhaps they will even hook up with RSS and Google to become truly internet savvy.
  • Non-heirarchical organization Sorting is the opposite of searching and putting things into a structure is actually much harder than getting them back out. Our data is just getting too big. There's too much information to keep track of. I personally organize my email as a nested tree structure: friends, work, online, other; with many subcategories. Now I have too much to sort comfortably. What I really need is a gigantic flexible relational database to hold it all. And every netapp I have should dump it's info into the database without my assistance. And it should intelligently sync with my server and my Palm, phone(s), and iPod.

I used to think that networked applications and distributed computing would take advantage of one simple idea: use someone else's cycles. Now, with Moore's law showing us that there's no application too big to run on the desktop of the future, I'm seeing that the real use for the network isn't to get at someone's cycles but at their databases. Every thing on my list above boils down to accessing someone else's databases. Storing, searching, manipulating, and syncing databases.

In some ways this is new because we are using new technology to do it, but this is really what we have always used computers for. The UI advances I've listed all reflect a need to visualize the above tasks in ways that are meaningful to humans. And that's what good software has always done.





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