Unit 01
Unit 01
SOFTWARE FRAMEWORKS
CSEN3071
Course Educational Objectives
Design static web page using Markup languages.
Design and implement web pages using style sheets.
Implement with java script web applications with dynamic
web pages.
Understand working of Web servers
Develop web applications using frameworks.
UNIT 1:Introduction to Web Application Designing
Introduction: Building a Web Application, Components –
Client Side, Server-side Components, 2 tier, n-tier
architectures, Networks, Protocols. MVC Pattern.
HTML5: Basic syntax, HTML document structure, text
formatting, images, lists, links, tables, forms, frames.
Cascading Style Sheets (CSS3): Levels of style sheets, style
specification formats, selector forms, font properties, list
properties, colour properties, alignment of text, background
images, The Box Model.
UNIT 2:Client-Side Scripting
JavaScript: Introduction, Functions, Arrays, DOM, Built-in
Objects, Regular Expression, Event handling, Validation,
Dynamic documents.
UNIT 3:XML, JSON
Syntax of XML, document structure, and document type
definition, namespaces, XML schemas, document object
model, presenting XML using CSS, XSLT, XPath, XQuery,
FLOWR. JSON: Features, JSON vs. XML, JSON Data
Types, JSON Objects, JSON Arrays, JSON HTML.
UNIT 4:Server-side processing with Java
Introduction to Servlet, Life cycle of Servlet, Servlet
methods, Java Server Pages.
Working with tomcat webserver Database connectivity –
Servlets, JSP, JDBC, Practice of SQL Queries
UNIT 5:Web Application Frameworks
Introduction to Web application development frameworks,
Types of Frameworks. ReactJS. Angular JS. Angular JS:
Introduction, Angular JS Expressions, Modules, Data
Binding, Controllers, DOM, Events, Forms, Validations.
ReactJS: Introduction, components, Styling, Form
programming, Building and Deployment
LAB Experiments:
Design static web pages required for any online services web site.
Apply Cascading Style Sheets to the Web pages.
Design dynamic webpages using Java script.
Write JavaScript to validate input fields
Write an XML file to display various contents.
Write a XSD to validate an XML file.
Design a web application and deploy on Tomcat webserver
Connect to a Database (MySQL/SQLServer/Oracle/MongoDB)
and create data and query data using JDBC
Implement a Simple Application using JSON
Develop a Complete Web Application for a simple case study
using ReactJS /AngularJS
Course Outcomes:
After successful completion of the course the student will be able to:
Design interactive web pages with client and server side scripting
Static Web Application looks the same to everyone who visits. It doesn't
update in real-time or store any information on you, the user.
Dynamic Web Applicationslook different to different users, even though
they all share the same base code. They are updated in real-time and store
information about the users. They generally run scripts and CSS to achieve their
look.
E-commerce Web Applications allow you to buy a product or make a
payment. They are generally built with PHP, Python, and Ruby on Rails.
Multilingual Web Applications allows users to view multiple languages
corresponding to them simultaneously.
Single-Page Web Applications act like a single webpage and can achieve
almost everything traditional web applications can do. Some examples are
Gmail and PayPal.
Multiple-Page Web Application reloads the entire page whenever the user
switches to another one. Major examples include Facebook and Wikipedia.
Server side vs Client Side
In the world of web development, the terms "server-side"
and "client-side" refer to the location where certain tasks or
processes are carried out in a web application.
Understanding the difference between these two types of
processes can help developers to choose the right approach
for a particular task or goal.
By choosing the right mix of server-side and client-side
processes, developers can create web applications that are
efficient and effective, and that provide a good user
experience.
What is server-side?
Client-side Server-side
Does not need interaction with the server Requires interaction with the server
Reduces load on the server’s proccessing Allows the server to provide dynamic
unit
Languages used: HTML, CSS, JavaScript websites tailored to the user. Increases the
processing load on server.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
Example Explained
You can add comments to your HTML source by using the following syntax
<!-- Write your comments here -->
Notice that there is an exclamation point (!) in the opening tag, but not in th
Note: Comments are not displayed by the browser, but they can help docum
source code.
With comments you can place notifications and reminders in your HTML:
Example
<!-- This is a comment -->
<p>This is a paragraph.</p>
<!-- Remember to add more information here -->
Comments are also great for debugging HTML, because you can comment o
code, one at a time, to search for errors:
HTML Tags
An HTML <br> tag is used for line break and it can be used wit
elements.
An HTML <hr> tag is used to apply a horizontal line between t
two paragraphs
HTML Line Breaks
The most important attribute of the <a> element is the href att
indicates the link's destination.
The link text is the part that will be visible to the reader.
Clicking on the link text, will send the reader to the specified U
By default, links will appear as follows in all browsers:
An unvisited link is underlined and blue
A visited link is underlined and purple
An active link is underlined and red
HTML Links
<!DOCTYPE html>
<html>
<head>
<title>GITAM</title>
</head>
<body>
<p>Click on <a href="https://www.gitam.edu" target="_bl
UNiversity </a>to go on home page of GITAM University.</
</body>
</html>
HTML Lists
HTML Lists are used to specify lists of information. All lists may
more list elements.
There are three different types of HTML lists:
Ordered List or Numbered List (ol)
Unordered List or Bulleted List (ul)
Description List or Definition List (dl)
HTML Ordered List or Numbered List
in the ordered HTML lists, all the list items are marked with nu
It is known as numbered list also.
The ordered list starts with <ol> tag and the list items start wit
<ol>
<li>Aries</li>
<li>Bingo</li>
<li>Leo</li>
<li>Oracle</li>
</ol>
HTML Ordered List or Numbered List
Numeric Number (1, 2, 3)
Capital Roman Number (I II III)
Small Romal Number (i ii iii)
Capital Alphabet (A B C)
Small Alphabet (a b c)
HTML Ordered List or Numbered List
To represent different ordered lists, there are 5 types of attributes in <ol> tag.
Type Description
In HTML Unordered list, all the list items are marked with bulle
It is also known as bulleted list also.
The Unordered list starts with <ul> tag and list items start with
<ul>
<li>Aries</li>
<li>Bingo</li>
<li>Leo</li>
<li>Oracle</li>
</ul>
HTML Unordered List or Bulleted List
Type Description
<ul>
<li>HTML</li>
<li>Java</li>
<li>JavaScript</li>
<li>SQL</li>
</ul>
HTML Description List or Definition List
<dl>
<dt>HTML</dt>
<dd>HTML to define the content of web pages.</dd>
<dt>CSS</dt>
<dd>CSS describes how HTML elements should be displayed
<dt>Javascript</dt>
<dd>JavaScript to program the behavior of web pages.</dd
<dt>JSP</dt>
<dd>JSP is a technology to build dynamic web applications.<
</dl>
HTML Tables
Tag Description
<table>
<tr><th>First_Name</th><th>Last_Name</th><th>M
<tr><td>Sonoo</td><td>Jaiswal</td><td>60</td><
<tr><td>James</td><td>William</td><td>80</td>
<tr><td>Swati</td><td>Sironi</td><td>82</td></
<tr><td>Chetna</td><td>Singh</td><td>72</td><
</table>
HTML Table Example
HTML Table with Border
By border attribute of table in HTML
<table border="1">
<tr><th>First_Name</th><th>Last_Name</th><th>M
>
<tr><td>Sonoo</td><td>Jaiswal</td><td>60</td><
<tr><td>James</td><td>William</td><td>80</td>
<tr><td>Swati</td><td>Sironi</td><td>82</td></
<tr><td>Chetna</td><td>Singh</td><td>72</td><
</table>
HTML Table Attributes
Align − Visual alignment.
Border- Specifies the border width. A value of "0" means no border.
width
Bgcolor- Specifies the background color of the table.
Cellpadding -Specifies the space between the cell borders and their co
Cellspacing- Specifies the space between cells.
Colspan- Colspan is an attribute which assigns multiple columns to a
Rowspan- Rowspan in table, works similar to the clospan for columns
assign multiple rows to a cell
Width –specifies the width of the table
Height- Specifies the height of the table
<html>
<head><title>GITAM Time Table</title>
</head>
<body>
<table border="1" width="500" height="500" align="center" bgcolor="red" cellspacing=
>
<caption>TIME TABLE</caption>
<tr><th>First_Name</th><th>Last_Name</th><th>Marks</th></tr>
<tr><td>Sonoo</td><td>Jaiswal</td><td>60</td></tr>
<tr><td>James</td><td>William</td><td>80</td></tr>
<tr><td>Swati</td><td>Sironi</td><td>82</td></tr>
<tr><td>Chetna</td><td>Singh</td><td>72</td></tr>
</table>
</body>
</html>
HTML <video> Tag
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
HTML Audio Tag
HTML forms are required if you want to collect some data from
For example: If a user want to purchase some items on internet,
the form such as shipping address and credit/debit card details s
sent to the given address.
HTML Form Syntax
<form>
.
form elements
.
</form>
Attributes
Attribute Value Description
accept-charset character_set Specifies the character encod
for the form submission
action URL Specifies where to send the fo
is submitted
autocomplete on Specifies whether a form sho
off on or off
enctype application/x-www-form-urlencoded Specifies how the form-data
multipart/form-data when submitting it to the ser
text/plain method="post")
method get Specifies the HTTP method t
post form-data
name text Specifies the name of a form
novalidate novalidate Specifies that the form should
when submitted
target _blank Specifies where to display the
_self received after submitting the
HTML Form Tags
Tag Description
The <input> tag specifies an input field where the user can ente
The HTML <input> element is the most used form element.
An <input> element can be displayed in many ways, depending
attribute.
The <input> Element
•<input type="button">
•<input type="checkbox">
•<input type="color">
•<input type="date">
•<input type="datetime-local">
•<input type="email">
•<input type="file">
•<input type="hidden">
•<input type="image">
The <input> Element
•<input type="month">
•<input type="number">
•<input type="password">
•<input type="radio">
•<input type="range">
•<input type="reset">
•<input type="search">
•<input type="submit">
The <input> Element
•<input type="tel">
•<input type="text"> (default v
•<input type="time">
•<input type="url">
•<input type="week">
<input> Tag Attributes
Attribute Value Description
accept file_extension Specifies a filter for what file
audio/* the file input dialog box (only
video/*
image/*
media_type
alt text Specifies an alternate text for
type="image")
autocomplete on Specifies whether an <input>
off autocomplete enabled
CSS is used to define styles for your web pages, including the
design, layout and variations in display for different devices
and screen sizes.
Advantages of CSS
CSS saves time − You can write CSS once and then reuse same
sheet in multiple HTML pages.You can define a style for each
HTML element and apply it to as many Web pages as you want.
Pages load faster − If you are using CSS, you do not need to
write HTML tag attributes every time. Just write one CSS rule of
a tag and apply it to all the occurrences of that tag. So less code
means faster download times.
Easy maintenance − To make a global change, simply change
the style, and all elements in all the web pages will be updated
automatically.
Superior styles to HTML − CSS has a much wider array of
attributes than HTML, so you can give a far better look to your
HTML page in comparison to HTML attributes.
Advantages of CSS
The ID Selectors
The id selector uses the id attribute of an HTML element to
select a specific element.
The id of an element should be unique within a page, so the
id selector is used to select one unique element!
To select an element with a specific id, write a hash (#)
character, followed by the id of the element.
#black {
color: #000000;
}
The Type Selectors
Comments are used to explain the code, and may help when you edit
the source code at a later date.
Comments are ignored by browsers.
A CSS comment starts with /* and ends with */. Comments can also
span multiple lines:
Example
p{
color: red;
/* This is a single-line comment */
text-align: center;
}
/* This is
a multi-line
comment */
Levels of Stylesheets
There are three ways of inserting a style sheet:
External style sheet
Internal style sheet
Inline style
When a browser reads a style sheet, it will format the HTML
document according to the information in the style sheet.
External Style Sheet
h1 {
color: navy;
margin-left: 20px;
}
Internal Style Sheet
An internal style sheet may be used if one single page has a unique style.
Internal styles are defined within the <style> element, inside the <head>
section of an HTML page:
Example
<head>
<style>
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
Inline Styles
Color Names
In HTML, a color can be specified by using a color name:
Color Values
In HTML, colors can also be specified using RGB values, HEX
values, HSL values, RGBA values, and HSLA values:
RGB Value
In HTML, a color can be specified as an RGB value, using this
formula:
rgb(red, green, blue)
rgb(255, 0, 0) is displayed as red
HEX Value
In HTML, a color can be specified using a hexadecimal value
in the form:
#rrggbb
Where rr (red), gg (green) and bb (blue) are hexadecimal
values between 00 and ff (same as decimal 0-255).
For example, #ff0000 is displayed as red, because red is set
to its highest value (ff) and the others are set to the lowest
value (00).
HSL Value
In HTML, a color can be specified using hue, saturation, and
lightness (HSL) in the form:
hsl(hue, saturation, lightness)
Hue is a degree on the color wheel from 0 to 360. 0 is red,
120 is green, and 240 is blue.
Saturation is a percentage value, 0% means a shade of gray,
and 100% is the full color.
Lightness is also a percentage, 0% is black, 50% is neither
light or dark, 100% is white
RGBA Value
RGBA color values are an extension of RGB color values
with an alpha channel - which specifies the opacity for a
color.
An RGBA color value is specified with:
rgba(red, green, blue, alpha)
The alpha parameter is a number between 0.0 (fully
transparent) and 1.0 (not transparent at all):
HSLA Value
HSLA color values are an extension of HSL color values with
an alpha channel - which specifies the opacity for a color.
An HSLA color value is specified with:
hsla(hue, saturation, lightness, alpha)
The alpha parameter is a number between 0.0 (fully
transparent) and 1.0 (not transparent at all):
Example
hsla(9, 100%, 64%, 0)
CSS Text Properties
color The color property can be applied to set the color in Blue, #ff0000,
your text. rgb(255,0,0)
direction The direction property can be applied to set the rtl. ltr
direction of your text.
text-align The text-align property can be applied to align text in left;,right,center or justify
your document.
white-space The white-space property can be applied to control flow,
as well as to the formatting of your text.
line-height The line-height property is applied to assign space normal, number, length, %
between lines:
CSS Text Properties
Text Color
The color property is used to set the color of the text. The
color is specified by:
a color name - like "red"
a HEX value - like "#ff0000"
an RGB value - like "rgb(255,0,0)"
Text Alignment
The text-align property is used to set the horizontal
alignment of a text.
A text can be left or right aligned, centered, or justified.
Text Decoration
The text-decoration property is used to set or remove
decorations from text.
The value text-decoration: none; is often used to remove
underlines from links:
CSS Fonts Properties
The CSS font properties define the font family, boldness, size,
and the style of a text.
Property Description
font-family Specifies the font family for text Times New Roman, Times,
serif, Arial, sans-serif
font-size Specifies the font size of text
background-attachment Sets whether a background image is fixed or Scroll, fixed, local, initial, inherit
scrolls with the rest of the page
The CSS border properties allow you to specify the style, width,
and color of an element's border.
Border-style
The border-style property specifies what kind of border to display.
Border -width
The border-width property specifies the width of the four
borders.
Border -color
The border-color property is used to set the color of the four
borders.
Border-radius
The border-radius property is used to add rounded borders to an
element:
CSS Margins
The CSS margin properties are used to create space around
elements, outside of any defined borders.
CSS has properties for specifying the margin for each side of
an element:
margin-top
margin-right
margin-bottom
margin-left
CSS Padding
In CSS, the term "box model" is used when talking about design
and layout.
The CSS box model is essentially a box that wraps around every
HTML element. It consists of: margins, borders, padding, and the
actual content. The image below illustrates the box model:
Explanation of the different parts:
Content - The content of the box, where text and images appear
Padding - Clears an area around the content. The padding is
transparent
Border - A border that goes around the padding and content
Margin - Clears an area outside the border. The margin is
transparent
The CSS Box Model
Property Description