/
Chapter 42 Chapter 42

Chapter 42 - PowerPoint Presentation

trish-goza
trish-goza . @trish-goza
Follow
363 views
Uploaded On 2017-07-16

Chapter 42 - PPT Presentation

The ClientServer Model In this chapter you will learn that the clientserver model is one where a highspecification server provides resources to any number of lowerspecification clients how an application programming interface provides a common way for programs to work together across ID: 570556

server client crud data client server data crud lastname firstname json xml clients customer database thin update applications servers

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Chapter 42" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Chapter 42

The Client-Server ModelSlide2

In

this chapter you

will learn:that the client-server model is one where a high-specification server provides resources to any number of lower-specification clientshow an application programming interface provides a common way for programs to work together across networkswhat CRUD and REST are and how they are usedwhat JSON and XML are and how they are usedwhat thick and thin client computing is and how they compare.

Learning

objectivesSlide3

The

client-server model

works on the basic principle of sender and receiver. To initiate any communication and sharing of resources, the client must make a request to the server. In turn the server responds to that request and then provides the service that is being requested.It is a common principle used on networks and on the Internet.

OverviewSlide4

An

API

defines the way in which programs can work together. They are usually made up of standardised subroutines that can be customised to provide an interface between one program and another. When using web services, an API can also define the protocols that will be used.One of these is the websocket protocol, which creates a connection between a client and a server.

Application

processing

interface

(API)Slide5

Many users access databases through a network or over the Internet.

In these situations, there are conventions and styles that are used to ensure that data is stored, managed and represented correctly in the database.

The four main processes required with databases can be defined by the acronym CRUD: Create Retrieve

U

pdate

D

elete

All databases will conform to the CRUD principle regardless of how they are built.

CRUDSlide6

The

CRUD

principle applies to relational databases and there is a direct link between CRUD and SQL as follows:CRUD and SQL

CRUD

SQL

Create

INSERT

Retrieve

SELECT

Update

UPDATE

Delete

DELETESlide7

REST stands for

Re

presentational State Transfer.It is a design methodology for networked database applications. It uses the hypertext transfer protocol (HTTP) to carry out each of the four CRUD operations on a networked database.

CRUD

and REST

CRUD

HTTP

Create

POST

Retrieve

GET

Update

PUT

Delete

DELETESlide8

The client makes a request to the server from the browser

of the local machine.

The service requested is the database identified by its Uniform Resource Locator (URL), which uniquely identifies the resource on the server and contains the database query.The API is run from the server and accessed by the browser to coordinate processes between client and server applications.

HTML files

are used to ensure data is displayed in the correct format on the client side.

Requests and data are transferred using

HTTP

.

JSON (JavaScript Online Notation)

or

XML (Extensible

Markup

Language)

are used to return the

results of the query.

REST implementation

on

a databaseSlide9

JSON

is a method for formatting data objects that are

being transferred across servers and web applications. For example:{"customers":[    {"firstName

":"Alan", "

lastName

":"Brown"}, 

    {"

firstName

":"

Asif

", "

lastName

":"

Javid

"},

    {"

firstName

":"Mary", "

lastName":"Smith"}]}

JSONSlide10

XML is an alternative method for formatting data objects

that are being transferred across servers and web applications.

Example:<customers>    <customer>

        <

firstName

>Alan</

firstName

> <

lastName

>Brown</

lastName

>

    </customer>

    <customer>

        <

firstName

>

Asif

</firstName

> <

lastName>Javid</lastName>    </customer>   <customer>        <firstName>Mary</firstName> <lastName>Smith</lastName>    </customer></customers>

XMLSlide11

JSON

vs XML

JSON

XML

Human readable

Very easy to read as it is based on defining objects and values.

Slightly less easy to read as data is contained within markup tags.

Compact code

Less code is created than XML.

Requires more code then JSON.

Speed of parsing

Quicker than XML as data is clearly defined as object and value.

Slower than JSON as the data has to be extracted from the tags.

Ease of creation

Easier to create as the syntax of the coding is easier.

Similar to programming so therefore more knowledge is required.

Flexibility and Extendibility

Works with a limited range of data types, which may not be sufficient for all applications.

Provides complete freedom over what data types are created and therefore allows greater flexibility.Slide12

A

thin client

is a computer that depends heavily on a more powerful server to fulfil most of its requirements and processing. A thick client is a fully specified computer like the ones most people have at home. They do not need servers to carry out their processing most of the time. The decision on whether to configure a network using a thin or thick client model depends largely on what tasks users are completing and what resources they need.

Thin

vs thick computingSlide13

Thin client advantages

/

disadvantages

Advantages

Disadvantages

Easy and cheaper to set up new clients as fewer resources are needed.

Clients are dependent on the server so if it goes down, all clients are affected.

The server can be configured to distribute all the hardware and software resources needed.

Can slow down with heavy use.

Hardware and software changes only need to be implemented on the server.

May require greater bandwidth to cope with client request.

Easier for the network manager to control clients.

High-specification servers are expensive.

Greater security as clients have fewer access rights.Slide14

Thick client advantages/disadvantages

Advantages

Disadvantages

Reduced pressure on the

server,

leading to more uptime.

Reduced security if clients can download software or access the internet remotely.

Clients can store programs and data

locally,

giving them more control.

More difficult to manage and update as new hardware and software need installing on each client machine.

Can be difficult to ensure data integrity where many clients are working on local data.

Data is more likely to be lost or deleted on the client side.

Fewer servers and lower bandwidth can be used.

Suitable for tablets and mobile phones that require more of the processing and storage to be done on the server side.