The Source for Java Technology Collaboration
User: Password:



Joshua Marinacci

Joshua Marinacci's Blog

Visions of truly portable applications.

Posted by joshy on September 05, 2004 at 09:58 PM | 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.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Miniapp Infected
    Viruses have been doing soemthing akin to this for some time now :-)

    Posted by: haruki_zaemon on September 05, 2004 at 11:47 PM

  • jar
    Sounds cool.

    One of the things that should perhaps be changed is the ambiguity of .jar files. It is as if .exe and .dll files had the same extension - there is no way to really know based on extension whether it is intended to be executed. And some operating systems end up opening them as zip files anyway.

    .jnlp files go somewhat in this direction. But they are really for web distribution, and are not part of the .jar. How about something that is like a combination of .war and .jnlp - a single self contained unit that contains all dependent files, jars included, with info on how to launch it. and it gets registered with the os to be launched with java like jnlp. Then you could have a single file you could send around that people could run.

    This would also solve the age-old problem of having to make exes to launch java programs for desktop apps. Why isn't that a no-brainer? a .jexe extension or something could make that problem a lot better.

    I like your idea, but man we are so far away from that. For one, Java web start isn't even really useable yet IMO.

    Also, your idea would require running browser plugins when viewing html emails. From Outlook or IE's point of view, Java is just another plugin like flash or anything else. (Same would be true of Thunderbird, etc) While they (applets) are theoretically "safe", the potential for spammers and scammers is huge. spam applets could pop up windows, fake login screens, whatever. The reality is that HTML email needs to be sandboxed to the point of being nothing more than formatted text. Embedded/linked images alone can be a nuisance in spam, wasting time and bandwidth.

    Posted by: kenlars99 on September 06, 2004 at 08:14 AM

  • Similar Vision
    Nice blog entry Josh,

    At the cajo project we have actively been working on this type of vision.

    The real issue with the scenario you've described is the miniapp codebase. Applets & jnlp dynamically load the codebase into the VM runtime. This allows the client to always run the latest version of the miniapp. However, it also requries the client to be connected to the network. The nice part is, that the handle to the miniapp is literally its URL. In the context of our framework, we use two URLs to represent a miniapp; for example:
    http://server/miniapp launches the miniapp as an applet, full screen in the inside the browser.
    http://server/miniapp! launches the miniapp as an application, via WebStart.
    It works on everything too, mainframes to mobilephones. (i.e. J2EE / J2SE / J2ME) Best of all, applications do not have to be restructured to work within this framework. And since they always run in a sandbox, users can be assured of their safety.

    However, offline operation is not a project goal of ours, as our focus is spontaneous internetorking. We are looking to the day, very soon, when all of our gadgets will have network access, all the time.

    The project is free software though, so you can add offline functionality if you wish.

    When you get a minute, why not stop by? There's ample documentation, a simple yet complete example program, and naturally all the source code.

    John

    https://cajo.dev.java.net

    Posted by: cajo on September 06, 2004 at 09:33 AM

  • Similar Vision
    John,

    Does the cajo project have any demo applets or jnlp apps currently on-line? If so, where?

    - Curt

    Posted by: coxcu on September 07, 2004 at 07:52 AM

  • Similar Vision
    Hi Curt,

    The demo is currently available in the example directory. It is a tiny miniapp server. Any Java capable browser can be used to connect and run it, as either an applet, or a jnlp application.

    I think this is preferable to a hosted miniapp in that it is possible to watch the client interact dynamically with the server, and to be able to experiment with extending both sides. If it were hosted online, it would only be half as much fun. :-)

    It's an interesting miniapp to watch; but it is far more fascinating to actually tinker with.

    John

    Posted by: cajo on September 07, 2004 at 10:14 AM

  • Similar Vision
    John,

    Thanks for the info. I hope you'll consider adding an applet or JNLP version somewhere on the site. The purpose is roughly the same as that of screen shots. There are literally tens of thousands of Java programs, libraries, and frameworks that I might be interested in. The more quickly I can see what can be done with a piece of software the better.

    Posted by: coxcu on September 07, 2004 at 12:03 PM

  • Similar Vision
    Good point Curt,

    I just placed a couple of screenshots at the bottom of the tutorial page.

    Hope that helps a little.

    John

    Posted by: cajo on September 07, 2004 at 03:11 PM





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