Lecture notes on Web Development

lecture notes on web application development. how many web programming languages are there and what is web programming and its basic pdf free download
OliverFinch Profile Pic
OliverFinch,France,Teacher
Published Date:15-07-2017
Your Website URL(Optional)
Comment
Internet and Web Programming Study Material for MS-18 Directorate of Distance Education Guru Jambheshwar University of Science & Technology, HisarInternet and 1.1 INTRODUCTION Web Programming INTERNET is the revolutionary phenomenon heralding the dawn of a new era in human civilization- the Information Age. With over 30 million computers connected to it and the number growing exponentially doubling in size approximately every 10 months, its potential for affecting every facet of life, be it communication, education, entertainment, business and government is mind- boggling. Nowadays, most of the hype about the Internet is focused on the World Wide Web. It has existed for less than 10 years but it has become the fastest growing and most popular part of the Net. The Web is an interface-a window on the Net. It wraps most of the different features of the Internet into a single interface used by Web applications. 1.2 CGI For some Web applications, you may need programs talking to each other at both locations: on the Web page and one the Web server. If the Web page program is a Java applet, it is even possible to make your Web page communicate with an e-mail or chat server instead of the Web server. Web pages run your server programs through a server feature called the Common Gateway Interface (CGI). The programs that run on the server under this feature are called CGI scripts for historical reasons (not because they have anything to do with Web page script languages such as JavaScript or VBScript). CGI scripts are generally written in the languages of either C or Perl, although other languages are also used to create the executable script file. Creating a CGI script for a Web server is not a simple task. Most Internet service providers require that you submit such scripts to them and pay for them to review it before you (or they) install it on the server. This precaution is to make sure that the script will not cause problems for others. For most Web page developers, attractive alternatives include using pre-designed or pre-installed scripts that their Webmaster has already approved and has provided easy access to. Another alternative is to buy special tools that create the scripts for you. How CGI Works How do CGI programs operate? The easiest way to envision a CGI program is to imagine that it is part of a Web server. The browser sends a request to the server. If the requested URL corresponds to a CGI program, the server starts the appropriate program and passes to the program a copy of the request. The server then sends the output from the CGI program back to the browser in the form of a reply. Interestingly, from a browser's point of view, there is no difference between a URL that corresponds to a static document and one that corresponds to a CGI program. Requests for both static documents and CGI output have the same syntactic form. Similarly, all replies that a browser receives from a server have the same form – there is nothing to tell the browser whether the server is returning a copy of a static document or the output from a CGI program. Professional Programmers Build CGI Programs Who builds CGI programs? Only someone who knows how to write a computer program can create a CGI program. Thus, the technology is beyond the capabilities of most users. More important, CGI programs are somewhat unusual because they interact directly with a Web server. The CGI program must be written to follow the server's guidelines. For example, unlike a conventional computer program, a CGI program does not write output on a user's screen. Instead, a Web server captures the output from a CGI program and sends it back to the browser. Similarly, a CGI program does not receive input from a keyboard or a mouse - the browser handles all interaction with the user. Interestingly, the interaction between a Web server and a CGI program also depends on the computer's operating system. Therefore, like conventional programs, each CGI program is written for one brand of Web server and for one brand of computer operating system. 12 Before the CGI program can be used on a different computer system, it may need to be rewritten.Internet Fundamentals CGI and Advertising Corporations quickly realized that CGI technology can be used to enhance advertising. Recall that frame technology makes it possible to separate advertisements from the Web pages themselves. A CGI program can store information about previous contacts from a given browser, and use the information when selecting an advertisement. That is, whenever it receives a request for a page, the CGI program can select an advertisement to place in one frame, while sending the requested page in another. As a result, a user will see a different advertisement each time he visits the corporate site. CGI programs can also keep a record of which corporate Web pages a user visits and choose advertisements that suit the user. If the user has browsed pages about furniture and appliances, the CGI program might choose to include ads appropriate for someone who is furnishing a house. If a user browses pages of popular music, the CGI program might choose to include advertisements about events such as upcoming rock concerts. Web Pages can Interact Although the CGI technology discussed above can be used to create Web pages that change, CGI programs run only at the server. Thus, a CGI program cannot interact directly with a user. To make it possible for a user to enter data, another technology was invented. Known as FORMS, the technology permits a Web page to contain blank areas in which the user must enter information. After a user fills in the required information, the browser sends the information to the server when requesting another page. The advantage of forms technology should be clear: instead of merely selecting items from a list, FORMS make it possible to enter data directly. For example, suppose a user wishes to purchase an item over the Web. The user must supply a credit card number and a postal address to which the item should be mailed. Without FORM technology, entering such information is almost impossible. With FORM technology, a single Web page can be displayed for the user that contains a form for the credit card number and another form for the mailing address. Once the user has filled in the forms and clicked on a selectable item (e.g., an item labeled purchase), the browser sends the information to the server. Active Documents are More Powerful Newer, more powerful Web technologies have been developed to help solve the problems of providing smooth motion and animation. The new technologies take an entirely different approach by making documents active. An active document is a computer program that paints an image on a screen. Active documents are stored on Web servers, and each active document is associated with a URL just like conventional Web pages. Furthermore, retrieval works as usual; a browser receives a copy of an active document when it requests the document's URL just like it receives a copy of a conventional Web page. Once a browser receives a copy of an active document, the browser runs the program on the local computer. The running program paints an image on the browser's screen. How Do You Make Web Pages Run Server Scripts? To write a Web page command that runs a server script, you must know a few things about that script. Pages that run server scripts refer to the scripts by the script's URL. To run a server script, therefore, you must know the script's URL: its name and the sub-directory where it is located on your Web server. (Note that it must be your Web server – the server the Web page comes from. You are not usually permitted to run a script on a different server.) You must also know what kind of data the script wants passed to it, and what method must be used for passing the data. There are two basic ways of running a CGI script located at a particular URL, depending on how that script requires data to be passed to it. (The way you pass data is officially called the method.) The two methods of passing data that a script may use are as follows: z GET for transmitting a line of data z POST for transmitting data from forms S0ome scripts require one particular method to be used. Others can use either method. The GET 13 method in its simplest form uses a conventional FIREF (hyperlink reference) tag in HTML, butInternet and instead of another Web page's URL, it uses the script's URL. Following is an example of a link you Web Programming click to run a program using the GET method. Although this example runs a script when the user clicks a link, your page could alternatively use JavaScript to run a script. In this hypothetical example, the script receives data about what Canadian province is being discussed and what language is to be used for script output. A HREF="/cgi-bin/myscript.bin?provinc=quebec&language=french" Click here to run the script.P/A The URL is cgi-bin/myscript.bin. (The script file's name is myscript.bin and it is in the cgi-bin directory of the Web server.) Not only is the URL given, but in the same line, following a question mark symbol (?), values (parameters) are passed to the CGI script for it to act upon. The parameters in the example are named province and language, and they are given the values quebee and french, respectively, in this case. The ampersand (&) separates the two values. The CGI script and the HTML code that runs the script must both be designed to work together, as they both must use the same method and variables. To read the data in the example, for instance, the CGI script must know or ascertain that the GET method was used to transmit the data. It then looks within a special variable (an environment variable) reserved for this purpose that usually has the name QUERYSTRING (or QUERY-STRING) to find the data that was passed. The data is passed as a single string of characters, so the script must separate (parse) the data. It does so by looking for the variables by their names (in this example, pros-ince and language) or by their position in the string, and reading whatever data follows each variable's equal sign (=). Student Activity 1 1. Define CGI. 2. How does CGI works ? 3. How can CGI technology enhance advertising ? 4. Define FORMS. Describe its usage. 5. How do you make web pages run server scripts? 1.3 HOW DO YOU PASS DATA FROM FORMS TO SERVER SCRIPTS To pass data from forms to server scripts, you use special attributes within the various form tags. Following is an example of the HTML for a Web page in which a form is used. The user fills out a form and then clicks a button labeled "Submit" to run the CGI script and transmit form data to it. HTML HEAD TITLEGuest Book/TITLE /HEAD BODY CENTER H1 ALIGN="CENTER"Guest Book/H1 HR FORM ACTION="/scripts/perl-cgi/guest.pl" METHOD="POST" First Name :INPUT TYPE="text" NAME="fn" SIZE="24" MAXLENGTH="30"BR Last Name :INPUT TYPE="text" NAME="ln" SIZE="24" MAXLENGTH="30"BR City : INPUT TYPE="text" NAME="fn" SIZE="24" MAXLENGTH="30"BR State :INPUT TYPE="text" NAME="fn" SIZE="24" MAXLENGTH="30"BR 14Email Address :INPUT TYPE="text" NAME="fn" SIZE="24" Internet Fundamentals MAXLENGTH="30"BR Comments :TEXTAREA NAME="comments" COLS=36" ROWS="7"/TEXTAREABR INPUT TYPE="submit" VALUE="Submit" INPUT TYPE="reset" VALUE="Clear Form" P /FORM /CENTER /BODY /HTML Internet Hardware and Software A modem (short form of modulator-demodulator) is a device, which is used to convert digital signals to analog signals so that they can be transferred over the standard telephone line. At the receiving end another modem is connected which reconverts the analog signals back to the digital signals (Figure 1.1).                Figure 1.1 Modulation-Demodulation Process Digital signals are converted to analog signals by the first modem so that information can be transferred over analog telecommunication lines. At the receiving end, it is reconverted by the second modem to digital signals so that the message is available in its original form. In order to connect to the Internet, you have to first connect your computer system with a modem, which in turn helps to establish a connection to the Internet with the help of telephone lines. Factors to be considered while buying a modem While buying modems the following factors are to be taken into account : (a) Transmission speed (b) Data compression schemes (c) Error Correction Protocols (d) Type of Modem, i.e., Internal vs. External Transmission Speed Transmission speed is the speed with which the data is transmitted. It is measured in bits per second (bps). Modems come in different speeds like 300 bps, 1200 bps, 2400 bps, 4800 bps, 9600 bps, 14,400 bps (14.4 kbps) and 28,800 bps (28.8 kbps). One kbps (1 kilo bits per second) stands for 1000 bits per second. The faster the transmission speed of the modem, higher will be its cost, the advantage being that data is transferred at faster speeds. This implies that if the transmission channels permit these speeds then the modem will attain that speed, otherwise it will depend on the speed of the media. These days modems of speeds 28.8 kbps, 33.6 kbps, and 56 kbps are gaining popularity. Data Compression Schemes Since voluminous data is to be transferred, data has to be compressed. In order to bring about standardization of the compressed codes generated by different modems various standards have 15 evolved.Internet and z V.32 standard has achieved a transmission speed of 9,600 bps. Web Programming z V.32 b transmits data at a speed of 14,400 kbps. z V.34 standard allows a transmission speed of upto 28,800 bps. z V.42 provides four-fold data compression. Error Correction Protocols Since data travels over telephone lines many errors can be introduced in the signal because of noise, which also travels in waves along with the data. Therefore, error correction protocols are used to free data from errors. Some popular systems are MNP (Microcom Networking Protocol) and V. 42. Examples of error-correction protocols of MNP are MNP2, MNP3, MNP4. V.42 is a standard for error correction based on Link Access Procedure for Modem (LAPM) standards. These standards are available in all modems so that the user is not troubled. Types of Modems There are two types of modems (Figure 1.2) Figure 1.2 Types of Modems  1.1:           1.          1.          '    .   ,    . . 2.         2.                      .      . 3.      . 3.        . 4.     ,     4.      ,        .         .    .         . 5.     ,       5.          .     .     . Cable modems (subscriber unit) A Cable Modem is a device that enables you to attach your PC to a local cable TV line and receive data at approximately 3.5 mbps. The distance can be 100 kms or even more. This is much faster than the dial-up connection (56 kbps) and the ISDN connection (128 kbps). When a cable modem unit is installed next to your computer, a splitter is also placed. It separates the coaxial cable line serving the cable modem from the line that serves the TV set. A separate coaxial cable line is connected from the splitter to the cable modem. A cable modem has two connections. One to the cable wall outlet, and the other to a PC or to set-top box for a TV. A set-top box is a device that enables a television set to become a user interface to the Internet and also enables the television set to receive, and decode digital television broadcast. 16Internet Fundamentals      100  (-3.50 /)  -            Figure 1.3 Cable Modem System Typically cable modem is connected to a standard 10BASE-T (10 refers to transmission speed of 10 mbps, BASE refers to baseband signalling and T refers to twisted pair cabling) with Ethernet (LAN) card in the computer. A wire called "Category 5 cabling" (Cat 5 cabling) with connects the cable modem to the Ethernet card. Data transmission rate between the cable modem and the computer is 10 mpbs. Basically you connect the cable modem to the TV outlet for your cable TV and the cable TV operator connects a Cable Modem Termination System (CMTS) at his end (Head-End) (Figure 1.2). CMTS is a central device for connecting the Cable TV Network to a data network like the Internet through the backbone of a cable Internet Service Provider. The CMTS can talk to all cable modems (CMs) but the cable modem can only talk to the CMTS. Now if two cable modems have to talk then the CMTS will have to relay the messages. Data Over Cable Service Interface Specification (DOCSIS) is a cable modem standard that defines technical specifications for both cable modems and CMTS. Student Activity 2 1. How do you pass data from forms to server scripts ? 2. What is a modem ? 3. Which factors are to be considered while buying a modem ? 4. Describe various types of modems. 5. What are cable modems ? 1.4 ISP AND INTERNET ACCOUNT An Internet Service Provider (ISP) is an organization or business offering public access to the Internet. It is your gateway, to the Net. You have to subscribe to a provider for your Internet connection. You use your computer and modem to access the provider's system and the provider handles the rest of the details of connecting you to the Internet. There are many types of Internet providers. You can, for instance, choose one of the big commercial on-line service providers. The primary business of an ISP is hooking people to the Internet by giving an Internet account to subscribers, and providing them with two different kinds of access: shell access and SLIP/PPP access. Most ISPs offer both kinds of access, some offer both with a single account, and others require that you choose one or the other. Once you register, your provider will give you a user name (called a userid), a password, and a phone number to dial. To establish the Internet connection, you have your communications program dial the number. You then log in using your particular userID and password. At present it is VSNL (Videsh Sanchar Nigam Limited) which is dominating the Internet scene in India through its GIAS (Gateway Internet Access Service). The other service providers in India are MTNL (Mahanagar Telephone Nigam Limited), Mantraon-line, and Satyam online. 17Internet and Most probably it would be present as a service provider in your city, if you are lucky enough to Web Programming dwell in an Indian city like Delhi, Mumbai, Chennai, Calcutta, Pune, Ahmedabad, Lucknow, Bangalore, etc. It is also available to you in various other cities through RABMN (Remote Area Business Management Network) and GPSS (Gateway Packet Switching Service), our older Indian networks, where you will really have to inquire yourself from VSNL or DOT for availability and type of connectivity. For many institutions and organizations, Internet access is available through ERNET, our old, but rich and reliable Educational and Research Network. NIC also provides Internet facility through their NIC-NET network. Choosing an ISP The privatization of Internet Service Providers (ISPs) is set to give a further fillip to the Internet boom. Central to the success of any service is the price criterion. You will be amazed to find out how a service offered at a premium could in effect be cheaper, considering the add-on facilities that are offered along with the core service. Do not forget that apart from the Internet connection, the ISP gives you an international contact address, that is, your E-Mail address. It is because of this E-Mail address that you must be discerning while choosing your ISP. The E-Mail address provided by the ISP would be all over your business, and it will not be easy for you to change your service provider if you wish to change your address. You will have to live with the ISP as well as the E-Mail address. So, be judicious while making the choice, just as you would while choosing your life partner. User-to-Telephone Ratio The first thing you must keep in mind while zeroing in on your ISP is the user-to-line ratio it commands. That is, how many users are using or are expected to use one single telephone line. Ascertaining this, however, is not easy as the number of subscribers are growing every day. Nevertheless, even the current user-to-line ratio will give you an idea about the standards the ISP has set for itself. This factor is very critical because it determines the ease of usage whether you would be able to connect to your ISP or not. Another way of finding this is to check out with some of the existing users as to how much time it normally takes to dial into a given ISP. If it takes more than 10 minutes to get through, that particular ISP should be avoided. Interface Simplicity Very few organizations take into account the simplicity of the interface while opting for an ISP. This occurs to them only when they begin to use the Internet service across their organizations. The right kind of interface can lead to tremendous savings in cost. There are other problems too. How many users in an organization know about dial-up networking under Windows? How many can remember and use passwords correctly? To how many people would you like to give the password? Does terms like TCP/IP sound friendly to them? Questions like these determine the success of the Internet enabled organizations. There are some ISPs to whom these questions do not apply. They provide an easy-to-use interface that once installed works by simply pressing a button. Roaming Facility The roaming facility is particularly relevant for those who travel a lot. Though most ISPs advertize this particular facility, there are not many who pay heed to it. Its benefits are realized only when one reaches another city and wants to access an urgent E-Mail or the Internet. How does one connect to the Internet when one is not an ISP subscriber in that particular city? To overcome this problem, either you will have to use a facility like Hotmail to access your mail from around the world or use the roaming facility provided by your ISP. The roaming facility allows you to dial-in into the local node of your ISP or of the regional ISP that your service provider has a tie-up with. Then all you have to do is to plug in your computer to a telephone line, find out the numbers for dial-up access, and then using your password, access your original Internet account. A crucial point here is the number of cities that your ISP has presence in or has tie-ups for the same. Multiple Login Facility Very few users know about this facility, mainly because it is hardly advertized. However, it can prove to be a life-saver and a great help for small and medium business houses. If an organization 18 has only one Internet connection, but more than one employees want to access the NetInternet Fundamentals simultaneously then this would be possible only if the ISP offers to the organization the multiple login facility. In fact, this facility can even be availed of while being away from the organization. For instance, one user may be in New Delhi and the other user in Mumbai. But, with the E-Mail ID it would be possible for the man away in Mumbai to simultaneously access the Internet. Some ISPs offer multiple E-Mail IDs that allow you to segregate E-Mail individually. But you have to pay extra for this. ISDN Facility a boon for Corporates ISDN services are a boon for corporates that have multiple users who need simultaneous Internet access. Mantraon-line is the first private ISP to offer the same, and at special rates. If you believe in planning for the future, and are optimistic about the utility of the Net in your organization, then maybe you should give this option a serious thought. Special Packages The private ISPs are putting out some unique usage packages. One of them is by Mantraon-line. It has launched a special package for night users. For those who access the Net at night, Mantra offers a dial-up account which costs almost half compared to the regular connection. This account cannot be used during day time. This is only the beginning as far as special packages are concerned. Soon you will find ISPs (especially the regional ones) coming out with packages that will fit your needs better than your cotton trousers. Already, VXL has launched India's first cable modem ISP service in Bangalore. So do not forget to check out each and every player before deciding on your Internet partner. Support This is a very crucial topic and an area of service where most of the players have been found wanting. Try getting any help from the service provider and the beautifully programmed EPABX system will take you around each and every option, only to disconnect your call at the end stating: "Sorry, the person handling your call is busy at the moment." In case, you happen to be using a pulse-dialling equipment, you can forget using the telephone, and may as well go to their office and clear out the matter there and then. Ideally, new users should subscribe to an ISP where they can be hand-held through the initial process, as Bill Gate's Windows operating system does try its best to support you in the exercise. An installation guide, the help desk's phone number, Windows 95 installation CD are part of the necessary survival kit that a new user must have while undergoing this not-so-holy procedure. Discounts on Renewal Last but not the least, you must find out whether your ISP will renew your account at the same rate or whether there are any discounts to retain its old customers? This is a factor that can upset those lining for their first-buy. VSNL has been very successful in playing this card. It offers slashed rates to those subscribers who renew their accounts. Brochure-speak If you can have more than a hundred different versions of the holy Ramayana, just think what the crafty marketing people can do to simple terms of the Internet. Hence, one must see through the exotic looking tariff cards of most ISPs. You must have the ability to judge beyond the gloss and the glitter. To summarize, here is what you want from an Internet Service Provider: z Access via a local phone call z a flat monthly fee z An ISDN or fast (28.8 kbps) connection z A PPP account z A shell account at no extra charge z The ability to use whichever Internet clients you want 19 z Full Internet access to all resourcesInternet and z The capability of having your own web home page Web Programming z Software support, through which you can use to connect to and use the Internet z Technical support should be open 24 hours a day, 7 days a week Internet was available for some time through ERNET and it was made available for commercial use by VSNL since August 1995. Presently VSNL operates in the following six metres: – New Delhi – Chennai – Calcutta – Mumbai – Bangalore – Pune The membership and networking rules are controlled by VSNL. VSNL has its own leased lines to USA where the Indian network is connected to the main Internet network. VSNL offers three types of membership to any user to be connected to Internet. The three types of Internet accounts are: z Shell account z TCP/IP account z Web-site or Homepage Shell Account It is usually subscribed by students and other members who want to access technical information in any branch of knowledge. The information is available only in text mode and no graphics and pictures are available. One can send E-mail to others on Internet, obtain information about latest research papers of various universities, search for product information, having on-line discussion, float questions to be answered by others, find out the latest news on any topic, find out tourist information like train, air schedule, interested places, etc. Shell account is more useful and cheaper. It requires very small hardware set-up and the membership is economical. The membership fee are Rs. 500 for students and Rs. 5000 for a professional per year for 500 hours or whichever is earlier and Rs. 25,000 for a company. TCP/IP Account TCP/IP account provides the same advantages to that of shell account plus and it provides unlimited access to Internet. It requires UNIX-Based machine, 1-2 GB of Hard-disc, 16-32 MB of RAM and SVGA/VGA monitors and TCP/IP software for better results. It provides an access to graphics, games, movies and other multimedia products along with text chapters, The membership fee for this account to an educational institution is Rs. 15,000 and Rs 500 for registration. Homepage or Website Website makes a user as a node of Internet. This means that if a university decides to float its own Website, then all information regarding admissions, scholarships, rules and regulations, courses it offers, department, staff and their profiles, workshops, conferences, seminars and symposia to be conducted, etc., can be kept at University's computer centre. This computer can be accessed by any member on Internet for any particular course; it will be automatically listed with all its details. This Website is important to a university or a company to offer 24-hours service and on- line help to international clients. Developing a Website on Internet is a costly affair as far as hardware and other costs are concerned. 20 There are no set of rules and regulations for granting Website by VSNL. Homepages can haveInternet Fundamentals text, graphics, pictures and animation. Some homepages can add sound and give multimedia capabilities. Any access to a homepage is called a "hit". The more popular the homepage, the more hits it will receive. Homepages can be grouped together in any order and be hyperlinked. Student Activity 3 1. What is an ISP ? Name some ISPs available in India. 2. What are the factors to be considered for choosing an ISP ? 3. Define shell account. 4. Define TCP / IP account. 5. Define home page. 6. Define a Website. 1.5 HTTP AND URLs If you have ever noticed an advertisement that says "check out our Web site", you must have seen the way they describe how to find it, giving you the address, or URL, which almost begins with the letters http:. (URL stands for Uniform Resource Locator). Within this system, there is a unique URL for any hypertext item on the Net. Moreover, there are also unique URLs for non- hypertext items from other services, such as gophers, anonymous ftp sites, Usenet newsgroups and wais databases. You see lots of URLs in newspapers and magazines these days. These URLs are basically "pointers" to documents, movies, photos, and so on, located on computer somewhere. You may want to visit those sites using URLs. If it's out there, you can get to it. Let's look at an example: http:// www.uptecnet.com/news.htmyaksha In this example, the URL has the following elements: z The first part of URL specifies the transfer protocol, the method that a computer uses to access this file. Most Web pages are accessed with the HTTP which is why Web addresses typically begin with http. The http:// at the beginning of a Web page's URL is so common that it often goes without saying; if you simply type uptecnet.com into the address window of Internet Explorer or Navigator, the browser fills in the http:// for itself. In common usage, the http: // at the beginning of a URL often is left out. Since the Web is not the only Internet service, you may occasionally see addresses that start with ftp:, gopher:, telnet:, news:, or some other name. The protocol is followed by a colon. z The www.uptecnet.com part of the address — called a domain name — is preceded by two slashes. This is the name assigned to a computer located somewhere in the world that is permanently connected to the host name of the Web server. In the name, www stands for World Wide Web, uptecnet is the name of the company or organization hosting the site, .com is the identification of the type of organization hosting the site — called the topmost domain. The Web server is invisible from the URL that means URL does not tell you where the Web server is actually located. It is the job of DNS (Domain Name System) to route your Web page request to the Web server regardless of its physical location. z The news.htm is the path to a file — it is saying that the document news.htm is stored in folder named / (root). z The Yaksha part of the name, called a fragment ID, is the name of a specific part of the document. 1.6 WEB BROWSERS To access the World Wide Web, you use what is called a Web browser (already discussed in the previous chapter). Browsers are sometimes also called Web clients, since they get information from a server. When you start a WWW browser or follow a hyperlink, the browser (acting like a 21 client) sends a request to a site on the Internet. That site (acting like a server) returns a file whichInternet and the browser then has to display. In order for you to see or hear what's in the file, the browser Web Programming should be capable of interrupting its contents. This differs depending on the type of file, text, graphics and/or images that may be displayed. If the file is written using HyperText Markup Language (HTML), the browser interprets the file so that graphics and images are displayed along with the text. Basic Features of Browsers Before we get involved in all the details, let is discuss some important browser features. 1. The Web browser should be able to look at the Web pages throughout the Internet or to connect to various sites to access information, explore resources, and have fun. 2. The Web browser must enable you to follow the hyperlinks on a Web page and also to type in a URL for it to follow. 3. Another feature of browser is to have a number of other commands readily available through menus, icons, and buttons. 4. Your browser ought to include an easy way to get on-line help as well as built-in links to other resources on the Web that can give you help or answers to your questions. 5. You will definitely want a way to save links to the sites you have visited on the WWW so that you can get back to them during other sessions. Web browsers take care of those in two ways, through a history list, which keeps a record of some of the Web pages you've come across in the current session, and a bookmark list, which you use to keep a list of WWW pages you want to access any time you use your browser. The name of the site and its URL are kept in these lists. The bookmark list is particularly important and the browser will contain tools to manage and arrange it. 6. One of the main feature of a browser is to search the information on the current page as well as search the WWW itself. 7. Browsers give you the facility to save a Web page in a file on your computer, print a Web page on your computer, and send the contents of a Web page by e-mail to others on the Internet. 8. Few Web browsers (like Netscape Communicator) are complete Internet package, means they come with components like e-mail client, newsgroup client, an HTML composer, telnet client, ftp client, etc. 9. Web browser should be able to handle text, images of the World Wide Web, as well as the hyperlinks to digital video, or other types of information. 10. To take advantage of some of the most exciting things on the World Wide Web, your browser needs to properly display and handle Web pages that contain animated or interactive items. Netscape Navigator can incorporate these features through its ability to interpret programs written in Java and Java Script. 11. Web browsers interact not just with the Web, but also with your computer's operating system and with other programs, called plug-ins, that gives the browser enhanced features. 12. Another important feature to insist on in your browser is caching. A browser that caches keeps copies of the pages you visit so that it does not have to download them again if you want to return to them. Reloading a page from the cache is much quicker than downloading it again from the original source. 13. The most important feature of any browser is ease of use. While all Web browsers are fundamentally simple to use, the one you settle on should be very easy to work with; it should function as a transparent window onto the Web. 14. If you will be browsing the Web from within a secured network, you may have to configure your browser to work through a special computer on your network called a proxy server. Most popular browsers let you configure them to work with a proxy server, but some don’t, so find out if you will be working through a proxy before deciding on your browser. If you are, your ISP or system administrator will tell you if you need to do anything special to use 22 your browser.Internet Fundamentals 1.7 URL If you have ever noticed an advertisement that says "check out our Web site", you must have seen the way they describe how to find it, giving you the address, or URL, which almost begins with the letters http:. (URL stands for Uniform Resource Locator.) Within this system, there is a unique URL for any hypertext item on the Net. Moreover, there are also unique URLs for non- hypertext items from other services, such as gophers, anonymous ftp sites, Usenet newsgroups and wais databases. You see lots of URLs in newspapers and magazines these days. These URLs are basically "pointers" to documents, movies, photos, and so on, located on computer somewhere. You may want to visit those sites using URLs. If it's out there, you can get to it. Let's look at an example: http:// www.uptecnet.com/news.htmyaksha In this example, the URL has the following elements: z The first part of URL specifies the transfer protocol, the method that a computer uses to access this file. Most Web pages are accessed with the HTTP which is why Web addresses typically begin with http. The http:// at the beginning of a Web page's URL is so common that it often goes without saying; if you simply type uptecnet.com into the address window of Internet Explorer or Navigator, the browser fills in the http:// for itself. In common usage, the http: // at the beginning of a URL often is left out. Since the Web is not the only Internet service, you may occasionally see addresses that start with ftp:, gopher:, telnet:, news:, or some other name. The protocol is followed by a colon. z The www.uptecnet.com part of the address — called a domain name — is preceded by two slashes. This is the name assigned to a computer located somewhere in the world that is permanently connected to the host name of the Web server. In the name, www stands for World Wide Web, uptecnet is the name of the company or organization hosting the site, .com is the identification of the type of organization hosting the site — called the topmost domain. The Web server is invisible from the URL that means URL does not tell you where the Web server is actually located. It is the job of DNS (Domain Name System) to route your Web page request to the Web server regardless of its physical location. z The news.htm is the path to a file — it is saying that the document news.htm is stored in folder named / (root). z The Yaksha part of the name, called a fragment ID, is the name of a specific part of the document. URL Anatomy URL (pronounced U-R-ell) stands for Uniform Resource Locator, which is simply an address of a document on the Web or, more accurately, on the Internet. Although a URL can look complex and long, it is made up of four basic parts — protocols, hostname, folder name, and file name — each of which has a specific function. Types of URLs URLs vary depending on the location of the document to which you are linking. For example, a URL will be longer and include more information if the file is on the World Wide Web. A URL will be shorter and include less information if the file is on your local computer or server. Basically, URLs fall into two categories: z Absolute z Relative An absolute URL contains all the information necessary to identify files on the Internet. A relative URL points to files in the same folder or on the same server. In other words, the file linked to is 23 relative to the originating document.Internet and Absolute URLs Web Programming An absolute URL contains the protocol indicator, hostname, folder name, and file name. Absolute URLs are similar to addresses used by the Indian Postal Service, which include a name, street address, apartment number (if applicable), city, state, and pin code. If some of the information is missing — say, the street number or house number — the carrier can not deliver the mail to the right person. Here are some absolute URLs: http://www.xmission.com/services/index.html http://www.altavista.digital.com/ ftp:/ftp.raycomm.com/download/readme.txt Relative URLs A relative URL usually contains only the folder name and file name or even just the file name. You can use these partial URLs when you are pointing to a file that is logged within the same folder or on the same server as the originating file. In these cases, a browser does not need the server name or protocol indicator because it assumes that the files are located in a folder or on a server that is relative to the originating document. Document-Relative URLs You will often use a document-relative URL when you are developing or testing a set of HTML documents. When linking from index.html, use the following URLs: services/consulting.html services/other/tips.html When linking from consulting.html to tips.html, use the following URL: other/tips.html Server-Relative URLs A server-relative URL is relative to the server root — that is, relative to the hostname part of the URL. Server-relative URLs have a forward slash (/) at the beginning of the file name, which indicates that you interpret the path of the document from the top of the current server (the server root), rather than from the current document location. For example, from anywhere in our site, we could use a server-relative URL to display out home page with a link to /index.html, which would display the index.html file right under the top of the server. Some server-relative URLs include: /index.html /contacts/names.html Server-relative URLs are useful when you are linking to a specific location on the server (such as contact information) that is not likely to change and that is not clearly relative to the current document. Adding Special Characters HTML is not limited to standard ASCII characters, which do not include special characters such as trademark symbols. You can use character entities to create many other characters. Each of these extra characters has both a name and a number. To include a character entity in the text of your Web page, type an ampersand (&), the name or number of the character, and a semicolon (;). If you use the character number, precede it by. For example, to include a copyright symbol, you can type & copy; or &169; in your text. Not all characters have names; some only have numbers. The table below lists of some useful character entities; you can use the version in either the second or third column of the table (unless only one version is available). For a complete listing of all the standard character entities, see one of the following sites: http://www.natural-innovations.com/boo/doc-charset.html 24 http://www.owlnet.rice.edu/-jwmitch/iso8859-1.htmlInternet Fundamentals When displaying text, browsers ignore repeated whitespace characters. For example, while writing an HTML program, if the Enter key is pressed several times, the browsers display only one vertical space. Similarly, if ten spaces are typed, the browsers generate only one space. Character Character Entity Character Entity (Name) (Number) Less than () < &060; Less than () > &062; Bullet (·) &149; Em dash (—) &150; En dash (-) &151; Trademark (ä) &153; Nonbreaking space   &160; Inverted exclamation point () ¡ &161; Copyright(Ó) © &169; Registered trademark (Ò) ® &174; Paragraph sign (¶) ¶ &182; One-half (½) ½ &189; Inverted question mark (?) ¿ &191; 1.8 INTERNET SECURITY Commercial and government enterprises are reluctant to use the Internet because of security concerns. During the past several years, attacks on routers have become frequent, with attackers realising that they can create many more problems by targeting the routing infrastructure than attacking any single system. The Internet currently uses BGP (border gateway protocol) for inter domain routing. Also, because BGP sessions use TCP to transmit data between routers, the recent increase in TCP based attacks is an additional threat to BGP security. In the past, the Internet community used SNMP (simple network management protocol) to monitor the health of the network, and to debug operational problems. But now it is pretty easy to eavesdrop on SNMP traffic and discover the appropriate community name, and then access the SNMP database on the management network device. This is especially true when the management network device uses no authentication. There are also programs that guess passwords, trying millions of combinations of letters to find a match. Once an attacker gains access to the SNMP database, he can attack in many ways. If security relevant information, such as a password, is stored in the database, the attacker can learn the password. The need to augment Intranet security is being alarmingly realized with the emergence of E- commerce. Presently, E-commerce operations are marked by fear of loss of money and privacy. One recent survey, undertaken by Equifex and Harris Associates, determined that over two-thirds of Internet consumers considered privacy concerns to be very important. E-Mail Threats E-Mail when sent across the Internet is more like a post card. It can be intercepted at any stage and read by anybody who can lay his hands on it. To ensure the secrecy of the message, the sender as well as the receiver should agree on a secret key. There starts the problem. If your intended recipient is in a far away country, then you have to distribute the key first to him before you can send him the message. And this presents a logistical problem. Public key cryptography was designed to overcome this problem through what is known as public key private key pair. Another way of ensuring the secrecy of E-Mail messages is through the use of a technique called signing a message. Firewall – A Safe Bet Are you planning to connect your organization to the lntemet? Do your employees dial into your 25 computers from remote places? Do you have multiple branches connected to each other? If yourInternet and answer is yes, then Firewall is what you need to protect your lntranet. Firewall is typically defined Web Programming as a system or group of systems that enforces an access control policy between two networks. It may also be defined as a mechanism used to protect a trusted network from an untrusted network. Firewall is a collection of components or a system placed between two networks. Firewall acts as a gatekeeper between a company's internal network and the outside world. It acts as an electronic barrier to stop unauthorized entry. A firewall basically performs two important functions: gatekeeping and monitoring. Gatekeeping by Firewall : Firewall acts as a gatekeeper between the company's internal network and the outside network. It examines the location from which the data enters your system and then decides, based on your instructions, whether or not to allow that information. Monitoring by Firewall : In addition to gatekeeping, the firewall also monitors information. Monitoring is one of the most important aspects of firewall design. Monitoring functions include logging of all system activities and generation of reports for system administration. Monitoring can be active or passive. In active monitoring, a firewall notifies a manager whenever an incident occurs. The firewall product, Smart wall, alerts the administrator via E-Mail or a pager about suspicious on-line activity. In passive monitoring, a firewall logs a record of each incident in a file or a disk. Then a manager can analyze the log periodically to determine whether attempts to access the organization have increased or decreased over time. Firewall Architecture An organization that connects to the Internet over a serial line might choose to implement a firewall. Router R2 implements the outer barrier; it filters all traffic except datagrams destined for the bastion host. Router RI implements the inner barrier that isolates the rest of the corporate Internet from outsiders; it blocks all incoming datagrams except those that originate on the bastion host. Figure 1.4 contains a superfluous network that connects the two routers and the bastion host. Such a network is often called a stab network because it consists of a stubby wire to which only three computers are connected.     → ←   Figure 1.4 Firewall with one domain Student Activity 4 1. What is a Web Browser? 2. Describe the basic features of a Web Browser. 3. Define URL. 4. Describe various types of URLs. 5. Why is Internet Security required? 6. What is a firewall? Describe the firewall architecture. 26Internet Fundamentals 1.9 TELNET Telnet is a standard Internet protocol for remote terminal connection service. By remote terminal we mean the other computer whose data/programs have to be accessed. This computer may be in the near vicinity or seven seas away. The computer on which the user works is called the local computer. In other words, Telnet is a facility by which a user can sit on a local computer and access remote computers provided he has a valid user id (user identity) and password of the remote computer or it could be that the remote computer allows public access. Telnet works on the client/server principle where the remote computer acts as a server by accepting the requests of the client (local computer), processing it and then sending the results back to the client. Generally Telnet is used in order to retrieve: z Special information from a remote database z Weather reports z Library catalogs z Departmental stores catalogs z E-mail while touring z Information from other Internet tools like FTP, Gopher, etc. Getting Connected To Telnet Generally there are two ways by which a local computer can be connected to a remote computer. The most common way is to log on to any Internet host on which you have an account. For example, you can make a connection to a remote UNIX computer. The next thing the host would ask you to do is to enter your name and password. If the above data is correctly entered then you can access the UNIX software. In fact your computer emulates the remote terminal. Another way to access a remote computer would be if that remote computer provides public Telnet access i.e. any netizen can access these types of remote computers from his own desktop. These remote computers do not require any password to be entered and can be directly accessed. For example, you want to find a particular book in the library catalog; you can do so provided that particular library computer provides public access. If you use Telnet using ‘domain access’ your computer has an IP address as you are directly connected to the Internet, then the client application executes on the local computer. If Telnet is used as terminal emulation your computer is not directly on the Internet. Infact it is connected to the Internet via your Internet access provider's host computer. The Telnet client application runs on the host computer. A Telnet Session Step 1: First establish a connection to the Internet i.e. login on the Internet. Step 2: Click Start and then select Run (Figure 1.5). The Run dialog box appears. 27 Figure 1.5 The Start MenuInternet and Step 3: Now enter telnet in the Run dialog box, and then click the OK button (Figure 1.6). Web Programming Figure 1.6 The Telnet Window The Telnet window appears. Figure 1.7 The Telnet Window Step 4: Select the Connect option from the above window and the resultant is a drop down menu. Figure 1.8 The Connect Pull down Menu Step 5: From the Connect drop down menu, click the option Remote System. Now you will get the connect dialog box. 28 Figure 1.9 The Connect Dialog BoxInternet Fundamentals Step 6: a. In the Host Name box of the Connect dialog box, type the URL or the IP address of the remote system you want to connect to, e.g., fedworld.gov. This site provides a huge number of US federal documents of all sorts. b. In the Port box, specify a port number or service to be used. In normal computer terminology port refers to a connection between two devices. On the Internet port numbers are used to identify different types of connection for different services. Normally, for Telnet, the default port number is 23 but for certain programs you have to specify the port numbers. Therefore, for the Cookie server the port which deals with quotable quotes is 12345 and so its complete address is: astro.temple.edu.12345 or 129.32.1.100 12345 i.e., the host waits to receive commands over port 12345. The reason for stating the host port number is that different port numbers on the same host may receive instructions of different types and perform accordingly. c. In the Term Type box, specify terminal type, i.e., the type of terminal you want to emulate. The most commonly used terminal type is vt100. You can also use tn3270 if you want your computer to emulate an IBM 3270 computer. But in our example (fedworld.gov) we use the default terminal type vt100 and the default port. Now click the Connect button. Figure 1.10 The Connect Dialog Box for the Site Fedworld Step 7: If the above operation has been successfully performed the remote computer will ask you to enter the login name and password. In the above case log on as NEW. No password is required as it allows public access. There are many Telnet sites which allow public access. For these sites there are no passwords and generally the login names are displayed on the screen so that the user is not perturbed. If nothing is mentioned then try using ‘guest’ as login. 29 Figure 1.11 The Telnet Site-FedworldInternet and Step 8: In case you are able to establish a successful connection you get further information. Web Programming 1 Figure 1.12 A Successful Connection to the Site Fedworld Step 9: If you are not able to establish a connection, then you will get the message Connection Failed or Connection to host lost. Figure 1.13 Unsuccessful Connection Step 10: Once all the information required is extracted from the telnet site, then it is always better to log out and then terminate the Telnet session. A Telnet session can be ended by highlighting and clicking the Disconnect option under the tab Connect. Figure 1.14 Disconnecting from Telnet Student Activity 5 1. Define Telnet. 2. Describe the usage of Telnet. 3. Write a step-wise procedure to establish a Telnet session. 1.10 E-MAIL Its long since you have sent a letter and you are still waiting for a response. Well continue waiting as normal postal techniques are slow. But if you are a smart user of the Internet then the entire 30

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.