Features / October 1997

Java Gets Down to Business

Critics say Java isn't ready for prime time.
But others are using it to solve real-world business problems.
What's their secret?

Tom R. Halfhill

Java is like a child prodigy who can play a Rachmaninoff piano concerto but still isn't potty-trained. The flashes of brilliance and glimpses of future potential are marred by cranky behavior that's typical of a two-year-old.

It's hard to overlook Java's immaturity. Compared to native code, interpreted Java byte code is as slow as a line at the post office. Java development tools are diamonds in the rough — sometimes very rough. Despite the "write once, run anywhere" mantra, there are still nagging differences among Java virtual machines (VMs) that cause Java programs to misbehave on different platforms. Java's API for creating GUIs, the Abstract Window Toolkit (AWT), is such a mess it seems everyone is rewriting it. And Sun Microsystems is wrestling with Microsoft over Java's future.

In other words, it's a lot like the chaotic early days of Windows, the Macintosh, and MS-DOS. But few people remember the Stone Age APIs of Windows 1.0, or that Mac developers had to clumsily compile their first programs on a Lisa, or that Microsoft once wrestled with Digital Research over the future of DOS. When any new platform is born, pessimists focus on the flaws while optimists hype the potential. Caught between are developers, who need to solve real-world problems today. When will Java be ready for prime time?

It's ready right now, according to some developers who are currently using Java to do some surprisingly serious business, as outlined below.

• A Silicon Valley start-up company built an enterprise-wide purchasing application that eliminates paper-pushing, runs across multiple client platforms, links outside vendors to corporate intranets, and integrates with enterprise databases.

• A Washington-based consulting firm rewrote an employment-practices expert system that it originally developed in C/C++.

• An independent consultant in California is using Java to reengineer the employee-review process at a major biotech company.

• A systems integrator in New Jersey is using Java applets and middleware to provide a help-desk service to corporate customers.

• A businessman who can't write a single line of Java code used a tool that automatically converts Excel spreadsheets into Java applets.

• Sony Online Ventures created a high-traffic commercial Web site with server-side Java components that dynamically generate most of the Web pages.

• Home Shopping Network is using server-side Java software to run a large-scale Web site that hosts on-line auctions and connects to a product database.

• A major defense contractor is using a Java-based indexing-and-retrieval engine to create a parts inventory that engineers can search from a browser on any client.

These are not isolated cases. An independent survey of BYTE readers last May found that 54 percent are developing Java software. In another study commissioned by the Java Internet Business Expo, analysts at Zona Research surveyed 279 IT professionals at organizations that have 250 or more computers. They discovered that 47 percent are using Java today, while the rest expect to use it within the next 12 months. Of the companies that have already adopted Java, 52 percent are rolling out finished applications.

"The average portion of application-development budgets for Java endeavors will rise from 12 percent during the next six months to over 21 percent within the next 24 months," concludes chief analyst Clay Ryder from Zona's study. "Java is more than a passing fad."

Java Trends

For this article, BYTE concentrated on business applications that are either finished or in the early stages of deployment. We found that four trends emerged.

• Developers are completing some of their projects in a matter of months, despite Java's flaws. Coders praise Java's advantages over C/C++ as an object-oriented language, and they're confident that development will get smoother as the tools keep getting better.

• A great deal of Java development is hidden from view because it's for in-house use by corporations. At this point, few developers are using Java to write shrink-wrapped commercial applications.

• Java programs that execute on servers are at least as significant as Java applets that run in browsers — even though applets are what most people associate with Java. Again, this tends to make Java development less visible than it really is. Some large-scale Web sites and enterprise applications depend heavily on server-side Java, but they use few or no Java applets.

• The main reason developers are selecting Java over other solutions is cross-platform compatibility. In other words, they are embracing Java as a platform, not just as a language. Zona reached the same conclusion, finding that Java's abilities to work with Web browsers and on different platforms are by far the biggest reasons enterprises have for adopting Java.

These trends make sense. Large organizations tend to accumulate many different platforms, and they're not in a hurry to replace perfectly good equipment. But this causes problems while deploying applications throughout the enterprise. The only common denominators are networks and browsers. Java allows developers to pave over the differences between platforms and quickly distribute networked solutions to any number of clients.

Putting Java to Work

Platform neutrality is why start-up Ariba Technologies picked Java for its new Operating Resource Management System (ORMS). Ariba ORMS automates the purchase of equipment, office supplies, furniture, vehicles, and almost anything else that isn't directly required for a company's product manufacturing. Those miscellaneous purchases typically account for 22 percent of corporate costs. It's a business process that screams for automation, because the cost of handling paper forms can exceed the cost of a requisitioned item.

It's also a process that's widely distributed and has to work with existing clients and legacy systems. Nobody wants to discard thousands of usable desktop PCs or replace their mainframes just to accommodate one new application. "If you go into a Fortune 1000 company, they've got AS/400s, they've got Hewlett-Packard systems, they've got Unix, they've got mainframes," says Paul Touw, marketing and business-development manager for Ariba. "That almost defaults you to Java."

Ariba ORMS extends its reach even beyond the enterprise. Outside vendors can distill their offerings into spreadsheets that contain prices, product options, stock numbers, and just about anything else — even hyperlinks that point to the vendor's own Web site, which might have data sheets and illustrations. Ariba imports the vendors' spreadsheets into an on-line catalog that users can browse with a Java applet.

The password-protected applet is the front end for the purchasing process. It provides a graphical interface and step-by-step instructions. It also enforces customizable business rules that govern how a company routes and approves purchases.

On the back end, Ariba's server-side Java application acts as the middleman between the applets and the company's legacy systems. It talks to databases via WebLogic's JdbcKona, which is a collection of Java Database Connectivity (JDBC) drivers for Oracle, Sybase, and Microsoft SQL Server. On Windows NT servers, Ariba also links to Crystal Reports.

Remarkably, Ariba's customers began deploying an early version only seven months after Ariba started the project in December 1996. "There's no way we could have built a C++ program in seven months that does everything our Java server does," claims Ariba engineer Boris Putanec.

Not that everything went smoothly; Ariba encountered many problems. A bug in Microsoft's early just-in-time (JIT) compiler caused IF statements to execute incorrectly. Java's thread synchronization was not consistent — Windows NT spawns native threads to handle Java threads, while Sun's Solaris piggybacks all Java threads on one native thread. Java's FINALLY statement can kill a thread that throws an exception. And Ariba's programmers struggled with differences in Java VMs on various platforms. Putanec says wryly, "Instead of 'write once, run anywhere,' it's more like 'write once, debug everywhere.'"

Nevertheless, they got it working. To overcome deficiencies in the AWT, Ariba turned to Netscape's Internet Foundation Classes (IFC), a class library that offers more graphical flexibility and a consistent look and feel across platforms.

Two of Ariba's pilot customers are AMD and Cisco Systems, both based in Silicon Valley. AMD began installing ORMS in June and expected to have it in full production by late August. AMD plans to eventually deploy ORMS on as many as 4000 desktops. Cisco also began implementing ORMS during the summer and expects to deploy it on 8000 to 10,000 desktops around November. Both companies say that ORMS meshes well with existing clients and back-end systems.

"We're doing this for solid business reasons, not just to geek out on the technology," says Pat Guerra, AMD's vice president of supply management. He explains that by automating the paper-driven purchasing process, ORMS is freeing his employees for more productive duties. They are already being retrained to measure the performance of suppliers more accurately and to negotiate better deals.

Guerra says that he selected a Java solution because AMD has everything from Windows PCs and Unix workstations to IBM mainframes and DEC VAX minicomputers. Some of the legacy systems are 15 years old. "Cross-platform compatibility is a huge factor," he explains. "That makes the application support much easier and less costly than a platform-specific solution."

At Cisco, employees use Windows PCs, Unix systems, and Macs, and they're scattered at field offices all over the world. Cisco needed a multiplatform, multilanguage, multicurrency solution that integrated with Oracle Purchasing. Ariba ORMS does all that, and it also generates purchase orders in the ANSI-standard EDI-850 electronic-data-interchange format for vendors that accept them.

Cisco program manager Carolyn DePalmo says the project is on schedule and that she's looking forward to distributing ORMS worldwide. "It's obviously difficult for people in satellite offices to deal with paper forms. This way, they can just shoot their requisitions over the Web," she says.

Selling to the Feds

Another developer sold on cross-platform compatibility is Washington Consulting Services & Technologies (WCS&T), which recently ported a C/C++ client/server application to Java. The application, called Chinook, is an employee-relations expert system for government agencies and corporations.

Chinook helps to guide managers through sticky situations that can have costly consequences — employee absenteeism, substance abuse, sexual harassment, discrimination, and so forth. Chinook's decision-logic tables are based on case law, court settlements, company policies, and best practices at other organizations. After asking a manager a series of questions, Chinook generates a risk-analysis report and suggests actions. Those actions might range from writing a letter or a memo — complete with recommended wordings — to specific forms of discipline.

"It's not 'attorney-in-a-can'; it's not a legal advisory tool," says Linda Brooks Rix, president of WCS&T. "But it does help managers deal with these problems. It also helps to level an organization so managers are more consistent in their actions and discipline."

Rix says the C/C++ version of Chinook is used by organizations with as many as 250,000 employees and 40,000 managers. When the software needed a major rewrite, the company decided to convert it to Java so the front end would run on any client. The National Science Foundation is about 50/50 Mac/Windows, she points out, and Macs are also popular at NASA and the U.S. Air Force. "The federal government is very interested in intranet solutions because they're less expensive than standardizing on a single platform," Rix explains.

WCS&T began rewriting Chinook in April. The task was made easier by the fact that the programmers had written the C/C++ version with a rules-based component framework and development suite called Elements, from Neuron Data. When Neuron recently ported the suite to Java, it added a utility that translates C/C++ resource files into Java classes. That slashed the amount of code the programmers had to rewrite, says Gary Frank, director of software development at WCS&T.

They did encounter some problems — mostly due to limitations in Java 1.0.2, Frank says. Applets under 1.0.2 can't talk to printers or save files on the client, so the server-side program has to generate the reports in HTML and display them in a printable browser window. "It was more of an annoyance than anything else," he says. WCS&T finished the Java port in July and immediately began working with customers to test and deploy the product.

Biofeedback

Another consultant is using cross-platform Java to solve an unusual problem for a 3200-employee biotech company in California. The company stores employee records in a 10-year-old database that runs on Novell NetWare and MS-DOS. The database does an adequate job and is heavily customized, so the company isn't eager to replace it. But to implement a new employee-review process aimed at reducing attrition, the company needed to expand access from about a dozen people to all 700 middle managers. The existing database simply couldn't handle it.

"They could not access this data. It was basically locked up. It was a classic data-warehouse problem," says Chris Christian, principal of CRC Business Solutions, the consultant hired to find a solution.

To complicate the challenge, the biotech company's managers use many different clients — mostly Macs, but also Windows PCs and Unix workstations. All of them need access to the database, and the company didn't want to install any new client software or browser-specific plug-ins. Also, some of their browsers don't run Java.

Fortunately, an intranet was already in place, running under Unix on a Digital Alpha server. The same server replicates the DOS database to Oracle 7 every night. So, Christian built his first solution with Prolifics JamWeb, a client/server engine that fetches information from the Oracle database and launches a CGI process to generate HTML pages for the browsers.

Unfortunately, the HTML pages tend to be large and can't display much information on the screen. Christian used a new Java version of Prolifics (3.0) to display the data more compactly in an applet with a scrolling grid widget. The user interface is more consistent on different-size screens, and the applet downloads faster. The Prolifics engine uses a special form-description language to automatically generate HTML and JavaScript for browsers that don't run Java, so Christian didn't have to create multiple versions of his client-side application.

To complete the project, Christian had to tap skills in Java, JavaScript, HTML, SQL, the Prolifics form tool, and even graphics design. "It's not programming as we used to know it," he says. "Developers need a lot of different skill sets. And because the application is running inside a browser, everyone expects it to look like a graphically exciting Web page."

Leveraging the Web

Because the Web amounts to a global WAN, developers are using it to build extranets between companies as well as intranets between platforms. The links between Ariba ORMS and outside vendors are one example; another is a help-desk application implemented by LANcomp, a 50-employee systems integrator and reseller in the New York area.

LANcomp is delivering a 24-hour help desk to its customers through a suite of Java applets called Applix Anyware. The applets allow customers to notify LANcomp's technicians about problems and then track the progress of solutions. Both parties also have 24-hour access to LANcomp's knowledge base, which is stored in an Oracle database. The middleware is Applix Enterprise, a native server-side component. The knowledge base contains documentation, solutions to common problems, illustrative screen photos, and hyperlinks to useful Web sites.

"We needed the ubiquitous access of a Web-enabled product that our employees and customers could use from any location or from any client," explains Dan DeVenio, LANcomp's vice president for sales and marketing. "All you need is a Java-enabled browser and a password."

The cross-platform applet is as important to LANcomp internally as it is to outside customers, adds Bob Rudis, technical operations manager. LANcomp's employees use an eclectic mix of Windows PCs, Unix systems, and network computers (NCs) from Sun and HDS. The alternative would have been to write, deploy, and maintain multiple versions of the help-desk program on all of LANcomp's systems as well as those of its customers — a Herculean task that, ironically, would generate help-desk calls of its own.

Server-Side Java

There are thousands of Java applets on the Web, but server-side Java gets less attention because it's generally invisible to users. Some Webmasters (including BYTE's Jon Udell) think Java can be more useful on servers than on clients, at least in the short term.

It's a compelling argument. Server-based programs conserve bandwidth and don't require users to have Java-enabled browsers because they don't download or execute any Java on the client. They're free to use the latest and best Java VMs because they don't have to wait for browsers to catch up. They can boost the performance of critical routines by calling native methods, because server programs usually don't have to run across multiple platforms. And Java's lightweight threads can handle multiple HTTP connections with fewer CPU resources than traditional CGI processes.

All those factors convinced Sony Online Ventures to use server-side Java components to build SonyStation, a family-oriented commercial Web site. With 150,000 to 200,000 users per day, it's one of the busiest Java-powered sites on the Web.

SonyStation users can register for services and navigate the site with a Java applet called the StationPass, but that's just the tip of the iceberg. A suite of server programs known as Dynamo does the bulk of the work. Dynamo, from Art Technology Group (ATG), consists of three integrated Java applications: Ad Station, which manages on-line advertising; Profile Station, which keeps track of user demographics; and Retail Station, which manages electronic commerce. They dynamically generate about 75 percent of SonyStation's Web pages. On the back end, Dynamo uses WebLogic JDBC drivers to plug into Sony's SQL database.

ATG says Dynamo is a testament to Java's strengths as a programming language. The coders started with an earlier version written in C++, completely rewrote it in Java, and shipped the product only five months later. Most of the code — some 200,000 lines — took just two months to write. And the programmers did it in early 1996, when Java tools were primitive. In fact, they didn't use any Java tools to speak of: They typed the code into EMACS, a text editor, and compiled it with Sun's free Java Development Kit (JDK). They've since adopted Symantec CafĂ©.

"It was pretty scary when we made the leap to Java," says Jeet Singh, president and CEO of ATG. "We were scared that the uptake on Java wouldn't be as fast as it was. We thought Sun was pitching the wrong things about Java, like animation on Web pages. Nobody was talking about server-side Java at all, and we were trying to build this huge server-side app."

The Java version of Dynamo was easier to write and is easier to maintain than the C++ version, Singh declares, partly because it simplifies multithreading and memory management. Also, it's certified to run on multiple-server platforms: Windows NT (both x86 and Alpha), Solaris, and Irix — or any platform with a compatible Java VM. Singh says the difference in performance between the C++ and Java versions is not significant.

Sony is satisfied with the performance, according to Mark Benerofe, vice president of programming for Sony Online Ventures. Benerofe also likes ATG's open server APIs, which allow Sony's developers to write new applications that access Dynamo's services with only a few lines of code. For example, developers can create on-line games that check the site's list of registered users through Dynamo's gateway to the SQL database. Another API call might return the player's profile, which a game could use to adjust its difficulty level or to display a targeted ad banner.

Not everything worked perfectly at first. "We had a whole host of bugs when we first rolled out because we were on the cutting edge and nobody had ever done a Java site on this scale," admits Benerofe. He says Sony and ATG soon resolved the problems.

Another high-traffic Web site built with server-side Java is First Auction, owned by Home Shopping Network. First Auction users can view data about products and enter competitive bids on-line; winners get to buy the products at their bids. The site went public in June and racked up $100,000 in sales in the first three days, says Keith Foxe, communications manager.

First Auction runs on a Solaris system with Kiva Enterprise Server, a middle-tier Java component that sits between the Web-server software and an enterprise database. Developers can use Kiva's Java class libraries to write applets or applications that talk back to the server via IIOP (using a third-party object request broker [ORB] from Iona or Visigenics) or Kiva's own communications protocol (based on sockets). The classes are transport-independent, so developers could also use a third-party bridge to DCOM.

Kiva wrote the core services in C/C++ because some of the early Java VMs for Unix weren't multithreaded, but all the application-level services are Java classes. The classes let developers distribute application logic between the client and the server, according to performance and security requirements. For instance, an applet can check the validity of a credit-card number without bothering the server.

Like other Java middleware components, Kiva allows developers to create Web applications that work with existing enterprise systems. First Auction uses Kiva to link its Web server to an Oracle database. "Not many companies are saying they want to write all-new applications from scratch in Java," says Sharmila Shahani, Kiva Software's director of product marketing. "But many companies do want to leverage their existing investment while also taking advantage of new opportunities by migrating to the Web."

Server-Side Portability

Java programs on servers generally don't need the run-anywhere mobility of applets because they live in a controlled environment. Nevertheless, some developers are writing distributed applications that run across heterogeneous servers as well as heterogeneous clients.

A prime example is Innotech's NetResults, a text-indexing and text-retrieval application that lets users find documents anywhere on a network. The server-side pieces consist of an indexer, a search engine, and an administration tool. The client-side component is an applet that allows users to make queries and view sorted results. NetResults was among the first applications to win 100 percent Pure Java certification from Sun.

"Intranets don't often consist of roomfuls of Windows NT servers," explains Simon Arnison, Innotech's vice president for R&D. "We find that many companies have strange combinations of servers running everything from NT, to Linux on Macs, to AIX on PowerPC, to Solaris on SPARC. We wanted to support all those platforms with a single product, without the problems that other companies face by having to create multiple versions for all those platforms."

Java seems like an odd choice for an application that needs high performance. The first version of NetResults was only about a tenth as fast as native code. The latest version is about one-fourth as fast. When compiled with a JIT compiler, it's about one-third as fast. Arnison thinks the performance is sufficient and that the advantages are worth the trade-off. He's confident that future improvements — including Java chips — will eventually banish the performance issue.

Like other Java pioneers (the project began in November 1995), Innotech hit a number of snags. NetResults shipped six months late because of problems with unstable Java VMs, incomplete APIs, and crude tools. For instance, Innotech had to write all its own sort routines because they're missing from JDK 1.0.2. And Innotech doesn't make any loose "run anywhere" claims until after it has tested the code on a slew of platforms: Windows, Power Mac, NetWare, SCO Unix on x86, an SGI workstation, and two different flavors of NCs (a Sun JavaStation and an HDS@WorkStation).

Still, NetResults shipped months ahead of most other Java products, and it's welcomed by those who need a cross-platform solution. Anton Ritter, a consultant for Computer Sciences, is installing it on servers at a major defense contractor. Engineers can use it to rapidly locate data about thousands of complex parts in the com-pany's inventory, even from NCs on the factory floor. A related Java project allows engineers to display an image of a part on-screen, and a future version will render the part in Virtual Reality Modeling Language (VRML) so engineers can manipulate and view the image from any angle.

"Our main requirement is that it must be multiplatform," explains Ritter. He encountered a few pitfalls along the way — he had to compile the programs with Sun's JDK 1.1 because of problems with JDK 1.0.2 — but nothing insurmountable. He's convinced that Web- and intranet-based solutions are the wave of the future.

The Next COBOL

There's still a lot of things that developers can't do with Java. They can't write applications that compete feature-for-feature with leading products, such as Microsoft Office. They can't write programs that demand outstanding performance. They can't write multimedia extravaganzas. And they can't deploy large-size applets that ooze through slow networks like cold syrup.

Of course, before embarking on any project, it's a developer's responsibility to determine whether the tools at hand are up to the task. It's not easy to make that determination with Java because its capabilities keep changing from month to month.

Despite its shortcomings, Java is already making such significant inroads into the enterprise that its future as a programming language for business applications is virtually assured. In a positive sense, Java is becoming the next COBOL — literally, a common business-oriented language.

Unlike COBOL, Java is also a platform. Java could fail in that role while still succeeding as a language. But its ability to deliver cross-platform networked solutions is the biggest reason businesses are adopting Java, and that bodes well for its survival. It's looking more and more likely that Java will be the most successful new platform to take root since Windows made its debut in 1985.

Sidebar:

Where to Find

Applix
Westborough, MA
Phone: 508-870-0300
Internet: http://www.applix.com/

Ariba Technologies
Mountain View, CA
Phone: 650-237-3800
Internet: http://www.ariba.com/

Art Technology Group
Boston, MA
Phone: 617-859-1212
Internet: http://www.atg.com/

The Computer Group
Columbus, OH
Phone: 614-876-8600
Internet: http://www.leasesource.com/

Computer Sciences
El Segundo, CA
Phone: 310-615-0311
Internet: http://www.csc.com

CRC Business Solutions
Oakland, CA
Phone: 510-569-2721
Internet: http://www.dnai.com/~crc

First Auction
(Home Shopping Network)
Internet: http://www.firstauction.com/

Innotech Multimedia
North York, Ontario
Phone: 416-492-3838
Internet: http://www.innotechcd.com/

Kiva Software
Mountain View, CA
Phone: 650-526-3900
Internet: http://www.kivasoft.com/

LANcomp
Piscataway, NJ
Phone: 908-981-1991
Internet: http://www.lancomp.com/

Neuron Data
Mountain View, CA
Phone: 650-528-3450
Internet: http://www.neurondata.com/

Prolifics
New York, NY
Phone: 212-267-7722
Internet: http://www.prolifics.com/

SonyStation
(Sony Online Ventures)
Internet: http://station.sony.com/

Visual Numerics
Houston, TX
Phone: 713-784-3131
Internet: http://www.vni.com/

Washington Consulting Services & Technologies
Tacoma, WA
Phone: 253-984-7933
Internet: http://www.wcst.com/

WebLogic
San Francisco, CA
Phone: 415-659-2600
Internet: http://www.weblogic.com/

Zona Research
Redwood City, CA
Phone: 650-568-5700
Internet: http://www.zonaresearch.com/

ORM Yourself with Ariba

Screen shot of
                  Ariba's ORM software.
Ariba ORMS uses server- and client-side Java software to automate the corporate-purchasing process.

All for One, and One for the Middle

Screen shot of
                  CRC's Java applet.
CRC built a custom Java applet that allows all 700 middle managers at a major biotech company to access employee records.

Applix Backs Up to Databases

Screen shot of
                  Applix Anywhere applets.
Applix Anyware is a suite of Java applets that connects users to back-end databases.

Manageable Web Ads from Dynamo

Screen shot of
                  Dynamo's Ad Station.
Dynamo Ad Station makes it easier for Webmasters to manage the advertising on their Web sites.

Middle of the Tier with Kiva

Screen shot of
                  Kiva's Enterprise Server.
Kiva Enterprise Server is a middle-tier component that links Web servers to enterprise databases.

A Plethora of Platforms Served

Screen shot of
                  Innotech's NetResults program.
Innotech's NetResults can index and retrieve files across multiple-server platforms.

Tom R. Halfhill is a BYTE senior editor based in San Mateo, California. You can reach him at thalfhill@bix.com.


Inbox / December 1997

Net Dream, Net Reality

Three years ago, I got a fancy for OS/2. This year, I purchased Warp Connect. Everything seemed OK. I downloaded Java Development Kit (JDK) 1.0.2 for OS/2, Netscape 2.02 for OS/2, and some lecture notes on Java. You can imagine my frustration when I realized that I couldn't run a network applet connecting to a host, even if the host had granted access, because Netscape wouldn't let me do so for security reasons. I believe security should be the host's problem, as in Unix, not the browser's problem. Are Java applets for thumbling ducks and Push Me buttons only?

Augustin Man
piti@ciasce.logicnet.ro

Actually, the current security model does let applets communicate with the host on which they originated. Theoretically, you can use a socket connection for this purpose, but some firewalls block those connections. I got around this problem in one of my applets by URL-encoding the data and sending it back on the HTTP connection. A Perl script running on the host receives the data. Programming books on Java and HTML explain this in more detail and usually include some sample code. —Tom Halfhill, senior editor

Copyright 1994-1998 BYTE

Return to Tom's BYTE index page