Advanced Visual Basic
Total Page:16
File Type:pdf, Size:1020Kb
Advanced Visual Basic Course Designer and Acquisition Editor Centre for Information Technology and Engineering Manonmaniam Sundaranar University Tirunelveli Client / Server Lecture - 1 Client /Server Objectives In this lecture you will learn the following About Client About Server About Client / Server computing Client / Server Model Centre for Information Technology and Engineering, Manonmaniam Sundaranar University 1 Advanced Visual Basic Lecture Unit - 1 1.1 Snap Shot 1.2 Client 1.3 Server 1.4 Client/ Server Computing 1.5 Client/Server Model 1.6 Short Summary 1.7 Brain Storm Lab unit 1 - ( 2 Real Time Hrs ) 2 Centre for Information Technology and Engineering, Manonmaniam Sundaranar University Client / Server 1.1 Snap Shot Any time two computers are involved in the mutual performance of executing an application, with each performing a different function, you are undoubtedly looking at a client/server application. Many definitions of client/server are used. A definition of client/server application is an application that has a client interface and that accesses data on a remote server. The work is distributed between the client system and the remote server system, based on the capabilities of the client and the system and the remote server system, based on the capabilities of the client and server software applications. Client/server systems usually are efficient because network traffic is minimized and each portion of the application is optimized for a particular function. 1.2 Client A client may be either a device or a user on a network that takes advantages of the services offered by a server. Client is often used in a loose way to refer to a computer on the network. It also refers to a user that is running the client slide of a client/server application. The Client area of a window is where end users enter data. Formally, the client is the region of a window that doesn’t include the title bar, menus, toolbars, status bars or window borders. In Visual Basic, the width and height to the client area can be determined by examining the value of a form’s Scale width and Scale height properties, respectively. 1.3 Server A server is a network-connected computer system that provides services to network users. Servers may be a file server, application server, database server, e-mail gateways and communication server. These systems run network operating systems such as Novell Netware, Windows NT or a version of UNIX OS. You can use VBScript to create Active Server Pages(ASP) in order to create logic that enables IIS to respond to various input from client computers. Also, you can use Visual Basic to create custom ActiveX components designed to work as extensions and enhancements to the IIS environment. These components are called server –side components. 1.4 Client / Server Computing Client / Server computing defines an architecture for designing programs that distribute their processing load between a client computer and a server computer Centre for Information Technology and Engineering, Manonmaniam Sundaranar University 3 Advanced Visual Basic and sharing the processing load between two. The client requests services, and the server provides the requested services. In contrast to the file-sever environment, the server in this environment is responsible for intelligent service to the client. The client does not request data at a file level, but sends a request to the server to execute a query and return specific records. This is a vast improvement over the file-server approach. The following figure 1.1 shows typical Client-Server configuration. Figure 1.1 A typical Client-Server configuration. Client side versus server side If you write a program that resides and executes on a client computer, that program is called a client-side program. If you create a program that runs on a Internet server, that program is called a server-side program. Microsoft Word is considered a client- side program. Yahoo Search, a program that searches for articles on the Web, is a sever-side program. 1.5 Client / Server Model Architecture that splits an application into a front-end client component and a back- end server component. The client component running on a workstation gathers data from the user, prepares it for the server, and issues a request to the server. On the back end, the server waits for requests from its clients. When it receives a request, the server processes it and returns the requested information to the client. The client then presents the data to the user through its own user interface. 4 Centre for Information Technology and Engineering, Manonmaniam Sundaranar University Client / Server 1.5.1 Two – Tier Client/Server Model The client communicates directly with the server with no intermediary. The limitation of this model is not easily scalable. If the server becomes over taxed by client traffic, the usual solution is to upgrade the server hardware to a fast processor with more memory. However, there is an upper limit to how fast the processor can be 1.5.2 Three – Tier Client /Server Model Three – tier client/server design is frequently used in Internet applications. This increases the scalability of the application. An example of this three-tiered can be seen with a Web page that accesses a database on the server. Frequently, the database is on a different server than the Web server. This allows the distribution of the load over multiple systems. It also creates scalability. If the database activity becomes a bottleneck for the application, the database activity can be distributed over multiple servers. If the Web server becomes the bottleneck, the Web server can be distributed over multiple servers. There are other uses of the three-tiered client/server model, including the following two very useful designs. The first design has a middle tier that provides an Online Analysis Processing data warehouse that is extracted from the base layer of operational databases. The second design makes use of a middle tier to enforce business rules. This separate layer for business rules makes the maintenance of the business rules much easier and less disruptive. 1.5.2.1 Three-Tiered Applications To use Remote Data Service technology, you must understand the three-tiered client/server model. This model separates the various components of a client/server system into three "tiers": • Client tier—a local computer on which either a Web browser displays a Web page that can display and manipulate data from a remote data source, or (in non– Web-based applications) a stand-alone compiled front-end application. • Middle tier—a Microsoft Windows NT Server computer that hosts components that encapsulate an organization's business rules. Middle-tier components can be either Active Server Page scripts executed on Internet Information Server, or (in non–Web-based applications) compiled executables. • Data source tier—a computer hosting a database management system (DBMS), such as a Microsoft SQL Server database. (In a two-tier application, the middle tier and data source tier are combined.) Centre for Information Technology and Engineering, Manonmaniam Sundaranar University 5 Advanced Visual Basic These tiers don't necessarily correspond to physical locations on the network. For example, all three tiers may exist on only two computers. One computer could be a Microsoft Windows 95 computer running Microsoft Internet Explorer 4.0 as its browser. The second computer could be a Windows NT Server computer running both Internet Information Server and Microsoft SQL Server. Designing applications this way gives you greater flexibility when deploying processes and data on the network for maximum performance and ease of maintenance. 1.6 Short Summary ) Client request a server for its service ) Server waits for a client to be connected and serves them as soon as they are connect ) Distributes the processing load between the client and the server ) Network architecture can be two or three tier architecture 1.7 Brain Storm 1. With an example explain how a client / server application works ? 2. Differentiate Client Server Application over Stand alone application 3. With an example explain how a client / server works 4. How to process the Two tier & Three tier model? Lab Unit - 1 (2 Real Time Hrs) 1. Open a new standard EXE project 2. Design your form as shown below 3. Result should be displayed depending upon the button pressed. 6 Centre for Information Technology and Engineering, Manonmaniam Sundaranar University Get into Visual Basic 6.0 Lecture - 2 Get into Visual Basic 6.0 Objectives In this lecture you will learn the following About Features of Visual Basic6 New Object Oriented features Under About Integrated Development Environment How to develop a script in Visual Basic Centre for Information Technology and Engineering, Manonmaniam Sundaranar University 7 Advanced Visual Basic Lecture unit - 2 2.1 Snap Shot 2.2 Features of Visual Basic 6 2.3 Integrated Development Environment 2.4 Basic Scripting in Visual Basic 2.5 Short Summary 2.6 Brain Storm Lab unit 2 ( 2 Real Time Hrs ) 8 Centre for Information Technology and Engineering, Manonmaniam Sundaranar University Get into Visual Basic 6.0 2.1 Snap Shot Visual Basic is the fastest and easiest way to create applications for Microsoft Windows. Visual Basic provides complete set of tools to simplify rapid application development both for the experienced professional and new Windows programmers. In the name Visual Basic - the "Visual" part refers to the method used to create the graphical user interface (GUI). Unlike many languages which requires numerous lines of coding to describe the appearance and location of interface elements, Visual Basic provides pre-built objects that can be used to form the Graphical User Interface (GUI). Note : The elements that can respond to the user actions such as mouse click, double click, drag, drop etc.