
by Azam A. Mirza
The last two years or so have been an exciting time to be a software engineer. The Internet has had a profound effect on the computing world. Not only have we seen a shift in the way we perceive computers and how they affect our lives, but we have witnessed a transformation in the way organizations view their core businesses and how computers and the Internet play a role in bringing them into the information age.
The Internet has brought a number of technologies, tools, and languages to the forefront of the computing world. For example, the TCP/IP protocol has become the de facto standard for networking across the globe. The HTTP and HTML protocols have been widely accepted and embraced as the mechanisms for information dissemination across the World Wide Web. The SMTP protocol is fast becoming the standard for global communications through electronic mail. The list goes on and on.
The software development principle has not been insulated from the sweeping changes being experienced by the computing world. The World Wide Web has changed the way we design, build, deploy, and use applications. The web has made it necessary for programmers to pay attention to the client browser and the web server as important and necessary ingredients when developing future applications.
This chapter discusses the issues involved with client/server development in I-net environments and the evolution of application development from the mainframe-based monolithic applications, to the various flavors of client/server architectures, to the newly introduced I-net application development paradigm. This chapter explores the pieces that together provide a solution for building I-net applications and how each piece of the puzzle fits into the application development process. n
Deciding what software to put on the client system and what to put on the server is crucial for the success of an I-net project. Performance, security, and upgradeability are three of the key areas that affect software placement. Additionally, if you want to store user preferences, you need to decide where to put the functionality, on the client or the server.
The response time of the system to the user can be important in having effective software. Putting unnecessary elements on the server will slow the speed of the response by virtue of sending data through network traffic, waiting for the server to validate the data, and then sending a response. Validating data on the client system whenever possible can save much in the response time of the system. This does not mean validating passwords, but rather checking to make certain that all required data is present and maybe doing some simple computations. For example, if you were designing a system where the user can purchase goods, perhaps you would have the client software compute the total and display it to the user without ever going to the server. The user can make a more informed decision more quickly, and the server does not have to continually receive data, do simple processing, and send the data back.
Keeping the database on the server side is a logical way and, most of the time, the only way to design a system. Sending the client a copy of the database would be time-consuming, and it would be difficult to keep the client copy of the database in sync with the server copy.
This scheme for preserving the performance of the system also helps to conserve server resources by reducing the server load. Additionally, it is important to curb the traffic over the network.
By the same token, it is best for some processing to be done on the server. Anything requiring password validation should always be done on the server. Password validation on the client would be impractical and dangerous. The client machine would have to have access to viable passwords, and an unscrupulous user could gain unauthorized access to the server.
In addition, servers provide a physically secure location for storing sensitive user data and important files. It is much easier to isolate a server in a secure location than to do so for a lot of client machines.
One other area to consider when designing a system is the upgradeability of the system for the future. Putting certain components on the client machine can cause the need to upgrade every client machine when a software change needs to be made. For example, if you decide that every machine needs to have an ActiveX control to handle certain processing, then the control needs to be downloaded or installed on every machine. Later, when you decide that the control is not meeting requirements and needs to be changed, the control again must be installed on every computer. If you had put the processing on the server, you would need to update the software in only one place.
The following are some guidelines summing up where the functionality should be placed, on the client or the server.
For the client:
For the server:
User preferences are settings that allow a web page to be tailored to a specific desire. For example, if you are browsing a page displaying the current stock market prices, perhaps only the stocks that you are interested in are displayed.
Where to store the information concerning user preferences can be an important and difficult decision. There are two main choices to make: Either the user has to log in, or the data has to be kept on the client computer.
TIP: The Yahoo! Finance web site (quote.yahoo.com) uses a server-side database to store user preferences and portfolio information. It requires users to set up a login ID and password to access the user preference information.
If the user is required to log in to the system, user preferences could be stored in a server-side database. This is particularly crucial if the information should be restricted to only particular users. For example, in a corporate intranet, the president of the company could have a page tailored to show confidential information, and another employee would not have access to the same information.
You can set up client-side preferences in two ways: You could write a client-side component, or, more commonly, you could use magic cookies.
If the security of the data is not an issue, magic cookies can be a solution to custom-tailoring web pages. The type of user preferences considered here are the layout of the web page and what non-confidential data should be displayed. Magic cookies or cookies are information that can be stored on the client machine. The following are some problems with cookies that developers should be aware of:
TIP: Cookie files typically reside on the user's system in the directory c:\<Systemroot>\Cookies, for example, c:\winnt\cookies. A cookie file is a data file usually with the .DAT extension that stores information in a binary format.
With all these problems with cookies, why should you use them? The typical user will use a single browser on a single computer and will not edit cookie files. Cookies are extremely useful in maintaining state.
Cookies can be comfortably used to maintain information about where the user has accessed information. For example, when a user accesses http://ESPN.SportsZone.com/nfl/index.html, a survey is often displayed. When the user fills out the page, a cookie is set, and then the page is reloaded. Instead of displaying the survey, the new page displays the results. If you had blocked the cookie from being set, the original page would be displayed. No severe damage would occur to the user or the web site. Similar results would occur if the user deleted, modified, or otherwise interfered with the cookie file. Clearly no confidential information should be stored with cookies.
Client/server computing has long been viewed as a plausible solution for building line-of- business applications. The main benefits of client/server computing were its distributed nature, the utilization of system resources in a more practical manner, and the cheaper cost of deployment compared to the older mainframe environments.
A single mainframe machine meant a single point of failure and inefficient use of system resources. Users performing unrelated tasks were forced to share the same system resources. Scalability was an issue because reaching the limits of the mainframe processing power resulted in upgrades to a costlier and bigger machine. Figure 10.1 shows the typical architecture of a mainframe environment.
FIG. 10.1
The mainframes handled all processing chores, and the clients used terminals to
access online resources.
In contrast, client/server computing provides a flexible architecture for building a corporate infrastructure. By breaking up the processing chores between several smaller server machines, it is possible to better utilize the resources and processing power of the system as a whole. In addition, the clients are more than just dumb terminals; they are capable of handling many processing and user needs, such as running word processing software, without needing the server to accomplish their tasks. Figure 10.2 shows a typical client/server environment model.
However, client/server computing has its own pitfalls. In many cases, the deployment of multiple server machines within the enterprise resulted in a management nightmare. Rather than deploying and viewing the servers as a single logical unit, they were deployed and used as single, standalone machines, each working individually. Also, client/server environments demanded more sophistication on the part of the users. Users looking for a particular resource not only had to know where the resource was located but also had to know how to connect to it and use it. The client/server environment, for all its flexibility and power, was also a more difficult environment to learn and use.
FIG. 10.2
Client/server computing places a larger burden on the user to determine where
a particular resource is located.
For software developers, the jump from mainframes to client/server software development was just as difficult. In the mainframe world, applications were developed, compiled, and executed on the mainframe. The client's purpose was to provide a session into the mainframe system that could be used to execute applications. Figure 10.3 shows the software development life cycle as it exists in the mainframe world.
FIG. 10.3
The mainframe pro-vides the development and the execution environment for applications
accessed through the client.
With the popularity of the client/server environment, software development became more complex and difficult. Processing was now divided between client machines and server machines. Software developers have to decide where to put the functionality. Application development has become more than just writing code. Developers have to understand the concepts of application partitioning, user interface design, and networking protocols. Deciding where to put the functionality has become just as important as writing the code to implement it. Decisions have to be made to best utilize the processing power of the clients and the servers.
NOTE: For example, an important decision that a developer faces in client/server environments is where to put the database query logic. Should it be implemented using stored procedures or should it be implemented using client-side SQL queries? The correct decision is usually based on the needs and design requirements of the application.
The complexity and difficulty of building client/server applications is offset by the awesome flexibility and power afforded by such an environment. Figure 10.4 illustrates the development life cycle for client/server environments.
FIG. 10.4
Building client/server applications requires making decisions about where to put
the functionality.
Typical client/server development projects include development efforts for building a client user interface and business logic and building and programming a database server. The common term for building database-enabled applications in such a setup is two-tier client/server. Figure 10.5 illustrates the two-tier client/server architecture.
Recent advancement in client/server computing has separated the business logic from the user interface. This is referred to as three-tier client/server architecture. The business logic units are modules that are independent of the client and the server and run on their own, providing a communication mechanism between the database and the client. This separates the client from having to handle logic processing and also insulates the client-side developers from having to program database-specific logic into their programs. Figure 10.6 illustrates the concept of three-tier client/server computing.
FIG. 10.5
Two-tier client/server architecture draws the line between the data-base server and
the client component.
FIG. 10.6
The business logic unit takes care of connecting to the database server and obtaining
data that can then be passed to the client machine for presentation to the user.
Three-tier client/server architectures afford developers more flexibility in building applications. Client-side developers need to worry only about interfacing with the business logic unit and not worry about the functionality of the database back end and how to query the database. They are assured of getting the pertinent data in a format they can handle.
The business logic unit handles formulating the appropriate database queries in response to client requests and talking to the database. Modifications can easily be made to each individual part of the system without having to change any of the other pieces in the system. The main benefit of business logic units is their ability to be developed and deployed once and then accessed multiple times from throughout an enterprise using client machines. The OLE Automation mechanism within the Windows operating system environment provides a mechanism for deployment of business logic units.
The logical extension of three-tier architectures is to develop applications that span multiple tiers. The most common example is the use of component-based software development mechanisms to break down an application's business logic units into multiple pieces that can be distributed throughout an enterprise and provide very specific functionality. Figure 10.7 illustrates the concept of distributed, multitier client/server environments.
FIG. 10.7
Distributed client/server environments place processing needs where they can best
utilize the available processing power.
By distributing components throughout machines in an enterprise, multitier architectures better utilize the processing power available. In addition, upgrades and enhancements to a particular component within an application can be carried out without having to reinstall the whole application on every client machine. Developers can replace the one instance of the component wherever it resides on the network, and all client machines using the component will instantly receive the upgraded functionality.
See Chapter 21, "Creating Distributed Applications."
The I-net architecture model takes the client/server concept to the next level. I-net is just another form of client/server computing that uses the web browser as the client and a web server as the back end in its most basic form. However, the I-net architecture provides significant benefits over client/server computing in terms of application development, deployment, and ease of use. The following section discusses the I-net architecture in more detail.
As the world races to connect to the Internet, an unexpected phenomenon is taking place. Corporations trying to figure out profitable and beneficial uses for this emerging global network have found a way to enhance the power and usefulness of their own internal networks as well. The intranet, a younger and more contained sibling of the Internet, has emerged. The intranet is a scaled-down version of the Internet, not in functionality or features, but in size and scope. Figure 10.8 presents a sample intranet architecture.
Intranets are internal, corporatewide networks based on technology used for the Internet. Whereas the Internet provides corporate networks with connectivity to the global network of networks, intranets enable corporations to build internal, self-contained networks that have important advantages over existing network technologies.
NOTE: I-net is a collective term that refers to the Internet, intranets, and extranets. Extranets are a collection of interconnected intranets.
FIG. 10.8
An intranet can utilize existing resources within an enterprise to provide an I-net
based client/server environment.
The I-net process model, and its network connectivity architecture, holds several major advantages over traditional networking architectures. First and foremost, companies are realizing the cost-effectiveness of the I-net architecture. It is relatively inexpensive to set up an internal I-net environment. The technologies at the core of an internal I-net setup are open, standards-based, and widely implemented. The server software for setting up a World Wide Web (WWW) server, often referred to as a web server, is available from a multitude of vendors such as Microsoft and Netscape. The client workstations use inexpensive and easy-to-use web browser software for connecting to the web server. The networking infrastructure needed for setting up a basic I-net is already in place in most corporations. In addition, with the integrated Internet Explorer browser in the upcoming Windows 98, the familiarity and intuitiveness of this model will increase on the user side.
NOTE: A rapidly growing intranet might eventually place extensive demands on an existing infrastructure in terms of hardware and networking resources and might necessitate upgrades.
Second, I-nets implement a hybrid architecture that brings together the best features of the client/server process model with those of the host-based process model. The I-net architecture is geared towards ease of deployment, centralized control of information, and simple administration of resources. In the I-net process model, the server is responsible for providing information and requested data to the intended users. In addition, the server holds the key to the graphical user interface presented to the user through the client browser software. Client workstations (typically desktop PCs) use web browser software to display information sent by the server. The server controls the layout and content of the information. This makes management and administration of information very reliable because it is centralized.
However, the client is not just a dumb terminal. It does perform operations such as information caching and local storage of information downloaded by the user. In other words, the I-net architecture is a process model that takes the best from the client/server world and combines it with the best attributes of the traditional host-based architecture employed by mainframes and minicomputers.
Finally, an important advantage of I-nets is their ability to bring together heterogeneous systems into a common interoperable network. The corporate world has spent millions of dollars and many years trying to connect disparate and incompatible systems into a seamless network. The results have not been completely satisfactory. Because the I-net architecture was developed from the ground up to be able to connect disparate systems together, it lends itself well to the corporate culture in most organizations where different systems such as PCs, Macs, and UNIX-based workstations must coexist.
FIG. 10.9
The web server provides a single point of entry for all access to back-end application
and database servers.
In terms of software development, the most important and significant benefit of using an I-net environment for building and deploying applications is the capability to create cross-platform applications without the cost of creating and distributing multiple versions of the application. Applications that use the web browser on the client and use the web server as an interface between the browser and the application server, or database server, on the back end generate HTML output that can be viewed by users on any platform that supports a web browser. Figure 10.9 illustrates the concept.
The centralized maintenance and administration of I-net-based applications is another important benefit. The cost of maintenance and enhancements to distributed client/server appli-cations is much greater than the cost of maintenance of I-net applications. Changes made to web-based applications on the server take effect immediately for all users, eliminating the need for individual changes to each and every client machine. I-net applications that take advantage of client-side components such as Java applets or ActiveX controls can utilize the automatic download capabilities of the browser to get a newer version of the component when it becomes available.
NOTE: Microsoft Internet Explorer is an example of a web browser that automatically checks to see if a newer version of a client-side component is available for download and upgrades the component on the client machine. The browser does give the user a chance to either accept or reject the upgrade.
The following sections discuss the various components that come together to provide the functionality for building applications in an I-net environment.
In a typical I-net environment, client workstations use a networked environment to connect to servers that facilitate requests for information and data. At its most basic level, an I-net requires a single web server, a network infrastructure based on the TCP/IP networking protocol, and client workstations running a web browser. At the other end of the spectrum, an I-net can consist of hundreds of web servers and thousands of client browsers located all around the world, connected through a complex array of networking components.
Client workstations can comprise a multitude of machines and operating systems in a large, heterogeneous corporate environment. I-nets provide a means for bringing all these disparate systems together into a cohesive and interoperable network.
In the I-net world, hardware has become a less important factor, with greater emphasis being placed on the software systems running on client machines. Due to companies such as Netscape providing web browsers for multiple platforms, it is not as important to worry about hardware conformity across the organization when dealing with I-net technology. The use of traditional applications and tools should govern client hardware choices. As far as I-net connectivity is concerned, hardware issues have so far been confined to maximizing network throughput through faster connections and the speed and capabilities of the graphical subsystem.
The software components that enable client workstations to connect to and use an I-net environment are
The following sections discuss these client software components, which are used in most I-net implementations.
The web browser is the most basic and common client tool used for accessing web servers. The web browser displays the information retrieved from web servers on client workstations. The web browser has become an important piece of the web software puzzle. The idea of developing applications independent of client considerations has become a reality with the concept of the web browser and web server paradigm. The web browser extends the concept of clients to the next level by providing a standards-based mechanism for accessing information. It uses the hypertext protocol and standard networking mechanisms to accomplish its tasks.
Browsers are clever programs that can interpret information sent by the user in a multitude of ways. They can format and display textual information based on web server directives. In addition, browsers can render graphics, video, and audio information.
Most browsers also have the capability for add-on tools and extensions to be installed and integrated, such as video players, audio players, file and graphics viewers, discussion group and chat facilitators, email clients, and other tools to enhance the basic functionality of the browser.
The marketplace for browsers is heavily crowded with entries from numerous vendors. However, the two most widely used web browsers currently available are Netscape Navigator and Microsoft Internet Explorer. Both browsers are solid products that offer high performance, extensive features, support for industry standards, and in the case of Netscape Navigator, availability on 16 different operating system platforms.
NOTE: With its release of version 4.0 of the Internet Explorer product, Microsoft has significantly closed the gap between the two products. However, Internet Explorer 4.0 is available only on Windows 3.1, Windows 95, and Windows NT, with UNIX and Macintosh support forthcoming. For organizations looking to implement I-net solutions in diverse and heterogeneous environments, Netscape Navigator currently provides the most flexibility.
In addition to the web browser, a client workstation will have tools installed for communications purposes. Most common among these are tools for email messaging systems and for reading and posting to discussion groups. In addition, tools are becoming available for using the multimedia hardware on client workstations (speakers and microphone) to provide digital phone facilities over the Internet. Users can speak to each other using their computers rather than a traditional telephone. There are also tools for providing live feeds of television and radio broadcasts.
These tools can be effectively used to provide users with I-net-based digital phone capabilities, the ability to bring seminars, presentations, and educational training to user desktops, and the ability to provide video-conferencing facilities for users in different geographic locations.
Browsers such as Navigator and Internet Explorer support plug-in additions for enhancing their functionality with third-party tools. Both companies have published specifications for supporting plug-ins. This capability is a powerful mechanism that allows developers to add custom functionality to the browsers.
The Internet Explorer web browser components can be compared to Microsoft's VBX/OCX controls that were introduced through Visual Basic and Visual C++. Microsoft's components are referred to as ActiveX controls, and they are the next generation of OCX controls specifically designed for use in an I-net environment.
See Chapter 8, "Using ActiveX Client Components in an I-net Environment."
In addition to ActiveX controls, both Internet Explorer and Navigator support Java language applets, which are plug-in components, based on the Java language developed by Sun Microsystems. In the short time since their introduction, these two control-building methods have started generating the same kind of industry support that resulted in the huge third-party market for VBX custom controls for Visual Basic.
Although the client has garnered the lion's share of attention in the development community because of its emphasis on the web browser, the Java language, and the support for applets and controls, the most critical component of any I-net infrastructure is the server hardware platform and operating system. The selection criteria for server platforms include the following:
Due to the graphical nature of information being handled by I-net-based networks, performance capabilities of the server hardware are an important consideration. In particular, the hard disk subsystem and the network interface must provide good throughput and reliable operation.
The server platform will house a variety of software components to provide various services to I-net users. Some of the major server components of an I-net architecture are
The following sections describe these server components in more detail. Each of these services can be installed on a single machine or can be spread across multiple machines for better performance and manageability.
The basic software component that brings together the power of I-nets is the web server software. Web server software allows client machines access to information by facilitating information publishing, application execution, and data retrieval.
Most web server software packages such as Microsoft's Internet Information Server (IIS), various Netscape server products, and O'Reilly's WebSite provide a comprehensive set of setup, management, and administration facilities. In many cases, a basic and functional web server can be installed, set up, and made operational within an hour. In addition, all server packages include sophisticated system administration utilities such as the Server Manager utility included with Microsoft Internet Information Server.
Until recently, most web servers stored static information for access by clients. With the introduction of technologies such as Java applets, ActiveX controls, and database access tools, web servers have become more than just repositories for publishing static information. Web servers are now capable of providing such powerful capabilities as user authentication, connectivity to database servers, dynamic web page creation based on user actions, database query resolution, and data encryption. This list is not exhaustive, but is intended to provide an indication of the advances that have been made in the last year or so in the capabilities of web server software.
Microsoft's IIS deserves special mention due to its integration with the Windows NT Server operating system, and with the security subsystem in particular. Because of this tight integration, IIS offers the following capabilities:
See Chapter 13, "An Inside Look at Active Server Pages and Internet Information Server"
The database server is a recent addition to the I-net phenomenon. Most web implementations were using flat files or proprietary systems for storing data and information. However, because most organizations already have large databases installed and operational, it was an obvious choice to use the database as a repository for information being published on the web.
In addition, corporations provide users access to corporate data through applications written to access the databases. If most data resides in existing relational database systems and an organization wants to replace its proprietary applications with I-net-based applications, mechanisms are needed to facilitate the flow of information to and from the database servers and the web server.
Extensions to standards such as ODBC (Open Database Connectivity) and the introduction of standards such as ISAPI (Internet Server Application Programming Interface) have made it possible for web servers to connect to database servers and access corporate data. The connectivity between web servers and database servers provides a means for making corporate data available to users. The traditional client/server database applications are being replaced by web-based database applications. In the years to come, database servers will become an integral part of the I-net infrastructure as more and more database-enabled applications are implemented for use on the I-net platform.
Microsoft provides support for building database-enabled applications with a product such as Microsoft Access or Microsoft SQL Server. Access is a workgroup database designed for small and medium-sized applications with a few megabytes of data at most and a small user base. SQL Server is designed to be the database for the enterprise that can handle large volumes of data and a large number of users. Typical SQL Server database sizes range from a few hundred megabytes to a terabyte with hundreds or thousands of users.
NOTE: Visual Studio 97 includes a Developer's Edition of SQL Server 6.5 for use as part of database-enabled development efforts. This edition is only restricted in the number of client connections it supports from the full retail version.
Communication servers facilitate information exchange between users. They provide functionality for
Communications servers work in conjunction with web servers to provide a seamless means for users to interact with the I-net and with each other. Communications servers also provide secure connectivity through email gateways to the outside world. Users can send and receive email messages to people all around the world using their web browser or other email software package.
Microsoft Exchange Server is the centerpiece of the communication server strategy Microsoft is pursuing. It is a full-blown workgroup, collaboration, email, and discussion group system that scales very well to large amounts of data and user bases.
Search servers, also called search engines, implement powerful search and indexing mech-anisms to provide users with a means for finding information. Over time, an I-net site can become a large and complex collection of published information, structured data, and applications. A well-developed I-net site must enable users to do searches on the information in the system based on their own criteria. Most available search servers allow users to search the system using multiple criteria and to define the scope of their search.
Search servers accomplish their task by cataloging and indexing the information being published on the web site. As new information is added to the web site, a search engine will update its indices to reflect these changes.
The most critical aspect of search mechanisms is the ability to provide search results in a fast, efficient, and error-free manner. Speed becomes an important issue as the size of a web site grows. A well-designed search engine can handle large, complex searches and enhance the usefulness of the information.
NOTE: Search servers are different than search engines such as Yahoo! and Lycos, which provide a searching mechanism for the entire Internet. Search servers are specifically used to catalog a particular web site. For example, the search button on the Microsoft web site uses a search server for user queries.
ON THE WEB:For more information about the Microsoft Search Server, refer to the Microsoft web site at www.microsoft.com.
Multimedia servers provide support for high speed streaming media such as video and audio. Multimedia servers use high-speed links to provide corporate customers access to live or prerecorded multimedia content.
One of the most compelling applications for multimedia servers is to provide support for live audio and video communications. Users can interact with each other through sight and sound rather than using text-based messages.
Another application for multimedia servers is to make it possible for corporations to allow users access to computer-based training classes using audiovisual mechanisms. Users can access video catalogs of seminars and training classes and view them using their browser software or other multimedia clients.
Microsoft NetShow provides support for enabling multimedia capabilities as part of your web site. Microsoft NetShow allows you to develop and present multimedia presentations and live video feeds as part of your web site. The NetShow client is needed to view content developed and broadcast with the NetShow Theater Server.
ON THE WEB:For more information about Microsoft NetShow, visit www.microsoft.com/netshow/.
Proxy servers allow clients connecting to a corporate network to access the global Internet. Proxy servers provide a high-performance, secure, and reliable means for users to gain access to the Internet from within the corporate intranet.
Proxy servers also control access to web servers and other I-net resources. They support mechanisms for providing access to the WWW, FTP, Telnet, and other common Internet protocols. In addition, proxy servers also restrict access to an intranet from the Internet world. In effect, a proxy server is a security tool that polices the bidirectional flow of information between I-net networks.
Microsoft Proxy Server provides support for adding firewall and content-caching abilities as part of a web connection. If you are setting up an Internet connection, Microsoft Proxy Server can provide a secure and cost-effective solution for establishing a secure presence on the Internet.
ON THE WEB:For more information on the Microsoft Proxy Server, visit www.microsoft.com/proxy.
This chapter looks at I-net architecture and how you can utilize I-net technologies to build applications that take advantage of the web browser and web server concept. I-net development is an extension of the traditional client/server environment that utilizes standard protocols and communications mechanisms to store, publish, and disseminate information.
© Copyright, Macmillan Computer Publishing. All rights reserved.