Back to the 2024 paper

Module I — Introduction to Web Technologies and Architectures

20247m

Write a short note on any two of the following: (i) DOM (Document Object Model) (ii) Static webpage vs. dynamic webpage (iii) Fat Client vs. Fat Servers. [3.5 × 2 = 7]

Worked SolutionAI Assisted

Any two notes are required (3.5 marks each). All three are given below; write any two in the exam.

(i) DOM (Document Object Model)

The DOM is a platform- and language-independent programming interface that represents an HTML or XML document as a tree of objects (nodes). The browser builds it when parsing a page, and JavaScript can read and change it, so pages become dynamic.

Node types: document, element, attribute, text, and comment nodes.

document
  └─ html
      ├─ head ─ title
      └─ body
          ├─ h1  ─ "Hello"
          └─ p   ─ "Text"

What JavaScript can do with it:

const h = document.getElementById('title');       // select
h.textContent = 'New heading';                     // change content
h.style.color = 'blue';                            // change style
const p = document.createElement('p');             // create node
p.textContent = 'Added';
document.body.appendChild(p);                      // insert
h.addEventListener('click', () => alert('Hi'));    // handle events

It allows adding, removing, or modifying elements, attributes, and styles, and reacting to events.

(ii) Static vs dynamic web page

Basis Static page Dynamic page
Content Fixed; same for every visitor Generated at request time; can differ per user
Technology HTML, CSS (and client-side JS) Server-side scripting (PHP, Node.js, JSP) with a database
Updates Manual editing of the file Content changes through a database or CMS
Interaction Minimal Login, forms, search, shopping carts
Development Simple and quick More complex
Speed Faster; can be cached or served from a CDN Slower due to processing and database calls
Cost / hosting Cheap Needs server and database
Examples Portfolio, brochure page Facebook, Amazon, online banking

(iii) Fat client vs fat server

Basis Fat (thick) client Fat server (thin client)
Processing Most of the business logic on the client Most of the logic on the server
Client Powerful, needs installation Simple; often just a browser
Server Mainly stores data Does processing and stores data
Maintenance Updates must be installed on every client Update once on the server
Network use Lower (after local processing) Higher, since each action goes to the server
Security Data and logic exposed on the client Centralised and easier to secure
Offline use Possible Not possible
Examples Desktop apps, MS Office, games Traditional web apps, terminal-based systems

Modern single-page applications combine both: a rich JavaScript client with server APIs.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.