Internet Overview – Fundamental computer network concepts – Web Protocols – URL – Domain Name – Web Browsers and Web Servers – Working principle of a Website – Creating a Website – Client-side and server-side scripting.
Size: 1.31 MB
Language: en
Added: May 17, 2023
Slides: 57 pages
Slide Content
IT2253 Web Essentials
Unit I –Website Basics
Kaviya.P
Kamaraj College of Engineering & Technology
Unit I –Website Basics
InternetOverview–Fundamentalcomputernetworkconcepts–
WebProtocols–URL–DomainName–WebBrowsersandWeb
Servers–WorkingprincipleofaWebsite–CreatingaWebsite–
Client-sideandserver-sidescripting.
World Wide Web (WWW)
•WWWisacollectionofsoftwareandcorrespondingprotocolsusedto
accesstheresourcesovertheInternet.
•WWWisainformationsysteminwhichvariousdocumentscontaining
informationareinterlinkedtogether.
•Thisinformationistypicallystoredonthewebpagesandthroughweb
browserswecanaccessthesewebpages.
Fundamental Computer Network Concepts
IPAddress
•EachhostonaTCP/IPnetworkisassignedaunique32-bitlogicaladdressthatis
dividedintotwomainparts:thenetworknumberandthehostnumber.
•TheIPaddressisgroupedfourinto8-bitsseparatedbydots.
•Thereare5classesbasedontwoparts.
•IPaddressisassignedtothedevicesparticipatingincomputernetwork.TheIP
protocolmakesuseofthisaddressforcommunicationbetweentwocomputers.
UsingIPaddressparticularnodecanbeidentifiedinthenetwork.
ClassFormatRangePurpose
Class AN.H.H.H1 to 126Very few large organizations
Class BN.N.H.H127 to 191Medium size organizations
Class CN.N.N.H192 to 223Relatively small organizations
Class D-224 to 239Used for multicast groups
Class E-240 to 254Reserved for experimental purpose
Fundamental Computer Network Concepts
NetworkPhysicalStructure
•Anetworkistwoormoredevicesconnectedthroughlinks.
•Link:Acommunicationspathwaythattransfersdatafromonedevicetoanother.
•TypesofConnection
oPoint-to-pointlink
oMultipointlink
Web Protocols
UserDatagramProtocol(UDP)
•Itisaconnectionlessprotocolwithoutanyerrordetectionfacility.
•Itisusedforsimplytransmissionofdata.
•ItisaunreliableprotocolhoweverthisismuchfasterthanTCP.
InternetProtocol(IP)
•Itisanetworklayerprotocolwhichconsistsofaddressinginformation.
•Usingthisinformationthecommunicationbetweenuniquelyaddressed
computersispossible.
Hyper Text Transfer Protocol
•HTTPisacommunicationandstatelessprotocol.
•Requestresponsemodel:Theclientmakesarequestfordesiredwebpageby
givingtheURLintheaddressbar.Therequestissubmittedtothewebserverand
thenwebservergivestheresponsetothewebbrowserbyreturningtherequired
webpage.
HTTPREQUEST
•EveryHTTPrequestmessagehasthesamebasicstructure:
•Startline
•Headerfield(s)
•Blankline
•Messagebody(optional)
Hyper Text Transfer Protocol
HTTPREQUEST
•Everystartlineconsistsofthreeparts,withasinglespaceusedtoseparateadjacent
parts:1.RequestMethod,2.RequestURI,3.HTTPVersion
1.RequestMethod
•ItdefinestheCONNECTmethodwhichisusedduringthewebbrowserandserver
communication.
•ItisalwayswritteninUpperCaseletters.
•TheGETmethodisusedwhen
a.YoutypeaURLinaddressbar
b.Whenyouclickonsomehyperlinkwhichispresentinthedocument
c.WhenbrowserdownloadsimagesfordisplaywithinaHTMLdocument
•ThePOSTmethodusedtosendinformationcollectedfromuserform.
Hyper Text Transfer Protocol
HTTPREQUEST
1.RequestMethod
METHODDESCRIPTION
GETReturntheresourcespecifiedbytherequestURIasthebodyofa
responsemessage.
POSTPassthebodyofthisrequestmessageonasdatatobeprocessedby
theresource.
OPTIONSReturnalistofHTTPmethodsthatmaybeusedtoaccesstheresource
specified.
PUTStorethebodyofthismessageintheserverandassignthespecified
Request–URItodatastoredtogetfutureGETrequestmessage.
DELETEUsefulindeletingthespecifiedresource.
Hyper Text Transfer Protocol
HTTPREQUEST
2.Request-URI
•TheUniformResourceIdentifier(URI)isastringusedtoidentifythenamesor
resourcesontheInternet.
•TheURIisacombinationofURLandURN.
•TheURL(UniformResourceLocater)denotesthewebaddressandURN(Uniform
ResourceName)denotesspecificnameoftheplaceorapersonoritem.
•URNExample:ISBN978-81-8431-123-2specifiestheaddressofsomebook.
URLIntended server
ftp://ftp.mywebsite.com/index.txtFilecanbelocatedonFTPserver
telnet://mywebsite.orgTelnetserver
http://www.mywebsite.comWebserver
Hyper Text Transfer Protocol
HTTPREQUEST
3.HTTPVersion
•TheofficialversionofHTTPisHTTP/1.1
•TheversionstringforHTTP/1.1mustappearinthestartlinewithallcapitalletters
andnoembeddedspace.
•Theheaderfieldsareintheformoffieldnameandfieldvalue.
•Thestructureofhttprequestis
Hyper Text Transfer Protocol
HTTPRESPONSE
•Thestructureofresponsemessageisasfollows:
•Statusline
•Headerfields
•Blankline
•Messagebody
STATUSLINE:Itconsistofthreefields
1.HTTPVersion:DenotestheHTTPversionsuchasHTTP/1.1
2.StatusCode:Numericcodeindicatingthetypeofresponse
3.ReasonPhrase:Presentsinformationaboutthestatuscode.
Example:HTTP/1.1200OK
Hyper Text Transfer Protocol
HTTPRESPONSE
Status
Code
Reason
PhraseDescription
200OKAstandardresponseforsuccessfulrequest
201CreatedShowsthattherequestisfulfilledandanewresourceis
beingcreated
202Accepted Whentherequestisacceptedforprocessingbutisnot
processedyetisdenotedbythisstatuscode
404Not foundTherequestedresourceisnotpresentcurrentlybutmaybe
availableinfuture
403ForbiddenTherequestedresourceispresentcurrentlybuttheserveris
notabletorespondit.
500Internal
Server Error
Itisagenericerrormessagethatappearsduetosoftware
internalfailure
Hyper Text Transfer Protocol
HTTPRESPONSE
•Theheaderfieldinresponsemessageissimilartothatofrequestmessage.
•Themessagebodyconsistofresponsemessage
Example
HTTP/1.1200OK
Date:Fri,1Jan201007:59:01GMT
Server:Apache/2.0.20(Unix)mod_perl/1.99_10Perl/v5.8.4mod_ssl/2.0.50OpenSSL/0.9.7dDAV/2PHP/4.3.8
Last-Modified:Mon,23Feb200908:32:41GMT
Accept-Ranges:bytes
Content-Length:2010
Content-Type:text/html
<!DOCTYPEHTMLPUBLIC“-//W3C//DTDHTML4.01Transitional//EN”>
<HTML> .....</HTML>
Header FieldDescription
DateRepresents the date and time at which the response is generated
ServerName of the server which is responding
Last modifiedRepresents the date and time at which the response is last modified
Hyper Text Transfer Protocol
CACHECONTROL
•Cacheisusedasrepository.Useofcacheimprovessystemperformance.
•Manywebbrowserstoreswebpagesviewedbytheclientinthecachememory.
HTTPTUNNELING
•Itisamechanismbywhichthecommunicationperformedbyvariousnetwork
protocolisencapsulatedbytheHTTPprotocol.
•TheapplicationthatwishestocommunicatewitharemotehostopensanHTTP
connectiontoamediatorserver.
•UsingHTTPrequestthehostcommunicateswiththemediatorserverby
encapsulatingtheactualcommunicationswithinthoserequests.
•Themediatorserverthenunwrapsthedataandsendtotheremotedestinedhost.
•Theremotehostwhensendstheresponsetotherequestinghost,wrapstheresponse
intheHTTPprotocolandthentheresponseisgiven.
Web Browsers and Web Servers
WebBrowsers
•Webclientisakindofsoftwarethatrunsontheclient’smachine.
•ThissoftwaresendstheHTTPrequesttotheserverandthenprocessestheHTTP
response.
•Thecommonlyusedwebbrowsersare(i)Internetexplorer(ii)MozillaFirefox
(iii)NetscapeNavigator(iv)Opera(v)GoogleChrome(vi)Safari.
•Webbrowsersupportsvarietyofprotocolsbutthemostusedprotocolontheweb
browserisHyperTextTransferProtocol(HTTP).
Web Browsers and Web Servers
FunctionsofWebBrowsers
•ReformatstheURLandsendavalidHTTPrequest.
•Whenusergivestheaddressofwebsiteitisintheformofdomainname.Theweb
browsercovertstheDNStocorrespondingIPaddress.
•ThewebbrowserestablishesaTCPconnectionwiththewebbrowserwhile
processingtheuser’srequest.
•ThewebbrowserssendtheHTTPrequesttothewebserver.
•ThewebserverprocessestheHTTPrequestsentbythewebbrowserandreturns
thedesiredwebpagetotheclientmachine.Thewebbrowserontheclient’s
machinedisplaysthiswebpageinappropriateformat.
Web Browsers and Web Servers
WebBrowserArchitecture
Web Browsers and Web Servers
WebBrowserArchitecture
UserInterface:Usingtheuserinterfaceuserinteractswiththebrowserengine.
BrowserEngine:Thebrowserengineisresponsibleforqueryingtherendering
engineaccordingtovariousinputofuserinterfaces.
RenderingEngine:Itisresponsiblefordisplayingtherequestedcontentsonthe
screen.TherenderingengineinterpretstheHTML,XMLandJavaScriptthat
comprisesthegivenURLandgeneratesthelayoutthatisdisplayedintheuser
interface.ThemaincomponentofrenderingengineisHTMLParse.Thejobofthe
HTMLparseristoparsetheHTMLmarkupintoparsetree.
JavaScriptInterpreter:TheinterpreterexecutestheJavaScriptcodewhichis
embeddedinawebpage.
Web Browsers and Web Servers
WebBrowserArchitecture
Networking:ThefunctionalityofnetworkingistoretrievetheURLusingcommon
internetprotocolssuchasHTTPandFTP.Thenetworkingisresponsibletohandlethe
internetcommunicationandsecurityissues.Thenetworkcomponentmayusethe
cacheforretrieveddocuments.Thisfeatureisusefulforincreasingtheresponsetime.
UserInterfaceBackend:Itisbasicallyusedtodrawthewidgetslikecomboboxes
andwindows.
DataPersistence:Thisisasmalldatabasecreatedonlocaldrivesofthecomputer
wherethebrowserisinstalled.Thedatastoragemanagesusedatasuchasbookmarks,
cookies,andpreferences.
Web Browsers and Web Servers
WebServers
•Webserverisaspecialtypeofservertowhichthewebbrowsersubmitstherequest
ofwebpagewhichisdesiredbytheclient.
•TherearesomepopularlyusedwebserversuchasApacheandIISfromMicrosoft.
FunctionsofWebServers
1.Thewebserversaccepttherequestfromthewebbrowsers.
2.Theuserrequestisprocessedbythewebserver.
3.Thewebserverrespondstotheusersbyprovidingtheserviceswhichtheydemand
foroverthewebbrowsers.
4.Thewebserversservetheweb-basedapplications.
5.TheDNStranslatethedomainnamesintotheIPaddresses.
6.Theserversverifygivenaddressexists,findnecessaryfiles,runappropriatescripts
exchangecookiesifnecessaryandreturnsbacktothebrowser.
7.Someserversactivelyparticipateinsessionhandlingtechniques.
Web Browsers and Web Servers
WorkingPrincipleofWebServers
•Step1:Webclientrequestsforthe
desiredwebpagebyprovidingtheIP
addressofthewebsite.
•Step2:Thewebserverlocatesthe
desiredwebpageonthewebsiteand
respondsbysendingbackthe
requestedpage.Ifthepagedoesn’t
exist,itwillsendbacktheappropriate
errorpage.
•Step3:Thewebbrowserreceivesthe
pageandrendersitasrequired.
Web Browsers and Web Servers
WebServers
1.Apache
•Features:ReliabilityandEfficiency.
•Anopen-sourcesoftware.Freelyavailabletoanybody.Apachewebserverisbest
suitableforUNIXsystemsbutitcanalsobeusedonWindowsbox.
•Theapachewebservercanbeconfiguredaspertherequirementsusingthefile
httpd.conf.
2.IIS
•TheInternetInformationServicesorInternetInformationServerisakindofweb
serverprovidedbyMicrosoft.
•ThisserverismostpopularonWindowsplatform.
Web Browsers and Web Servers
WebServers
3.Databaseserver
•Ithavealotofdatatodealwitharegularbasis.Ifyouhaveclient-server
architecturewheretheclientsneedprocessdatatoofrequently,itisbettertowork
withadatabasesserver.
•Alldatabasefunctionsarecontrolledbythedatabaseserver.
•ExamplesofproprietarydatabaseserversincludeOracle,DB2,Informix,and
MicrosoftSQLServer.
•ExamplesoffreesoftwaredatabaseserversincludePostgreSQL.
Web Browsers and Web Servers
WebServers
Web Browsers and Web Servers
DifferencebetweenWebserverandDatabaseserver
Web serverDatabase server
Webservermakesuseofthe
languageslikePHP,ASP,JSP.It
makesuseoftheprotocolssuchas
FTPandHTTP.
Thedatabaseserverhasitsownspecific
programlanguageorquerylanguages.
Webserverisusedtosavethe
staticanddynamiccontentand
pagesofwebsites.
Databaseserverdealswiththestoringand
managingthedataofacomputeror
computerprograms.
Webserveronlyperformsweb-based
services.
Databaseservercanmanagetheweb
based,enterprisebasedorbusiness-based
servicesatthesametime.
ApacheHTTPServer,Microsoft
InternetInformationServices(IIS)
GooglewebServer(GWS)andSunJava
SystemWebServerareexamplesofweb
server.
Oracle,SAP,MySQLandDB2aresome
commonexamplesofdatabaseserver.
Web Browsers and Web Servers
DifferencebetweenApacheandIIS
Apache web serverIIS web server
Apachewebserverisusefulonboth
UnixbasedsystemsandonWindows
platform.
IISwebserverisusedonWindows
platform.
Itisanopen-sourceproduct.Itisavendorspecificproductandcanbe
usedonwindowsproductsonly.
TheApachewebservercanbecontrolled
byeditingtheconfigurationfile
httpd.conf.
ForIISserver,thebehavioriscontrolledby
modifyingthewindow-basedmanagement
programscalledIISsnapin.Wecanaccess
IISsnap-inthroughtheControlPanelà
AdministrativeTools.
Web Browsers and Web Servers
DifferencebetweenApplicationServerandWebServer
Application ServerWeb Server
Aserverthatexposesbusinesslogictoclient
applicationsthroughvariousprotocols
includingHTTP.
AserverthathandlesHTTPprotocol.
Applicationserverisusedtoserveweb-
basedapplicationsandenterpriseapplications
(i.eservlets,JSPandEJBetc).Application
serversmaycontainawebserverinternally.
Webserverisusedtoserveweb-based
application(i.eservletsandJSP)
Todelivervariousapplicationsto
anotherdevice,itallowseveryoneinthe
networktorunsoftwareoffofthesame
machine.
KeepingHTML,PHP,ASP,etcfiles
availableforthewebbrowserstoview
whenauseraccessesthesiteontheweb,
handlesHTTPrequestsfrom
clients.
Itmakesuseofdistributedtransactionand
EJB’s. ItmakesuseifServletsandJSP.
Resourceutilizationishigh.Resourceutilizationislow.
Working Principle of a Website
FeaturesofWebsiteDesign
1.QualityWebContent
•Peopledesireinformationinfastandreliablefashion.
•Forbusinesswebsites,contentshouldincludeimportantinformation.
•Displayhighqualitypicturesoftheirproducts.
•Highlightforclienttestimonials.
2.Clear,User-friendlyNavigation
•Allowsvisitorstoquicklyfindtheinformationneeded.
•Asearchboxissuggestedtomakeitfastertoreachmorespecificpageswithina
website.
3.SimpleandProfessionalWebDesign
•Abalanceddistributionofcontentsandgraphicsisrequired.
•Slightlycontrastingcolorsandclearfontsisalsonecessary.
Working Principle of a Website
FeaturesofWebsiteDesign
4.WebpageSpeed
•Thewebsitewithheavygraphics,audioandvideotakesmoretimetoload.
•Maintainthedesirablespeedofthewebsite.
5.SearchEngineOptimization
•Thisallowstheinsertionofsearchkeywordsinwebsitecontent,anappropriatelink
profile,socialmediasignals.
6.WebCompatibility
•Awebsiteshouldeasilyrenderonvariousresolutions,screensizes,andbrowsers;
andwiththeincreasingpopularityofmobiledevices,websitesshouldfunction
properlyonthesetypesofdevices.
Working Principle of a Website
WebsiteDesignIssues
JeanKaiserhassuggestedfollowingdesigngoalsforthewebdesign:
1.Simplicity:Avoidlotofanimations,hugeamountofinformation,extremevisuals
andsoon.
2.Identity:Webdesigndrivenbytheobjectiveofthewebapplication,categoryofuser
usingit.Awebengineermustworktoestablishanidentityforthewebapplication
throughthedesign.
3.Consistency:Thecontentsofthewebapplicationshouldbeconstructedconsistently.
Forexample:textformatting,fontstyle,thegraphicsdesign,colorschemeandstyle.
hypermediastructure,navigationandcontentdisplay.
4.Robustness:Theusersalwaysexpectrobustcontentsandfunctionsoftheweb
application.Ifanyfunctionorcontentismissingorinsufficient,thenthatweb
applicationwillfail.
Working Principle of a Website
WebsiteDesignIssues
5.Navigability:Thenavigationshouldbesimpleandconsistent.Thedesignof
navigationsshouldintuitiveandpredictableinnature.
6.Visualappeal:Thewebapplicationsaremostvisualandmostdynamicandaesthetic
innature.ThevariousfactorsofvisualappealareLookandfeelofthecontent,
interfacelayout,colorco-ordination,thebalanceoftext,graphicsandothermedia,
navigationmechanismandsoon.
7.Compatibility:Thewebapplicationcanbeusedinvarietyofenvironmentand
configurationsuchasdifferentbrowsers,internetconnectiontypes,operatingsystems
andvariousbrowsers.