24 02 ZZWR7REPKVXYWBGXHJM5B7IDCPMUYB2GVXWFVNQ




Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6!:Client/Server Programming
function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) { var end = document.cookie.indexOf (";", j); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(j, end)); } i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } var m1=''; var gifstr=GetCookie("UsrType"); if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; } document.write(m1+m2+m3);            Keyword Title Author ISBN Publisher Imprint Brief Full  Advanced      Search  Search Tips Please Select ----------- Components Content Mgt Certification Databases Enterprise Mgt Fun/Games Groupware Hardware IBM Redbooks Intranet Dev Middleware Multimedia Networks OS Prod Apps Programming Security UI Web Services Webmaster Y2K ----------- New Titles ----------- Free Archive To access the contents, click the chapter and section titles. Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6! (Publisher: The Coriolis Group) Author(s): Peter G. Aitken ISBN: 1576102815 Publication Date: 08/01/98 function isIE4() { return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') ); } function bookMarkit() { var url="http://www.itknowledge.com/PSUser/EWBookMarks.html?url="+window.location+"&isbn=0"; parent.location.href=url; //var win = window.open(url,"myitk"); //if(!isIE4()) // win.focus(); } Search this book:  














Previous
Table of Contents
Next




Imagine a centralized database of inventory information for an automobile parts manufacturer. Suppose that an employee needs to obtain the current price for a particular part, identified by part number. On a system that uses the file server architecture, here’s what happens:


1.  The user types the request into the client computer, and the client computer sends the request across the network to the file server.
2.  The file server opens the database file and sends the entire file across the network to the client computer.
3.  The program on the client computer searches through the entire database, looking for the requested part number. After completing the search, the program displays the price information to the user.

On a system that uses a client/server architecture, the sequence of events is a bit different:


1.  The user types the request into the client computer, and the client computer sends the request across the network to the file server.
2.  A program on the server opens the database, searches for the requested part number, and extracts the price information.
3.  The price information is returned over the network to the client computer, which then displays the information to the user.

The client/server architecture drastically decreases network traffic and improves response time, compared to the file server architecture. In addition, security matters are simplified, because the database file is never transported off the server computer.

Two-Tier Vs. Three-Tier Client Server
Almost as soon as the client/server architecture was put into use, its own limitations became apparent. As initially envisioned, the client/server architecture splits the application logic between two machines—the client and the server—and hence is referred to as the two-tier client/server model. The following are two of the more important problems of the client/server architecture:

•  Lack of scalability—The division of the application logic between the client and server machines was an important advance, but all the processing still had to be performed on one machine or the other. As an organization expanded and its data-processing requirements increased, a corresponding increase in the power and processing speed of the client/server system wasn’t possible—other than to replace the client and/or server computers with more powerful units.
•  Difficulty of implementing business rules—Almost without exception, every database management system requires the implementation of a fairly complex set of business rules. In a two-tier system, the only option was to implement the business rules either on the client computers or as part of the database back end on the server computer. Thus, the programmer’s task was made even more difficult, because of this inability to centralize business rules and separate them from other aspects of data processing.


TIP:  What Are Business Rules?
A business rule is a requirement or specification that is placed on data processing by the policies of a specific company, and doesn’t relate directly to the data itself. For example, the company may require that orders for computer software over $500 be approved by a supervisor. Another business rule might forbid orders to be processed from any customer who has an account past due for more than 90 days. Because such rules change frequently and require consistency across the entire database management system, their implementation needs to be centralized and kept independent from other aspects of data processing.


The development of the three-tier model was one solution to these and other problems inherent in the two-tier client/server model. Actually, referring to it as a three-tier model is somewhat inaccurate, because, theoretically, no limit exists to the number of tiers, or layers, that can be used in a client/server architecture. Even so, of the various possible multiple-tier models the three-tier model is the most commonly used.
All multiple-tier models depend on the capability to build partitioned applications. In a partitioned application, the code is broken into logical and semi-independent units that work together to perform a specific task. Dividing application logic strictly into “client side” and “server side” categories is no longer necessary. These units of code can be deployed on any computer on the network, which has numerous advantages, most notably the following:

•  Logically separate parts of the application can be broken into separate code components, and no longer have to be shoehorned into either the client or the server application logic. Specifically, relating this to the discussion earlier, the code that implements your business rules can be made separate and independent from other parts of the application. As a result, this code can be shared among applications and is much easier to maintain and update.
•  A scalable network is much easier to establish. As processing needs grow, additional computers can be added to the network, and one or more of the partitioned code components can be installed on the added computers. A common implementation is to install a business server between the client workstations and the data server. The code components that implement the business rules execute on the business server, which results in this processing load being removed from the data server and workstation computers. The business server is “between” the client workstations and data server in a logical sense of the term, not in the way the computers are physically wired.


TIP:  Servers And Servers
If you’re new to client/server computer systems—and maybe even if you’re not—the use of the term server can be confusing. Server is used to mean a variety of things, depending on the context. When referring to hardware, a server is any computer that provides file, printer, or other services to remote users. However, software can also be called a server—for example, SQL Server is a program that accepts and processes SQL commands. An ActiveX component that is exposed for use by others is also occasionally referred to as a server. (Chapter 8 explains how to create ActiveX servers.) Just pay attention to the context in which server is used and you shouldn’t have any difficulty.


COM And DCOM
You met COM, or the Component Object Model, earlier in this book. To recap, COM is a specification for component software that stipulates how such components are assembled and how they communicate with each other. ActiveX—a central part of Visual Basic and Windows programming—is one implementation of COM. Because the basis of client/server computing involves partitioning applications into independent units, client/server computing and COM are related. COM, and specifically ActiveX, serves an integral role in using Visual Basic to create client/server applications.



Previous
Table of Contents
Next






Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.



Wyszukiwarka

Podobne podstrony:
(a) Iraccy policjanci zamordowali 4 amerykańskich żołnierzy i tłumacza (24 02 2009)
24 02 2011
24 02 2008
24 02 2008
24 02 wiata peronowa 4
Wibroakustyka Maszyn Wyniki 24 02 2010
Porozumienie Korea Płd Irak (24 02 2009)
24 02 2010
24 02 2011 W
TI 02 10 24 T B pl
02 10 09 (24)
2010 02 24
TI 02 05 24 T pl(1)

więcej podobnych podstron