Client-Server Relationships PDF
Document Details
Uploaded by InstructiveNephrite4861
Universiti Utara Malaysia
Tags
Summary
This document details the concept of client-server interactions and different aspects of client-server architectures. It discusses various aspects, from interaction methods to resources client-side and server-side scripts use.
Full Transcript
SCCVK3013 Concept of Client Server ( Client Side Script & Server Side Script) & Internet Application Objectives Objectives, at the end of this lecture, students will be able to: – Introduce the concept of client side scripts – De...
SCCVK3013 Concept of Client Server ( Client Side Script & Server Side Script) & Internet Application Objectives Objectives, at the end of this lecture, students will be able to: – Introduce the concept of client side scripts – Describe client side scripting language – Introduce the concept of server side scripts Client & Server Clients and servers cooperate to deliver network services – Client: initiates communication – Server: send information's back to client. Web Server & Web Browser In Action 1. Type the URL in Web Browser 5. Close the connection www.google.com www.ahadiar.uum.edu.my 4. Send the information's 2. Sending URL (documents or program) to initiate a connection. Internet Web Browser Server 2. Sending URL (documents or program) to initiate a connection 4. Send the information's 3. Accept incoming connection through specific port..... Client-Server Relationships The relationship between client and server is the fundamental paradigm that determines the characteristics of computer languages on the web. The differences are played out in terms of: 1. How the languages are invoked 2. What resources and information they can access 3. What structures can be manipulated 4. How they interact with the user and system 5. The speed and predictability of their interactions 1. How the languages are invoked: server side languages live on the server and are typically invoked either by – a user pressing a submit button in the client browser HTML which transfers control to the server program along with any name-value pairs in the form associated with the submit button. – a user typing in a URL with the name of the server program optionally followed by a "?" and "name=value" parameters separated by "&"s. For example, http://site.location.type/my.cgi?p1=abc&p2=10 – a user clicking on a Server Side Include element in HTML which points to a server program In contrast, client side programs are initially stored on the server embedded in the HTML code but are transferred to the client browser and operate there for the remainder of the session. They may be activated just by the loading process, by "onLoad" commands, or by user actions such as moving or clicking the mouse. 2. What resources they can access: server side programs operate as normal user programs unless web administrators have imposed restrictions. Thus they can access all user programs, such as graphics and databases, system programs, Unix system variables, and a special set of variables associated with the web, including a limited amount of browser information. In contrast, client-side programs are almost entirely confined to the browser, except for accessing images and other client side scripts from the server, and cookies. However, they have almost full access to the structure and operation of the browser. 3. What structures can be manipulated: server side programs can manipulate any resources on the server that are accessible to any user program, and can also write (but not change) HTML (including embedded scripts), plain text, and images to the browser. In contrast, client-side programs cannot manipulate anything on the server (they can read images and scripts but cannot write or change anything), or the client (except for cookies), except for the browser, where they have a great deal of control. 4. How they interact with the user and system: server side programs cannot manipulate any information on the client browser: they can rewrite a browser image, but they cannot modify an existing one (although they can change the contents of graphic files) In contrast, client programs interact easily with the user, and in the case of DHTML, can move, modify, add, or replace virtually anything in the browser 5. The speed and predictability of their interactions: server side programs can only rewrite a browser page, not change anything on it, so interactions often require a good deal of modem traffic and are subject to the varying loads placed on the server In contrast, client programs can manipulate HTML elements down to the smallest level and are affected only by the activity on the client. Thus interaction is usually very swift, immediate, and predictable. Client-Side vs Server-Side 2 parts of scripting languages: – Client-side scripts for browser(x internet) – Server-side scripts for server(internet) This Photo by Unknown Author is licensed under CC BY-SA-NC How Client Side and Server Side Script Works? Client Side Script – – interpreted or executed by the browser/client – run on the user’s workstation Server Side Script – – interpreted or executed by the Web server Client-Side Scripts Scripts are interpreted or executed by the browser/client Example: JavaScript, JScript, VBScript Can be embedded into HTML documents or contained in separate file Used to validate user input, accesses the browser and enhances Web Pages with DHTML, ActiveX controls and Java applets Processed at the browser, not processed at the Web server– longer downloading time depending on the size Reduces the number of requests that need to be passed to server. Thus reduced server load Browser dependence The browser must support the scripting languages To see CSS, view the source Client-Side Scripts Server-Side Scripts Example: Python, Perl, PHP, Ruby, C#, NodeJS, ASP, ASP.Net, JSP, CGI, etc Provide interactive web sites that interface to databases or other data stores Processed by the server to generate html and return as response to the browser Scripts are embedded in html documents Specialty… – Browser/Client independence – Response time is small – Data retrieved from database, not left at the client – Powerful Server-Side Scripts Link YouTube Link YouTube– Exp. about Client-Server https://www.youtube.com/watch?v=toLnp3P JVVA Concept of Internet Application Objectives – To differentiate the role of client and server. – To explain the process of network application. Architecture for Internet Application Internet Internet Application Application Networked Networked Application Application Support Support Transport Transport Protocol Protocol Network Network Transmission/ Transmission/ Communication Communication Transmission medium Architecture for Internet Application Internet Application Top of the architecture – because they use supports from networked application support layer. Take action to perform organization's function Many examples of applications….. Architecture for Internet Application Networked Application Support 2 sub layers; (1) complete user visible support services, (2) InterProcess Communication File transfer, terminal emulation, file server, database server Sub layer 1 is named so because some of them can straight away be used without having to program. Architecture for Internet Application Transport Protocol TCP/IP, Netbeui, (Systems Network Architecture) SNA, etc… Protocol to be used to transmit ‘messages’ into network, from a network to another, from a segment to another… There are issues…e.g. network size, etc… TCP/IP – supports web server applications, independent, embedded in most products, supported by most protocols at the transmission/communication level Architecture for Internet Application Network Transmission/ Communication Ethernet, token ring, telephone, wireless, etc… Computers must be connected There must be certain standards to follow Client Tier vs Middle Tier vs Information Tier.. Client Tier Browser Middle Tier Web Server. Information Tier Database This Photo by Unknown Author is Client Tier vs Middle Tier vs Information Tier (Cont’) Information tier – Referred to as data tier or bottom tier – Maintains data for application – Stores data in relational database management system Middle tier – Implements business logic and presentation logic – Controls interactions between application clients and application data – Acts as intermediary between data in information tier and application clients Client Tier vs Middle Tier vs Information Tier (Cont’) Middle tier, cont. – Controller logic Processes client requests from top tier Retrieves data from database – Presentation logic Processes data from information tier Presents content to client – Business logic Enforces business rules – Dictates how clients can access application data and how applications process data Ensures data validity before updating database Client Tier vs Middle Tier vs Information Tier (Cont’) Client tier – Referred to as top tier – Application’s user interface – Users interact with application through user interface – Interacts with middle tier to make requests and to retrieve data from information tier – Displays data to user Form Vs Process Vs Database An application consists of three main parts: Form Process Database They play different roles, briefly as described in the previous discussion Form Vs Process Vs Database (cont’) Form Seen on the browser To be filled by the users Need to be designed appropriately – HCI issues Many form elements can help – discussed in the following discussion – Radio button, drop down list, check boxes, text, etc… Form Vs Process Vs Database (cont’) Process Invisible to the users To compute all transactions Need scripts/codes to generate the outputs Server side/client side – depends Interface between user/browser and the database Key to the application Many possible languages Form Vs Process Vs Database (cont’) Database Not intended to view by the users/admin All data management/manipulation done using the forms provided Need to be designed correctly for smart data management and to system successful Compatibility issues To be explained more in later discussion Structured Query Language (SQL) Commands embedded into scripts/codes For certain specific aims – Insert new records, update records, delete records, etc… – Combining tables for certain outputs Powerful and applications have to embed SQL To be discussed further in later discussions XAMPP Web Server Distribution.... Or http://127.0.0.1................ python https://www.python.org/downloads/windows/ XAMPP DONWNLOAD AND INSTALL Xampp 32 Bit https://xamppguide.com/download/xampp-for- windows-32-bit/ Xampp 64 Bit https://xamppguide.com/for-windows/ Xampp Official https://www.apachefriends.org/index.html