System Analysis and Design - Web Programming 2024 PDF
System Analysis and Design - Web Programming 2024 PDF
(3 marks)
Question 2:List three (03) added benefits of HTTP/2 compared to HTTP 1.1? (3 marks)
Answer:Multiplexing: HTTP/2 allows multiple requests and responses to be sent over a single
connection simultaneously, reducing latency compared to HTTP 1.1’s sequential request
handling.Header Compression: HTTP/2 uses HPACK to compress headers, reducing overhead
and improving performance over HTTP 1.1’s uncompressed headers.Server Push: HTTP/2
enables the server to proactively send resources (e.g., CSS, JavaScript) to the client before
they are requested, speeding up page loading compared to HTTP 1.1.
Answer:Syntax Strictness: XHTML is stricter than HTML; it requires well-formed XML syntax
(e.g., all tags must be closed, properly nested, and attributes quoted), whereas HTML is more
lenient.XML-Based: XHTML is based on XML, making it more suitable for integration with other
XML-based technologies, while HTML is SGML-based and less strict.Case Sensitivity: XHTML
is case-sensitive (e.g., tags must be lowercase), while HTML is not (e.g., <P> and <p> are the
same in HTML).Question 4:List out newly introduced input types, APIs, form elements in
HTML5? (3 marks)Answer:New Input Types: HTML5 introduced input types like email, url, date,
range, color, and tel, which provide better validation and user experience.New APIs: HTML5
added APIs like Canvas API (for 2D drawing), Geolocation API, Web Storage (localStorage,
sessionStorage), and WebSockets for real-time communication.New Form Elements: HTML5
introduced elements like <datalist> (for autocomplete suggestions), <progress> (for progress
bars), and <meter> (for scalar measurements), along with attributes like placeholder and
required.Question 5:While building a web application, how do you consider SEO,
maintainability, UX, performance, and security? (5 marks)Answer:SEO (Search Engine
Optimization): Use semantic HTML5 tags (e.g., <header>, <article>), optimize meta tags (title,
description), ensure fast loading with compressed assets, and create a sitemap for better
indexing.Maintainability: Structure code with clear separation (e.g., MVC pattern), use modular
CSS (e.g., BEM), comment code, and follow consistent naming conventions to make updates
easier.UX (User Experience): Design intuitive navigation, ensure responsive design for all
devices, provide feedback (e.g., loading spinners), and use accessible elements (e.g., ARIA
labels) for inclusivity.Performance: Minimize HTTP requests, use lazy loading for images,
leverage browser caching, and optimize assets (e.g., compress images, minify CSS/JS) to
reduce load times.Security: Implement HTTPS, sanitize user inputs to prevent XSS, use secure
headers (e.g., CSP), validate forms server-side, and protect against SQL injection with prepared
statements.
Question 6:Describe three situations that can be good candidates for denormalization. (6 marks)
Question 7:What is an index and how can it improve the performance of a system? (3 marks)
Answer:What is an Index?: An index is a database structure that allows faster data retrieval by
creating a lookup mechanism for specific columns (e.g., a B-tree or hash index). It acts like a
book’s index, pointing to data locations without scanning the entire table.How it Improves
Performance:Faster Queries: Indexes speed up SELECT queries and WHERE clauses by
reducing the number of rows scanned (e.g., finding a user by user_id in a million-row
table).Efficient Sorting: Indexes improve ORDER BY and GROUP BY operations by pre-sorting
data.Reduced Disk I/O: By narrowing down the search space, indexes minimize disk reads,
improving overall system performance. However, they add overhead for INSERT, UPDATE, and
DELETE operations due to index maintenance.