Java Technology
At a recent conference, I was invited to give a talk on Java. This article is based on that presentation. After all isn’t that what software re-usability is all about?
In November 1997, Java was 900 days old… and had 900,000 active programmers
In contrast, in 1993, C++ completed 10 years… and had 100,000 active programmers
Java is the most rapidly adopted technology in software industry history!
Why?
I take you on a whirlwind tour covering: What is Java? Where did it come from? What can it be used for? Where is it headed? Finally we look at some personal real-life experiences.
Definition
Java has been defined as: “A simple, object-oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high performance, multithreaded and dynamic language.”
That probably explains it all. But lets start at the beginning.
History
The language was first conceived of in 1991 by a few people at Sun Microsystems. The first working version took 18 months to develop and was called Oak. And surprise, surprise: the original impetus for Oak was not the Internet! Instead, Oak was created out of a need for a platform independent language that could be used to create software that would be embedded in various consumer electronic devices such as microwave ovens, remote controls, etc.
Oak was publicly renamed to Java in 1995.
A Closer Look at Java
Java is Robust: This was part of the original design goal (for Oak), where a failure in a consumer electronic device would be indistinguishable from a hardware or software problem!
Java is Platform Independent: In my opinion, this is the single most important feature of Java Technology. The magic mantra “Write once, run anywhere!” is a programmer’s dream come true. And is almost as good for an EDP manager who probably would be able to take advantage of a host of new software applications without being tied down to an operating system! Indeed, today you can find Java running on Intel 486 based PCs running Win 3.1 upto and including IBM390 mainframes running OS/360 (Pentiums with Win95/98, NT, Unix, etc. included)
How does this work? The secret is: “Architecture neutral Java Byte Codes.” A truly architecture independent compiled binary code is frankly impossible. To achieve a semblance of complete portability across platforms, Java uses the following method: the program is compiled to an intermediate byte-code, which is interpreted on the fly by the Java interpreter. Thus to port these programs to a new platform, all that is needed is a port of the interpreter to that platform.
What this translates to is that I can create multi-platform software in a single development cycle and bypass the single biggest disadvantage that is associated with conventional methods for developing multi-platform software i.e. porting - which can be a very expensive and time consuming process.
Take IBM for example. They offer hardware ranging from PCs to Mainframes. And undoubtedly, they have teams of skilled & specialized programmers developing applications for these various platforms. Now if they were to develop a Java abstraction layer on their entire range of Operating Systems, then all of a sudden an IBM programmer would be able to develop an application just once that would be available instantly on all their platforms. Incidentally, IBM is a big pusher of Java Technology!
Java supports the Network Centric Model (NCM) of computing: What this implies is that functionality can move between machines. Take the case of a powerful software package - lets say a modern word processor. These applications offer the user an amazingly large number of features - but I daresay most of you would agree with me when I say that the typical user hardly ever uses more than 30 to 50% of the application’s capabilities. If that is indeed true, then why should he or she pay for the additional horsepower built into the package? Why should the user’s hard disk be used to store unwanted and unused bloated software?
In the NCM, you could use software package features as and when needed. The application could be served of a network server and a client machine can download and use only what it needs. The user pays for level of usage. As a result the LAN could comprise of cheap and slim client machines. An important benefit for the administrator (especially in large networked organizations) is that application upgrade & maintenance becomes centralized… This paradigm of computing may still not be very feasible over the Internet (till such time that we get higher speeds and very reliable connects), but can immediately be deployed on an Intranet.
Networking Support: Machines need not be islands. The Internet proves that. TCP/IP is the de-facto protocol on the Internet today. Java has built in TCP/IP capabilities. It allows a programmer to create network client-servers and other network based applications in a scalable and easy to use fashion. Indeed as the WWW mushrooms, Java offers HHTP support for web programming and is continually building standard support for Mail, Telephony, etc.
Strong Component Model: Smart programming encourages coding in a fashion where a programmer’s creation can be re-used as and when required. Java Beans are based on this philosophy. They are basically reusable components created in Java with well-defined interfaces. They serve as building blocks for creating and extending applications. The benefits to a software company are obvious: quicker development time for a project, less expense incurred, usage of tried and tested components, and focussed debugging when required.
Java and the Internet
The Internet is a network of networks - a massive, heterogeneous computing environment. No wonder in an environment as diverse as this, the quality of platform independence finds a welcome place. The Internet is distributed - and Java excels here by delivering functionality over the network in the form of applets.
Neat. Your next question may be, “But how secure is the code that comes across the Internet?” Well, one of the initial goals of Java was security. And to make sure that Net delivered code runs securely on your machine, it is contained and executed in the confines of the Java Virtual Machine. Applets delivered over the web are restricted from reading and writing to your hard disk. Moreover they can make network connections back only to the server from which they were dished out. Admittedly, there could be scenarios where this behaviour is restrictive. For those cases, there are ways of bypassing the default behaviour with the approval of the user!
Java and the WWW
The World Wide Web is the attractive packaging around the Internet. Initially intended for sharing information and resources in an easy and standard fashion, it has quickly moved beyond just that. When Netscape Corporation built in Java support into its web browser, a tremendous amount of intelligence and therefore potential functionality was embedded into the user’s interface to the WWW. With Microsoft and others joining the fray, this movement was reinforced. All of a sudden animation, graphics and multimedia became the order of the day - substituting ordinary (and sometimes dull) static pages.
Although, today I would hardly recommend Java for plain web-decoration purposes. Doing that would be cumbersome, too heavy and an inefficient utilization of Java. HTML focussed technologies like DHTML (Dynamic HTML), CSS (Cascading Style Sheets) address that much better. Coupled with streaming audio and video technologies, they offer multimedia experiences in a more elegant (and probably more lightweight) fashion.
Java could be used where intelligent computation is required. Examples that immediately come to mind are shopping cart applications that allow you online shopping, interactive and real-time chat applications. Similarly, in cases where one needs secure transactions, Java is an attractive candidate. Basically, use Java to create services that need to overcome the default, stateless behaviour of the basic web protocol (HTTP).
And talking about technologies and innovations that enhance and add value to a web surfing (or serving) experience, one cannot afford to miss Java Servlets. Applets are the use of Java on the client side (browsers), whereas servlets work by adding server side intelligence to the web server.
The traditional way of adding intelligence to a web server is to use CGI (Common Gateway Interface) scripting. This allows the web server to talk to databases and other programs that provide specialized services outside the scope of the web server. The biggest drawback of CGI is an increased operational load on the server. So although they are okay for low-medium loaded servers, at high loads the response time starts becoming noticeably poor. Secondly, if one has to port a CGI script to another platform it may not be completely easy and painless.
Servlets on the other hand integrate with the web server itself, resulting in increased efficiency. Most modern web-servers now support the Servlet API. Since servlets are written in Java, they are platform independent and thus offer almost no porting problems. And so now you can offer solutions through a universal frontend - the browser, which itself need not be Java enabled. In true Java philosophy, servlets allow you to: “Write once, serve anywhere!”
Extending the reach of Java
To maximize it’s flexibility and to multiply its usefulness manifold Java supports interaction with many other technologies. For example JDBC (Java Database Connectivity) enables Java clients to interact with ODBC (Open Database Connectivity) compliant databases - which are a standard today.
CORBA (Common Object Request Broker Architecture) is an architecture that specifies how distributed software objects can work together without regard to client-server operating systems and programming languages. Java has been used very successfully with CORBA to create truly platform-independent, distributed environments. These have enabled the creation of software modules that interface with and enhance the utility of already existing (and probably expensive) legacy systems.
Ironically enough, Java also offers interoperability with Microsoft Technologies, COM (Common Object Model) and ActiveX .
Java and the Enterprise
The adoption of Java has been serious enough to warrant the creation of a series of independent APIs whose function is to support Enterprise application building in Java. These are collectively called Java Enterprise. They include facilities to support: distributed applications, interfacing to non-java code, directory services, mail services, transaction services, etc.
A survey by Zona of companies with 250+ employees:
Half were implementing Java in their business solutions
Remaining had Java test plans with the year
Heavy weights adding impetus to the Java movement include:
Sun Microsystems, Netscape, IBM, Oracle, Microsoft, Novell…
IBM is reported to have 2000 Java programmers!
100% Pure Java Program
Can there be too much of a good thing? Apparently yes. After the enormous startup success of Java, many of the IT giants showed movement towards releasing their own implementations of Java. In fact Microsoft went ahead it’s own implementation which offered additional features and performance enhancements when run on top of a Microsoft OS. For a short period Java programmers probably had a bad scare. I mean, if there were to be different releases of Java, each with its own peculiarities, then we were disregarding the original intent and purpose of the Java language - write once, run anywhere!
And so, Sun Microsystems embarked on a worldwide campaign to encourage Java purity. There exists a certification process by KeyLabs, USA that is an independent third party Organization. This program helps developers create, test, certify & sell 100% Pure Java applications. The certificate is a quality assurance seal of approval - to ensure the applications will run correctly on all Java enabled platforms.
Some Personal Experiences
If you have been with me so far, then I’d like to share with you some real-life experiences (revolving around Java of course).
Weather Tracker
We (QuantumLink Communications) did a Weather Tracking application for a US Company. The application is for use by television stations for real-time weather information display during their News broadcasts. The setup includes physical electronic sensors collecting weather data. These use the Internet as a transmission medium and the Java application receives and interprets data, while providing a user friendly displays with zooming and other power features. Now, actually we could have used one of many programming languages for this. In all probability, we may have opted for Java anyway, but what finally clinched the deal for Java was that the TV stations wanted this to also be globally available on their website. So we did the application, and also made an applet out of it to allow browser enabled viewing worlwide.
PostMaster - An Innovative Mail Server
Back home and something very close to my heart - an in-house creation - the PostMaster. The need for a PostMaster stemmed from observing the prevalent Internet scenario in India: expensive Net access, no e-mail privacy over a shared account, a lot of organizations saying that allowing web surfing is often counter-productive
So we set out to create a piece of software that would take one Internet account and provide unlimited, personal e-mail IDs. And the PostMaster was born. With a great market response, it’s feature list quickly expaned to include: virtual accounts, remote forwarding, usage statistics, security controls, multiple POP account support, auto-responder, auto connect & mail transfer, etc. And all this packaged under a user friendly, easy to use GUI.
The language of choice: Java! Today we have more than 100 organizations across India running the PostMaster. And a few international installations too. Running it on varied platforms, in heterogeneous environments.
Incidentally, the PostMaster is 100% Pure Java Certified. And we believe that it was the FIRST Indian application to be awarded this certification by Sun Microsystems Inc., USA
The reader can download and try out an evaluation copy of the PostMaster from: http://postmaster.co.in
If you do, I would love to have your feedback and comments.
SurfConsole - A WWW Proxy Server
Sooner or later an organization will want to allow multiple users on a LAN to surf the WWW over a single connection - simultaneously. Another Java application, Surf allows you to do exactly this. And it’s features include: caching, net-nanny functionality, auto-connect, real-time displays, etc.
The reader may download an evaluation copy from http://postmaster.co.in/products/surfconsole_overview.htm if he or she so desires. As usual, feedback would be highly appreciated. And oh, we believe that Surf was India’s second application to get the 100% Pure Java Certification.
The above examples (besides the obvious self-promotion ) are meant to illustrate that Java is ready to be used in real-life, for serious purposes. And it can do this exceedingly well.
Conclusion
Java continues to mature, but is already a dominant force in the software industry today. It could do with your vote of support… but will probably get along without it too!
(Published in: Express Computers, Dec 1998)
