0% found this document useful (0 votes)
0 views

Theory Assignment 2 webdevev 2025

The document outlines a theory assignment for a web application development course, detailing questions on CSS styling methods, connecting HTML to MySQL databases, features of database-driven websites, GIT repository management, web security practices, PHP file upload code, and HTTP request methods. Each question requires detailed explanations, examples, and discussions on various aspects of web development. The assignment is due on March 28, 2025, and must be submitted in handwritten form.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Theory Assignment 2 webdevev 2025

The document outlines a theory assignment for a web application development course, detailing questions on CSS styling methods, connecting HTML to MySQL databases, features of database-driven websites, GIT repository management, web security practices, PHP file upload code, and HTTP request methods. Each question requires detailed explanations, examples, and discussions on various aspects of web development. The assignment is due on March 28, 2025, and must be submitted in handwritten form.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

553/18/s10 WEB APPLICATION DEVELOPMENT

Theory Assignment 2 Due Date 28 March 2025


Instructions:

• Submit handwritten work.


Question 1.
CSS has 3 ways to style your HTML:

• Inline: Add styles directly to HTML elements (limited use).


• Internal: Put styles inside the HTML file in a <style> tag.
• External: Create a separate CSS file (.css) and link it to your HTML.
Using an example show the use of external, internal and inline CSS into HTML file. (10)

Question 2.
To connect an HTML page to a MySQL database, you cannot directly interact with the database using
HTML itself; instead, you need a server-side scripting language like PHP, Python, or Node.js to handle
the database connection and retrieve/insert data, which is then displayed on the HTML page through
dynamic content generated by the server-side script based on the data from the database. Discuss
the Key steps involved. (10)
Question 3.
a) Discuss the key points and features about database-driven websites giving examples. (10)
b) A database driven website has many advantages over a basic website. The most imperative
ones are presented below: (Discuss them)
• Content Management
• Future Expandability
• Improving Stability
• Cutting Production and Update Costs
• Data Storage
• More Efficiency
Question 4.
a) Explain how to add website code to GIT repository. (5)
b) Define GIT repository. (5)
c) Outline the various ways of getting a GIT repository. (5)
d) Distinguish between GIT and GitHub. (5)
e) Describe the installation and setting up of GIT. (5)
f) Explain any 10 GIT commands. (10)
g) Outline how to deploy push application code to online repository.(5)
h) Define feature branching. (2)
i) Outline qualities of feature branch deployments. (5)
j) Outline steps to merge branches to master in GIT. (5)
Question 5.
Discuss the following key practices to implement security on web pages:

• installing an SSL certificate for encryption, (5)


• enforcing strong password policies, (5)

© 2024, Programmers Live Longer!


• regularly updating software and plugins, (5)
• utilizing a web application firewall (WAF), (5)
• validating user inputs, (5)
• implementing two-factor authentication (2FA), (5)
• backing up data regularly, and (5)
• conducting security audits to identify vulnerabilities. (5)
Question 6.
Explain the following example code snippet for a basic file upload in PHP: (10)
if (isset($_FILES['userFile']['name'])) {

$fileName = $_FILES['userFile']['name'];

$tmpName = $_FILES['userFile']['tmp_name'];

$uploadDir = "uploads/";

// Basic validation (check for file type, size, etc.)

if (!in_array(pathinfo($fileName, PATHINFO_EXTENSION), array('jpg', 'png', 'gif'))) {

echo "Invalid file type!";

exit;

$targetPath = $uploadDir . $fileName;

if (move_uploaded_file($tmpName, $targetPath)) {

echo "File uploaded successfully!";

} else {

echo "Error uploading file!";

Question 7.
a) There are 2 HTTP request methods: GET and POST. Differentiate between them. (4)
b) Describe the purpose, function and benefits of website frameworks. (9)
c) Discuss the types and examples of available website frameworks. (10)

© 2024, Programmers Live Longer!


© 2024, Programmers Live Longer!

You might also like