lthough Login Brothers had a history of allowing Customers to order books electronically, it wasn't until the Internet provided an inexpensive means that Ted Berg could put his BBx® genius to work on a true e-commerce application. What Ted, Vice President of Information Systems, has achieved with BASIS products is one set of PRO/5® programs that runs over 100 dynamic Web sites with no HTML code maintenance.
"Once we designed the pages, we don't have to redesign them or use any Web tools or learn much HTML," he says. "All we use are regular, old-fashioned application programs to do data maintenance, and the Web sites change based upon that."
With over 100,000 titles in its warehouse and more than 7,000 Customers, including 3,100 bookstores, 650 academic and special libraries, and 3,400 hospitals and institutions, Login Brothers is one of the largest U.S. distributors of medical, nursing and allied health books and electronic products. Login Brothers has its main site and maintains 120 other sites for its bookstore partners. The approximately $15 million the company does in annual sales comprises both business-to-consumer (B2C) and business-to-business (B2B) transactions.
The company had an electronic system as early as 1983 with which Customers could look at inventory and place orders, dialing in through a modem using ASCII terminals and printers. But in the early 1990s, as Internet technology became more widespread, it became apparent that this was the direction the company should go.
"We wanted to do e-commerce on the Web," Ted says. "But there wasn't much around then. There weren't any tools, so how could I go and write programs to work on the Web? I wasn't sure what to do."
The Transition to BBx
The list of books had to come from the company's BBx files. The three began in a primitive way, with Ted putting different data in string files and running utilities overnight that built the files and put them into other databases, so all the C programs would work.
Order information was captured as a server-side cookie file, and a CGI wrapper, also written in C, was created to execute BBx on the Web. With the CGI wrapper, the server-side cookie would pass order information over to BBx, BBx would execute, the order would be prepared and processed through the whole system, but the next page the Customer would immediately see was the order acknowledgement. Although the inventory data were refreshed each night, the orders themselves were processed in real time. The system went live in February 1995.
Over time, Ted replaced all the C programs with BBx programs to eliminate the coordination work necessary among the C programs, Customers' proprietary databases and Login Brothers BBx data files. The first transition step was to make the program that executed the order program more of a stand-alone application. Then, he rewrote the C structure of the server-side cookie as an ASCII file so that it could be written to in C or written to in BBx. Eventually, all the programs were rewritten in BBx. Then, he rewrote the CGI wrapper in Perl.
Each page is made up of three pieces: an HTML header, which can be customized by each Login Brothers bookstore partner; the footer, which is an ASCII file that has HTML code; and the body of the page, which is essentially the application program, the appearance of which can vary for each bookstore partner.
Bookstore partners also have the opportunity to create announcements, view visitor/order statistics, send e-mail and manage their end-users' information all from within www.lb.ca. Essentially each unique partner site resides on Login Brothers' server and Login Brothers provides order processing and fulfillment for each partner on their behalf - all via private labeling for that partner.
The login and home pages are a little bit different from the rest of the site in that they are HTML templates that Ted created. At the login page, a BBx program analyzes whether a visitor's browser supports cookies. If so, it will remember the visitor's login next time at the visitor's discretion. The login and home pages use custom tags to display dates, inventory totals and an assortment of books from the BBx database. From then on, every other page on the site is created by BBx. "Although if you view the source you'll see HTML, none of it really exists permanently," Ted says. "They're all Business Basic programs that create the HTML on the fly."
The entire application is a few BBx programs and a handful of call routines. BBx has the advantage of allowing a call routine to be an external subroutine that modifies the HTML in real time. "Think of a call routine as a programming object," Ted explains, "and if you do that, our site is primarily made up of about two dozen routines that are simply reused all the time."
For example, on the home page, the name of the book, the publisher and the book description all come from a single call routine. The bookstore partners can log in and pick which books they would like displayed on their individual sites, but all the sites use the same template and the same call routine that plugs in the title's information. Partners simply fill in forms to pick their lists. The forms are written to the BBx files and the files are read when the pages are displayed.
Ted has set up the site to track visitors, which on any given day can be between 500 and 1,500 unique visitors. The system assigns an internal identification to each by means of a client-side cookie that points to a file in the order system. Because data is written directly to a server file, nothing more than a cookie is being sent back and forth over the Internet. Therefore, speed is greatly enhanced. Also, Ted adds, there is no limit to the amount of data he can store in the file. As a visitor wanders through the site, the system knows exactly where he or she is, tracking the visitor's path. A click of the Buy button and a book is placed in the visitor's shopping cart.
For ease of use and accessibility, the inventory database is displayed in sets of 25 books. As a visitor browses the inventory database, search results are returned in these sets of 25. Using tags in the server-side cookie file, the system tracks where visitors are and logs the information. So visitors can browse individual titles or view their purchases while the system "remembers" the last search-results screen and can return visitors to the last data set they were browsing.
Visitors can also read an outside company's review of individual titles. Ted has added Java script to the BBx routine to connect to the other company's Web server, almost immediately bringing the visitor into the other company's Web site to the page with the review.
Also, with a single parameter file, customized discount structures for Customers are built in, so as the main Login Brothers site recognizes individual Customers, the system will calculate a Customer's discount when it displays a book and its price for that Customer.
The system contains seven years of history on Customers' purchasing patterns, returns, etc. A Customer such as a bookstore partner can log in, enter any book ISBN, and the system will:
Customers can also query their sales histories with date ranges and, using Synergetic Data Systems' MailCall, a BASIS Solution Partner product, distribute the reports via e-mail.
After the initial launch of the site and up until this year, it was just Ted writing the BBx programs. He now has two programmers working with him to add even more functionality to the site. But because of the template and database structure, maintenance is a breeze. The site completely changes every two weeks, and it takes only one half-time person to do it. "All somebody has to do is fill in a few fields, and the sites are regenerated," Ted says.
This Customer-driven design philosophy permeates how Ted thinks about next-generation features and functionality for the site. Being able to integrate Java objects using BBj™ is an exciting prospect.
"There are certainly a number of cool things I could do if I had that flexibility," he says. As an example, he would like to be able to show Login Brothers' bookstore partners how many different Customers looked at their individual sites on a daily basis over the course of a year. Although Web-log analysis programs exist, Ted says he's not been happy with any of them. He wants to display Customer hit data in graphical formats, such as histograms or bar charts, but there's no simple way to do it now. Once he has BBj, though, he'll be able to use an existing Java applet that creates graphs and just send data to the applet. "It would be so incredibly easy," he says, "it's just not worth trying to develop something like that on my own."
Which is exactly the purpose of BBj: to help developers like Ted leverage new technology to enhance their applications quickly, easily and with a minimum of programming effort.
He's pleased, however, with all he has been able to do with current BASIS products. "I've never seen anybody do all this before," Ted says, adding that in fact, he prefers the flexibility of working with PRO/5 over other Web-development technologies. "It's just far more work with other development tools; they can't do the same things we can do in Business Basic," he explains. "Because we're working with a programming language, there are no limitations. We can make anything work."