Site Archive (Complete)
Java Blog: The Java-less iPhone
Java
SWAINE'S CAFE

Black. No Sugar. Extra Caffeine.

by Mike Swaine
ERIC BRUNO'S BLOG

Java: The Daily Grind.

by Eric Bruno
June 13, 2007

The Java-less iPhone

Are you confused by all the recent buzz around Sun’s technology? I am.

First we hear that the OpenSolaris zettabyte file system (ZFS) is going to be in Apple’s next OS X release, then we hear that it’s not, then it is, but not in a real useful way (read Mike’s blog for more on this). Next, Linus Torvalds accuses Sun of having a double standard when it comes to the open source community—Linux specifically—but then they decide to settle the world’s open source problems over dinner and wine. However, in Jonathan’s blog, he claims he loves Linux, and the direction that GPLv3 is headed. However, in a previous quote, Torvalds calls GPLv3 a disaster.

All along, Apple has been saying there will be no Java on the iPhone. In fact, the iPhone was to remain closed because developers might write applications that crash the phone, or even the AT&T network. That seems clear enough, until you look more closely at Steve Jobs’ announcement at Apple’s World-Wide Developers Conference a few days ago. He specifically said that Ajax and Safari are the solution to opening up the iPhone to developers. What’s an Ajax application? JavaScript on the client (the browser) interacting with Java on the server. So JavaScript is the answer for security on the iPhone? It seems to me that the more robust security model will exist with the Java code on the server.

In the early days of Web development, scripting languages were popular when CGI applications were first launched. Perl; JavaScript; VBScript in Active Server Pages; these were all early examples of scripting languages chosen for Web application development. Back then, Java Applets were popular within the browser because they ran in a VM—a sandbox if you will—where their actions could be controlled and made more secure. There were two main problems that existed with this approach:

1 - Applets required the Java VM and runtime to be installed on the client. This would result in large downloads in what was a world of mostly dial-up modem connections. The large download times kept Java Applets grounded.
2 - Scripting languages proved too inefficient and un-secure to run at the server, where large quantities of user requests are handled simultaneously.

The solution was to flip the model: Java on the server; Script on the client - immediate problem solved. But things have changed since then; connection speeds improved with broadband adoption, browsers have opened up more of the underlying OS to script code, and mobile devices have grown in usage and capabilities.

Java now belongs on the client, within its secure environment (the VM, a.k.a sandbox), platform-neutral as always. Instead, Apple is pushing developers to write Safari applications that will only run in Safari, where Safari runs. Suddenly, the Safari-on-Windows announcement makes a whole lot more sense. How will Apple be able to expose the functionality of the iPhone to JavaScript applications? By exposing Safari-specific hooks into the “OS X for iPhone” OS. This means that Safari applications--which include iPhone applications--will run only where Safari runs: the Mac, iPhone, and Windows. What about Solaris and Linux?

I’m still confused. Why is Linus so upset at Sun? And more importantly, how will he know what wine to bring if Jonathan doesn’t open up and announce what he’s planning to cook?

Posted by Eric Bruno at 10:53 PM  Permalink




 
INFO-LINK


Related Sites: DotNetJunkies, SD Expo, SqlJunkies