MAHAKAL INSTITUTE OF TECHNOLOGY BEHIND AIR STRIP UJJAIN (MP) AICTE Approved, NBA Accredited, ISO 9001-2000 Certified
Department of Computer Computer Science Science & Engineeri Engineering ng
WEB ENGINEERING (CS-802) LAB - MANUAL Stud Studen entt Name Name:: - ………… ……………… ………… ………. …... Enro Enroll llme ment nt No: No: - ………… ……………… ………… ………. …. Branch/Year/Semester:-……………….
Affiliated to Rajiv Gandhi Prodyogiki Vishwavidyalaya Bhopal (MP)
INDEX
S.No
Name of Algorithm
1
To St Study Web se servers and we web Br Browsers
2
Write the introduction of ASP, PHP and XML
3
Create a web page age purely in HTML code
4
Crea Create te a we web b page page to show show appl applic icat atio ion n of CSS CSS file file
5 6
Stud Study y of of Jav JavaS aScr crip iptt and and apply applyin ing g jav javaa scr scrip iptt to to vali valida date te form Crea Create te a w web eb page page usi using HTML TML, ja java scr script, pt, CSS CSS file
7
Crea Create te a w web eb page page to show show appl applic icat atio ion n of of for form m con contr trol olss
8
a) Write a code in ASP to format the text with HTML tags. b) Write Write a code code to rever reverse se the str string ing.. c) Write Write a code code to to check check is user user is is conne connected cted or not not
9
Crea Create te an XML XML doc docum umen entt tem templ plat atee to to des descr crib ibee the the resu result lt of student in an examination.
10
a. Write the code in PHP by using Loop statements any 2 b.Write the code in PHP using Mathematical operations, String functions (any one).
Date
Sign
Remark
Lab manual Total number of Experiments: 10 S.No
Name of Algorithm
1
To Stud Study y We Web b ser serve vers rs and and web web Brow Browse sers rs
2
a) b) b) c) d)
Days needed to complete
3
Write the introduction of ASP What What are are the the stre streng ngth thss of XML XML techno technolog logy y Write Write shor shortt note note on cond conditi itiona onall statem statement ent and Iter Iterati ations ons in PHP. PHP. What What is the the file file extensi extension on of PERL, PERL, write write the the code code using using FOR and and WHILE loop. e) What What CGI CGI scri script ptss are? are? Crea Create te a w web eb page page pur purely ely in HTML HTML code code
4
Crea Create te a web web page page to show show appl applic icat atio ion n of of CSS CSS fil filee
5
Study Study of Java JavaSc Scri ript pt and and appl applyi ying ng jav javaa scri script pt to to vali valida date te for form m
6
Crea Create te a w web eb page page usin using g HTM HTML L, jav javaa scr scrip ipt, t, CSS CSS fil filee
7
Crea Create te a w web eb page page to to sho show w aapp ppli lica cati tion on of form form cont contro rols ls
8
a) Write a code in ASP to format the text with HTML tags. b) Write Write a code code to revers reversee the the string string.. c) Write Write a code code to check check is is user is is connec connected ted or not
9
Crea Create te an XML XML docu docume ment nt temp templa late te to desc descri ribe be the the res resul ultt of of stu stude dent nt in an examination.
10
1) Write the code in PHP by using Loop statements any 2 2) Write Write the the code code in in PHP using Mathematica Mathematicall operati operations, ons, String String functions (any one).
Distribution of lab hours: Explanation of experiment: Performance of experiment: File checking: Attendance:
1Hour 40 Min. 15 Min. 55 Min. 10 Min. 05 Min.
PROG PROGR RAM NO: - 1 Unit/Topic: Web Server and Browser Browser
PROBLEM DEFINITION: Study of web server and web Browser.
OBJECTIVE: To understand understand working working of web server and browser. browser.
THEORY: Web Server: computer on which a web site is hosted and a program that A web serv server er can can mean mean two thing thingss - a computer on runs on such a computer. So the term web server refers to both hardware and software . We'll look at each of these individually. A web site is a collection collection of web pages. And web pages are digital files, typically written using HyperText Markup Language (HTML). For a web site to be available to everyone in the world at all times, it need to be stored or "hosted" on a computer that is connected to the internet. Such a computer is known as a web Server. Hardware:
There are are several requirem requirements ents for a Server Server computer computer - it needs to be fast, fast, have a large storage storage capacity hard disk and lots of RAM. But the most important is having a permanent internet address also known as an I.P. (Internet protocol) address Software:
A web server program is software software that runs on the web site site hosting Server computer. Its Its main purpose is to serve web pages; which means it waits w aits for requests from web browsers (also known as clients ) and responds by sending the required data back.
Role of Web Serv Server: er:
Web servers servers - the computer computer or the program program - have a vital vital role on the Internet. Internet. The The Server Server machine hosts the web site while the server program helps deliver the web pages and their associated files like images and flash movies. The process of loading a web site/page in a web browser starts with the user either entering the URL in the address bar or clicking on a link. You should know that each web page has a unique address (or URL) on the internet; which means the same page cannot exist in two places.
The browser now needs to send out a request for the web page. Behind the scenes, the URL of resolved into an I.P. address , which in English means, converted to the requested web page is resolved an I.P. addresses - something that computers computers understand. The I.P. address points to to the location of the web site host and the t he request is forwarded to Server computer and passed on to the server s erver software. The server software now takes up and hunts for the requested web page on the hard disk. On finding the file, it sends back a response and the web page file to the browser which then starts displaying the page. A typical web page not only has text but also embedded multimedia elements like images and Flash animation. These "extra" files are separate from the actual web page and need to be sent one by one for the browser to display the web page correctly. ONLY the web browser determines how a web page is displayed; the web server has h as no control over this. The job of a web server ends once it processes the request from a browser and sends the required information.
Web Browser: A Web browser is a software software application application for retrieving, retrieving, presenting, presenting, and traversing traversing information information resources resources on the World Wide Wide Web. An information resource is identified identified by a Uniform Uniform Resource Resource Identifie Identifierr (URI) and and may be a web page, image, image, video, video, or other other piece piece of content. content. Hyperlinks Hyperlinks present in resources enable users to easily navigate their browsers to related resources.
Web Browser Features: ActiveX: ActiveX is a technology used by Microsoft Microsoft Internet Explorer on Microsoft Windows systems. ActiveX allows applications or parts of applications to be utilized by the web browser. A web page can use us e ActiveX components that may already reside on a Windows system, or a site may provide the component as a downloadable object. This gives extra functionality functionality to traditional web browsing, but may also introduce more severe vulnerabilities if not properly implemented.
browser. Netscape has developed Plug-ins: Plug-ins are applications intended for use in the web browser. the NPAPI standard for developing plug-ins, but this standard is used by multiple web browsers, including Mozilla Firefox and Safari. Plug-ins are similar to ActiveX controls but cannot be executed outside of a web browser. Adobe Flash is an example of an application that is available as a plug-in. your system to store data for specific web sites. A cookie Cookies: Cookies are files placed on your can contain any information that a web site is designed to place in it. Cookies may contain information about the sites you visited, or may even contain credentials credentials for accessing the site. Cookies are designed to be readable only by the web site that created the cookie. Session cookies
are cleared when the browser is closed, and persistent cookies will remain on the computer until the specified expiration date is reached. JavaScript is a scripting scripting language language that is used to make web sites more interact interactive. ive. JavaScript: JavaScript There are specifications in the JavaScript standard that restrict certain features such as accessing local files.
INPUT SET:
OUTPUT SET:
NOTES:
NAME OF FACULTY: SIGNATURE: DATE:
PROG PROGR RAM NO: - 2 Unit/Topic: Web Applications
PROBLEM DEFINITION: a) b) c) d) e)
Write Write the the intr introdu oducti ction on of of ASP ASP What What are the the streng strengths ths of XML XML techn technolog ology y Write Write short note on conditional conditional statement statement and and Iterations Iterations in in PHP. What is the the file file extension extension of PERL, PERL, write write the code using using FOR and WHILE WHILE loop. loop. What What CGI scri script ptss are are??
OBJECTIVE: To understand basics technologies for Web Applications
INPUT SET:
OUTPUT SET:
NOTES:
NAME OF FACULTY: SIGNATURE: DATE:
PROG PROGR RAM NO: - 3 Unit/Topi Unit/Topic: c: HTML
PROBLEM DEFINITION: To create a web page purely in HTML .
OBJECTIVE: To under underst stan and d basi basicc and and use of HTML HTML tag tags. s.
INPUT SET:
OUTPUT SET:
NOTES:
NAME OF FACULTY: SIGNATURE: DATE:
PROG PROGR RAM NO: - 4 Unit/Top Unit/Topic: ic: Cascading Cascading style sheet
PROBLEM DEFINITION: To create a web page to show application of CSS file
OBJECTIVE: To understand concept of CSS (Cascading style sheet)
INPUT SET:
OUTPUT SET:
NOTES:
NAME OF FACULTY: SIGNATURE: DATE:
PROG PROGR RAM NO: - 5 Unit/Topic: JavaScript
PROBLEM DEFINITION: Study of JavaScript and applying java script to validate form
OBJECTIVE: Study of java script and validation.
THEORY: What is JavaScript?
JavaScript JavaScript gives HTML designers designers a programming programming tool tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of o f code into their HTML pages JavaScript JavaScript can put dynamic dynamic text into an an HTML page - A JavaScript statement like this: document.write("
" + name + "
") can write a v ariable text into an HTML page JavaScript JavaScript can react to to events events - A JavaScript can be set to execute when something happens, like when a page has finished loading loading or when a user clicks on an HTML element JavaScript JavaScript can read and and write HTML elements elements - A JavaScript can read and change the content of an HTML element JavaScript JavaScript can be used to validate validate data data - A JavaScript can be used to validate form data before it is submitted to a server. This saves the server s erver from extra processing JavaScript can be used to detect the visitor's browser - A JavaScript JavaScript can be used used to detect the visitor visitor's 's browser browser,, and - depending depending on the browser browser - load another another page specifically specifically designed designed for that browser browser JavaScript can be used to create cookies - A JavaScript JavaScript can be used to store store and retrieve information on the visitor's computer Interpreted language -JavaScript is an interpreted language (means that scripts ex ecute without preliminary compilation)
To insert a JavaScript into an HTML page, we use the <script> tag. Inside the <script> tag we use the type attribute to define the scripting language.So, the <script type="text/javascript"> and tells where the JavaScript starts and ends: <script type="text/javascript"> ….
JavaScript Functions
To keep the browser from executing ex ecuting a script when the page loads, you can put your script into a function. A function contains code that will be executed by an event or by a call to the function. You may call a function from anywhere within a page (or even from other pages if the function is embedded in an external .js file). Functions can be defined both in the and in the section of a document. However, to assure that a function is read/loaded b y the browser before it is called, it could be wise to put functions in the section. <script type="text/javascript"> function displaymessage() { alert("Hello World!"); }
Events By using JavaScript, we have the ability to create dynamic web pages. Events are actions that can be detected by JavaScript. Every element on a web page has certain events which can trigger a JavaScript. For example, we can use the onClick event of a button element to indicate that a function will run when a user clicks on the button. We define the events in the HTML tags The