Web development lab manual
Web development lab manual
Laboratory Manual
PEO Statements
PEO-1:
The graduates will be successful IT professionals in their chosen area
and / or pursue higher studies.
PEO-2:
The graduates will comprehend, analyze, design and create novel
products and technologies that provide sustainable solutions.
PEO-3:
The graduates will demonstrate multidisciplinary knowledge, personal
and interpersonal skills and work as an effective team member with
ethical standards.
PO Statements
1. Engineering Knowledge: Apply the knowledge of mathematics,
science, engineering fundamentals, and an engineering specialization
to the solution of complex engineering problems.
12. Life-long Learning: Recognize the need for, and have the
preparation and ability to engage in independent and life-long
learning in the broadest context of technological change.
PSO 1:
Ability to identify, design and develop processes and systems for enterprises.
PSO 2:
Ability to identify, deploy and maintain the IT infrastructure based on the needs of
the businesses.
PSO 3:
Practice and promote information technologies for societal needs.
ASO 2:
ASO 3:
ASO 4:
ASO 5:
ASO 6:
Identify and analyze user needs to take them into account in the selection, creation,
integration, evaluation, and administration of computing-based systems.
Course Outcome(s)
CO1 Apply frontend web development concepts in designing static pages.
CO2 Apply frontend web development concepts in deigning dynamic pages.
CO3 Develop web server incorporating multimedia features.
CO4 Develop dynamic server based applications through ASP.
CO5 Apply database concepts in storing and managing data generated through
web applications
Weekly Plan
Week Lecture (2 Hour) Practical (2 Hours) X-Component (3 Hours)
Week 1 History of Internet and Familiarizing Web Create a profile page in Google
W3C – Internet Protocols Applications and browsers – Sites
– HTTP Request and Web portals, e-commerce, --Include Name and public
Response – HTTP blogs, social media, etc. personal details
Message Header Types --Include photo
Week 2 HTML5: Basic Tags – Working with basic HTML --Include About Yourself
Metadata Tags – Section Tags --Your expertise and
Tags – Grouping Tags – achievements
Text Formatting Tags --Your strengths
Week 3 Embedded Content Tags – Working with tables and --Photo gallery
Multimedia – Tables – Form Elements -- Any specific interests
Forms
Week 4 JavaScript: History – Syntax Event Handling - Validating Simple game using JS and CSS
– variables – data types – Simple Form tricks
operators - control Event Handling - Background
structures Color Change
Event Handling -
OnMouseover event
Event Handling -
Week Broken Access Control - Add appropriate security Test the Mini Project for these
15 Security check for XSS, RCE etc. specific attacks. Try to resolve
Misconfiguration - Cross- it.
Site Scripting XSS, RCE
Do’s Dont’s
Be punctual. Don’t use the system for typing
Follow dress code. letters, reports etc., during lab
Remove the foot wears. hours.
Keep personal belonging in allotted Don’t use others login.
place. Don’t change the configuration
Submit the observation record of and system settings.
previous experiments. Don’t bring floppies, cd’s inside
Use the allotted system and login as lab without permission
per instruction only. Don’t load unauthorized software.
Take the printouts regularly.
While leaving the lab, arrange the
chairs you are seated in a proper way.
Help to maintain the cleanliness of
the lab.
Maintain strict discipline.
Assessment Pattern:
Table of Contents
Topic Page No
1 Familiarizing Web Development 1
1.1 Web Technology 1
1.2 Web Development 1
1.2.1 Frontend Development 1
1.2.2 Backend Development 2
2 Familiarizing Development Environment 4
2.1 Text Editor and IDE 4
3 Familiarizing HTML Basic HTML Tags 5
3.1 HTML Elements and Attributes 5
3.2 HTML Structure 5
3.3 Basic HTML Tags 6
4 Html Links And Images 8
5 Working with Lists 13
6 Working with Tables 17
7 Cascading Style Sheet 20
8 JavaScripts 25
9 ASP.NET Form Designing 31
10 ASP.NET Validation Controls 33
11 ASP.NET State Management 35
12 ASP.NET DB Connectivity 37
On the backend, we will be using ASP.NET with C# for the business logic
and ADO.NET with MS SQL server for database connectivity.
HTML Elements are also known as HTML tags. They have the
following format.
<tagname> is known as start tag. The text that you enter after the start
tag will be in scope until the end tag. </tagname> is known as end tag.
This will close the scope of the start tag.
Example:
HTML Attributes are mentioned within the HTML Element's start tag.
They provide modifiers for the HTML Elements. HTML Attributes will
be of the following format.
<a href='https://kalasalingam'>KARE</a>
The content inside the <body> section (the white area above) will be
displayed in a browser. The content inside the <title> element will be
shown in the browser's title bar or in the page's tab.
3.3 Basic HTML Tags:
Problem
Statement:
Practice all the basic HTML statements. Note down the observations on
the changes that happens in the output page.
Procedure:
Write the HTML code in any text editor and save with .html extension.
Once the coding is done, open the saved file from the file location by
double clicking it. Observe the changes in the Web browser.
Tag Description
<!DOCTYPE> Defines the document type
<html> Defines an HTML document
<head> Contains metadata/information for the
document
Department of ation Technology
Inform y of Research and on 6
Kalasalingam Educati
Academ
WEB APPLICATION DEVELOPMENT / 212INT1401
Formatting
Tag Description
<b> Defines bold text
<big> Not supported in HTML5. Use CSS instead.
Defines big text
<center> Not supported in HTML5. Use CSS instead.
Defines centered text
<cite> Defines the title of a work
<del> Defines text that has been deleted from a
document
<em> Defines emphasized text
<i> Defines a part of text in an alternate voice or
mood
<ins> Defines a text that has been inserted into a
document
<pre> Defines preformatted text
<small> Defines smaller text
<strike> Not supported in HTML5. Use <del> or <s>
instead.
Defines strikethrough text
<strong> Defines important text
<sub> Defines subscripted text
<sup> Defines superscripted text
<u> Defines some text that is unarticulated and
styled differently from normal text
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
The <img> tag is used to embed an image in an HTML page. Images are
not technically inserted into a web page; images are linked to web pages.
The <img> tag creates a holding space for the referenced image. The
<img> tag has two required attributes: src
- Specifies the path to the image
alt - Specifies an alternate text for the image, if the image for some
reason cannot be displayed
4.2 Problem Statement:
Design pages using multiple links and images. Try adding all attributes
of the tags. Note down the observations on the changes.
Procedure:
Write the HTML code in any text editor and save with .html extension.
Once the coding is done, open the saved file from the file location by
double clicking it. Observe the changes in the Web browser.
Sample Outputs:
Links:
Images:
<body>
<img src="laptop.png" width="200" height="150">
<img src="laptop.png" width="300" height="250">
</body>
5.1 Lists:
HTML has three types of lists
Unordered Lists
Ordered Lists
Description Lists
Unordered Lists: As the name indicates it is used to configure list of
unordered elements.
ul is the tag used to create unordered lists.
Example:
python
cobra
crocodile
tiger
Ordered Lists:
As the name indicates it is used to configure list of ordered elements.
1. python
2. cobra
3. crocodile
4. tiger
Description
Lists:
Description Lists use name value pairs instead of list items.
Example:
Animals
Tiger
Procedure:
Write the HTML code in any text editor and save with .html extension.
Once the coding is done, open the saved file from the file location by
double clicking it. Observe the changes in the Web browser.
</DT>
</DL>
Sample
Outputs:
Unordered List:
Ordered List:
6. TABLES
6.1 HTML Tables:
A table is defined using the <table> element, and contains a number of
table cells ( <td>, for “table data” ) which are organized into table rows (
<tr>). The markup (HTML code) for a table is always based on rows,
ever columns. Table cells which act as column headers or row headers
should use the <th> (table header) element.
Table cells can be merged using the colspan and rowspan attributes.
Tables can be broken into sections using the following elements:
<thead> — Table header
<tbody> — Table body
<tfoot> — Table footer
A caption can be added to a table using the <caption> element.
Procedure:
Write the HTML code in any text editor and save with .html extension.
Once the coding is done, open the saved file from the file location by
double clicking it. Observe the changes in the Web browser.
Specific Attributes
The HTML <table> tag also supports the following additional attributes −
Attribute Value Description
align right Deprecated − Visual alignment.
left
center
justify
char
bgcolor rgb(x,x,x) Deprecated − Specifies the background
#hexcode color of the table.
colorname
border pixels Deprecated − Specifies the border width.
A value of "0" means no border.
cellpadding pixels or % Deprecated − Specifies the space between
the cell borders and their contents.
cellspacing pixels or % Deprecated − Specifies the space between
cells.
frame void Deprecated − Used in conjunction with the
above border attribute, specifies which side of the
below frame that makes up the border
hsides surrounding the table is displayed.
lhs
rhs
vsides
box
border
width pixels or % Deprecated − Specifies the width of the
table.
<head>
<style>
h1 { color: blue; }
</style>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>This is a sample text with css applied</h1>
<p style="color:red;">This is my first paragraph</p>
<div id="my_div_1">This is my second paragraph</div>
</body>
Procedure:
Write the HTML code in any text editor and save with .html extension.
Write the CSS in the internal file or as a separate .css file
Once the coding is done, open the saved file from the file location by
double clicking it. Observe the changes in the Web browser.
8. JavaScript
8.1 JavaScript
JavaScript was initially designed to run on browsers alone. Now it can run
from command interface / Server environment, mobile app, gaming etc.
<html>
<body>
<script type = "text/javascript">
document.write(“Written from JavaScript!")
</script>
</body>
</html>
Case Sensitivity
JavaScript Events
The change in the state of an object is known as an Event. In html, there are
various events which represents that some activity is performed by the user
or by the browser. When javascript code is included in HTML, js react over
these events and allow the execution. This process of reacting over the
events is called Event Handling. Thus, js handles the HTML events via
Event Handlers.
For example, when a user clicks over the browser, add js code, which will
execute the task to be performed on the event.
Mouse events:
Keyboard events:
Window/Document events
8.3 Procedure:
Open any text editor to write the HTML and JS file.
In case the JS is internal, use the same file for HTML and JS
In case the JS is external use a separate file with extension .js for the
java script files.
Run the HTML Files to see the outputs.
8.4 Exercises:
Before you start, make sure the following software is installed on your
computer:
Microsoft Visual Studio or Microsoft Visual Studio Community edition
is installed.
The project will take a little time to create. When it's ready, open the
Default.aspx page.
You can switch between Design view and Source view by selecting an
option at the bottom of the center window. Design view displays
ASP.NET Web pages, master pages, content pages, HTML pages, and
user controls using a near-project name- view. Source view displays the
HTML markup for your Web page, which you can edit.
9.4 Exercises
Simple form design for student registration or ticket booking or login
forms etc.
You can use ASP.NET validation, which will ensure client, and server
validation. It work on both end; first it will work on client validation and
than on server validation. At any cost server validation will work always
whether client validation is executed or not. So you have a safety of
validation check. For client script .NET used JavaScript.
WebUIValidation.js file is used for client validation by .NET
RangeValidator - Checks that the user enters a value that falls between
two values
RegularExpressionValidator - Ensures that the value of an input control
matches a specified pattern
CustomValidator - Allows you to write a method to handle the validation
of the value entered
ValidationSummary - Displays a report of all validation errors occurred in
a Web page
Application State
Session State
11.2 Problem Statement
Let us assume that someone is trying to access a banking website and he
has to fill in a form. So the person fills in the form and submits it. After
submission of the form, the person realizes he has made a mistake. So he
goes back to the form page and he sees that the information he submitted
is lost. So he again fills in the entire form and submits it again. This is
quite annoying for any user. So to avoid such problems "STATE
MANAGEMENT" have to be used to solve the problem.
11.3 Procedure
1. Start a new web site with two web forms. Let Default.aspx and
Success.aspx are two web forms.
2. Design Default.aspx page with required fields and a submit button.
3. After filling all information, it should be displayed on Success.aspx
page using
a) Client side techniques
b) Server side techniques
11.4 Exercises
Similar programs like counter, login form, registration forms etc can be
designed.
We can also observe various classes in the preceding diagram. They are:
Connection Class
Command Class
DataReader Class
DataAdaptor Class
DataSet.Class
1. Connection Class
In ADO.NET, we use these connection classes to connect to the database.
These connection classes also manage transactions and connection
pooling. To learn more about connection classes, start here: Connection
in ADO.NET.
2. Command Class
The Command class provides methods for storing and executing SQL
statements and Stored Procedures. The following are the various
commands that are executed by the Command Class.
ExecuteReader: Returns data to the client as rows. This would typically
be an SQL select statement or a Stored Procedure that contains one or
more select statements. This method returns a DataReader object that can
be used to fill a DataTable object or used directly for printing reports and
so forth.
ExecuteNonQuery: Executes a command that changes the data in the
database, such as an update, delete, or insert statement, or a Stored
Procedure that contains one or more of these statements. This method
returns an integer that is the number of rows affected by the query.
ExecuteScalar: This method only returns a single value. This kind of
query returns a count of rows or a calculated value.
ExecuteXMLReader: (SqlClient classes only) Obtains data from an SQL
Server 2000 database using an XML stream. Returns an XML Reader
object.
3. DataReader Class
The DataReader is used to retrieve data. It is used in conjunction with
the Command class to execute an SQL Select statement and then access
the returned rows. Learn more here: Data Reader in C#.
4. DataAdapter Class
The DataAdapter is used to connect DataSets to databases. The
DataAdapter is most useful when using data-bound controls in Windows
Forms, but it can also be used to provide an easy way to manage the
connection between your application and the underlying database tables,
views and Stored Procedures. Learn more here: Data Adapter in
ADO.NET.
5. DataSet Class
The DataSet is the heart of ADO.NET. The DataSet is essentially a
collection of DataTable objects. In turn each object contains a collection
of DataColumn and DataRow objects. The DataSet also contains a
Relations collection that can be used to define relations among Data
Table Objects.
12.2 Procedure
Design Simple application using Form designer
Create necessary DB and tables in the MS Sql server
Create Connection with a connection string
Do the database operations with the command class User
reader class to read and show the data to the user
12.3 Experiments
Create Db Operations for Student management, reservation systems etc