INLS 461 Web Servers
Housekeeping Today’s Presentation Project 5 due midnight tonight Project 6 due midnight Thursday 3/1 Any questions about material so far?
Suggested Preparation Read  Web Design in a Nutshell 3 rd  Ed., Chapters 12-13, Appendix D 2 nd  Ed., Chapters 12, 13, 16 Request CGI Service for your Onyen Search for  CGI Access  at help.unc.edu Request  Personal CGI Access   for yourself
Simple Browser-Server Interaction Browser Issue a http request – “Get me this file” Process http response – “A <read mime type> file. I can open it using <insert correct helper application>” Server Respond to http request “Here is your <insert mime type> file”
Required Software Browsers Internet Explorer Firefox Mozilla Opera Safari Netscape … Web Servers Apache Microsoft Internet Information Server …
Apache Software Foundation “ The Apache Software Foundation provides support for the Apache community of open-source software projects. The Apache projects are characterized by a collaborative, consensus based development process, an open and pragmatic software license, and a desire to create high quality software that leads the way in its field. We consider ourselves not simply a group of projects sharing a server, but rather a community of developers and users”. *   * Source:  http://www.apache.org/
Apache Web Server Open source Runs primarily on UNIX (including Knoppix) Apache has been the most popular web server on the Internet since April of 1996.  The February 2005  Netcraft Web Server Survey  found that more than 68% of the web sites on the Internet are using Apache, thus making it more widely used than all other web servers combined. * * Source:  http://www.apache.org/
Internet Information Server (IIS) Microsoft product  Free with XP By default it is turned off History of security issues Critical to keep patches up to date NOTE : You do not have permission to run your own server in SILS – use either UNC’s server (on isis) or the SILS server (on Ruby)
File (MIME) Types Web server can serve many types of file Not just *.html MIME types -- list in Niederst (check index) Browser can process as appropriate Defaults User settable (“open with”) We’ve seen already: *.html, *.txt, *.ppt
Where Are The Files? On both isis and ruby: Browser asks for … http://<hostname>/~youronyen/<etc.> Server sends … Your  $HOME/public_html/<etc.>
Server side processing Server can do more than just send a page E.g., searches and database processing Server side processing technology: Common Gateway Interface (CGI) Active Server Pages (ASP) Personal Home Page (PHP) JavaServer Pages (JSP) Java Servlets
Server Side Processing Example Get me the SILS resources page Get bookings for room 214 Book 214 on <insert date> at <insert time>. My user name is cablake, my password is xxx. Here is the http page Search database and show current bookings for 214 Authenticate user If ok, add to database Send email confirmation
Server Side Programming Covered in depth in INLS 572 Still more depth in INLS 668 Shell scripting PHP Javascript (on client)
Client side processing Client can do more than just show the page E.g., data validation checks, menu processing Technology to support client side processing: Javascript (NOT the same as Java) Visual Basic (VB) Script
Client Side Processing Example Webmail  empty trash  function Javascript prompts “are you sure” If yes, sends  empty trash  request Server needn’t process the “are you sure” part Webmail  create folder  function Javascript prompts for name of folder Sends  create folder   <name>  request Server needn’t ask for a folder name
Near Term Course Plan This week: images, color, tables Project 6 Week after: CGI, Javascript, XHTML Project 7 Spring break No project Then: Excel, Access
Hand Coding a Web Page Start Notepad or Wordpad, type a little   Save as *.html file (may have to MS around) May leave open, NO NEED TO EXIT Start browser, open the same *.html file Displays your file as a web page May also leave open
Hand Coding Edit Cycle Make changes in text editor Save (leave open) Refresh browser window Displays your changes Repeat as necessary When done, transfer file(s) to server (Test one more time, on server)

INLS461_day14a.ppt

  • 1.
    INLS 461 WebServers
  • 2.
    Housekeeping Today’s PresentationProject 5 due midnight tonight Project 6 due midnight Thursday 3/1 Any questions about material so far?
  • 3.
    Suggested Preparation Read Web Design in a Nutshell 3 rd Ed., Chapters 12-13, Appendix D 2 nd Ed., Chapters 12, 13, 16 Request CGI Service for your Onyen Search for CGI Access at help.unc.edu Request Personal CGI Access for yourself
  • 4.
    Simple Browser-Server InteractionBrowser Issue a http request – “Get me this file” Process http response – “A <read mime type> file. I can open it using <insert correct helper application>” Server Respond to http request “Here is your <insert mime type> file”
  • 5.
    Required Software BrowsersInternet Explorer Firefox Mozilla Opera Safari Netscape … Web Servers Apache Microsoft Internet Information Server …
  • 6.
    Apache Software Foundation“ The Apache Software Foundation provides support for the Apache community of open-source software projects. The Apache projects are characterized by a collaborative, consensus based development process, an open and pragmatic software license, and a desire to create high quality software that leads the way in its field. We consider ourselves not simply a group of projects sharing a server, but rather a community of developers and users”. * * Source: http://www.apache.org/
  • 7.
    Apache Web ServerOpen source Runs primarily on UNIX (including Knoppix) Apache has been the most popular web server on the Internet since April of 1996. The February 2005 Netcraft Web Server Survey found that more than 68% of the web sites on the Internet are using Apache, thus making it more widely used than all other web servers combined. * * Source: http://www.apache.org/
  • 8.
    Internet Information Server(IIS) Microsoft product Free with XP By default it is turned off History of security issues Critical to keep patches up to date NOTE : You do not have permission to run your own server in SILS – use either UNC’s server (on isis) or the SILS server (on Ruby)
  • 9.
    File (MIME) TypesWeb server can serve many types of file Not just *.html MIME types -- list in Niederst (check index) Browser can process as appropriate Defaults User settable (“open with”) We’ve seen already: *.html, *.txt, *.ppt
  • 10.
    Where Are TheFiles? On both isis and ruby: Browser asks for … http://<hostname>/~youronyen/<etc.> Server sends … Your $HOME/public_html/<etc.>
  • 11.
    Server side processingServer can do more than just send a page E.g., searches and database processing Server side processing technology: Common Gateway Interface (CGI) Active Server Pages (ASP) Personal Home Page (PHP) JavaServer Pages (JSP) Java Servlets
  • 12.
    Server Side ProcessingExample Get me the SILS resources page Get bookings for room 214 Book 214 on <insert date> at <insert time>. My user name is cablake, my password is xxx. Here is the http page Search database and show current bookings for 214 Authenticate user If ok, add to database Send email confirmation
  • 13.
    Server Side ProgrammingCovered in depth in INLS 572 Still more depth in INLS 668 Shell scripting PHP Javascript (on client)
  • 14.
    Client side processingClient can do more than just show the page E.g., data validation checks, menu processing Technology to support client side processing: Javascript (NOT the same as Java) Visual Basic (VB) Script
  • 15.
    Client Side ProcessingExample Webmail empty trash function Javascript prompts “are you sure” If yes, sends empty trash request Server needn’t process the “are you sure” part Webmail create folder function Javascript prompts for name of folder Sends create folder <name> request Server needn’t ask for a folder name
  • 16.
    Near Term CoursePlan This week: images, color, tables Project 6 Week after: CGI, Javascript, XHTML Project 7 Spring break No project Then: Excel, Access
  • 17.
    Hand Coding aWeb Page Start Notepad or Wordpad, type a little  Save as *.html file (may have to MS around) May leave open, NO NEED TO EXIT Start browser, open the same *.html file Displays your file as a web page May also leave open
  • 18.
    Hand Coding EditCycle Make changes in text editor Save (leave open) Refresh browser window Displays your changes Repeat as necessary When done, transfer file(s) to server (Test one more time, on server)