Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 10

Homework type/no: ASSIGNMENT-1 code: INT 402

Course

Course instructor, course tutor: Mr. Paramjit Singh

Date of submission: 05-02-11 REG NO: 3450070030

Student roll no: RB17T2B44

Declaration:

I declare that this assignment is my individual work. I have not copied from any other students work or from any other source except where due acknowledgment is made explicitly in the text, nor has been written for me another person.

Students signature NIKHIL

Evaluators comments:

Marks obtained _____________________ out of ______________________________

Ques: 1 List five static sites and five dynamic sites. In what respect would you differentiate between them keeping in mind their Pros and Cons? Ans: Static: there are used for only presentation. These websites simply delivers information. These are built using individual web page files written in Hyper Text Markup Language (HTML), along with some support files for styling (e.g., Cascading Style Sheets - CSS), images (e.g., JPGs, GIFs, etc.). The content on a static webpage will never change unless the change is applied manually. Example: 1. http://www.janslarder.co.uk 2. http://www.stellarhomes.co.uk 3. http://www.toppstrings.co.uk/ 4. http://www.sounivillas.com/

Static Websites Advantages Very easy to develop. It is very cheaper to develop. Disadvantages Could cost more in the long run. You will have to wait till your web designer has time to make the changes. It is very much easier to host. Ideal for small websites Quicker to download on slow connections Requires an FTP program. Content can become stagnant. Limited functionality.

Dynamic websites: Dynamic sites are those offer interactive features in a website. Means that user is able to interact in these websites. One of the most common types of dynamic web pages is the database driven websites. Content generally changes every time the page loads with you having to manually make those changes. This change in content will directly be related to the

latest updated information present on the database as well as the users request for specific information.

Example:

1. www.ums.lpu.in 2. www.irctc.co.in 3. http://www.absolutelycyprus.com/ 4. www.wikipedia.org/

Dynamic Websites Advantages Quicker and easier to update Disadvantages More expensive and time consuming to develop New content brings people back More functionality with ecommerce, Forums, blogs etc plus better user interaction No programming skills required to update content Hosting is more expensive harder for search engines to crawl and index

Ques: 2 Formulate a HTML code to list the items in the menu card of a restaurant. Use appropriate assumptions and also make use of various Tags and Attributes available. Ans: <html> <head><title>Restraunt Menu</title></head>

<body> <ol> <li>HOT BEVERAGES <ul> <li>Tea <li>Without Sugar Tea <li>Filter Cofee <li>Nescafe <li>Bournvita </ul> <li>SWEETS <ul> <li>Sheera <li>Sweet Kachori <li>Amras <li>Shreekhand <li>Keer <li>Gulab jamun </ul> <li>LIGHT SNAcKS <ul>

<li>Steam Idli <li>Medu Vada <li>Rasam Vada <li>Upma </ul> </ol> </body> </html>

Ques: 3 Java Script is a client side scripting language or Server side language. Give reasons in support of your answer. Ans: JavaScript is the original client side scripting language for web. This language is generally embedded with html. These languages are executed by the web server when a document is requested. JavaScript have a much larger access to those data and functions which are available on the user's browse rather than server side scripting language. This language does not require any software to run script on the server. CLIENT SIDE SCRIPTING LANGUAGE: Client side scripting languages are generally used to validate the inputs of user actions from user side or client side. Client side scripting language is good because it will not send the unwanted input's to server for validation. Client-side scripts have greater access to the information and functions available on the user's browser. Client-side scripts may not be allowed to access the user's computer beyond the web browser application. Client side scripting languages are: java script, vb Script...etc Ques: 4 List and discuss the various types of Script Tags used in Java Script.

Ans: when we want to place a JavaScript code into a html document, we have to use script tag. This tag is used to link external JavaScript file into an html document. In JavaScript there are two elements: Text/JavaScript. Example: <script type="text/javascript" src="script.js"></script> We can add a script anywhere inside the head or body sections of our document. We should use the type attribute to specify the type of script being used. The script tag has two purposes: 1. It identifies a block of script in the page. 2. It loads a script file.

Part-B Ques: 5 Create a web page using a basic HTML, which contains a link or a button which opens a page after a delay of 15 seconds. Elaborate the process for implementing the same. Ans: <html> <head><title>open new window after 15 seconds</title></head> <body> <input type="button" value ="click" onClick="setTimeout(window.open, 15000)"/> </body> </html>

Ques: 6 Create a Web page using HTML Controls under ASP.NET in which there is a login screen in which user enters information as follow: UserName, Password

UserName Password

******** Submit Cancel

If the user enters the wrong UserName or Password, Count the no. Of his attempts and display a message Invalid UserName or Password. Ans: static Int32 cnt; protected void Button1_Click(object sender, EventArgs e) { if (TextBox1.Text == "nikhil" && TextBox2.Text == "saini") { Response.Redirect("Default2.aspx"); Response.Redirect("Welcome Nikhil A very warm welcome to you"); } else { cnt = cnt + 1; Label1.Text = "incorrect username and password"; if (cnt == 4) { TextBox1.Text = " "; TextBox2.Text = " "; TextBox1.Enabled = false; TextBox2.Enabled = false; Label1.Text = "you have done enough no of times... Now you are aborting"; } } }

Ques: 7 discuss the Pros and Cons of various scripting languages over each other. You can consider the ASP, JSP, and JavaScript in support of your answer. Ans: Scripting is basically in my point of view a set of lines where each individual line will do something; its for tasks which are quicker to do by running a script. Scripting is for Convenience, programming is more for doing things which cant be done line by line.

JavaScript : is the original client side scripting language for web. This language is generally embedded with html. These languages are executed by the web server when a document is requested. JavaScript have a much larger access to those data and functions which are available on the user's browse rather than server side scripting language. This language does not require any software to run script on the server.

advantages simple to learn

disadvantages sometimes read differently with different browsers

very fast because codes function runs immediately on the users computer Easy access to document objects

Search engines can't read JavaScript navigation links Security can be an issue because JavaScript run on users computer

Wide browser support

WebPages will not work correctly, if JavaScript is disabled in web browser.

JSP:

ADVANTAGES Powerful Portable Inexpensive

DISADVANTAGES

Virtual hosting of unrelated sites on a single machine can cause problems Need for a Server Engine

Ques: 8 is IIS necessary for publishing the Websites under ASP.NET? if yes, Comment. Also discuss that if you are working in ASP.NET under Linux environment then what would be used to publish the dynamic WebPages.
Ans: Yes, IIS necessary for publishing the websites under ASP.NET. When we run our ASP.NET

Web Application from visual studio IDE, ASP.NET Engine is responsible to execute all kind of asp.net requests and responses. Web Server comes into picture when we want to host the asp.net application on a centralized location and want to access from many locations. Web server is responsible for handling all the requests that are coming from clients, process them and provide the responses. IIS (Internet Information Server) is one of the most powerful web servers from Microsoft that is used to host your ASP.NET Web application. IIS has its own ASP.NET Process Engine to handle the ASP.NET request. So, when a request comes from client to server, IIS takes that request and process it and send response back to clients. If we want to host your .NET application on a Linux machine, we will have to use Mono or apache server. We can build and deploy both Web forms and Web services using either the built-in Web server that ships with Mono (XSP) or through an Apache server. Mono is an opensource project providing the necessary software to develop and run .NET client and server applications on Linux. Mono is .NET compatible set of tools, including among others a C# compiler and a Common Language Runtime.

You might also like