introduction of web programming ins. elaf alhazmi lecture 1

Click here to load reader

Upload: ariel-cook

Post on 11-Jan-2016

220 views

Category:

Documents


1 download

TRANSCRIPT

LECTURE 1

Introduction of Web programmingIns. Elaf AlhazmiLECTURE 1What is Internet When two or more networks are connected, they become internetwork, or internet.Network : is group of connected communicating devices such as computers and printers.Internet is two or more networks that can communicate with each otherInternet is a worldwide telecommunications system that provides connectivity for millions of other, smaller networks; therefore, the Internet is often referred to as a network of networks. It allows computer users to communicate with each other across distance and computer platforms

2Ins.Elaf Alhazmihttp://fcit.usf.edu/internet/chap1/chap1.htm 2What is Internet Today most end users who want Internet connection use the services of Internet service providers (ISPs).Internet services providers (ISPs). ISP is organization with one or more servers of local ISP by establishing service contract and paying fee. No company / or person owns the internet. it is a cooperative effort governed by system of standards and rules. The purpose of connecting computers together is to share information3Ins.Elaf Alhazmi3TCP/IP protocolsThe two most important protocols allowing computers to transmit data on the Internet are Transmission Control Protocol (TCP) Internet Protocol (IP). With these protocols, virtually all computers can communicate with each otherThe Internet Protocol (IP) defines how data packets are sent across the Internet. It is like a mechanism for transmitting packets between source and destination

4Ins.Elaf AlhazmiWhat is World Wide WebThe Internet is the collection of the many different systems and protocols. The World Wide Web (WWW), is repository () of linked information spread all over the world.www, developed in 19895Ins.Elaf AlhazmiDifference between Internet & WWWThe terms Internet and World Wide Web are often used interchangeably in everyday speech.The Internet is a particular global computer network connecting millions of computing devicesThe World Wide Web or Web is just one of many services running on the Internet. The Web is a collection of interconnected documents (web pages) and other Web resources, linked by hyperlinks and URLs6Ins.Elaf AlhazmiInternet ApplicationThe main task of the internet is to provide services for users.Electronic mail (exchange of messages between two entities)File transfer (copying file one computer to another)Remote login (is a client-server application used to log into another computer on the Internet)Accessing World wide Web (WWW)7Ins.Elaf AlhazmiWeb Servers & Web BrowsersWeb page : a single document that is placed on internetWebsite : collection of web pagesWeb client/ browser: it requests for informationThe software that request for information is called the client. On the web, the browser is the client software that makes request for documents.

8Ins.Elaf AlhazmiWeb Servers & Web BrowsersWeb server : it has websites stored, it accepts request from client and sends back informationWeb browser is piece of software on your computer or mobile device that you use to access web pages on websitesFor example Microsoft Internet ExplorerGoogle ChromeMozilla FirefoxSafariopera9Ins.Elaf AlhazmiComponents of the WWWTo use the WWW you need Three componentsBrowser (To display web pages)Servers ( Store Web sites)Hypertext Transfer Protocol (HTTP)

10Ins.Elaf AlhazmiHypertext Transfer Protocol (HTTP)HTTP is protocol used mainly to access data on the World Wide Web.The idea of HTTP is very Simple. Client send a request to server, and then the server sends the response.11Ins.Elaf AlhazmiClient-Server Architecture The Web has a client-server architecture with three fundamental components Web (client) browsers Network Web servers

The request and response are handled via HTTP protocol, It can be used to transfer images, audio, videos etc all other web resources 12Ins.Elaf AlhazmiAddressesTo identify one particular HTTP site, the client uses Uniform Resource Locator(URL)

Uniform Resource Locator(URL) is standard for specifying any kind of information on the internet. The URL defines four thingsMethod/protocol Host namePortPath13Ins.Elaf AlhazmiUniform Resource Locator(URL)For examplehttp://www.yahoo.comProtocol : HTTPHost: It has the websitePort : 80 for HTTP (optionally)Path: location of file http://www.yahoo.com:80/index.html

ProtocolHostPORTPath14Ins.Elaf AlhazmiProtocol The protocol part of an URL is the funny string of characters that you see before the hostname. Examples are http, ftp, telnet:, etc. They are separated from the hostname with a colon and two forward slashes ( :// ). These protocols tell your browser what type of service to use when you connect with the web browser to the hostname. If you leave the protocol off your address, by default the Web Browser will assume you are using the HTTP protocol, which is for connecting to web sites, so there is no need to type in the http:// every time you go to a web site. If you specify another protocol like ftp, then the browser will act as an ftp client that will enable you to connect to a ftp server to download files. 15Ins.Elaf AlhazmiHostname The hostname is the address you are going to. For example, if you are going to the address http://www.bleepingcomputer.com, then www.bleepingcomputer.com is the hostname. 16Ins.Elaf AlhazmiPort NumberThe port number is a number that you can append to the hostname with a colon ( : ) between them. For example http://www.bleepingcomputer.com:80. If you leave the port number off, which almost everyone does, then the browser will automatically use port 80 as that is the default port for the http protocol.

Reserved Ports 80: Hypertext Transfer Protocol (HTTP) 20: File Transfer Protocol (FTP) 22: Secure Shell (SSH) 23: Telnet 25: Simple Mail Transfer Protocol (SMTP)

17Ins.Elaf AlhazmiPath This is the path on the server, culminating with the filename you are trying to reach. For example, the URL http://www.bleepingcomputer.com/examples/example1.html. The path in this case is /examples/example1.html. This path corresponds to an actual directory structure on the web server. So on the web server there is a root directory, an examples directory underneath that root directory, and a file called example1.html underneath that. 18Ins.Elaf AlhazmiDomain name Server (DNS)An Internet address has four fields with numbers that are separated by periods or dots. This type of address is known as an IP address. For example 131.247.120.10

Domain Name System (DNS) was developed to translate the numerical addresses into words for example http://fcit.usf.edu/

19Ins.Elaf AlhazmiDomain name Server (DNS)(DNS) is Unique name that identifies an entity, whether that be an single individual or a company, on the Internet Its a part of host name in URL Domain Names always have 2 or more parts separated by the dots . www.yahoo.comThe left most part is a specific name like yahoo This is a unique name and there cannot be any duplicates on the rest of the Internet that are used by anyone else. The right most part is top level domain (TLD) like .com, .edu, .gov ect

20Ins.Elaf AlhazmiDomain name Server (DNS)There are 2 different types of TLDCountry code top level domainGeneral top level domainCountry code (cc)TLD specifies the country and only 2 letters are used like .sa , .ca , .au , Generic TLD(gTLD) used 3 or more letters like .com, .edu, .gov

21Ins.Elaf AlhazmiCountry code top level domain.au Australia .deGermany .fr France.nlNetherlands .uk United Kingdom.us United States General top level domain.com Commercial .edu Educational .gov Government .net Networking Providers .org Organization.mil United States Military 22Ins.Elaf AlhazmiCookiesA cookie is information that a Web site puts on your hard disk so that it can remember something about you at a later time.A cookie is a mechanism that allows the server to store its own information about a user on the user's own computerThe location of the cookies depends on the browserThe main purpose of cookies is to identify users and possibly prepare customized Web pages for them.23Ins.Elaf AlhazmiCookies TypeThere are two types of cookies Session Cookies Persistent Cookies

24Ins.Elaf AlhazmiSession CookiesSession Cookies a cookie that is erased when the user closes the Web browser Session cookie has short time set for expiration like 20 min, 30 min, 2 hours, 8 hours Session cookies do not collect information from the users computer

25Ins.Elaf AlhazmiPersistent CookiesPersistent Cookies cookie that is stored on a users hard drive until it expires (persistent cookies are set with expiration dates) or until the user deletes the cookie Persistent cookies are used to collect identifying information about the user

26Ins.Elaf AlhazmiDocuments on the WWWThe documents on the WWW can be grouped into three categoriesStatic documentsDynamic documentsActive documents27Ins.Elaf AlhazmiStatic DocumentsStatic documents are fixed-content documents that are created and stored on server.The client can only get copy of the documentThe contents are determined when the file is created, not when it is used.Programming languages Hypertext Markup language (HTML)Extensible Markup Language (XML)28Ins.Elaf AlhazmiDynamic DocumentsDynamic document is created by web server whenever a browser requests the document.The server returns the output of the program as response to the browser that requested the document.( because fresh document is created for each request).Dynamic document Shows different information to different users.

29Ins.Elaf AlhazmiDynamic DocumentsProgramming languagesCommon Gateway Interface (CGI)New technology, it allows programmers to use several languages C,C++ etcScripting technologiesHypertext preprocessor (PHP)Java Server Pages (JSP)Active server Pages (ASP)30Ins.Elaf AlhazmiActive DocumentsActive documents are able to run program or script at the client site.The server send copy of document or script to clientFor example, to run a program that creates animated graphics on the screen.Programming languagesJava appletsJava script

31Ins.Elaf Alhazmi31