Web Server-Side Programming Techniques

Embed Size (px)

DESCRIPTION

General Presentation of Web Server programming Techniques.

Citation preview

  • 1. Web programming
    • General introduction to the topic
  • 2. Protocols

3. Servers 4. Programming techniques 5. Client-side techniques 6. Standardization 7. Protocols

  • The web techniques is based on TCP/IP protocols

8. Mostly used protocols are HTTP and HTTPS

  • IP: Internet Protocol

9. TCP: Transmission Control Protocol 10. UPD: User Datagram Protocol 11. TCP/IP based application layer's protocols

    • DHCP: Dynamic Host Configuration Protocol
  • 12. DNS: Domain Name Service

13. FTP: File Transfer Protocol 14. HTTP: Hypertext Transfer Protocol 15. IMAP: Internet Message Access Protocol 16. IRC: Internet Relay Chat Protocol 17. POP3: Post Office Protocol version 3 18. SMTP: Simple Mail Transfer Protocol 19. SSL/TLS: Secure Sockets Layer 20. SSH: Secure Shell 21. TELNET: Terminal Emulation Protocol 22. HTTP

    • To retriever linked resources (hypertext docs)
  • 23. Developed 1990 by Tim Berners-Lee

two major versions:

    • HTTP/1.0that uses a separate connection for every document
  • 24. HTTP/1.1that can reuse the same

25. connection to download Theclientis an application (web browser, spider) on the computer 26. theserveris an application running on the server computer hosting the web site 27. HTTP standars

  • coordinated by
  • The World Wide Web Consortium (w3.org)

28. the Internet Engineering Task Force (IETF) RFC 2616:http://tools.ietf.org/html/rfc2616 29. Resources accessed by URI (more specially URL locator) 30. HTTP connection

  • Client established TCP connection to TCP port (80)

31. Server responses using 32. Request method (8 methods to identified resource)

  • HEAD, GET, POST
  • PUT, OPTIONS, DELETE, TRACE

HTTP request:

  • GET /public/index.html HTTP/1.1

33. Web Servers

  • Most used Web Servers at January 2010 are:
  • Apache 111,307,94153.84 %

34. Microsoft49,792,844 24.08 % 35. Google14,550,0117.04% 36. Nginx15,568,224 7.53%

  • http://nginx.org/

Source:http://news.netcraft.com/archives/2010/01/07/january_2010_web_server_survey.html 37. Apache HTTP server

  • http://httpd.apache.org/

38. Project of Apache Foundation

  • Also many other Open Source projects are lisenced different way:http://www.apache.org/licenses/

Newest Apache HTTP 2.2

  • Upcoming version 2.4

SSL and TLS support with mod_ssl module

  • Many features implemented as compiledmodulesfor extending core server

39. Programming Apache

  • The Most popular programming languages used with Apache server are:
  • PHP (the Most popular)

40. Python 41. Perl

  • Mostly server-side programming language support is implemented as compiled modules which extend the core functionality

42. PHP

  • Originally developed by Rasmus Lerdorf
  • PHP = Personal Home Page

PHP 3 was rewrited

  • Andi Gutmans and Zeev Suraski rewrote the parser that formed PHP 3

43. New name:PHP: Hypertext Preprocessor PHP 4 powered by Zend Engine 44. PHP 5 powered by Zend Engine 2

  • Zend Engine is was written by Andi Gutmans and Zeev Suraski

45. LAMP

  • LAMP = Linux, Apache, Mysql, PHP or Python or Perl

46. Open Source based software suiteto create general purpose web server apps

  • Popular combination of independent OS projects (term used generally to refer these techniques)

Same software suite to run on other OS:Windows (WAMP), Mac (MAMP) 47. Python

  • Python is a popular OO scripting language
  • mod_python is an Apache HTTP Server to integrate the Python with Apache

Python supports many paradigms like functional or aspect-oriented programming

  • Has fully dynamic type system, automatic memory management with garbage collection and late binding

48. Language has simple and intuative syntax 49. Microsoft IIS Server

  • Microsoft Internet Information Services (IIS)

50. The main competitor for Apache 51. IIS7works on Windows Server 2008 52. http://www.iis.net/ 53. IIS 7.0 was totally rewritten version of IIS 6.0

  • Programming techniques supported remains still the same

54. Unlike previous versions of IIS, the modular design of IIS 7.0 allows to implement custom modules 55. IIS7 Server

  • Common HTTP features like Static Content, HTTP errors/redection, HTTP logging etc.

56. Supports Optionally custom modules to :

  • CGI Common Gateway Interface

57. ASP.NET 58. ASP (classic version) 59. .NET extensibility 60. ISAPI and ISAP extensions 61. Server Side Includes

  • It's also possible to plug into IIS some additional module from Microsoft/3 th- party source

62. IIS7 development

  • Language support:
  • ASP.NET (C#, VB, J#) and

63. Pure PHP Support using 3th party's FastCGI module The components of the Microsoft Web Platform:

  • Internet Information Services (IIS), SQL Server (Express), .NET Framework and Visual Web Developer

64. Java EE

  • The newest isJava EE 6
  • http://java.sun.com/javaee/

APIs/Frameworks supported are:

    • Java Servlet
  • 65. JavaServer pages (JSP) + JSTL

66. JavaServer Faces 67. Java Persistence 68. Java Api for Web Services (JAX- WS, JAX-RS) 69. Enterprise JavaBeans 70. Related Java SE specs: JAXP, JDBC, stAX 71. Java EE app servers

  • Java EE 5/6 Servers:
  • GlassFish v3

72. Sun GlassFish Enterprise Server v3

  • former Sun Java System Application Server

JEUS 7 (TmaxSoft) 73. JBoss Application Server v5 (RedHat) 74. Apache Geronimo 2.0 75. IBM WebSphere AppServer V7/Community Ed. 2 76. Oracle Containers for Java EE 11 77. SAP NetWeaver 78. Lightweight: Apache Tomcat, Jetty 79. Client-side web programming

  • Two independent parts
  • Client-side Markup languages
  • HTML, XHTML, XML, XML based languages etc.

Client-side programming

  • JavaScript, VBScript etc.

80. Markup languages

  • HTML (3.2, 4.0, upcoming HTML 5.0)

81. CSS 1, 2 and CSS 2.1 82. XML

  • DTD

83. XSLT 84. Schema 85. MathML Validation tools (online, offline, integrated) 86. Client-side programming

  • Client-side scripting is the web application that is executed on the client-side normally usingthe web browser

87. Dynamic HTML( DHTML ) for scripted web pages

  • Written by client-side scripting languages like JavaScript and VBScript.

XML Programming tools like XSLT, Xpath, DOM, E4X etc. 88. Web standars

  • The World Wide Web Consortium (W3C)

89. http://www.w3.org/ 90. main international standardization organization for the World Wide Web (WWW or W3). 91. W3C process

  • Working Draft (WD)

92. Last Call Working Draft 93. Candidate Recommendation (CR) 94. Proposed Recommendation (PR) 95. W3C Recommendation (REC)

  • Note! W3C leaves it up to manufacturers to follow the Recommendations

96. Defines levels of conformance if software isW3C-compliant 97. The Most Important standards from W3C

  • http://www.w3.org/standards/

98. HTML (including XHTML 1.0/1.0), CSS 99. XML

  • XML, XQuery, XML Schema, XSLT, EXI

100. http://www.w3.org/standards/techs/xml Services, Architechture

  • HTTP, XML, SOAP, WSDL, SPARQL

101. Standards continues

  • Semantic Web
  • " Web of Linked Data "

102. RDF, SPARQL, OWL Web of Devices: Multimodal access, mobile Web and Voice Browsing

  • One Web Vision

103. Techs: CSS Mobile, XHTML for mobile, EMMA, InkML, VoiceXML, PLS, Speech Interface Framework 104. Web Services

  • Web services for other applications
  • SOAP RPC, remote Procedure Call interface

105. WSDL description of the service 106. UDDI - General service register Web Services

  • Amazon Web Services

107. Google Web Services 108. Using standardized XML techniques/protocols 109. REST as a web service

  • Web Services API

110. Supports XML data and HTTP protocol 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. Simpler to implement than SOAP/WSDL

  • Facebook has REST API

113. RESTful web Service

  • RESTful web service:
  • The base URI for the web service

114. The MIME type of the data supported by the web service (JSON, XML, YAML etc.) 115. The set of operations supported by the web service using HTTP methods (e.g., POST, GET, PUT or DELETE). 116. Future of the Web?

  • "One Web Vision"?

117. Watch the talk from Kevin Kelly on the next 5,000 days of the web

  • http://www.ted.com/talks/kevin_kelly_on_the_next_5_000_days_of_the_web.html