SCO207 Lecture Notes
SCO207 Lecture Notes
SCO207
WEB DEVELOPMENT TECHNOLOGIES
1
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
1. WEB DESIGN
2
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Example:
o A simple wireframe for a homepage might include:
Header (with navigation)
Hero Section (main image or call-to-action)
Content Sections (with text and images)
Footer (with links and contact info)
2.2 Typography
Font Choices: The selection of fonts is essential in web design. Common web-safe fonts
include Arial, Times New Roman, and Verdana. Additionally, Google Fonts provides a
wide range of fonts that can be easily incorporated into a website.
Font Hierarchy: Using different font sizes for headings, subheadings, and body text
helps create a clear hierarchy and improves readability.
Example:
o Heading: h1 { font-size: 2.5em; font-weight: bold; }
o Body Text: p { font-size: 1em; line-height: 1.5; }
3
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
2.5 Navigation
Navigation Menus: A website’s navigation should be clear, simple, and easy to use.
Commonly, navigation is placed in the header or sidebar, and it should include links to
key pages like Home, About Us, Services, Contact, etc.
Sticky Navigation: A sticky or fixed navigation bar stays visible at the top of the page as
the user scrolls down, providing easy access to important sections. Example:
o Basic navigation in HTML:
o <nav>
o <ul>
o <li><a href="#home">Home</a></li>
o <li><a href="#services">Services</a></li>
o <li><a href="#contact">Contact</a></li>
o </ul>
o </nav>
Example:
.container {
width: 100%;
padding: 5%;
}
.column {
float: left;
width: 48%;
margin-right: 4%;
}
3.4 Viewport Meta Tag
The viewport meta tag is used to control the layout on mobile browsers. It is essential for
responsive web design to ensure that the website scales correctly on mobile devices.
o Example:
o <meta name="viewport" content="width=device-width, initial-scale=1.0">
.button:hover {
background-color: #2980b9;
}
4.2 UX Design (User Experience Design)
UX Design focuses on the overall experience of the user when interacting with a website. It
involves usability, accessibility, and ensuring that the site meets user needs.
Key UX principles include:
o Consistency: Maintaining uniformity in design elements across the site.
o Feedback: Providing users with clear responses to their actions (e.g., button hover
effects, loading spinners).
o Accessibility: Ensuring that the site is usable by people with disabilities (e.g., screen
readers, color contrast).
6. Conclusion
Web page design is an essential skill in web development that encompasses several key
components such as layout, typography, color schemes, responsive design, and user experience.
With the increasing demand for mobile-first websites and the need for high-performance,
7
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
accessible web experiences, designers must focus on creating visually appealing and functional
designs that work seamlessly across a variety of devices.
By using the right tools and technologies (HTML, CSS, JavaScript, and frameworks), web
designers can create websites that are not only beautiful but also responsive, user-friendly, and
accessible.
Key Takeaways:
Effective web page design involves understanding both the aesthetic and functional aspects of a
website.
Responsive design ensures that a website works across multiple devices, providing a great user
experience.
Key tools for web design include HTML, CSS, JavaScript, and web development
frameworks.
Additional Resources:
Books:
o Don't Make Me Think by Steve Krug
o HTML and CSS: Design and Build Websites by Jon Duckett
Websites:
o MDN Web Docs (Mozilla)
o W3Schools
o CSS-Tricks
8
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
The core of modern web development is based on scripting languages such as JavaScript, PHP,
Python, Ruby, Perl, and TypeScript. Each of these languages plays a critical role in enhancing
user experience, handling backend logic, and interacting with databases. This lecture will focus
on the role of scripting languages in client-side and server-side web development, how they
work, and their uses in programming for the Internet.
2. Client-Side Scripting
2.1 What is Client-Side Scripting?
Client-side scripting refers to the execution of scripts directly in the user's web browser. The
scripts are typically embedded in HTML pages and executed when the page loads, without
needing to communicate with the server after the page has been requested. Client-side scripting
is essential for creating dynamic interactions and improving user experience without excessive
server load.
9
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
<script>
function changeColor() {
document.body.style.backgroundColor = "lightblue";
}
</script>
</body>
</html>
10
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
3. Server-Side Scripting
3.1 What is Server-Side Scripting?
Server-side scripting involves the execution of scripts on a web server to generate dynamic
content. These scripts are processed by the server before being sent to the user's browser. Server-
side scripting is crucial for tasks like database interactions, form processing, user authentication,
and generating content dynamically based on user inputs.
Python: Python is often used for server-side scripting with frameworks like Django and
Flask to build web applications. Python’s simplicity and powerful libraries make it an
excellent choice for web development.
Example: A basic Python script with Flask to serve a "Hello, World!" page.
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return "Hello, World!"
if __name__ == '__main__':
app.run(debug=True)
Ruby: Ruby, with its framework Ruby on Rails, is another popular server-side language
used to build web applications. It emphasizes convention over configuration, making
development faster and easier.
Example: Simple Ruby script using Rails to display a greeting.
11
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Node.js: Node.js allows for JavaScript to be used on the server-side. It’s built on
Chrome’s V8 JavaScript engine and is known for its performance in handling
asynchronous requests.
12
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
<script>
function loadData() {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'data.txt', true);
xhr.onload = function () {
if (xhr.status === 200) {
document.getElementById('result').innerHTML = xhr.responseText;
}
};
xhr.send();
}
</script>
13
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
<script>
document.getElementById("myForm").addEventListener("submit",
function(event) {
event.preventDefault();
var name = document.getElementById("name").value;
6. Conclusion
Scripting languages form the backbone of modern web development, enabling the creation of
dynamic, interactive, and scalable web applications. Client-side scripting (primarily JavaScript)
enables users to interact with the page in real time, while server-side scripting (e.g., PHP,
Python, Ruby, Node.js) handles the backend logic, database interactions, and dynamic content
generation.
14
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
The use of AJAX and asynchronous programming helps to create responsive web applications
that provide a smoother user experience, while the integration of both client-side and server-side
technologies is crucial for building full-stack web applications.
As web development technologies continue to evolve, mastering scripting languages remains
essential for creating modern, interactive, and efficient websites and web applications.
Key Takeaways:
Client-side scripting with JavaScript enables interactive features like form validation, dynamic
content, and event handling.
Server-side scripting using languages like PHP, Python, and Node.js allows for dynamic content
generation, database interaction, and user authentication.
AJAX and asynchronous programming allow for non-blocking operations, improving
application performance and responsiveness.
Additional Resources:
Books:
o JavaScript: The Good Parts by Douglas Crockford
o Learning PHP, MySQL & JavaScript by Robin Nixon
Websites:
o MDN Web Docs (JavaScript)
o W3Schools (PHP, JavaScript, AJAX)
o Node.js Documentation
15
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
16
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
<script>
function changeContent() {
document.getElementById("text").innerHTML = "This text has been changed!";
}
</script>
3.2 AJAX (Asynchronous JavaScript and XML)
AJAX is a technique that enables dynamic updates to a web page without reloading the entire
page. It allows for asynchronous communication between the client and the server, meaning that
parts of the webpage can be updated while the rest of the page remains unaffected.
AJAX Workflow:
o The client (browser) sends an asynchronous request to the server.
o The server processes the request and sends back a response.
o The client processes the response and dynamically updates the web page without
reloading.
Example: Using AJAX to load new content without refreshing the page:
<button onclick="loadData()">Load New Content</button>
<div id="content"></div>
<script>
function loadData() {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'data.json', true);
xhr.onload = function() {
if (xhr.status === 200) {
document.getElementById('content').innerHTML = xhr.responseText;
}
};
xhr.send();
}
</script>
17
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = $_POST['name'];
echo "<h1>Hello, " . htmlspecialchars($name) . "!</h1>";
}
?>
</body>
</html>
18
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
In this example:
The form collects the user's name and submits it via POST to the server.
The server processes the request using PHP and generates a personalized greeting.
4.3 Interaction with Databases
Dynamic websites often require the ability to interact with databases to store and retrieve
information. Server-side scripts (e.g., PHP, Python) handle database queries and return the
results as dynamic content.
Example: PHP with MySQL to retrieve and display data.
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "webdata";
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
echo "<h1>" . $row['name'] . ": " . $row['message'] . "</h1>";
}
} else {
echo "No greetings found.";
}
$conn->close();
?>
In this example:
The PHP script connects to a MySQL database, runs a query to fetch user messages, and displays
them dynamically on the page.
19
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
20
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
$conn->close();
}
?>
In this example:
Client-Side (JavaScript): Captures user input and sends it asynchronously to the server.
Server-Side (PHP): Processes the form data and stores it in the database.
AJAX: Provides real-time feedback to the user without reloading the page.
21
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
7. Conclusion
Scripting languages are fundamental in the creation of dynamic websites, enabling the
integration of client-side and server-side logic. Client-side scripting (mainly JavaScript) allows
for real-time user interactions, while server-side scripting (using PHP, Python, Ruby, Node.js,
etc.) powers content generation, database interactions, and data processing.
By combining both client-side and server-side scripting, developers can build highly interactive,
responsive, and personalized websites that meet modern web development standards.
Key Takeaways:
Client-Side Scripting: Uses JavaScript to manage dynamic content, form validation, and
interactivity in the browser.
Server-Side Scripting: PHP, Python, and other languages handle dynamic content generation,
database interactions, and user authentication.
AJAX: Allows asynchronous data exchange between the client and server, enhancing user
experience by updating parts of the page without reloading.
Integration: Both client-side and server-side scripting are necessary to build fully dynamic
websites that deliver interactive, real-time content.
Additional Resources:
Books:
o JavaScript: The Good Parts by Douglas Crockford
o Learning PHP, MySQL & JavaScript by Robin Nixon
Websites:
o MDN Web Docs (JavaScript)
o W3Schools (AJAX, PHP)
o PHP Official Documentation
22
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
23
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
24
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
25
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
9. Conclusion
FTP is a fundamental protocol for web development, enabling efficient file transfer and
management on remote servers. Whether uploading website files, managing databases, or
performing backups, FTP remains a reliable tool. However, it is essential to ensure security by
using SFTP or FTPS and following best practices to maintain secure and organized file
transfers.
Key Takeaways:
FTP is essential for transferring files between local machines and remote servers in web
development.
Active Mode and Passive Mode FTP determine how data channels are established between the
client and server.
SFTP and FTPS are secure alternatives to FTP, offering encryption and enhanced data security.
Best practices include securing FTP with encryption, organizing files systematically, and
regularly backing up files.
Additional Resources:
Books:
o FTP: The Complete Guide by F. K. McKinney
o Pro FTP: The Complete Guide by Michael K. Hughes
Websites:
o FileZilla Official Website
o WinSCP Official Website
o SFTP vs FTP - Difference & Comparison
27
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
5. SEARCH ENGINES
28
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Search engines use complex algorithms to determine how relevant a page is to a given search
query. Popular ranking factors include keyword relevance, backlinks, content quality, user
experience, and mobile-friendliness.
2.4 Search Engine Results Pages (SERPs)
The search engine displays the results in a Search Engine Results Page (SERP). This page
typically includes a list of webpages that match the query, ranked by relevance.
Modern SERPs may also display additional features like rich snippets, local results, images,
and videos.
29
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
30
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
o Content Quality: Write high-quality, engaging, and relevant content that answers the
user’s query.
o Mobile Optimization: Ensure the website is responsive and works well on all screen
sizes.
o Internal Linking: Link to other pages within your website to improve navigation and
SEO.
5.2 Off-Page SEO
Off-page SEO refers to actions taken outside the website that can impact rankings, primarily
focusing on acquiring backlinks.
o Backlink Building: Getting other authoritative websites to link to your content.
o Social Media Sharing: Promoting your content through social media platforms can drive
traffic and improve SEO.
5.3 Technical SEO
Technical SEO refers to the backend elements of a website that affect its performance and
visibility in search results.
o Website Speed: Ensure that the website loads quickly.
o XML Sitemap: Create and submit a sitemap to help search engines index your pages
more efficiently.
o Robots.txt: Manage which pages can be crawled and indexed by search engines.
o Structured Data: Use schema markup to provide search engines with more information
about your content.
31
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Search engines are integrating visual search capabilities, where users can search using images
rather than text.
9. Conclusion
Search engines are a cornerstone of the modern internet, enabling users to quickly find the
information they need. For web developers, understanding how search engines work and
implementing effective SEO strategies is essential for creating websites that rank well and attract
visitors. By focusing on content quality, backlinks, user experience, and technical SEO,
developers can improve a website’s search engine ranking and visibility.
Key Takeaways:
Search engines crawl, index, and rank web pages based on various factors such as relevance,
content quality, and authority.
SEO involves optimizing content and website elements to improve search engine rankings.
Paid search engine advertising (SEM) can supplement organic traffic.
Current trends include voice search, AI-based algorithms, and visual search.
Additional Resources:
Books:
o The Art of SEO by Eric Enge, Stephan Spencer, and Jessie Stricchiola
o SEO 2025: Learn Search Engine Optimization with Smart Internet Marketing Strategies
by Adam Clarke
Websites:
o Google Search Central
o Moz Blog - SEO and SEM Insights
33
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
35
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
36
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
8. Conclusion
Understanding the differences between unified search engines and multiple search engines is
crucial for web developers aiming to optimize their sites for search visibility. Unified search
engines provide a streamlined and comprehensive user experience by aggregating content from
various domains, while multiple search engines offer a broader scope by pulling results from
various specialized sources. Both models have unique advantages and challenges, and developers
should consider how their websites interact with these search engines to improve search rankings
and user engagement.
Key Takeaways:
Unified search engines aggregate different types of content into a single interface, offering
convenience for users.
Multiple search engines aggregate results from several specialized engines, providing broader
and more niche-specific results.
Optimizing websites for both types of search engines can improve visibility and engagement
across different domains.
38
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Additional Resources:
Books:
o Search Engine Optimization (SEO) 2025 by Adam Clarke
o The Art of SEO by Eric Enge, Stephan Spencer, and Jessie Stricchiola
Websites:
o Google Search Central
o Moz Blog - SEO Insights
39
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
41
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
42
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
PDO (PHP Data Objects): A more flexible way to interact with multiple databases using a
consistent interface.
7. Database Security
Security is a crucial aspect of database programming on the internet. Web applications must
ensure that user data and sensitive information are stored and transmitted securely. Key practices
include:
7.1 Data Encryption:
Encryption at rest: Data is encrypted when stored in the database.
Encryption in transit: Data is encrypted during transmission over networks (e.g., using HTTPS).
7.2 SQL Injection Prevention:
Prepared Statements: Use of prepared statements and parameterized queries to prevent attackers
from injecting malicious SQL code.
o Example in PHP using MySQLi:
o $stmt = $conn->prepare("SELECT * FROM users WHERE email = ?");
o $stmt->bind_param("s", $email);
o $stmt->execute();
43
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
9. Conclusion
Database programming on the internet is a crucial aspect of modern web development.
Whether using relational databases like MySQL or NoSQL databases like MongoDB,
understanding how to integrate databases with web applications is essential for creating dynamic,
data-driven websites. By mastering server-side scripting, SQL, and database management,
developers can ensure their applications are scalable, secure, and efficient.
Key Takeaways:
Database integration enables dynamic, data-driven web applications.
SQL is the standard language for interacting with relational databases.
Server-side scripting languages like PHP, Python, and Node.js are used to interact with
databases.
Security is crucial when handling sensitive user data in web applications.
44
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Additional Resources:
Books:
o Learning PHP, MySQL & JavaScript by Robin Nixon
o Flask Web Development by Miguel Grinberg
o Node.js Design Patterns by Mario Casciaro
Websites:
o W3Schools - SQL Tutorial
o Mozilla Developer Network (MDN) - Node.js
45
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
8. E-COMMERCE
1. Introduction to E-Commerce
E-Commerce (Electronic Commerce) refers to the buying and selling of goods and services
over the internet. It encompasses a wide range of online business activities for products, services,
and information. E-Commerce websites allow businesses to interact with consumers (B2C),
other businesses (B2B), or consumers with other consumers (C2C) through electronic
transactions.
In the context of Web Development Technologies, building an E-Commerce site involves
creating and maintaining a platform that can handle product listings, shopping carts, customer
data, payments, and secure transactions.
Key Features:
o Peer-to-peer transactions
o Auction systems
o User reviews and feedback
2.4 Consumer-to-Business (C2B):
Description: Consumers offer goods or services to businesses.
Examples: Freelance platforms like Upwork or Fiverr, Stock photography sites like Shutterstock.
Key Features:
o Consumer-generated content
o Crowdsourcing opportunities
o Pay-per-use services
47
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
48
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
49
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
5.4 BigCommerce:
A hosted platform designed for businesses that need a customizable solution without the need for
self-hosting.
Offers built-in tools for marketing, SEO, and analytics.
7. Security in E-Commerce
Security is a critical aspect of any E-Commerce website due to the handling of sensitive
information like user data, payment details, and personal information.
50
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Secure Payment Gateways: Integrating secure, trusted payment gateways like Stripe, PayPal, or
Square reduces the risks of fraud.
Regular Security Audits: Conducting regular security assessments to identify and fix
vulnerabilities.
9. Conclusion
E-Commerce is a vital part of modern business, and web developers play a crucial role in
creating user-friendly, secure, and scalable online stores. Understanding the technologies behind
E-Commerce platforms, payment gateways, and security features is essential for building
effective web-based shopping solutions. As online shopping continues to grow, mastering E-
Commerce development skills will remain in high demand.
Key Takeaways:
E-Commerce involves online transactions between businesses and consumers (B2C), businesses
and businesses (B2B), and consumers and consumers (C2C).
Essential components include product catalogs, shopping carts, payment gateways, and order
management systems.
Technologies like HTML, CSS, JavaScript, PHP, Python, and frameworks like Django and
Laravel are central to building E-Commerce websites.
Security and SEO are crucial to protecting user data and driving traffic to online stores.
51
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Additional Resources:
Books:
o E-Commerce 2025 by Kenneth C. Laudon and Carol Guercio Traver
o The Art of E-Commerce by J. Davidson
Websites:
o Shopify Academy
o Moz Blog - E-Commerce SEO
52
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
1. Introduction
Web development is a rapidly evolving field, driven by technological innovations, changing user
expectations, and new web standards. The way we design, develop, and maintain websites and
web applications has been significantly influenced by advances in tools, frameworks,
programming languages, and approaches to user experience (UX). This lecture focuses on some
of the most important emerging trends that are shaping modern web development.
53
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
4. Serverless Computing
4.1 Overview
Serverless computing allows developers to build and run applications without managing servers.
This approach uses cloud services where developers deploy functions in response to specific
events or HTTP requests. The cloud provider handles the scaling, load balancing, and
maintenance.
4.2 Key Features of Serverless:
Event-driven: Serverless applications are built around events (e.g., HTTP requests,
database changes, file uploads) that trigger functions.
Automatic Scaling: The cloud provider automatically scales the application based on
demand, meaning you don't need to worry about infrastructure.
Cost-effective: You pay only for the resources you use, which can result in cost savings
compared to traditional server-based hosting.
54
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
5. GraphQL
5.1 Overview
GraphQL is a query language for APIs and a runtime for executing those queries by using a type
system. Unlike REST, which exposes multiple endpoints for different resources, GraphQL
allows clients to request exactly the data they need with a single request.
5.2 Key Features of GraphQL:
Single Endpoint: All interactions (queries, mutations, and subscriptions) are handled via
a single endpoint.
Client-Specified Queries: Clients can specify which fields they need, reducing over-
fetching and under-fetching of data.
Strongly Typed Schema: GraphQL uses a type system to define the structure of the API,
ensuring better documentation and validation.
5.3 Why GraphQL?
More efficient data fetching.
Less network traffic due to precisely tailored queries.
Simplifies the API by combining multiple RESTful endpoints into one.
5.4 Popular GraphQL Tools:
Apollo Server: A popular GraphQL server implementation.
Relay: A JavaScript framework for building data-driven React applications with
GraphQL.
6. WebAssembly (Wasm)
6.1 Overview
55
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
7. Jamstack Architecture
7.1 Overview
Jamstack is an architecture that focuses on delivering faster, more secure, and scalable web
applications. It stands for JavaScript, APIs, and Markup, and emphasizes pre-rendering
content, using APIs for dynamic functionality, and decoupling the front-end and back-end.
7.2 Key Features of Jamstack:
Pre-rendered Content: Static files (HTML, CSS, JavaScript) are generated at build
time, which leads to faster page loads and better SEO.
Decoupled Back-End: The front-end and back-end are separate, with dynamic data
fetched from APIs or serverless functions.
Continuous Deployment: Websites built on Jamstack often rely on Git-based workflows
and CI/CD pipelines for deployment.
7.3 Why Jamstack?
Increased performance through static content delivery.
Scalability and security improvements through decoupling.
Simpler maintenance and deployment with Git-based workflows.
56
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
57
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
11. Conclusion
The landscape of web development is constantly changing with the advent of new technologies,
frameworks, and practices. Trends like Progressive Web Apps, Serverless Computing, AI and
Machine Learning, and more are transforming how we build and interact with web applications.
As web developers, it’s essential to stay up-to-date with these trends to create efficient, secure,
and user-friendly web applications.
Key Takeaways:
58
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Additional Resources:
Books:
o Learning Progressive Web Apps by John M. Wargo
o GraphQL in Action by Samer Buna
o The Design of Web APIs by Arnaud La
59
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
60
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
PNG (Portable Network Graphics): A lossless compression format, ideal for images
with transparency and sharp edges, such as logos and icons.
GIF (Graphics Interchange Format): Best suited for simple animations with a limited
color palette (256 colors).
SVG (Scalable Vector Graphics): A vector-based image format, meaning it can be
scaled infinitely without losing quality. Perfect for logos, icons, and illustrations.
3.2 Image Optimization
Images are often the largest files on a webpage. Optimizing images helps improve page load
speed and user experience:
Compression: Reducing file size without significantly losing quality (e.g., using tools
like ImageOptim or TinyPNG).
Lazy Loading: Images are only loaded when they come into view as the user scrolls
down the page, reducing initial page load time.
Responsive Images: Using the srcset attribute to provide different image resolutions for
different screen sizes, improving performance on mobile devices.
4. Audio Technologies
4.1 Audio Formats
Several audio formats are used in web development to deliver sound content:
MP3: The most widely supported audio format for streaming and downloading music.
MP3 uses lossy compression to reduce file size.
WAV: An uncompressed audio format, typically used for high-quality sound but results
in large file sizes.
OGG: An open-source, lossy audio format often used for web applications and open
media projects.
4.2 Audio Playback on the Web
Web browsers support embedding and playing audio directly in web pages via the <audio> HTML
element:
<audio controls>
<source src="audiofile.mp3" type="audio/mp3">
Your browser does not support the audio element.
</audio>
61
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Additionally, JavaScript libraries like Howler.js and Tone.js can be used to control audio
playback programmatically, providing features like looping, volume control, and sound effects.
4.3 Audio Streaming
For real-time audio delivery (e.g., live radio, podcasts, or music), streaming protocols like HLS
(HTTP Live Streaming) and RTMP (Real-Time Messaging Protocol) are used to deliver
audio content efficiently to users.
5. Video Technologies
5.1 Video Formats
Video formats vary depending on the required quality and file size. Common formats include:
MP4: A widely used format for video streaming due to its balance between quality and
file size. It uses H.264 video codec and AAC audio codec.
WebM: A royalty-free video format designed for web use, supporting VP8/VP9 video
codecs and Vorbis/Opus audio codecs.
OGG: Similar to WebM, another open-source video format used for browsers that
support HTML5 video.
5.2 Video Embedding and Playback
The HTML5 <video> element allows the embedding of video content directly into a webpage:
<video controls width="320" height="240">
<source src="video.mp4" type="video/mp4">
Your browser does not support the video element.
</video>
Controls: The controls attribute provides a user interface with buttons like play, pause,
and volume control.
Autoplay: The autoplay attribute allows the video to start playing automatically when the
page is loaded.
5.3 Video Streaming
For high-quality video streaming, modern web applications use protocols like HLS and DASH
(Dynamic Adaptive Streaming over HTTP). These protocols allow adaptive bitrate streaming,
automatically adjusting the video quality based on the user’s internet connection speed.
Popular video streaming platforms like YouTube and Vimeo offer APIs that can be integrated
into websites, enabling the embedding of videos directly into web pages.
62
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
function drawBall() {
63
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.beginPath();
ctx.arc(x, y, 10, 0, Math.PI * 2);
ctx.fillStyle = "#0095DD";
ctx.fill();
ctx.closePath();
x += dx;
y += dy;
}
setInterval(drawBall, 10);
</script>
64
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Compression: Reducing file sizes without compromising quality (e.g., using image
optimization tools and video codecs).
Lazy Loading: Deferring the loading of multimedia content until it is required (e.g.,
when it comes into the viewport).
Responsive Media: Serving different resolutions of images and videos based on the
user's screen size and device capabilities.
8.2 Cross-Browser Compatibility
Not all browsers support the same multimedia formats. It’s important to check compatibility and
provide fallbacks for unsupported formats. For example, using multiple <source> elements for
video content:
<video controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.webm" type="video/webm">
<p>Your browser does not support HTML5 video.</p>
</video>
8.3 Accessibility Considerations
Multimedia content should be accessible to all users, including those with disabilities. This
includes:
Providing text alternatives for images (alt text) and videos (subtitles, captions).
Using the <audio> and <video> elements' built-in controls to allow users to pause, play, and
control the volume.
9. Conclusion
Multimedia data technologies are integral to modern web development, enhancing user
experiences through rich and interactive content. As web development continues to evolve,
staying updated on the latest technologies and best practices for handling images, audio, video,
animations, and interactive media will be crucial for building high-quality, engaging web
applications.
Key Takeaways:
Multimedia Types: Images, audio, video, animations, and interactive media.
Techniques for Optimization: Image compression, responsive media, lazy loading.
65
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Technologies for Multimedia: HTML5 <audio>, <video>, Canvas API, WebGL, and
JavaScript libraries like GSAP.
Performance and Accessibility: Always aim to optimize multimedia content for
performance and ensure accessibility for all users.
Additional Resources:
Books:
o Learning Web Audio by Eric T. Freeman and Elisabeth Robson
o HTML5 Multimedia by Joshua Olszewicz
Websites:
66
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
69
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
</head>
<body>
<h1>Java Applet Demo</h1>
<applet code="HelloWorldApplet.class" width="300" height="200">
</applet>
</body>
</html>
However, modern browsers do not support the <applet> tag, and applets are no longer the
preferred method for embedding dynamic content into websites. Today, JavaScript and HTML5
are used in their place for interactive content.
70
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
<script>
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
var x = 0;
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height); // Clear canvas
ctx.fillRect(x, 50, 100, 60); // Draw the rectangle at new position
x += 5;
if (x > canvas.width) x = 0; // Reset the position after it reaches the edge
requestAnimationFrame(animate); // Request the next frame for animation
}
animate();
</script>
</body>
</html>
In this example, JavaScript provides a modern, efficient way to animate shapes using the <canvas>
element.
5.2 HTML5 for Multimedia and Graphics
HTML5 has a wide array of APIs for handling multimedia and interactive content, such as:
Canvas API: Used for 2D drawing and animations.
WebGL: Provides 3D rendering capabilities in the browser.
Audio and Video APIs: For playing audio and video content natively in the browser.
71
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
7. Conclusion
Although Java applets were once an essential tool for interactive content on the web, they have
largely been replaced by modern web technologies like JavaScript and HTML5. These
technologies provide more secure, performant, and accessible ways to create interactive,
multimedia-rich web applications.
In today's web development landscape, developers use JavaScript frameworks, HTML5 APIs,
and CSS for building dynamic websites and applications, which offer superior user experiences
and cross-browser compatibility.
Key Takeaways:
Java Applets: Once used for interactive content but now largely obsolete.
HTML5 and JavaScript: The primary tools for interactive web applications, offering cross-
platform compatibility and security.
Canvas and WebGL: Powerful APIs for rendering graphics and animations.
Security and Performance: Modern web technologies offer superior performance and security
compared to applets.
Additional Resources:
Books:
o JavaScript: The Good Parts by Douglas Crockford
o HTML5: The Missing Manual by Matthew MacDonald
o Learning Web Design by Jennifer Niederst Robbins
Websites:
o MDN Web Docs (Mozilla Developer Network): https://developer.mozilla.org
o W3Schools: https://www.w3schools.com
72
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
73
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
74
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
</head>
<body>
<h1>Java Applet Example: Hello World</h1>
<applet code="HelloWorldApplet.class" width="300" height="200">
</applet>
</body>
</html>
Note: The code attribute points to the compiled Java applet class file (HelloWorldApplet.class),
which needs to be placed in the same directory as the HTML file or in a specified directory.
75
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
9. Conclusion
While Java applets were once a powerful tool for embedding interactive content in web pages,
they have been deprecated due to security issues and browser compatibility problems. Today,
JavaScript, HTML5, and other modern web technologies offer much more secure, efficient, and
cross-platform solutions for creating dynamic and interactive web content.
By understanding the history of applets and the shift to modern alternatives, developers can
better navigate current web development practices and create engaging, interactive web
applications without relying on outdated technologies.
Key Takeaways:
Java Applets: Historically used for interactive content but now largely obsolete due to security
and compatibility concerns.
Modern Alternatives: JavaScript and HTML5 provide secure, powerful, and widely supported
alternatives for dynamic content on the web.
Web APIs: HTML5 Canvas, WebGL, and JavaScript frameworks enable interactive multimedia
experiences without the need for plugins.
77
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
Additional Resources:
Books:
o JavaScript: The Good Parts by Douglas Crockford
o HTML5: The Missing Manual by Matthew MacDonald
o Learning Web Design by Jennifer Niederst Robbins
Websites:
o MDN Web Docs
o W3Schools
78
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
79
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
80
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
How it Works:
An attacker may exploit weak session management to steal a session token, bypass
authentication mechanisms, or escalate their privileges.
Prevention:
o Implement secure authentication protocols (e.g., multi-factor authentication).
o Use secure, random session tokens and ensure they are stored safely.
o Set session expiration and inactivity timeouts.
2.5 Insecure Direct Object References (IDOR)
What is IDOR?
IDOR is a vulnerability where an attacker is able to access or modify data objects (files,
database entries, etc.) by manipulating parameters such as URLs or form fields.
How it Works:
If a web application does not properly validate or authorize access to an object, an
attacker can change an object identifier (e.g., user ID or document ID) in a URL or
request and gain unauthorized access to restricted resources.
Prevention:
o Implement access control checks on every resource or object reference.
o Validate user input and ensure proper authorization before allowing access to sensitive
resources.
82
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
83
Dr. Bernard Ondara (Ph.D. – Computer Science)
Web Development Technologies – Lecture Notes
By Dr. Bernard Ondara (Ph.D. – Computer Science)
7. Conclusion
Security is an ongoing challenge in web development. By understanding common security issues
such as SQL injection, XSS, CSRF, and session management, developers can better protect their
web applications from attacks. Firewalls, including WAFs, play a critical role in filtering
malicious traffic and preventing unauthorized access to web servers. However, web developers
must also implement secure coding practices, input validation, encryption, and other security
measures to ensure a comprehensive security posture for their applications.
Key Takeaways:
Common Security Issues: SQL Injection, XSS, CSRF, Broken Authentication, IDOR.
Firewalls: Monitor and control traffic to protect web servers from external threats.
WAFs: Specialized firewalls designed to protect web applications from specific vulnerabilities.
Best Practices: HTTPS, input validation, CSP, MFA, and least privilege are essential
components of secure web applications.
Additional Resources:
OWASP: Open Web Application Security Project
Books:
o Web Application Security by Andrew Hoffman
o The Web Application Hacker's Handbook by Dafydd Stuttard and Marcus Pinto
Websites:
o OWASP Top Ten
- END -
84
Dr. Bernard Ondara (Ph.D. – Computer Science)