Web Programming
Web Programming
YEAR OF
CATEGORY L T P CREDIT INTRODUCTION
CST463 WEB PROGRAMMING
PEC 2 1 0 3 2019
Preamble: This course helps the learners to understand the web programming concepts. It
includes the essential frontend and backend technologies needed for the development of web
applications. The learners will have an opportunity to gain necessary web development skills such
as HTML, CSS, JavaScript, PHP, MySQL integration, JSON and Laravel framework.
Prerequisite: Knowledge of Programming is required.
Course Outcomes: After the completion of the course the student will be able to
CO1 Use HyperText Markup Language (HTML) for authoring web pages and understand
the fundamentals of WWW. (Cognitive Knowledge Level: Understand)
CO2 Construct and visually format responsive, interactive web pages using CSS and
JavaScript (JS) (Cognitive Knowledge Level: Apply)
CO3 Construct websites using advanced sever side programming tool PHP (Cognitive
Knowledge Level: Apply)
CO4 Develop dynamic web applications using PHP and perform MySQL database
operations. (Cognitive Knowledge Level: Apply)
CO5 Explain the importance of object exchange formats using JSON and the MVC based
web application development frameworks (Laravel) (Cognitive Knowledge Level:
Understand)
PO PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
1
CO1
CO2
CO3
CO4
CO5
Assessment Pattern
Remember 20 20 20
Understand 40 40 40
Apply 40 40 40
Analyze
Evaluate
Create
Mark Distribution
150 50 100 3
Syllabus
Module – 1 (WWW, HTML)
Introduction to the Internet & WWW: Evolution of Internet & World Wide Web- Web Basics,
URI’s & URL-MIME.
Backgrounds-List Styles-Element Dimensions- Table Layouts-Box Model and Text Flow-div and
span -Basics of Responsive CSS, Media port & Media Queries.
PHP Language Structure: Introduction- Building blocks of PHP-Variables, Data Types -simple
PHP program-Converting between Data Types- Operators and Expressions -Flow Control
functions - Control statements- Working with Functions- Initialising and Manipulating Arrays--
Objects- String Comparisons-String processing with Regular Expression
Advanced PHP: Form processing and Business Logic-Cookies- Sessions & MySQL Integration-
Connecting to MySQL with PHP- Performing CREATE, DELETE, INSERT, SELECT and
UPDATE operations on MySQL table -Working with MySQL data-Reading from Database-
Dynamic Content.
JSON Data Interchange Format: Syntax, Data Types, Object, JSON Schema, Manipulating
JSON data with PHP
Text Books
1 Paul J. Deitel, Harvey M. Deitel, Abbey Deitel, Internet & World Wide Web
How to Program 5th Edition [Module 1,2,3,4]
2. Lindsay Bassett, Introduction to JavaScript Object Notation: A To-the-Point Guide to JSON
1st Edition, O’Reilly [Module 5]
3. Julie C. Meloni, Pearson -PHP, MySQL & JavaScript All in One, Sams Teach Yourself,5th Ed
[Module 4]
4. Matt Stauffer,” LARAVEL up and Running, A framework for building modern PHP apps”1st
Edition, O’REILLY [Module 5]
Reference Books
1. Robert W Sebesta, Programming the World Wide Web, 7/e, Pearson Education Inc,8th Edition
2. Larry Ullman, Pearson- PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide
3. Eric van der Vlist, Danny Ayers, Erik Bruchez, Joe Fawcett, Alessandro Vernet",Wrox-
Professional Web 2.0 Programming, Wiley-India edition
4. Web Technologies Black Book 2018(As per Mumbai University Syllabus) HTML, CSS3,
JavaScript, iQuery, AJAX,PHP,XML,MVC and Laravel DT Editorial Services (ISBN:
9789386052490)
QP CODE:
PART A
1. Define WWW. List any two examples of web server & web browser. Differentiate
between URL and a domain?
2. Write the syntax of the URL? Rewrite the default URL of your university website
by adding a subdomain named ‘Research’ and a web page named ‘FAQ.html’.
Also link this URL through the logo of ‘kturesearch.png’ placed in a web page.
The FAQ page should be opened in a new window.
4. What are different ways of adjusting spacing in a text with suitable example.
5. Discuss the various CSS style sheet levels with suitable examples. How are
conflicts resolved when multiple style rules apply to a single web page element?
6. Describe how input from an HTML form is retrieved in a PHP program, with an
example
8. Discuss the various steps for establishing PHP-MySQL connection with a MySQL
database ?
Part B
(Answer any one question from each module. Each question carries 14 Marks)
11. (a) Design a webpage that displays the following table. (6)
(b) What is the difference between radio buttons and checkboxes when (8)
implemented using HTML? Write HTML code to implement a form which
has the following elements:
i. A textbox which can accept a maximum of 25 characters
ii. Three radio buttons with valid Label, Names and values
iii. Three check boxes buttons with valid Label, Names and values
iv. A selection list containing four items, two which are always visible
v. A submit button clicking on which will prompt the browser to send the
form data to the server “http://www..mysite.com/reg.php” using “POST”
method and reset button to clear its contents. You can use any text of
your choice to label the form elements.
OR
12. (a) Write the equivalent HTML code to implement the following in a web page: (6)
(i) An image titled “birds.jpg” with a height of 100 pixels and width of 200
pixels. If the image cannot be accessed, a message “No image available”
should be displayed (ii) A hyperlink to the URL
“www.mysite.com/birds.jpg”. The hyperlink should have the label “Click
Here”.
(b) Create a static HTML document for your portfolio, which includes the (8)
following contents: your name, address, Mobile Number and email address.
Also add the details about your college, university, your major and the batch
13. (a) Illustrate the usage of JavaScript DOM in event handling and explain any (8)
three methods with example.
(b) Write CSS and the corresponding HTML code for the following: (6)
i. Set the background color for the hover and active link states to "green"
ii. Set the list style for unordered lists to "square".
iii. Set "Flower.png" as the background image of the page and set 3%
margin for the pages
iv. Set dashed border for left and right and double border for top & bottom
of a table with 2 rows.
OR
14. (a) List the order of precedence of style levels. Organize a sample web page for (6)
providing ‘KTU BTech Honours Regulation 19’ for KTU and use embedded
Style sheet to apply minimum 5 styles for list, tables and pages.
(b) Illustrate the different ways of Array declaration in JavaScript. Describe the (8)
function of the following JavaScript Array object methods with examples.
(i) join (ii) slice
15. (a) Explain any six string handling functions used in PHP with example. (6)
(b) How does a PHP array differ from an array in C? List the different ways to (8)
create an array in PHP with an example. Explain any 4 functions that deals
with PHP array.
OR
16. (a) During the process of fetching a web page from a web server to a client (6)
browser, at what point does an embedded PHP script get executed. What are
the two modes that the PHP processor operates in? Explain
17. (a) Write equivalent PHP statements corresponding to the following: (8)
i. Declare an associative array named “ages” to store the key-value pairs
(“Alice”, 30), (“Bob”, 30), (“Harry”, 35), (“Mary”, 32).
ii. Modify the value associated with the key “Mary” to 28.
iii. Sort the array according to values maintaining the key-value
relationships and print the sorted key-value pairs.
iv. The entry identified by the key “Bob”
(b) What are the uses of cookies in web pages? Describe syntax for setting (6)
cookies in PHP. How can you access and delete the cookie using setcookie()
function?
OR
18. (a) Write a PHP form handling program to perform the user registration of any (8)
website with a minimum of 5 different fields and insert the data into a
MySQL table after establishing necessary connections with the DB,
(b) Design the HTML page which enters a given number and embed the PHP (6)
code to display a message indicating, whether the number is odd or even,
when clicking on the ‘CHECK NUMBER’ button.
19. (a) With a neat diagram, explain about Laravel MVC Framework. (6)
OR
20. (a) Enumerate the data types in JSON. Illustrate the document definition of a (8)
‘Student document ‘using JSON Schema.
Teaching Plan
No of
Lecture
No Contents
Hrs (35
hrs)
Module 1 (7 hours)
1.1 Evolution of Internet &World Wide Web- Web Basics URI’s & URL -MIME 1
[Book 1 - Chapter 1]
Introduction to HTML5
1.4 Special Characters & Horizontal Rules- meta Elements- div and span 1
[Book 1 - Chapter 2]
1.6 HTML5 Form input types, input and data list Elements and autocomplete 1
attributes-Page Structure Elements [Book 1 - Chapter 3]
2.5 Box Model and Text Flow, Basics of Responsive CSS-Media port & Media 1
Queries [Book 1 - Chapter 4]
Introduction to JavaScript
2.10 Document Object Model (DOM)- Form processing [Book 1 - Chapter 12,13] 1
Module 3 (6 hours)
Introduction to PHP
3.1 Building blocks of PHP-Variables, Data Types simple PHP program [Book 3- 1
Chapters 4]
3.2 Converting between Data Types, Operators and Expressions -Flow Control 1
functions [Book 1- Chapters 19]
3.5 Working with Strings-String processing with Regular expression, Pattern Matching 1
[Book 1- Chapters 19]
Module 4 (6 hours)
PHP -MYSQL
4.4 Performing CREATE, DELETE, INSERT operations on MySQL table from PHP 1
Program. [Book 4- Chapters 16]
4.5 Performing SELECT and UPDATE operations on MySQL table from PHP 1
Program. [Book 4- Chapters 16]
Module 5 (6 hours)
JSON
5.2 JSON Schema, Manipulating JSON data with PHP [Book 2 - Chapter 3,4] 1
LARAVEL