In-Depth

E-Biz 101: A Web-Based Computing Primer

Networks were initially used to connect mainframes using dedicated hardware and proprietary software and protocols. The ’80s saw the growth of UNIX servers and the use of TCP/IP, which became an industry standard. In response to servers not adequately scaling to meet the needs of increasing users, some began to shift processing power from centralized servers to the network. The era of client-server computing had begun.

Of course, no technology is without its set of unique problems. Client-server requires that clients possess some "intelligence" not needed for a "dumb terminal." After a time, clients evolved into robust desktop systems containing hundreds of megabytes of memory, gigabytes of local storage, and thousands of dollars in software. As clients grew "fat" they had to be "fed." The amount of time and money spent on maintaining the clients was growing. Standards were difficult enough to enforce without the complication of adding thousands of client systems to the environment. In short, it is high time we start to starve the client.

Web-Based Computing

In brief, Web-based computing is an environment that consists of ultra-thin clients networked over the Internet or intranet. Applications in this environment consist of code on the servers distributed to thin clients containing a browser, such as Netscape Communicator or Internet Explorer; the browser completely defines the user interface.

Web applications are usually written in Java. Java is fully object oriented, contains packages of classes for user interface components, file I/O, math and security. Java is used by every major player in the computing arena, taught in schools, prolific on the Internet, and may become the de facto standard for Web applications.

User interface screens generated by Web applications have to be readable by the current generation of Web browsers. Web browsers read documents that have content marked with tags in accordance with the rules of a tag language. Depending on the tag language, tags may describe the content’s organization (structure), meaning (context) and presentation (style). HTML is by far the most common tag language used to create Web pages. A markup language called XML, more flexible than HTML, is rapidly coming to the foreground of Web-based application development.

Web-based applications require a Web server, which is a piece of software that uses HTTP to deliver HTML or XML pages over the network. Popular Web servers are Apache, Microsoft’s IIS, Netscape Enterprise and Lotus Domino. Web servers essentially consist of server software that is optimized for the generation and transmission of Web pages.

Web-Based Computing Overcomes Problems

If one feature could be called "definitive" for Web-based computing, using an off-the-shelf browser as the user interface is it. Having a single user interface for several applications saves training time and cost; the same browser used at home to access and use the Internet is used at the office for Web-based applications. Of course, having a single user interface saves development time and cost; Netscape and Microsoft have done the hard work already!

Issues dealing with maintaining client applications are supplying the user community with supported software releases, distributing these releases, providing support and, of course, billing for these services. When the client houses a browser, most of these issues become easily manageable. The user community requires only the in-house supported browser release. Distributing, supporting and billing for client software services is greatly simplified.

Many large IS shops are heterogeneous; Wintel, Macs and UNIX boxes coexist on the same network. Having a browser front end helps prevent some problems in dealing with multi-platform shops. There is no need to develop custom widgets for Macs; the browser has taken care of that.

On the server side, software must be written to accommodate browser use in a multi-platform environment. Developed by Sun Microsystems, Java’s slogan is "Write once, run anywhere." Java achieves this boast by compiling into a platform-neutral format called Bytecodes. A separate platform-specific product, called a Java Virtual Machine (JVM), available from the platform or browser vendor, interprets the Bytecodes. In short, the Java programmer need not be concerned with platform-specific details, like byte sizes of primitive data types, because the JVM tends to these details.

Developing Java applications to run on an operating system requires that a JVM and development tools exist for that operating system. Every major player offers a JVM and Java development tool suites. Java Development Kits (JDKs) exist for several flavors of UNIX, Windows 95, 98 and NT, Macintosh, and IBM mainframe operating systems.

Web Application Development

Web technologies, like any multi-tiered technology, fall into one of four categories, or layers: GUI/display, communication, middleware and data. GUI/display technologies include tag languages, such as HTML, Dynamic HTML (HTML version 4.0), XML, script languages, Java use and the usual concerns and issues with creating an application interface. With page content display, tag languages allow developers to place input widgets on Web pages; script languages allow the contents of these elements to be manipulated on the client. Rather than transmit inputs to the server for verification and validation, script languages can perform these tasks on the client. Two popular script languages are JavaScript, developed by Netscape, and VBScript, developed by Microsoft.

A Web application developer can use HTML tags to create entry screens or can combine HTML or XML with style sheets. Style sheets, or CSS (Cascading Style Sheets) Levels I and II, contain style information about display elements, such as font family, style or size. A style sheet gives the Web developer additional control over the display of content on the client entry screens. A developer can use several different style sheets with the same HTML or XML page to get a different look, or use one style sheet with several HTML or XML pages. The Cascade feature implements a rudimentary inheritance mechanism among multiple style sheets, applied to the same HTML or XML page.

Script languages expose the Web page elements to program control. JavaScript, a weakly typed, object-based language, somewhat resembles Java in its syntax. VBScript is very similar to Visual Basic for Applications. Script code is included in the Web page or imported, like a copybook or include file. Web scripting languages are full featured, but lack important features by design. For example, a programmer cannot code a Web script to read, write, create or delete files on the client (except for a special file called a cookie). Also, a Web programmer cannot write a script to tap the client operating system. The watchword here is security: No one wants Web pages to alter client files, launch programs or interact with the client operating system.

A programmer can write Java code called "applets" to execute when a Web page is displayed in a browser. Java applets executing on the client require the browser’s JVM for execution. Much of the showy animations seen on Web pages are programmed in Java. However, a Web developer can create effective Web pages without coding Java applets. Like scripts, Java applets are barred from tapping into the client operating system; the term used to describe Java’s hands-off approach to the client OS is the Java sandbox.

The communication layer of a Web application uses common communication protocols like TCP/IP, and Web-specific protocols like HTTP. Low-level (hardware) data transmission is governed by IP. Once the target machine receives data, TCP usually moves data to the software level. Once the TCP/IP connection is established, application or Web server software communicates via HTTP.

The middleware layer accepts incoming requests from browsers on clients and process them, using the resources provided by the Web server, the machine that the Web server runs on, or by the network of servers and resources that the Web server is connected to. Consider the most basic function of a Web server: distributing HTML or XML files. First, a Web browser requests a given HTML or XML file from the Web server. In response, the Web server will find the given file on the local (or networked) file system and send it back to the browser. Of course, the Web server has at its disposal a whole world of resources above and beyond file systems. Web servers, in fact, are in close contact with all sorts of resources including data stores, applications, business objects, operating system resources, authentication services and more. Encryption technologies, used at the middleware layer, may not be as relevant for company intranets and in-house-developed Web applications as for the Internet.

Server side processing, including HTML or XML code generation, is performed with a variety of technologies. CGI (Common Gateway Interface) is a standard that lays down the rules for running external programs, called Gateways, on a Web server. CGI programs can be programmed in a variety of programming languages, including Java, C/C++ and Perl, a text manipulation language.

ASP (Active Server Pages), a Microsoft technology, is a server-side scripting language that builds HTML pages based on user inputs. ASP is a collection of components manipulated by VBScript (although other scripting languages can be used).

Java servlets tap the full programming power of Java to perform server-side processing tasks. According to Sun Microsystems, a servlet is "a standard approach to extending server functionality, without the limitations of CGI-based or server-specific approaches." Since a Java servlet is stored as bytecodes, the servlet is platform neutral. A Web server needs a servlet API-class library to execute Java servlets.

The most basic part of a Web application is the data itself. All Web applications allow a user to submit instructions on how the Web application should massage a bit of data on the Web server. This might involve creating a shopping cart of products, e-mailing some information to someone or searching a host database. The reformatting of host data for browser display and translation of Web documents for storage is done by middleware software.

The State of Web-Based Computing

Every technology has its share of strengths and weaknesses; Web-based computing is certainly no exception. Not surprisingly, the marketplace is rife with hype over Web-based applications. The IT decision maker, as usual, has to separate the meat from the gristle. The situation is somewhat reminiscent of PC introduction into the enterprise; the users knew about PCs and wondered why these marvelous tools were not present in the workplace. The same could be said about the Internet.

Adding logs to the hype pyre, the marketplace is being flooded with third-party products. The concerned IT decision maker could spend several years evaluating HTML or XML generators, Java code optimizers, Web server sniffers, courseware to "retool" the staff, and, of course, the endless stream of consultants.

Of course, little of Web technology is truly standardized. Microsoft has its product suite for Web development that doesn’t include Java (Microsoft has a Java product offering as well). Microsoft and Sun are in court over Java licensing and compatibility issues. XML is not fully supported in some of the popular browsers. Even HTML version 4.0 behaves differently under Internet Explorer and Netscape Communicator. Other related issues are a lack of standards for efficient (vector) display of graphics on a Web page (several firms have competing architectures), and different scripting languages (Perl, TCL, JavaScript, Jscript, Python, VBScript and PHP, to name a few) that behave differently (or not at all) under different browsers.

On the flip side, customers know of, and many use, the Internet. The IT shop, believing that their organization should sink some resources into exploring Internet related technology, may have an easy sell. As mentioned earlier, Web technologies are taught in schools (Java and HTML are taught in some high schools). IT shops have a fresh batch of Web-savvy recruits to code these Web applications.

Web development tools are inexpensive to purchase. JVMs are free. JDKs often are bundled with other packages. For example, Microsoft Developer Visual Studio comes with a JDK along with C, C++, Visual Basic and other products. Also, Web servers are inexpensive to purchase. The Apache Web server, the most used on the Internet, is a free product. The Microsoft shop running NT 4.0 can download Microsoft’s Web server, IIS release 3.0, for free and is included in the NT service pack 2.

The Internet has an enormous amount of information on Web technologies. The motivated IT professional can download tutorials on nearly every aspect of Web application development. Programmers can download source, join discussion groups and get free newsletters and e-zines sent to their mailbox.

W3C, the World Wide Web Consortium, is a gathering of industry players that represent the closest entity to a standards organization for Web technologies. Their site is at www.w3.org. Here, the latest standards for HTML, XML and CSS levels I and II are published. Also, W3C has an impressive suite of tools, including Web servers, XML structure validators and browsers, available for download.

About the Author: Lou Marco is a writer and consultant with more than 20 years of computing experience. He is currently writing a book entitled Java for the Data Processing Professional, scheduled for publication later this year.

Must Read Articles