Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BKBIET Phase I - Day 1

BKBIET Phase I - Day 1

Presentation on web technologies given to engineering students @ BKBIET

Mihir Malaviya

June 03, 2013
Tweet

More Decks by Mihir Malaviya

Other Decks in Education

Transcript

  1. Today... ✤ Technical ✤ Web Technologies ✤ client-server technologies ✤

    HTTP/HTML/JS ✤ web server/servlet-container/cgi ✤ DB/SQL
  2. Client Server Model ✤ Why client server? ✤ alternatives? ✤

    basis of all distributed computing paradigms
  3. Client Server Model ✤ Why client server? ✤ alternatives? ✤

    basis of all distributed computing paradigms ✤ service-oriented, based on a request response protocol
  4. Client Server Model ✤ Why client server? ✤ alternatives? ✤

    basis of all distributed computing paradigms ✤ service-oriented, based on a request response protocol ✤ requires two distinct entities, a client and a server
  5. Client Server Model ✤ Why client server? ✤ alternatives? ✤

    basis of all distributed computing paradigms ✤ service-oriented, based on a request response protocol ✤ requires two distinct entities, a client and a server ✤ problems?
  6. Web Technologies ✤ interconnected computers : Internet ✤ interconnected, distributed

    knowledge : Hypertext ✤ language to express, hypertext : HTML ✤ tags ✤ links ✤ client :web-browser, ✤ server : web-server, ✤ protocol: Hyper Text Transfer Protocol
  7. HTTP ✤ Request ✤ the url ✤ protocol ✤ host/domain,[port]

    ✤ path, parameters ✤ methods: ✤ GET, POST, PUT,DELETE ✤ HEAD, OPTIONS, TRACE... ✤ Cookies! GET /index.html HTTP/1.1 Host: www.example.com
  8. HTTP ✤ Response ✤ Status codes ✤ Response headers ✤

    content type ✤ content length ✤ Response data ✤ Cookies!
  9. HTTP ✤ Response ✤ Status codes ✤ Response headers ✤

    content type ✤ content length ✤ Response data ✤ Cookies! HTTP/1.1 200 OK Date: Mon, 23 May 2005 22:38:34 GMT Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux) Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 131 Connection: close <html> <head> <title>An Example Page</title> </head> <body> Hello World, this is a very simple HTML document. </body> </html>
  10. HTTP ✤ Salient Properties: ✤ Idempotent, except for POST ✤

    multiple calls should result in the same state ✤ Stateless ✤ why? ✤ problems?
  11. HTTP Sessions ✤ Cookies to the rescue! ✤ Types ✤

    session ✤ persistent ✤ secure ✤ third-party cookie ✤ super cookie ✤ Server --> Client ✤ Client --> Server HTTP/1.1 200 OK Content-type: text/html Set-Cookie: name=value Set-Cookie: name2=value2; Expires=Wed, 09 Jun 2021 10:18:14 GMT (content of page) GET /spec.html HTTP/1.1 Host: www.example.org Cookie: name=value; name2=value2 Accept: */*
  12. HTML ✤ The language of the internet? ✤ distributed information

    bank ✤ tag based structure ✤ links to other html documents ✤ styling provided through css ✤ latest versions HTML 5, CSS 3 ✤ move from hypertext to hypermedia <!DOCTYPE HTML> <html> <body> <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video> </body> </html>
  13. Dynamic Web ✤ Personalized, interactive and dynamic ✤ HTTP Sessions

    ✤ dynamically generated content ✤ server-side: cgi ✤ client-side: javascript ✤ Ajax
  14. CGI ✤ basis of server side dynamism ✤ route the

    request from client to a server-side script ✤ let the script generate the response ✤ CGI can be anything ✤ perl, bash script ✤ C program ✤ Java, python or ruby
  15. Java on the Server ✤ harness the power of java

    on the server side ✤ Java Servlets ✤ JSP: templates for java ✤ Enter frameworks ✤ struts ✤ spring ✤ MVC
  16. Java on the Server ✤ harness the power of java

    on the server side ✤ Java Servlets ✤ JSP: templates for java ✤ Enter frameworks ✤ struts ✤ spring ✤ MVC
  17. Web Application ✤ web page --> web app ✤ an

    interactive front-end ✤ enter applet,vbscript,javascript,.... ✤ HTML as DOM ✤ Ajax/XHR ✤ frameworks : jQuery, backbone.js, ember.js, angular.js, knockout.js
  18. Persistence ✤ Flat files --> Databases ✤ Relational Databases ✤

    NoSQL ✤ No more 1 size fits all ✤ JDBC ✤ ORM : Hibernate