Skip to main content
CBE Nexus · Undergraduate Computer Science

Chapter 12: Web Technologies and Application Development

University web development notes on HTML, CSS, JavaScript, HTTP, APIs, client-server architecture, accessibility, responsive interfaces, authentication, application security, testing and deployment.

Back to Computer Science course guide

Chapter overview and learning outcomes

This chapter develops the theory and practical foundations of web technologies and application development, linking core concepts to the design, evaluation and responsible operation of computing systems.

1. Web architecture and the internet

The web is a distributed information system built on internet protocols. A browser acts as a client that requests resources from servers using application protocols such as HTTP. DNS resolves domain names; IP routes packets; transport protocols carry data; TLS protects supported connections. A web application may include a browser interface, application server, database, object storage, cache and external services. Architecture should define trust boundaries, data ownership, failure handling and responsibilities for each component.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

2. HTML semantics and document structure

HTML describes the structure and meaning of web content. Semantic elements such as header, nav, main, article, section, aside and footer communicate document roles. Headings should form a logical hierarchy; forms need associated labels; images require meaningful alternative text when they convey information. Valid structure improves accessibility, maintainability and machine interpretation. Use elements according to their meaning rather than choosing tags solely for their default visual appearance.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

3. CSS layout, responsive design and visual systems

CSS controls presentation, typography, colour, spacing and layout. The cascade, inheritance and specificity determine which declarations apply. Flexbox is useful for one-dimensional alignment; Grid supports two-dimensional layouts; normal flow remains important for robust documents. Responsive design adapts content to viewport and user settings using flexible units, fluid images and media queries. Design systems define reusable tokens and components, improving consistency while preserving readable contrast and keyboard focus.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

4. JavaScript and browser programming

JavaScript adds behaviour to web pages and can run in browsers and server environments. Variables, functions, objects, arrays, modules, promises and asynchronous operations are core concepts. The Document Object Model represents a page as a tree that scripts can inspect and update. Event handlers respond to user actions. Avoid blocking the main thread with expensive work, handle rejected promises and validate assumptions about network responses. Separate data logic from presentation to improve testing.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

5. HTTP, URLs, cookies and web communication

HTTP uses requests and responses. Methods such as GET, POST, PUT, PATCH and DELETE express intended operations, while status codes communicate outcomes. URLs identify resources; headers carry metadata; bodies contain representations or submitted data. Cookies can maintain sessions but require appropriate security attributes such as Secure, HttpOnly and SameSite. Caching improves performance when freshness and privacy are handled correctly. Understand idempotency and safe methods when designing APIs and retry behaviour.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

6. Client-server applications and backend development

A backend receives requests, applies business rules, authenticates and authorises users, accesses data stores and returns responses. Clear separation between routing, validation, domain logic and persistence supports maintainability. Server-side validation is essential even when client-side validation improves usability. Use structured error handling, configuration management, rate limits and observability. Avoid exposing stack traces, secrets or internal implementation details to clients.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

7. APIs, REST principles and data formats

An application programming interface defines how software components communicate. REST-style APIs model resources and use HTTP semantics; JSON is a common representation, though other formats exist. Good API design uses predictable paths, appropriate methods and status codes, validation, pagination, versioning and documented error formats. Authentication does not replace authorisation: each request must check whether the caller may access the requested resource. Protect APIs against abuse through quotas and monitoring.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

8. Databases, state and web application data

Web applications commonly persist structured data in relational databases or use document, key-value, graph and other data stores. Choose a data model based on relationships, query patterns, consistency requirements and operational needs. Use parameterised queries, transactions and constraints. Sessions, caches and client-side state have different lifetimes and trust levels. Never treat browser storage as a secure place for secrets. Plan migrations, backups, retention and data deletion.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

9. Accessibility, usability and inclusive interaction

Accessible applications support users with different sensory, motor, cognitive and language needs. Use semantic HTML, keyboard operability, visible focus, adequate contrast, captions, labels and helpful error messages. Do not communicate meaning by colour alone. Test with keyboard navigation, zoom, screen readers and automated tools, while recognising that automated checks cannot assess every user experience. Usability testing with representative participants reveals barriers that developers may not anticipate.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

10. Web application security and privacy

Common web risks include injection, cross-site scripting, cross-site request forgery, broken access control, insecure authentication, unsafe file uploads and security misconfiguration. Encode untrusted output for its context, use CSRF protections where applicable, enforce server-side access checks, store passwords using modern password-hashing algorithms and protect transport with TLS. Apply content security policy carefully, manage dependencies and minimise personal data. Security headers and scanning complement—not replace—secure implementation.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

11. Testing, deployment, performance and maintenance

Test web systems at unit, integration, end-to-end, accessibility, security and performance levels. Use representative environments and synthetic data where possible. Deployment may use immutable builds, staged releases, automated checks and rollback plans. Performance work includes image optimisation, compression, caching, efficient queries and reduced JavaScript payloads. Monitor availability, errors, latency and user-facing outcomes. Maintain documentation, dependency updates, backups and incident response procedures after launch.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

Figure 1. Web request lifecycle
Browser resolves domain and connects→Client sends HTTP request→Server validates and processes→Response returned and rendered

Conceptual diagram for learning and revision.

Figure 2. Accessible form flow
Visible label and instructions→Keyboard-operable controls→Clear validation feedback→Accessible confirmation

Conceptual diagram for learning and revision.

Figure 3. Layered web application
Browser interface→API and application logic→Database and external services→Monitoring and security controls

Conceptual diagram for learning and revision.

Practical laboratory or project activity

  1. Choose a bounded problem relevant to this chapter and state its purpose.
  2. Identify inputs, outputs, constraints, assumptions and potential failure cases.
  3. Develop a small model, prototype, experiment or worked analysis.
  4. Use appropriate tools and authorised datasets or test environments.
  5. Test normal, boundary and failure conditions; record reproducible observations.
  6. Write a report explaining method, evidence, limitations and recommendations.

Follow institutional rules, protect private information and obtain permission before testing systems or collecting data.

Worked reasoning and self-assessment

Start by translating the question into a precise problem statement. Define variables and assumptions before calculating or implementing. Work through a small example manually, then verify it with an appropriate tool. Explain why the selected approach is suitable, identify an alternative, and discuss its trade-offs. For empirical claims, describe the data and method needed to support them; for system claims, specify observable tests and expected outcomes.

Examination and revision questions

Answer using precise definitions, diagrams, calculations and examples where appropriate.

  1. What is the role of HTML?

    Show answer guidance

    HTML defines the structure and semantics of web content.

  2. What is CSS used for?

    Show answer guidance

    CSS controls presentation, layout, typography and responsive styling.

  3. What is the DOM?

    Show answer guidance

    A structured object representation of a document that scripts can inspect and modify.

  4. Differentiate GET and POST.

    Show answer guidance

    GET requests a representation and is intended to be safe; POST submits data for processing or resource creation.

  5. What does DNS do?

    Show answer guidance

    It resolves domain names into records such as IP addresses.

  6. What is a REST-style API?

    Show answer guidance

    An interface that models resources and uses HTTP methods and representations to interact with them.

  7. Why validate input on the server?

    Show answer guidance

    Client-side checks can be bypassed; the server is the trusted enforcement point for data rules.

  8. What is responsive design?

    Show answer guidance

    Designing interfaces that adapt to different viewports, devices and user settings.

  9. Name two accessibility practices.

    Show answer guidance

    Use semantic elements, keyboard support, visible focus, labels, contrast and meaningful alternative text.

  10. What is cross-site scripting?

    Show answer guidance

    A vulnerability where untrusted content is executed as script in another user's browser.

  11. Why use parameterised SQL queries?

    Show answer guidance

    They separate query structure from data values and reduce injection risk.

  12. What is a cookie used for?

    Show answer guidance

    It stores small browser-managed values, often for session or preference state.

  13. Name three HTTP status code classes.

    Show answer guidance

    2xx success, 3xx redirection, 4xx client errors and 5xx server errors.

  14. What is continuous deployment?

    Show answer guidance

    An automated process that releases validated changes to production, subject to configured safeguards.

  15. Why monitor a deployed web application?

    Show answer guidance

    To detect errors, latency, availability problems, security events and changing user needs.

Revision checklist

Further study and academic references

Consult current university textbooks, peer-reviewed conference and journal papers, official standards and authoritative technical documentation. Verify versions and publication details before citing sources. Use the citation style required by your institution, cite data and software as well as written sources, and distinguish published evidence from your own analysis. Do not invent references, measurements or experimental outcomes.

Academic and responsible-use note: These notes support undergraduate study and do not replace your institution's course outline, laboratory rules or supervisor guidance. Respect privacy, intellectual property, licences, research ethics and applicable law.

Return to the full Computer Science course guide

Official Education References

Use these official organisations for curriculum guidance, examinations and further learning information.