Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Web Server-Side Programming Techniques

10,034 views

Published on

General Presentation of Web Server programming Techniques.

Published in: Technology
  • Be the first to comment

Web Server-Side Programming Techniques

  1. 1. Web programming <ul><li>General introduction to the topic
  2. 2. Protocols
  3. 3. Servers
  4. 4. Programming techniques
  5. 5. Client-side techniques
  6. 6. Standardization </li></ul>
  7. 7. Protocols <ul><li>The web techniques is based on TCP/IP protocols
  8. 8. Mostly used protocols are HTTP and HTTPS </li><ul><li>IP: Internet Protocol
  9. 9. TCP: Transmission Control Protocol
  10. 10. UPD: User Datagram Protocol </li></ul></ul>
  11. 11. TCP/IP based application layer's protocols <ul><ul><li>DHCP: Dynamic Host Configuration Protocol
  12. 12. DNS: Domain Name Service
  13. 13. FTP: File Transfer Protocol
  14. 14. HTTP: Hypertext Transfer Protocol
  15. 15. IMAP: Internet Message Access Protocol
  16. 16. IRC: Internet Relay Chat Protocol
  17. 17. POP3: Post Office Protocol version 3
  18. 18. SMTP: Simple Mail Transfer Protocol
  19. 19. SSL/TLS: Secure Sockets Layer
  20. 20. SSH: Secure Shell
  21. 21. TELNET: Terminal Emulation Protocol </li></ul></ul>
  22. 22. HTTP <ul><ul><li>To retriever linked resources (hypertext docs)
  23. 23. Developed 1990 by Tim Berners-Lee </li></ul><li>two major versions: </li><ul><ul><li>HTTP/1.0 that uses a separate connection for every document
  24. 24. HTTP/1.1 that can reuse the same
  25. 25. connection to download </li></ul></ul><li>The client is an application (web browser, spider) on the computer
  26. 26. the server is an application running on the server computer hosting the web site </li></ul>
  27. 27. HTTP standars <ul><li>coordinated by </li><ul><li>The World Wide Web Consortium (w3.org)
  28. 28. the Internet Engineering Task Force (IETF) </li></ul><li>RFC 2616: http://tools.ietf.org/html/rfc2616
  29. 29. Resources accessed by URI (more specially URL locator) </li></ul>
  30. 30. HTTP connection <ul><li>Client established TCP connection to TCP port (80)
  31. 31. Server responses using
  32. 32. Request method (8 methods to identified resource) </li><ul><li>HEAD, GET, POST </li><ul><li>PUT, OPTIONS, DELETE, TRACE </li></ul></ul><li>HTTP request: </li><ul><li>GET /public/index.html HTTP/1.1 </li></ul></ul>
  33. 33. Web Servers <ul><li>Most used Web Servers at January 2010 are: </li><ul><li>Apache 111,307,941 53.84 %
  34. 34. Microsoft 49,792,844 24.08 %
  35. 35. Google 14,550,011 7.04 %
  36. 36. Nginx 15,568,224 7.53% </li><ul><li>http://nginx.org/ </li></ul></ul><li>Source: http://news.netcraft.com/archives/2010/01/07/january_2010_web_server_survey.html </li></ul>
  37. 37. Apache HTTP server <ul><li>http://httpd.apache.org/
  38. 38. Project of Apache Foundation </li><ul><li>Also many other Open Source projects are lisenced different way: http://www.apache.org/licenses/ </li></ul><li>Newest Apache HTTP 2.2 </li><ul><li>Upcoming version 2.4 </li></ul><li>SSL and TLS support with mod_ssl module </li><ul><li>Many features implemented as compiled modules for extending core server </li></ul></ul>
  39. 39. Programming Apache <ul><li>The Most popular programming languages used with Apache server are: </li><ul><li>PHP (the Most popular)
  40. 40. Python
  41. 41. Perl </li><ul><li>Mostly server-side programming language support is implemented as compiled modules which extend the core functionality </li></ul></ul></ul>
  42. 42. PHP <ul><li>Originally developed by Rasmus Lerdorf </li><ul><li>PHP = Personal Home Page </li></ul><li>PHP 3 was rewrited </li><ul><li>Andi Gutmans and Zeev Suraski rewrote the parser that formed PHP 3
  43. 43. New name: PHP: Hypertext Preprocessor </li></ul><li>PHP 4 powered by Zend Engine
  44. 44. PHP 5 powered by Zend Engine 2 </li><ul><li>Zend Engine is was written by Andi Gutmans and Zeev Suraski </li></ul></ul>
  45. 45. LAMP <ul><li>LAMP = Linux, Apache, Mysql, PHP or Python or Perl
  46. 46. Open Source based software suite to create general purpose web server apps </li><ul><li>Popular combination of independent OS projects (term used generally to refer these techniques) </li></ul><li>Same software suite to run on other OS: Windows (WAMP), Mac (MAMP) </li></ul>
  47. 47. Python <ul><li>Python is a popular OO scripting language </li><ul><li>mod_python is an Apache HTTP Server to integrate the Python with Apache </li></ul><li>Python supports many paradigms like functional or aspect-oriented programming </li><ul><li>Has fully dynamic type system, automatic memory management with garbage collection and late binding
  48. 48. Language has simple and intuative syntax </li></ul></ul>
  49. 49. Microsoft IIS Server <ul><li>Microsoft Internet Information Services (IIS)
  50. 50. The main competitor for Apache
  51. 51. IIS7 works on Windows Server 2008
  52. 52. http://www.iis.net/
  53. 53. IIS 7.0 was totally rewritten version of IIS 6.0 </li><ul><li>Programming techniques supported remains still the same
  54. 54. Unlike previous versions of IIS, the modular design of IIS 7.0 allows to implement custom modules </li></ul></ul>
  55. 55. IIS7 Server <ul><li>Common HTTP features like Static Content, HTTP errors/redection, HTTP logging etc.
  56. 56. Supports Optionally custom modules to : </li><ul><li>CGI – Common Gateway Interface
  57. 57. ASP.NET
  58. 58. ASP (classic version)
  59. 59. .NET extensibility
  60. 60. ISAPI and ISAP extensions
  61. 61. Server Side Includes </li><ul><li>It's also possible to plug into IIS some additional module from Microsoft/3 th- party source </li></ul></ul></ul>
  62. 62. IIS7 development <ul><li>Language support: </li><ul><li>ASP.NET (C#, VB, J#) and
  63. 63. Pure PHP Support using 3th party's FastCGI module </li></ul><li>The components of the Microsoft Web Platform: </li><ul><li>Internet Information Services (IIS), SQL Server (Express), .NET Framework and Visual Web Developer </li></ul></ul>
  64. 64. Java EE <ul><li>The newest is Java EE 6 </li><ul><li>http://java.sun.com/javaee/ </li></ul><li>APIs/Frameworks supported are: </li><ul><ul><li>Java Servlet
  65. 65. JavaServer pages (JSP) + JSTL
  66. 66. JavaServer Faces
  67. 67. Java Persistence
  68. 68. Java Api for Web Services (JAX- WS, JAX-RS)
  69. 69. Enterprise JavaBeans
  70. 70. Related Java SE specs: JAXP, JDBC, stAX </li></ul></ul></ul>
  71. 71. Java EE app servers <ul><li>Java EE 5/6 Servers: </li><ul><li>GlassFish v3
  72. 72. Sun GlassFish Enterprise Server v3 </li><ul><li>former Sun Java System Application Server </li></ul><li>JEUS 7 (TmaxSoft)
  73. 73. JBoss Application Server v5 (RedHat)
  74. 74. Apache Geronimo 2.0
  75. 75. IBM WebSphere AppServer V7/Community Ed. 2
  76. 76. Oracle Containers for Java EE 11
  77. 77. SAP NetWeaver
  78. 78. Lightweight: Apache Tomcat, Jetty </li></ul></ul>
  79. 79. Client-side web programming <ul><li>Two independent parts </li><ul><li>Client-side Markup languages </li><ul><li>HTML, XHTML, XML, XML based languages etc. </li></ul><li>Client-side programming </li><ul><li>JavaScript, VBScript etc. </li></ul></ul></ul>
  80. 80. Markup languages <ul><li>HTML (3.2, 4.0, upcoming HTML 5.0)
  81. 81. CSS 1, 2 and CSS 2.1
  82. 82. XML </li><ul><li>DTD
  83. 83. XSLT
  84. 84. Schema
  85. 85. MathML </li></ul><li>Validation tools (online, offline, integrated) </li></ul>
  86. 86. Client-side programming <ul><li>Client-side scripting is the web application that is executed on the client-side normally using the web browser
  87. 87. Dynamic HTML ( DHTML ) for scripted web pages </li><ul><li>Written by client-side scripting languages like JavaScript and VBScript. </li></ul><li>XML Programming tools like XSLT, Xpath, DOM, E4X etc. </li></ul>
  88. 88. Web standars <ul><li>The World Wide Web Consortium (W3C)
  89. 89. http://www.w3.org/
  90. 90. main international standardization organization for the World Wide Web (WWW or W3). </li></ul>
  91. 91. W3C process <ul><li>Working Draft (WD)
  92. 92. Last Call Working Draft
  93. 93. Candidate Recommendation (CR)
  94. 94. Proposed Recommendation (PR)
  95. 95. W3C Recommendation (REC) </li><ul><li>Note! W3C leaves it up to manufacturers to follow the Recommendations
  96. 96. Defines levels of conformance if software is W3C-compliant </li></ul></ul>
  97. 97. The Most Important standards from W3C <ul><li>http://www.w3.org/standards/
  98. 98. HTML (including XHTML 1.0/1.0), CSS
  99. 99. XML </li><ul><li>XML, XQuery, XML Schema, XSLT, EXI
  100. 100. http://www.w3.org/standards/techs/xml </li></ul><li>Services, Architechture </li><ul><li>HTTP, XML, SOAP, WSDL, SPARQL </li></ul></ul>
  101. 101. Standards continues <ul><li>Semantic Web </li><ul><li>&quot; Web of Linked Data &quot;
  102. 102. RDF, SPARQL, OWL </li></ul><li>Web of Devices: Multimodal access, mobile Web and Voice Browsing </li><ul><li>One Web Vision
  103. 103. Techs: CSS Mobile, XHTML for mobile, EMMA, InkML, VoiceXML, PLS, Speech Interface Framework </li></ul></ul>
  104. 104. Web Services <ul><li>Web services for other applications </li><ul><li>SOAP – RPC, remote Procedure Call interface
  105. 105. WSDL – description of the service
  106. 106. UDDI - General service register </li></ul><li>Web Services </li><ul><li>Amazon Web Services
  107. 107. Google Web Services
  108. 108. Using standardized XML techniques/protocols </li></ul></ul>
  109. 109. REST as a web service <ul><li>Web Services API
  110. 110. Supports XML data and HTTP protocol
  111. 111. A RESTful web service (also called a RESTful web API) is a simple web service implemented using HTTP and the principles of REST
  112. 112. Simpler to implement than SOAP/WSDL </li><ul><li>Facebook has REST API </li></ul></ul>
  113. 113. RESTful web Service <ul><li>RESTful web service: </li><ul><li>The base URI for the web service
  114. 114. The MIME type of the data supported by the web service (JSON, XML, YAML etc.)
  115. 115. The set of operations supported by the web service using HTTP methods (e.g., POST, GET, PUT or DELETE). </li></ul></ul>
  116. 116. Future of the Web? <ul><li>&quot;One Web Vision&quot;?
  117. 117. Watch the talk from Kevin Kelly on the next 5,000 days of the web </li><ul><li>http://www.ted.com/talks/kevin_kelly_on_the_next_5_000_days_of_the_web.html </li></ul></ul>

×