Java Perks Up E-Commerce Site

 

Philip J. Gill is an Associate Editor of Java Report. He can be contacted at philipgill@aol.com.




FLASHLINE.COM INC. is a Cleveland-based electronic commerce (e-commerce) start-up. It was formed last year to capitalize on the emerging market for reusable software components, including JavaBeans. Today, Flashline.com offers for sale a variety of fonts and software components—principally JavaBeans and COM, but also Active/X—from its Web site's Digital Marketplace.

THE SITE AND ITS SERVICES
The site offers four main services, the principal one being its consumer-oriented "Customer Digital Marketplace." This system allows customers to browse, select, and purchase its digital products via the Web. On payment authorization, the site's digital products are delivered over the Internet to the customer's computer. In addition, an archive function stores copies of every product purchased in a personalized customer filing system for later retrieval.

The site's second system, a vendor system, allows developers wishing to use the Digital Marketplace to set up accounts to sell their software fonts, components, and at a future date, other as yet unspecified digital products.

An advertiser system allows vendors to sign up and submit ads, while an affiliate system enables other Web sites to make commissions from Digital Marketplace sales that come about as a result of a referral. Its newest system, launched in February, is "Beans by Design," a free online service that allows users to solicit competing bids for RFPs that specify Java components, applets, or complete applications they wish to have developed.

Last fall, Flashline.com's Digital Marketplace debuted with about 100 pre-packaged components for sale, mainly Active/X components with a handful of Java components. Today, the site offers more than 300 components, the vast majority of which are Java or JavaBeans.

IMPLEMENTATION
The implementation of Flashline.com's Digital Marketplace provides a good model for setting up e-commerce sites quickly. It consists of application and business logic written entirely in Java, first as Java servlets and now as JavaBeans.

In both cases, the servlets and JavaBeans run on the JRun Web Server from Live Software Inc., a Santa Clara, CA start-up Java servlet and components vendor. JRun is an integrated Java Web deployment environment incorporating an all-Java Web server, a servlet runner, and other functions. It is a commercial implementation of Sun's Java Web Server and supports Sun's specifications for the Java Servlet API as well as the Java Server Pages (JSP).

The Digital Marketplace's business logic includes the four services or systems—Customer, Vendor, Ad, and Affiliate—plus payment processing and authorization and other functions. The JRun Web server and the Java application logic run on Microsoft's Windows NT on a dual-processor Pentium Pro 200 server from Hewlett-Packard Co. (HP).

Its business logic connects using a Level 4 JDBC driver to a back-end Oracle Corp. Oracle 7.3 relational database. Among other things, the Oracle database stores transaction records and the site's personalized customer archive files. The Oracle database runs on a small Solaris UNIX-based SPARCserver from Sun Microsystems Inc.

For payment processing and authorization of online purchases, the Digital Marketplace uses Cybercash software and services. The Cybercash software on its Digital Marketplace, interfaces to the Cybercash payment software and services through a JavaBean wrapper. Authorization usually occurs in ten seconds or less. Users do not need a Java-enabled Web browser to access the site or purchase products.

Since launching the site last summer, Flashline.com's founder and president Charles Stack and his development team have put the system through two generations of software. The first generation was written as Java servlets, while for the second generation, they were migrated to JavaBeans. Application development tools include the JBuilder Java integrated development environment (IDE) from Inprise Corp., Scotts Valley, CA and DreamWeaver from MacroMedia Corp., San Rafael, CA, which was used to develop the site's HTML pages.

JAVA VERSUS C AND CGI
Flashline.com was not the first online e-commerce site for Stack. Stack built and ran one of the first online bookstores, books.com, as well as affiliated online stores that sold music, movies, flowers, gifts, and software. After selling those sites, Stack decided to launch Flashline.com, noting that after many years of promises, the market for reusable, resalable software components appeared to be at hand—thanks in large part to the growing popularity of Sun Microsystems Inc.'s Java and the language's JavaBeans software components specification. Through his years of experience in building and maintaining online retail sites, Stack had became quite familiar with the C programming language and Computer Gateway Interface (CGI). He had, in fact, used those two technologies as the basic technologies for his earlier Web retail sites. He was also well aware of the drawbacks of both technologies; C, for instance, had memory leaks and could be difficult to program in, while CGI was given to slow and cumbersome performance. One alternative to C and CGI was Microsoft's Active Server Pages (ASP), but Stack said he rejected that choice because it didn't provide the full programming environment that Java does.

Therefore, when it came time to plan the Digital Marketplace, he started testing and experimenting with Java. In Java, however, Stack said he saw a technology that would provide e-commerce developers like himself with a faster way to build, maintain, and update a site's features and inventory, as well as one that would provide faster performance. For that reason, he opted to build his new Web site's server-based application logic in that language. From that decision, the basic architecture and implementation of his e-commerce site began to fall into place.

"The way the Java Web Server is designed,
it's inherently faster [than CGI.]"


— Flashline.com's founder and president, Charles Stack



JAVA SERVLETS AND CGI
His decision to go with Java was influenced by the availability of the Java servlet API—which offered much faster performance than CGI—and the combination of the Java language and Java servlet API. "The way the Java Web Server is designed, it's inherently faster even though the language itself is interpretive," said Stack.

How much faster? In its initial release, Stack estimates the use of JRun Servlet Runner provides at least a 300% performance improvement over CGI, based on testing of a prototype. Not only that, he said he's found that Java programmers are "at least 50% more productive" than C programmers, and that many programs developed in Java simply run faster than an equivalent program written in C.

He also evaluated and chose to use the Java Web Server, the Java servlet API, and JSP technologies that were then in various stages of readiness. Stack said he evaluated Sun's Java Web Server and its Java Server Pages (JSP) functionality, and found the product's specification incomplete and its stability unreliable. Instead, he opted to go with a commercial product that he felt was more reliable. In that case, Live Software's JRun.

MIGRATING TO JAVABEANS
Before, with his earlier Web sites, Stack had used both C and HTML together. While that combination worked, Stack found it difficult to make changes in that environment. "If you made a change, you had to go back and work through the entire system," he said. In its first iteration, Flashline.com's Digital Marketplace combined Java and HTML, and presented the same type of problems for maintaining and changing the applications as C and HTML had.

Besides that, Stack wanted to take advantage of the modularity of the JavaBeans component specification that was emerging for his own use, as well as sell JavaBean components and other products from the site. Converting the Java servlets to JavaBeans was a rather simple migration effort accomplished with the help of the JBuilder tool.

By making the migration, the site's maintainability has been enhanced, said Stack, using techniques such as connection pooling to the database and the "Bean Tag." A Bean Tag allows Flashline.com to build a page using HTML templates and have access to the all the methods inside a JavaBean component.

Other migrations of the site's underlying technologies are also planned. Chief among them, Stack plans to migrate the back-end Oracle relational database from its current version, Oracle 7.3, to Oracle8. That release supports running Java in the database, which eliminates) the need to write database applications in PL/SQL, Oracle's native database programming language. Besides improving performance, said Stack, the ability to run Java in the database itself should lower operating costs, as the company won't have to keep or hire PL/SQL expertise.

URLs

Flashline.com Inc.
www.flashline.com

Live Software Inc.
www.livesoftware.com

Hewlett-Packard Co.
www.hp.com

Microsoft Corp.
www.microsoft.com

Oracle Corp.
www.oracle.com

Sun Microsystems Inc.
www.sun.com

Cybercash
www.cybercash.com

Inprise Corp.
www.inprise.com

MacroMedia Corp.
www.macromedia.com

books.com
www.books.com



Quantity reprints of this article can be purchased by phone: 717.560.2001, ext.39 or by email: sales@rmsreprints.com.

Featured

Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.