Java's Thoughts on Flash
Java's Thoughts on Flash
Join the DZone community and get the full member experience.Join For Free
Get the Edge with a Professional Java IDE. 30-day free trial.
Java has something to say about Steve Job's "Thoughts on Flash." open letter. First, let's tackle the issue of "Open" from the perspective of Java
Java was the first successful commercially-supported language, once proprietary, invented by James Gosling when he was a chief technical officer / research scientist / patriarch at Sun Microsystems. Java was created in 1995 and then open sourced in 2006 under the OpenJDK project. In 2010, Oracle corporation acquire Microsystems and therefore became the new stewards of Java. The Father of Java , Gosling, also left the new acquired company in April 2010.
Java is open source. There is no doubt about it. The code for Sun [Oracle] JDK 6, is available at the Open JDK project. However, just because code is in a repository does not make a free-for-all build anything you want in the Java world. Oracle also works on code for the JDK behind closed doors with the promise that the code will be eventually open source. These new changes tend to be dynamic, hot changes and innovations to the JDK or platform, therefore are in a constant state of flux. There, then, is the Java Community Process, which Oracle may or may not change this year, which has traditional attempted to standardise the application programming interfaces that could be delivered with and certified as Java runtime or stack. The JCP has had it flaws, warts and all as other Java Champions and commentators could pontificate and debate until tomorrow never comes. Still, Java is still open to the community.
At least for a few years, now, Java has been known as "open", code is available and it is free to experiment or develop. There is the Open JDK and the less known Harmony repositories. It is a major improvement over Adobe Flash in that regard, which is closed source and very proprietary to develop with. It is easy to confuse Flash and the Flex builder solutions. Flash is definitely the runtime player that runs on the client side. Flex is the solution that make Flash communicate with the server side. Java has at least four different successful IDE for developers and engineers: NetBeans, Eclipse, IntelliJ and Oracle JDeveloper. Flash in its guise a Flex has only one at the moment, although IntelliJ might be offering a Flex plug-in of its own.
Let me throw in a firework to explode, since we are looking at the mobile platform in this tit-for-tat row between Apple and Adoble. Google has its Android, Open Handset Alliance platform, which to all extents is built with the Java programming languange syntax and semantics. Why did Google choose Java syntax for it's Android platform? The answer is because it understood that millions of developers, engineers and architects. For Google developers are important, even if there were stock Java engineers, in order to launch a platform. There are about seven million Java developers in the world, at least that was the announcement from Sun Microsystems at their last ever JavaOne conferences in San Francisco (2008/2009). Android is, of course, different the Android Dalvik compilers produces unique byte-code that are unterstood only by the Dalvik runtime executor. I could also throw in a some sulphuric acid, regarding the Java Mobile Edition (Java ME) and its history, but that is another story for another blog.
The Java is a "Open" language, the platform(s) nearly so.
Second, Java does not say so much about the "full web". Java inspired the "full-web".
Duke (the Java Mascot) only says that his/her success is running on server side. Historically Java is there in the "cloud" so to speak. Where as once, Java ran was originally pushed as a client side solution, including building a clone of the Mosaic browser inside Java (Remember Sun Microsystem's HotJava product solution.), today's web standard world is completely different to that one Java was attempting to solve back in 1996. The power of web standard is now self-evident.
Java failed abysmally on the client side for several early web developers. Java fell short at the turn of the new century, because of innovation, change to the server side and vision. Java Applets gave way to Swing Applets, the ill fated and misimplemented Java Plug-in and the belief in Java Servlets, Java Server Faces, the explosion of Java web frameworks. (This author is the organiser and founder of a Java user group [Java Web User Group].) This was followed by application server, EJB debacle, the launch of the anti-EJB brigade, the foundation of Spring Source, the Spring Framework and various other non-client side Java technologies. I could go on.
Hence, there was opportunity for Flash to move in the position that Java Applet left behind in 1999. There was explosion of Flash inspired web sites and abilities from 2000 to 2004. Flash and Adobe did very well in the mindshare of the web design agencies and web developers. During the same period, what is not lost on Apple is that Adobe prioritised to supporting applications on Windows. Hence, there is a bit of wounded pride with Steve Jobs, I feel, when Apple were really hurting financially. Remember that their MacOS based desktops iMacs machines were battling in the consumer markets against Windows XP Home Edition, then so. Pain is certainly felt when a decent friendship suddenly becomes emotionally strained.
Ah ha! In Steve Job's article, I believe he is confusing consumers. There are web applications and there are native applications. Web applications run only through a web browser (Safari or Opera on the iPhone). Native applications are programs target to the instruction set of the microprocessor of the device, which are dependent on the operating system that runs on that target device.
Adobe CS5 cross compiler (Flash to iPhoneOS) is supposed to take code written in the (proprietary) Flash language (ActionScript 3) and produce a native iPhoneOS application. Every computer scientist knows that the object code can only then run natively on the target device. You cannot take the same object code and then run it on a different device e.g. Symbian or Android phone device.
Now here is the really good thing. Java is a portable, secure and Internet accessible language. It runs a byte code instruction interpreted or processed by a virtual machine. If you can port the virtual machine to the target device, and if the platform owner allows this, crucially then you can in theory run any pure Java program. The second part is that the Java runtime library must also be ported to the native operating system so that Java access device I/O, peripherals, magnetometer, USB, bluetooth, RAMdisk etc. Presumbly program interfaces to the outside world, hence input and output is essential.
The dream of writing a language and being able to run it on several machines was a slogan coined by Sun Microsystems "Write Once Run Anywhere". It is sadly now just simply a Java ideal. Where Java has won a battle on the desktop, because Java SE runs on Windows, MacOS and Linux machines, it is clear that in the mobile phone / embedded device space cross-platform developers will be wringing their fists for a long while to come as the manufacturers, phone carriers , platform engineers, independent service provides and tool providers about face and run headlong in random directions.
Java has plenty to say about "Reliability, Security and Performance".
Java's design already had a security in mind at birth. From the very beginning of the language and platform, James Gosling and Henry McGilton thought seriously hard about robustness and security of then interpreted byte codes. There also offered to developers the revolution of a platform with a built-in garbage collector and thread concurrent programming for the masses. These were major innovation on the abstraction curve for developers who were only dreaming of becoming C++ gurus back in the mid-1990s.
Java's record as the foundation technology in several e-commerce business, Fortune 100 corporations, Times Rich List business and it staple of server side computing speaks for itself. Even Adobe recognises this with it Flex product and it delivers BlazeDS connectors to de-facto standards such as Hibernate OR/M providers and TopLink. Business rely on Java on the server every single day, minute and second of the year.
Java has work to do with Mobiles "Battery Life"
Java ME has been running on phones for a long time. Android is built with the Java language. It is those pesky Android application pinging the server every 10 seconds that are probably responsible for draining the life on HTC Desire, say. However no application, if carefully written, can eclipse the bad hardware design. I felt that the Steve Job's criticism of Flash on phone was a little harsh. Granted Java ME engineers have fine tuned the runtime or Android developers can pretty do the same. However, if the phone itself has a AMOLED display that drains the battery then it cannot be purely the apps fault.
Also as I said in the cross platform section above. If the underlying device has hardware acceleration for graphics, video and/or audio then it is up to the device manufacturer to provide decent API for developers (platform , operating system engineers and not application engineers) to use them. Witness the debacle years ago with Linux Kernel developers with graphic card vendors. It was not until the vendors ATI and NVidio really accepted open source or provided drivers for Linux system did accelerated graphics really shine. The situation will be same for phone manufacturers regardlessly of Apple, HTC or Nokia. The buck stops with the manufacturer to provide open and fair APIs and guidelines that explain how to utilise their hardware for the best power efficency and economy ratios.
Java has not said anything really on "Touch"
I believe Java has fallen short on this issue with multi-touch support. There is no known or de-facto acceptable Touch or Gesture API on the Java platform, apart from one that Simon Ritter, technological advocate has been showing off on various sites around the globe. This is not good for Java. And when I speak off Java, I am speaking of JavaFX on mobile devices.
Clearly, Steve Job's has this one, for now, in the bag. Apple is the leader in touch screen innovation outside of the Microsoft Surface not productisation curve. Microsoft predates Apple by at least a year with a public product on full view and yet never delivered a mobile touch screen device to compete with Apple, even when the iPhone was announced. I find that course of history changed.
Java is cross platform. Java is moving back to the desktop in a huge way. JavaFX is getting there. Java can be proud of its legacy is reliability, security and performance, but Duke, the teenage boy, must keep pushing the innovation curve. Java and JavaFX need a story on Touchscreen API with gestures. JavaFX needs to be ported to Android platform, in order to at least proof a point to both corporation, Adobe and Apple, then cross platform Java (JVM and JRE) can still do it, continues do it and will do it in the future. Java can learn lessons from this early battle of the mobile platforms. It is but an early skirmism of yet more tactical fields of deployment in the decade. As we move and live through this decade the success of Java needs to be built on. The platform must on through these increasing competitive times.
Opinions expressed by DZone contributors are their own.