Sie sind auf Seite 1von 25

Name : Mohan N Roll No : 511015404

MBA IS- 4th SEM MI0041 Java & Web Design 4 Credits
Assignment Set- 1 (60 Marks)

1 | Pa ge

Name : Mohan N Roll No : 511015404

Name Roll No Program Subject Code

Mohan N 511015404 MBA - IS Java & Web Design [ Set1] MI0041

Note: Each question carries 10 Marks. Answer all the questions.

Q.1 Explain the browser components and its features [10 Marks] Answer : Web Browsers : A browser is a software program that enables you to view and interact with any information available on the Web. In general, the term browser is a user interface that allows you to navigate through and read text files online. The browser program is used to make a Web page or Website request to a Web server through the Internet using the URL of the respective Web page or Web site. The WorldWideWeb created in 1990 was the first Web browser. However, later this name was changed to Nexus to avoid confusion with the World Wide Web. Today, there are a number of Web browsers available in the market for example, the Internet Explore (IE) Mozilla Firefox Flock Web 2.0 Safari Opera Google Chrome and so on. The two main functions of a Web browser: 1. To make a request for a page from a computer. You can do this by typing the URL of the page in the address field of the browser. Even when you click on a hyperlink the similar action that of accessing the Web page associated with the URL is performed by the browser. 2. To interpret the HTML page sent back by the Web server. This is done because the HTML text received from the Web server is in the American Standard Code 2 | Pa ge

Name : Mohan N Roll No : 511015404 for Information Interchange (ASCII) form. The Web browser, after receiving this text interprets it and creates the page in its original form. The HTML and Cascading Style Sheets (CSS) specifications , specifies the way in which the browser interprets and displays the HTML files. The World Wide Web Consortium organisation monitors the standards of the Web and helps to maintain the browser specifications defined by HTML and CCS. Browser components
Below is the architecture of a Web browser. This reference architecture is the basic architecture for Web browsers and helps you to easily understand the various components that exist in the Web browser.

As shown in the figure 1.1 the Web browser consists of seven main components, each having a specific task to perform and they are: User interface: It consists of an address bar where you can enter the URL, bookmark menu to save the links of your favourite Web pages, back/forward button to navigate to the previous Web page/next Web page, and so on. Browser engine: It is the interface through which you can ask questions to the browser and manipulate the rendering engine. It also sets the layout of a Web page formatted with HTML tags within a browser. Rendering engine: It is displays the content you had requested, after obtaining it from the respective Web server.

3 | Pa ge

Name : Mohan N Roll No : 511015404 Networking: It is used for calling the network for example, raising an HTTP request for a URL connection through the server. Display backend: It provides drawing tools, user interface widgets, and fonts that help to display text and graphics. Javascript interpreter: It is used to parse and execute the codes of written using the Java script Data storage: This enables the browser to save all the data on the hard disk and acts as the database of the browser. Features of browser
some of the most important features of a browser. The figure 1.2 shows the screen shot of the Microsofts Internet Explorer Web browser. The arrows point to the features that are available on the Web browser along with the name of the corresponding feature mentioned at the other end of the arrow.

From the figure 1.2 you can see some of the features that are present as icons or buttons on a Web browser. If you do not find it as a button you can find the same in one of the menus provided in the menu bar. Let us now briefly discuss the features that are mentioned in the figure 1.2: 4 | Pa ge

Name : Mohan N Roll No : 511015404 Address field: This is the area on the browser window where you enter the Web page address or URL. At the right end of this area, there is a small arrow pointing towards the menu bar, when you click this arrow you will view a list of some of the Websites that you have visited recently. When you click on these URLs you will view the respective Website or else you can directly enter the address in the address field. After you enter the address you can either press "Enter" or click on the "Go" button (which is present next to the downward facing arrow button in some browsers). Back and forward buttons: The back button is used to go back to the previous page that you have opened in a particular browser window. The forward button allows you to view pages that you have previously viewed in that browser window. In some browsers, there is a small arrow pointing towards the menu bar arrow right next to these buttons, when you click this arrow you will see the list of Websites that you have visited after opening the browser window. Home button: When you click this button you will be able to view the page that you have set as home page. A home page is a default page that opens when you open the browser window. Menu bar: A menu bar is a part of each browser window, it contains menus like File, Edit, View, Favorites or Bookmarks, Tools and Help. Refresh or reload: When you click the refresh or reload button, the page is updated. For example, if you think that the contents of a browser window may have changed since the last time you viewed it, you can click this button to update the page. Security indicators: At the left corner of the window, a lock icon appears when you use a browser and this is called padlock. If the padlock is in a lock position then you can say that your server connection is secure, i.e. the data being sent and received by the server is encrypted. This indicates that nobody else can access this data. There is another way to find out whether your browser is secure or not and that is done by looking at the URL. If the URL of your Website begins with "https://" for example, you enter an address "www.gofind.com" in the address field and press enter or click "Go" then automatically the address changes to "https://www.gofind.com" indicating that your browser connection is secure. Status bar: This is a bar at the bottom of the browser window which indicates the URL of the Web page currently being loaded into the browser window. It also displays the URL of the link on which the cursor of your mouse is placed. While loading, the Web page shows a progress indicator which shows how much percentage of a file has been downloaded.

5 | Pa ge

Name : Mohan N Roll No : 511015404 Stop button: This button is used to stop the browser from loading the Web page on to the browsing window.

Q. 2 Describe in detail the building of webpage. [10 Marks]

Answer : Building a Web Page : Building a Web page involves great planning and design. Before you design the Web page it is very important to plan the structure of the Web page and also decide the kind of content that you insert in to the Web page.
The first major issue that you need to address is gathering the right content and organising the gathered content on the Web page. While doing so, you need to understand the requirements of the audience who use the Web page clearly. Therefore, you need to define the objectives of your design clearly before gathering the content. While gathering the content, you must ensure that you do not include any content that does not define the objectives. This will make sure that only the right content is used for creating the Web page. After you gather the content you also make sure that you organise the content logically. This means you need to structure the content properly on the Web page. This involves providing proper names to the sections and subsections that you use to categorise the content. Also, there must be a logical flow in which you present the content.

The usability of the page will make the Website reach out to large a group of audience. Only if the page is user friendly it can retain its users. Therefore, you need to design the Web page with simple and reliable interfaces and navigations so that it can be easily understood and used by the audience. These interfaces comprises of images, graphics, coloured texts and so on. You must provide hyperlinks to related content so that the Web page users can navigate to other Web pages to get more information about the content. Once you have gathered, organised, and structure the next part is deciding upon the placement of the content on the Web page. A plan that describes how to organise the various elements of content like text, graphics and so on, on the Web page is known as the Web layout. While designing the Web layout, you first need to decide the position and placement of every element of the content. A good designer will not place and position the element randomly on the Web page. Therefore, you need to think about the significance of each element, how it is related to the objectives of the Web page, whether it fits with other elements around it and so on and then decide the positioning and placement of the elements. As a designer you have to consider all the aspects of style, requirement, and objective, and then place the element in its appropriate position. This improves the look and feel of the Web page you design. For example, if you are creating a Web page which talks about the biography of an individual. You want to insert his picture on the Web page; you can either insert it at the right or left top corner of the Web page. Many a times these design aspects are governed by individual interests and requirements. Some of the basic aspects of Web layout that you need to keep in mind while designing a Web page are: 6 | Pa ge

Name : Mohan N Roll No : 511015404 Space and white space: Try to use the entire space available on the Web page. However, make sure you do not overcrowd the page with too much information. You need to keep the screen resolution in mind so that your text does not look too small or too large. You can use colours to define spaces. For example, if you want to have a page which has a specific width, then you can centre it on the browser screen and make the background colour and the page colour different. (The page colour is the colour of your Web page and background colour is the colour of the browser window where the Web page is displayed.) When you aligning the Web page at the centre of the browser window enables the page to be resized for different browsers. Say, if the browser you use has a large space the page will be displayed along with the background. In case your browser has small space the page will be displayed with less or no background. Images and graphics: Images and graphics are a major part of your Web layout. You need to make sure that you check the image size and position before you put it on the Web page. Since, images have large impact on the audience than the text. Text width: Often referred to as scan length this defines the number of words you can display on one line. Most designers prefer to have seven to eleven words in a line just to make sure that the user is able to read it without any difficult. Since, most people are not comfortable reading lengthy sentences. Therefore, setting a proper width for your Web page is very essential and improves the efficiency of the design. Once you finalise the Web layout you can easily build the Web pages. With the Web layout, more than one designer can work on the same page and still maintain uniformity. Let us first create a Web page with few lines of text displayed on it. Later, in the next sub section we will discuss how to format text and images on the Web page. In the previous section we have already learnt about the basic document structure of the HTML. Using this let us now create our Web page using the notepad.
First write a simple HTML code as shown below, on your notepad (refer previous section 2.1 for the structure of an HTML document). You can use the title element <title> and </title> tag to provide a name to the Web page which appears on the title bar of the browser window. (Refer figure 2.2).

7 | Pa ge

Name : Mohan N Roll No : 511015404 <html> <head> <title>My First Web Page!</title> </head> <body> <h2>My Web page</h2> <p>This is my first Web page. I have created this Web page using a Notepad. </p> </body> </html>
Now choose a name for your document and save it as a HTML document. To save it as a HTML document, your document name should end with the extension ".html" or .htm. For example, "First Web Page.html".

Note: All HTML documents will appear with a browser icon. For example, if you are using the Microsoft's Internet Explorer then your HTML document appears as shown in the figure 2.1.
Go to the location were you have saved the HTML document and double click on it to view your Web page.

8 | Pa ge

Name : Mohan N Roll No : 511015404 The Figure 2.2 shows the Web page that you have created. As you can see the Web page has the title My First Web Page! which is described inside the title tags of our example above. Text and image formatting We have learnt how to create a Web page and include content in our Web page. Let us now learn how to format our Web page. The formatting elements help you to organise and format the content on your Web page. This makes your Web pages more attractive and allows you to present the information as you wish. Let us now study some of text formatting elements available in html and format our Web page. Heading elements
You can use these elements to format the headings in your Web page. The font sizes of the heading elements vary form size one to six. For example, if you want to display a main heading of a Web page My Page with the font size of six then the command line is, <h1>My Page</h1>. If you want to display the same text Web Page with the font size one then, the command line is <h6>My Page</h6>. The font size can be specified precisely in pixels for each header tag using Cascading Style Sheets (refer Unit 4).

Font styling elements The HTML provides you a number of elements that allow you to modify the styles of the font. Let us now discuss some of the elements you can use to modify the styles and they are: Bold text: To make the text appear in bold on your Web page you can start that part of the text or word with the tag <b> and close the text with "</b>". The part of the text within these tags appears bold on your Web page. For example, if you want to display the sentence, "Sachin is the best cricketer in India." on your Web page. The code to display this sentence is: <p>Sachin is the <b>best cricketer</b> in India.</p> Text positioning The text positioning elements enable you to align the text on your Web page. Some of the most important elements are: Paragraph: You can create a paragraph on your Web page by entering the text within the <p> and </p> tags. You can use the font styling element inside the paragraph element and this is called nesting. The syntax for this is: <p>Paragraph text</p> For example: <p>Sachin is the <b>best cricketer</b> that India has ever produced. </p><p>He is also called the <b>God</b> of world cricket. </p> 9 | Pa ge

Name : Mohan N Roll No : 511015404 Output The text appears as on the Web page as shown below, India will be a developed country by 2020. In the above code, we use the attribute "src" to specify the source/location of the image to the editor along with the file type. For example, the ".gif" specifies the type of the image and the file name specifies the location of the image. Along with this you also find two more attributes "width" and "height" which specify the width and height of the image in pixels that will be displayed on your Web page respectively. You can specify the width and height for all the images that you want to insert. You can find the values for these attributes using graphics editor software like Paint Shop Pro. You can vary the width and height attributes and format the size of the image. You can also adjust the alignment of the image on your Web page using the attribute "align". For example, if you want to align the image "Picture12" to the right of the paragraph then the code is: <p align="right"><img src="Picture12.gif" width="130" height="101"> In the above syntax, the "href" attribute specifies the address or Uniform Resource Locator (URL) to which the text or image is linked. For example, if you have a sentence, "The national bird of India is Peacock." and you want to link the sentence to the URL "www.indiafirst.com" then the code is written as: <p><a href="http://www.indiafirst.com">The national bird of India is Peacock.</a></p>

10 | P a g e

Name : Mohan N Roll No : 511015404


Q.3 How to use forms? Explain with an example [10 Marks] Answer :

An HTML form is a section of a document containing normal content, markup, special elements called controls (checkboxes, radio buttons, menus, etc.), and labels on those controls. Users generally "complete" a form by modifying its controls (entering text, selecting menu items, etc.), before submitting the form to an agent for processing (e.g., to a Web server, to a mail server, etc.)

You can create the forms using the <form> tag. First you create the form element using <form> and </form> tags. Next you define the elements that you want to display on the form within the form element. The syntax of the form is as shown below: <form> Input elements </form>

The rectangular boxes are the text fields where you enter the text.

11 | P a g e

Name : Mohan N Roll No : 511015404 Password field: This field is similar to text field and the only difference is that you can view the text you enter in the text field. However, in password field you cannot see the text that you enter, for every character that you enter you see either an asterisks (*) or dot (.). You can use the same tag that you used to create text field except that the value that you pass to the attribute "type" will be "password". This signifies that the field is a password field. Using the attribute "name" you can define a variable to store the password that you enter. The example code for the password field is given below, Password: <input type="password" name="PassWord">

Radio buttons: This button allows you to select only one of the items from the given list. For example, for a question asked in a form they provide four answers out of which only one answer will be correct and you have to choose only one out of the four. In such cases, you can use radio button. The code given below explains how to insert radio buttons on the Web page. <form> <p>Tiger is the national animal of India. <input type="radio" name="answer" value="true" /> True <input type="radio" name="answer" value="false" /> False </form>

Note: The arrow is just to indicate the radio button. It is not a part of the output. The circles are the radio buttons which you can select by clicking on the circle.

Checkboxes: The code to define the checkboxes is shown below:

12 | P a g e

Name : Mohan N Roll No : 511015404 <form> <p>Select the vehicles that you have.<> <input type="checkbox" name="vehicle" value="Bike" /> I have a bike <input type="checkbox" name="vehicle" value="Car" /> I have a car </form>
You can notice from the above example code that the code for checkboxes is similar to the radio buttons. The only difference is the value that we pass to the attribute "type". For selecting the checkbox element we pass the value "checkbox" to the attribute "type". Another important difference which we need to know is that in checkbox you can select any number of items. For example, you can select all the items given with a checkbox in a list which is opposite to radio buttons where you were able to select only one of the items in the list. The output of the above code for checkboxes appears as shown below:

Note: The arrow is just to indicate the checkboxes. It is not a part of the output. The square boxes are the checkboxes by clicking on these boxes you can select the option. Submit button: This button is used to send form data from the Web page to the Web server. This button is created on the Web page using the example code shown below: <form name="input" action="html_form_action.asp" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="Submit" /> </form> You can see from the example code shown above that there are few new attributes which we have defined in the opening <form>, "action" and "method". The "action" attribute specifies the address or URL to which the form has to be submitted when you click the submit button. When you pass the value "get" to the attribute "method" then, the form data that you send to the URL specified in the attribute "action" is sent as an attachment to the URL. This means it will not be sent separately but as a part of the URL page. Therefore, the amount of data that you can send is limited. It is used to send short forms with one or two input fields such as text fields, radio buttons, checkboxes and so on. Since, the data is simply attached to the URL and other users on the Web can easily access it. There is another way of sending the data that is by passing the value "post" to the attribute "method". You can send any number of data or input elements 13 | P a g e

Name : Mohan N Roll No : 511015404 such as text fields, radio buttons, checkboxes and so on using the post method. Form data sent using the post method can also be encrypted and sent securely using the HTTPS protocol.

Q.4 Give an example for cascade style sheets and explain editing with cascade style sheets in detail . [10 Marks] Answer : Working with CSS : The Cascading Style Sheets (CSS) are simply referred to as style sheets and they are a set of guidelines and properties that define how an HTML document appears in a Web browser. CSS on the Web works along with HTML documents. Using CSS in an HTML document enables you to create and apply various display styles to your Web page which you cannot achieve using HTML. Lets see how style sheets work:

First, you define a set of rules in the style sheet. These rules describe how the content
that you want to display using a mark-up language such as HTML appears on the Web page. Next, you establish a link between the content in the HTML document and the style sheet. Finally, the browser will apply the style defined in the CSS to the content as defined by you and displays it on the Web page. After understanding the working of style sheets, let us see the basic syntax of CSS which is as shown below: selector {property: value;} In the above syntax, the selector represents the HTML tag for which you want to apply the style. Property is the parameter for which you want to apply the style, for example, background color, text alignment, text color and so on. The value is the actual style that you want to apply for the defined parameter, for example, to apply color you can choose the value as red, green, blue or any color of your choice. For example, consider you want to change the background color of your Web page to red using CSS and for this you can write the code as: body {background-color: #FF0000;} Here, you can compare the above CSS code with the CSS syntax. In the above code, the "body" is the "selector", "background-color" represents the property that you want to change, and

14 | P a g e

Name : Mohan N Roll No : 511015404


"#FF0000" is the code used to represent the color "Red" and it is the "value" that you pass to the "property" applying styles to an HTML document using CSS using different methods are as below Inline method: This is a very simple and straight forward method of applying CSS to an HTML document. This is achieved using the attribute "style" (refer unit 2 for definition of Attribute). Let us understand this with an example, say you want to apply a background colour to your Web page. The code shown below explains how you can achieve this using inline <html> <head> <title>Example</title> </head> <body style="background-color: #FF0000;"> <p>This is a red page</p> </body> </html> As you can see, the above code is written completely using HTML tags (refer Unit 2 for HTML tags). We apply the background colour to the page by using the attribute "style" inside the HTML tag as shown in the above example. Internal method: In this method you will define the style within the <head> and </head> tags. The example below shows how you this is written. <head> <title>Example</title> <style type="text/css"> body {background-color: #FF0000;} </style> </head> You can see in the above code that we use the <style> and </style> tags, within these tags we define all the CSS styles that we want to use in the HTML document. In our example, we are applying the background color to the Web page using the internal method as shown above. We can define CSS class selectors in this method and use it to apply styles to the HTML document For the attribute "type" we are passing the value "text/css" this is to define that the CSS style will be applied to the HTML document which is created using text editors such as Notepad. Link to style sheet: This is considered to be the most efficient way of applying styles to the HTML document. In this method, we create a style sheet document called external style sheet. In this document you will define all the styles that you want to apply to the HTML document and you save the document with the extension ".css". Then you will attach the CSS document to the HTML document to apply the styles. Let us see how this is done with an example. Let us say that you have created a style sheet named styles.css and it is saved in a folder named checkstyle.

15 | P a g e

Name : Mohan N Roll No : 511015404


<head> <title>My document</title> <link rel="stylesheet" type="text/css" href="style/style.css" /> </head> The above code is used to link the HTML document with the style sheet. You need to include the code line "<link rel="stylesheet" type="text/css" href="style/style.css" />" inside the element <head> of the HTML The <link> tag is used to establish a link between the HTML document and CSS document. You also notice few attributes used inside the <link> tag, let us now analyse them one by one. The attribute "rel" is used to define the relationship between the document that you want to link to the respective HTML document since, we are linking the style sheet we are passing the value "stylesheet". For the attribute "type" we are passing the value "text/css" which indicates that the style sheet document that we are attaching is of the MIME type text and sub-type CSS (refer section 3.3 for a description of MIME types). Next to "type" attribute is the "href" attribute. This attribute is used to specify the address of the document. In our example we have stored our CSS document style.css in the folder styles therefore, the value that we pass to the attribute "href" is "styles/style.css". You can notice that we are not just mentioning the file name but also the folder in which it is stored this helps the browser to quickly locate and attach the file to the HTML document. The file style.css must be saved in a sub directory called styles in the same directory as the HTML document. The major advantage of this method is that you can make any new modifications in the CSS document and this will be reflected in all the Web pages that use this style sheet. Where as, in the inline method you have to edit each and every code line of the HTML document, when you want to modify some style on the Web pages. You can also use the same style sheet to apply styles to a number of Web pages. For example, consider that you want to change the background colour of a website which contains 100 Web pages. If you use the inline method you have to manually change all the 100 documents. Whereas using CSS to apply styles for all the 100 pages you can simply make the change in the style sheet and all the 100 Web pages will be modified. Thus, it helps to save lot of time and effort. A Small Examples of stylesheet .heading_blue { font-family:Arial, Helvetica, sans-serif; font-size:14px; font-style:normal; color:#0070C6; font-weight:bold; text-align:left; text-decoration:none; } .hosttbldet { font-family:Verdana, Arial; font-size:11px;

16 | P a g e

Name : Mohan N Roll No : 511015404


font-weight:normal; text-transform:uppercase; text-decoration:none; border-top-width:1px; border-bottom-width:1px; border-top-style:solid; border-bottom-style:solid; background-color:#F2F2F2; border-bottom-color:#BEBEBE; border-top-color:#FFFFFF; text-indent:5px; border-left-width:1px; border-left-style:solid; border-left-color:#FFFFFF; height:11px; background-position: center; text-align: center;

Q.5 Describe the working of search engine. What are the different types of search engine? Explain with its application. [10 Marks] Answer :

Search Engine : A program that searches documents for specified keywords and returns a list of the documents where the keywords were found. Although search engine is really a general class of programs, the term is often used to specifically describe systems like Google, yahoo and ask that enable users to search for documents on the World Wide Web and USENET newsgroups.
Working of a Search Engine : How do we search for a Web page using any search engine? We open the search engine Website for example, www.google.com or www.bing.com and then in the text box provided we type the keywords of our choice and press enter key or click the search button. This process will provide us a list of Websites based on the keyword entered.

Do you think the working of a search engine so simple? The answer is No. The working of search engines is not this simple. It involves incredibly detailed processes and methodologies. There might be some differences in the working of different search engines. However, all of them perform three fundamental tasks includingcrawling the Web by following all possible links from any Web page, extracting keywords from the collected Web pages and building an index, and allowing users to search for matching Web pages using the keywords saved in the index. Search engines today are indexing and responding to billions of Web pages in a single day. Let us now look at how all these happen. Search engines use the following processes in its working: Web Crawling. Indexing. 17 | P a g e

Name : Mohan N Roll No : 511015404 Searching. We will now see each of these operations in detail. Web crawling: When you search for information by typing keywords in a search engine Website it gives you a list of related information. Prior to listing the related information, it has to find it. In order to retrieve information from the numerous Websites that exist on the WWW, a search engine utilises special software robots known as spiders. The spiders are simple programs that scan the Web pages to create a list or index of words that are found on the Websites, and the process of creating a list or index of words by a spider is known as Web crawling.
Spiders are also known as bots, web robots or automatic indexers. The spider program has to scroll through many Web pages in order to create and maintain a list of useful words. A search engine uses a spider program to gather information that is available on Web pages. The information needs to be gathered so that the search engines can provide us the relevant Websites when we search for a particular term.

Indexing: After the spider program finishes the job of looking for information on the Web pages, the search engines have to store the information such that it is useful for the users. This is known as indexing. An efficient indexing helps us to quickly find information on the Web. We have to note that the data needs to be encoded and then stored in a more compact form in order to save the storage space. The information is ready for indexing once it is compacted. The two key components responsible for indexing or making the gathered data accessible to users are as follows: The information that is stored with the data: Here, a search engine can store the word and the Uniform Resource Locator (URL) of the Web page where the word was found. However, this result in limited use of the Web page as it will not inform the user if the word was used many times or only once. It will also not specify if the page comprises links to any other page, or if the word was an important phrase on the Web page. Therefore, we can say that we will not be able to put the most important page on top of the list from the search results. The technique in which the information is indexed: Here, a search engine stores the number of times the word has appeared on the Web page rather than storing only the word and the URL. A particular word's value increases when it appears in the heading, sub heading or in the links. Considering this, a search engine assigns weight to every entry. Every search engine follows different formulas to allot weight to words in its index. Therefore, we can observe that, different lists are produced by different search engines when we search for a particular word. Most of the search engines today are following this technique. 18 | P a g e

Name : Mohan N Roll No : 511015404 Searching: It refers to the process of querying a search engine. A query should have at least a minimum of one word. You can also have complex queries. Complex queries are built using Boolean operators that help us to refine the search. For example, OR, AND, and NOT are known as Boolean operators. Table 9.1 illustrates the use each of these Boolean operators. Table 9.1: Boolean Operators and Its Uses Boolean Operators Uses OR We use this when at least one of the terms that are combined by using the OR operator should appear in the resultant Web pages. AND We use this when all the terms that are combined using the AND operator should appear in the resultant Web page. We can also use the '+' operator instead of AND. NOT We use this when the term that follows the NOT operator should not appear in the resultant Web page.
Figure 9.1 depicts the working of a search engine.

19 | P a g e

Name : Mohan N Roll No : 511015404

Figure 9.1: Working of a Search Engine As you can observe in figure 9.1 a spider program starts the process of indexing on Websites that are listed on frequently used servers and on popular Web pages. It indexes the words and links present within a Website. Like this the spider program moves through various areas of the WWW that are widely used and creates index of words and compresses the same to save the storage space. Then the compressed data is stored so that the users can access the data by querying the search engine.

Types of search engine Now that you have learnt how a search engine works, let us now study the different types of search engines. The different types of search engines are: Crawler based search engines. Human powered directories. Hybrid or mixed search engines. We will now study more about these search engines. Crawler based search engines: In this type of search engines the spiders crawl through the Web and create a listing or index of words. Whenever a user enters a query or a keyword using a search engine, the word is searched for against these listings or index. The index consists of a copy of all the Web pages that is found by the spider. Whenever a change is made to any of the Web pages, the spider will update the changes in the index. This is possible as the spiders are always crawling through the Web pages on a regular basis. This also affects the way your Website is listed. We should also note that 20 | P a g e

Name : Mohan N Roll No : 511015404 it takes some time when the spiders crawl through the Web pages and an index is created. Until then the Web page will not be found when you search for it using a search engine. Google and Yahoo use a crawler based search engines. Human powered directories: In this type of search engine there is a directory which gets information from short descriptions about the websites along with the address and title of the Web pages that are submitted by the webmasters. These submissions are later reviewed by the editors. The disadvantage of human powered directories is that it can take months to get your Website reviewed unless you take up a paid inclusion program. We should also note that when a user searches for a topic these directories look for only the descriptions that are submitted on the Website and not the entire content of the Web page. As such any change made to the Website does not affect its listing. The only advantage of this type of a search engine is that a Website which comprises good content could be reviewed for free when compared to a poor site. Earlier Yahoo! was a human powered directory. However, today it uses a crawler based search engine.
Hybrid or mixed search engine: It is a combination or mixture of crawler based search engines and human powered directories. The basic idea behind a hybrid search engine is to provide the users with a combination of results including spidered results and directory results. Google and Yahoo are today using hybrid search engines. Google calls this Universal Search. The advantage of this type of a search engine is that the multiple types of results complement each other, and ultimately offer the users with more complete and relevant search results. This is depicted in figure 9.2.

Figure 9.2: Result of Search on a Hybrid or Mixed Search Engine In figure 9.2 we can see how a Google looks for the keyword java books. On top of the list we can find shopping results, and below it are results from the crawler based search engines. Towards the right hand side of the screen you can find sponsored links. 21 | P a g e

Name : Mohan N Roll No : 511015404 Importance of search engine friendly website You have now learnt about the different types of search engines. Let us now learn why a search engine friendly Website is important. Search engine friendly refers to the design of a Website that includes images, videos, menus, content management system and various other elements that help a search engine to get the maximum information about the Website for the purpose of search engine exposure.
A search engine friendly Website is important because, when your Website is search engine friendly it is easy for visitors to find your Website. This could be done by listing your Website on top of all the other Websites in the list returned by a search engine. When your Website is on top of the list it generally gains the attention of the visitors and thus will motivate them to visit your Website.

It is also important because in todays corporate world many organisations are building their business through Internet marketing. This Internet marketing generally starts with your organisation's Website. Thus, the Website should be developed or listed in such a way that it gains the attention of the customers. It also helps you in your search engine marketing efforts. Here, search engine marketing refers to a type of internet marketing. The main intention of this is to promote your Website by allowing it to appear on the result page of the search engine by means of paid placement, paid inclusion, or contextual advertising. We can even find a decrease in the costs related to the advertising or search engine marketing if you develop a search engine friendly Website.
We should also note that the design of your Website affects search engine friendliness. This is because when you have a Website that contains keyword rich text the search engines spiders will be able to access the keywords easily and index it for users to access.

Q.6 List the benefits and drawbacks of Lamp stack [10 Marks] Answer :

Overview of LAMP Stack :Internet is one of the most prominent innovations in the field of communication that has linked all of us together. It could be through the services it provides or through the information that it pools together for the people around the globe. As such Web developers are always striving hard to create Web applications that are dynamic. LAMP is one such emerging technology used in the creation of dynamic Web applications.
LAMP is an acronym for Linux, Apache, MySQL, and PHP. It is an open source Web development platform that facilitates rapid development and deployment of high quality Web applications. In LAMP Linux is an operating system, Apache is a Web Server, MySQL is a ,

22 | P a g e

Name : Mohan N Roll No : 511015404


relational database, and PHP is an object oriented scripting language. We can always replace PHP with Perl, or Python. This means, instead of PHP we can use Perl or Python as an object oriented scripting language. As LAMP comprises four layers it is referred to as LAMP stack. Figure 8.1 depicts the four layers in the LAMP stack.

Sometimes LAMP stack is also referred to as Web stack. We can always build these stacks on any operating system. When you as a developer use these tools with a Linux operating system it is known as LAMP If you use these tools on a Windows . operating system, it is known as Windows, Apache, MySQL, and PHP (WAMP). With a Solaris operating system it is known as Solaris, Apache, MySQL, and PHP (SAMP). With a Macintosh operating system it is known as Macintosh, Apache, MySQL, and PHP (MAMP).

Just like the operating system we can replace the Web server too. We can use Internet Information Services (IIS) instead of Apache. We can also replace the database with PostgreSQL instead of MySQL, and Perl or Python instead of PHP as a scripting language. The advantage of combining these technologies together is that it helps us in the development of websites that are rich in features. We can also say that LAMP is usually used to run dynamic websites and web servers. We can compare LAMP stack with languages or platforms such as WebLogic or Microsoft's .NET that provide a complete stack, from data access layer to Web servers and programming language. The major drawback of this is its closed nature that restricts the developers choice in choosing the components of their choice. However, we should also note that it offers relatively greater integration of components resulting in little complexity and more efficient development.
The software components used in LAMP stack are open source. You can find it readily and freely available to use, make modifications, and thereby improve its design. These open source software components together help us in the creation of a powerful web application platform at a much lower cost than a proprietary product.

Origin of LAMP stack 23 | P a g e

Name : Mohan N Roll No : 511015404 The term LAMP was coined by Michael Kunze in the year 1998, in the German c't magazine. The main intent behind this article was to present the idea that a set of open source software could prove to be an alternative to packages of licensed software, which we need to purchase. To increase the popularity of this open source software, Michael Kunze came up with the name LAMP .
The scripting language that we use in the LAMP stack was initially used in the Common Gateway Interface (CGI) protocol that came into light when the Web was first introduced in the early 1990s. The CGI refers to a technology that facilitates the Web user who is using a Web browser to run a program on the Web server and get content that could be static or dynamic from the Web server.

Today, as an evidence of its efficiency we can find LAMP stack being used in numerous Web applications such as, gmail, youtube, wikipedia, facebook, orkut, naukri, and so on. Benefits and drawbacks of LAMP stack Now that you have understood how the LAMP stack originated, we will now discuss the benefits of LAMP stack that has made it popular. Even though there are various commercially available software packages that provide various features in Web development, many Web applications today, are using the LAMP stack. This is because of the various benefits it provides. The benefits of LAMP stack are as follows: It is open source software package and thus can be got free of cost. This helps organisations to develop Web applications without spending hefty amounts for its licensing. Even though Microsoft offers the ASP (Active Server Pages) extensions free of cost, they charge you for their Operating System, database servers, and Integrated Development Environment (IDE). However, sometimes companies may have to pay for customer support for the open source products that they purchase from vendors. It can be installed on a wide range of platforms. We can use Windows instead of Linux if we are working on Windows platform, or use IIS instead of Apache Web server. This helps us to adapt to our companies current environments by utilising the existing infrastructure. It provides a greater support when compared to other commercially available software. This is because the components of LAMP stack are open source and thus we can find support from the actual developers who have worked on the project, and also from its community. It is possible for us to find various modules that can be reused. These modules are built by a community of developers who publish the modules developed by them. This saves time and results in rapid development of Web applications. 24 | P a g e

Name : Mohan N Roll No : 511015404 It facilitates us with an efficient hardware support such as Linux that can run on almost all servers. This is possible as it facilitates the administrator with the choice of running only what is required to perform a particular job. It offers greater performance as we use Linux. When compared to Windows, Linux scales high in performance, memory management, and stability. It is possible for us to find constant updates and improvements for the LAMP stack. As you know, we can find developers and support communities that update new features and enhancements constantly. Despite of the above mentioned benefits LAMP stack has a few drawbacks. The drawbacks of LAMP stack are as follows: The main disadvantages of LAMP stack is in updating the applications. This is because, whenever you have a new version released, we have to follow the same procedure that is used in installing the applications, to update the changes. There could be confusion as to where the application is installed as the application files are not placed in the file system in a standard way. One more disadvantage is that it is difficult to find people who are good and qualified in developing Web applications on LAMP platform. Hence, organisations fear to switch to LAMP .

25 | P a g e

Das könnte Ihnen auch gefallen