Skip to content
Pixel
العربية

Textbook answers: 3-1 The Overall Structure of Web Applications

Suggested answers by the site team, the book has no answer key.

Try 1

1What is the term for an application used through a web browser?

Show answer

Web application.

A web application is normally used through a web browser (some can also be installed), for example video, shopping, email and map services on the web.

Note: Arabic edition: The English version describes it as used through a browser with no software to install; the Arabic version says "usually" and notes some can be installed. The answer is the same.

2What is the term for the screen component that users see directly?

Show answer

Frontend.

The frontend is the part the user sees and uses in the browser: it displays content and takes what the user types or selects.

3What is the term for the part responsible for server-side processing that users do not see?

Show answer

Backend.

The backend runs on the server, processing requests and applying the app's rules out of the user's sight.

4What is the term for a system that organizes, stores, and manages data?

Show answer

Database.

The database (data layer) organises, stores and manages data and provides it when needed.

Try 2

(1)When searching for a product on an online shopping site, which of the following is responsible for searching through data for products that match the search keywords?

  • A - Frontend
  • B - Backend
  • C - Database
Show answer

B: the backend.

Following the book's steps, the backend processes the search request and asks the data layer for products matching the search phrase, so it is responsible for the searching. C can be argued because the products are stored in, and returned by, the database, hence medium confidence; but "responsible for searching" points to processing, which is the backend's role.

This question allows more than one reading

Note: Arabic edition: In step 3 the English edition says the backend "searches the database" and the Arabic says it "asks the data layer"; both wordings support choosing the backend.

(2)For each of a–f, indicate which tier of an e-commerce site it belongs to: A Frontend, B Backend, C Database.
a Product listing page
b Stock checking processing
c Storage of customer information
d Cart screen
e Payment processing
f Storage of order history

  • A - Frontend
  • B - Backend
  • C - Database
Show answer

1 A (frontend), 2 B (backend), 3 C (database), 4 A (frontend), 5 B (backend), 6 C (database).

Pages and screens (product page, cart) are frontend, processing (stock check, payment) is backend, and storage (customer information, order history) is database. In the Arabic edition the backend "sends payment requests and handles their results".

Exercise 1

1Cover the Point! section with a red plastic sheet and quiz yourself in your notebook in numerical order.

Show answer

Cover the Point! / «ملحوظة مهمة» section (numbered points 1–4), answer the questions from memory, then uncover it and check your answers.

Actually write your answers before checking, and anchor each tier with a short phrase: frontend displays and collects, backend decides and processes, data layer stores and retrieves. Revisit whatever you got wrong and test yourself again later.

Note: Arabic edition: The English version says to cover the Point! section with a red plastic sheet; the Arabic says to answer without looking at the «ملحوظة مهمة» section, then review. Same idea.

Exercise 2

1Read the following passage and answer each question.
A web application is broadly composed of three tiers. The screen component that users see directly is called the ( a ). The part responsible for server-side processing that users do not see is called the ( b ). A system that organizes, stores, and manages data is called the ( c ). In response to user actions, these three tiers cooperate to perform processing.
1. Fill in the blanks (a)–(c).

Show answer

(1) frontend, (2) backend, (3) database (data layer).

The interface the user sees and uses is the frontend, the part running on the server and processing requests is the backend, and the tier that keeps and provides data is the data layer.

Note: Arabic edition: Blanks are numbered (1)–(3) in the Arabic version and (a)–(c) in the English; the Arabic frames it as a simplified model.

Exercise 3

(1)For each of a–f, indicate which tier of an SNS it belongs to: A Frontend, B Backend, C Database.
a Timeline screen
b Processing that determines the audience for a post
c Storage of post data
d Post screen
e Notification processing
f Storage of follow relationships

  • A - Frontend
  • B - Backend
  • C - Database
Show answer

1 A (frontend), 2 B (backend), 3 C (database), 4 A (frontend), 5 B (backend), 6 C (database).

The timeline and post screens are what the user sees, choosing the target audience and handling notifications are server-side decisions, and post data and follow relationships are kept in the database, exactly as in the book's table.

(2)From the following options (A–D), choose the one that most appropriately describes the three-tier architecture of a web application.

  • A - The frontend has the role of storing and managing data.
  • B - The backend is the part that users interact with directly on the browser.
  • C - In response to user actions, the frontend, backend, and database cooperate to perform processing.
  • D - The database has the role of displaying screens to users.
Show answer

C: In response to the user's actions, the frontend, backend and database cooperate to carry out the processing.

A is wrong because storing data is the database's role, B is wrong because what users interact with is the frontend, and D is wrong because showing screens is the frontend's role.

Exam-style question

Explain how the three tiers of a web application cooperate when a user posts a photo on a social media app. Refer to: the role of the frontend, backend, and database. [6]

Model answer

When a user posts a photo, the three tiers cooperate like this:
• Frontend: shows the post screen in the browser and takes the photo and caption the user entered. [1]
• It then sends the photo and caption to the backend as a request. [1]
• Backend: runs on the server, processes the request and applies the app's rules, such as checking that the user is logged in and choosing the post's target audience. [1]
• It then asks the database to store the post. [1]
• Database (data layer): stores the photo and post data, and provides them later when followers open their timeline. [1]
• The result returns to the backend, which prepares and sends it, and the frontend shows the published post to the user: the request travels through the tiers and the result comes back the same way. [1]

Back to the lessonStart exercises