OCR A-Level Computer Science H446
Processors: Structure, Performance and Types
Input, Output and Storage
Systems Software
Applications Generation
Software Development
Types of Programming Language
Exchanging Data
Networks
Web Technologies
Data Types and Number Representation
Data Structures
Boolean Algebra
Legal, Moral, Cultural and Ethical Issues
Elements of Computational Thinking
Problem Solving and Programming
Algorithms
Web Technologies
Server side and client side processing
- 1 thing to know
- Component 01
Overview
Recall questions on client-side and server-side processing, examples of each, their advantages and disadvantages, bypassing client-side validation, why both sides validate, and deciding which side should handle a task.
What you need to know
Answer each one before you reveal it.
Questions from this subtopic
Each one with the model answer underneath.
- 1
Define client-side processing and server-side processing.
Model answer
Client-side processing is work carried out by the user's own device, in the browser, on code the server has sent to it - typically JavaScript acting on the page. Server-side processing is work carried out by the web server before the response is sent, by a program running there with access to the server's files and databases; the browser receives only the result. The distinguishing question is always where the code runs and who controls that machine.
- 2
Give examples of processing that happens on each side.
Model answer
Client-side: giving instant feedback that a required box is empty or an entry is the wrong format, showing and hiding sections of a page, animating and updating the interface, sorting or filtering a small list already downloaded, and simple arithmetic such as updating a displayed subtotal. Server-side: authenticating a login, querying or updating a database, processing a payment, sending an email, generating a page from stored data, resizing and storing an uploaded file, and re-validating everything the form submitted before storing it.
- 3
What are the advantages of processing on the client?
Model answer
It is fast to respond, because there is no round trip to the server, so the user sees the result immediately. It reduces the load on the server, which can then serve more users with the same hardware. It reduces bandwidth, because only small amounts of data cross the network rather than a whole new page for every interaction. It works on data the user has already got, and can keep working when a small interaction would otherwise be impossible. And it makes the interface feel continuous rather than a series of page reloads.
- 4
What are the disadvantages of processing on the client?
Model answer
The user controls the machine, so the code can be read, altered, disabled or replaced, and its results can never be trusted. Behaviour varies with the browser, its version and any extensions, so it must be tested widely. Performance depends on the user's device, so heavy processing is slow on a weak phone and drains its battery. The code and any data it uses must be downloaded first, which costs time on the initial load. And it has no access to central data, because the databases are on the server.
- 5
What are the advantages of processing on the server?
Model answer
It is under the site owner's control, so the code cannot be seen or altered by the user and its results can be trusted - which is what makes it the only place security decisions can be made. It has direct access to the databases and files that hold the site's data. It behaves identically for every user regardless of their browser or device, so there is nothing to test across platforms and low-powered devices are not disadvantaged. It can use as much processing power as the server has, so heavy work is feasible. And a change to the code takes effect for everyone immediately, with nothing to download.
- 6
What are the disadvantages of processing on the server?
Model answer
Every interaction needs a round trip over the network, so there is a delay before the user sees anything and the site feels less responsive, badly so on a slow or high-latency connection. All the work concentrates on one machine, so the server must be powerful enough for peak demand and can become a bottleneck or fail under load. It costs bandwidth, since data must travel both ways for each interaction. And it cannot do anything at all if the connection is lost.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Web Technologies, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.