SlideShare a Scribd company logo
1 of 20
Download to read offline
Web 2.0 and AJAX



                         Abhishek Nagar
                   nagar.ksp@gmail.com
Agenda
•   Definitions: Web 2.0 , AJAX
•   AJAX : Real Life Examples
•   Why AJAX?
•   Technologies used in AJAX
    – XMLHttpRequest
• Steps of AJAX Operation
• AJAX Security
A little Web History
•   CGI / Perl & C
•   Servlets
•   JSP / ASP / PHP
•   Java Based frameworks
    – Struts, JSF & many others
• Other Scripting
    – Python, Ruby
• But all these kept the same (1.0) UI
Web 2.0 by examples
        Web 1.0                 Web 2.0
•                       •
    Double Click            Google Adsense
•                       •
    Ofoto                   Flickr
•                       •
    Britannica Online       Wikipedia
•                       •
    Personal Websites       Blogging
•                       •
    Directories             Social Web
Web 2.0 by definitions
•   Not just a technology
•   Web as a platform
•   Collective Intelligence
•   Data is key and should be shared
•   Lightweight Programming Models
•   The network is the computer
•   Rich User Experience
•   Largely driven by hobbyists
So what is WEB 2.0
•   Technologies
    – Blogging, Wikis
    – AJAX, Rich Internet clients
•   Attitudes
    – Sharing, Connected, Participatory
    – Services, Users Engaged
•   Services
    – Flickr, BitTorrent
    – Maps, Wikipedia
    – Google, Yahoo etc
•   Drivers
    –   Faster Connectivity
    –   More available connectivity
    –   More powerful machines
    –   Customers More Comfortable with Technology
    –   Browser wars (almost) over
AJAX
Asynchronous Javascript + XML
• DHTML plus Asynchronous communication
  capability through XMLHttpRequest
• Pros
  –   Most viable technology so far
  –   Tremendous industry momentum
  –   Several toolkits and frameworks are emerging
  –   No plug-in required
• Cons
  – Still browser incompatibility
  – JavaScript is hard to maintain and debug


          neither new, nor a technology
AJAX : Real Life Examples
• Google Maps
  – http://maps.google.com/
• Google Suggest
  – http://www.google.com/webhp?complete=1&hl=en
• Gmail
  – http://gmail.com/
• Yahoo Maps (New)
  – http://maps.yahoo.com/
• Wikipedia
  – http://en.wikipedia.com/
• Many many more
Why AJAX?
• Intuitive and natural user interaction
   – No clicking required
   – Mouse movement is a sufficient event trigger

• quot;Partial screen updatequot; replaces the quot;click, wait,
  and refreshquot; user interaction model
   – Only user interface elements that contain new information
     are updated (fast response)
   – The rest of the user interface remains displayed without
     interruption (no loss of operational context)


• Data-driven (as opposed to page-driven)
   – UI is handled in the client while the server provides data
Why AJAX?
• Asynchronous communication replaces
  synchronous request/response model.

  – A user can continue to use the application while the client
    program requests information from the server in the
    background
  – Separation of displaying from data fetching
Technologies Used in AJAX
• Javascript

• DOM

• CSS

• XMLHttpRequest
XMLHttpRequest
• Javascript

• Adopted from modern browsers
   – Mozilla, Safari and Opera


• Communicates with a server via standard HTTP
  GET/POST

• XMLHttpRequest object works in the background for
  performing asynchronous communication with the
  backend server
   – Does not interrupt user operation
Browsers which support
XMLHttpRequest
•Mozilla Firefox 1.0 and above
•Netscape version 7.1 and above
•Apple Safari 1.2 and above.
•Microsoft Internet Exporer 5 and above
•Konqueror
•Opera 7.6 and above
and many more
Classic Vs. AJAX Model
Classic Model




         Interrupted user operation
        while the data is being fetched
The AJAX Model




     Uninterrupted user operation
     while the data is being fetched
Steps of AJAX operation
•   A client event occurs

•   An XMLHttpRequest object is created

•   The XMLHttpRequest object is configured

•   The XMLHttpRequest object makes an async. Request

•   The Validate Servlet returns an XML document containing
    the result

•   The XMLHttpRequest object calls the callback() function and
    processes the result

•   The HTML DOM is updated
AJAX Security : Server Side
• AJAX-based Web applications use the
  same server side security schemes of
  regular Web applications

• AJAX-based Web applications are
  subject to the same security threats as
  regular Web applications
AJAX Security : Client Side
• JavaScript code is visible to a
  user/hacker

• JavaScript code is downloaded from the
  server and executed at the client
Thank You




            Abhishek Nagar

More Related Content

What's hot

Advanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsAdvanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsChris Love
 
Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Boris Livshutz
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?Balajihope
 
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...Hariharan Ganesan
 
Visualizing data on web
Visualizing data on webVisualizing data on web
Visualizing data on webMatjaž Horvat
 
Component based Progress Programming
Component based Progress ProgrammingComponent based Progress Programming
Component based Progress ProgrammingValentin Duricu
 
Building Modern Web Apps with MEAN Stack
Building Modern Web Apps with MEAN StackBuilding Modern Web Apps with MEAN Stack
Building Modern Web Apps with MEAN StackSuresh Patidar
 
Introduction to the MEAN stack
Introduction to the MEAN stackIntroduction to the MEAN stack
Introduction to the MEAN stackYoann Gotthilf
 
Christmas Trees Made with HTML CSS and JS
Christmas Trees Made with HTML CSS and JSChristmas Trees Made with HTML CSS and JS
Christmas Trees Made with HTML CSS and JSNiamh Foley
 
Bruce Lawson Opera Indonesia
Bruce Lawson Opera IndonesiaBruce Lawson Opera Indonesia
Bruce Lawson Opera Indonesiabrucelawson
 
Ajax: User Experience
Ajax: User ExperienceAjax: User Experience
Ajax: User Experiencepetrov
 
End to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeEnd to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeAlexandre Morgaut
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalAlessandro Pilotti
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVC Introduction to ASP.NET MVC
Introduction to ASP.NET MVC Joe Wilson
 

What's hot (20)

Advanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsAdvanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms tools
 
Intoduction to Ajax
Intoduction to AjaxIntoduction to Ajax
Intoduction to Ajax
 
Html5 for beginners
Html5 for beginnersHtml5 for beginners
Html5 for beginners
 
Taming 3rd party content
Taming 3rd party contentTaming 3rd party content
Taming 3rd party content
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
 
Visualizing data on web
Visualizing data on webVisualizing data on web
Visualizing data on web
 
Component based Progress Programming
Component based Progress ProgrammingComponent based Progress Programming
Component based Progress Programming
 
Building Modern Web Apps with MEAN Stack
Building Modern Web Apps with MEAN StackBuilding Modern Web Apps with MEAN Stack
Building Modern Web Apps with MEAN Stack
 
Introduction to the MEAN stack
Introduction to the MEAN stackIntroduction to the MEAN stack
Introduction to the MEAN stack
 
Christmas Trees Made with HTML CSS and JS
Christmas Trees Made with HTML CSS and JSChristmas Trees Made with HTML CSS and JS
Christmas Trees Made with HTML CSS and JS
 
Bruce Lawson Opera Indonesia
Bruce Lawson Opera IndonesiaBruce Lawson Opera Indonesia
Bruce Lawson Opera Indonesia
 
Ajax: User Experience
Ajax: User ExperienceAjax: User Experience
Ajax: User Experience
 
End to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeEnd to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) Europe
 
State of the Web
State of the WebState of the Web
State of the Web
 
Disruptive code
Disruptive codeDisruptive code
Disruptive code
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVC Introduction to ASP.NET MVC
Introduction to ASP.NET MVC
 

Similar to Web 2.0 & Ajax Basics

Drupal 6 JavaScript and jQuery
Drupal 6 JavaScript and jQueryDrupal 6 JavaScript and jQuery
Drupal 6 JavaScript and jQueryMatt Butcher
 
AJAX\'s Impact on Telecom
AJAX\'s Impact on TelecomAJAX\'s Impact on Telecom
AJAX\'s Impact on TelecomVoxeo Corp
 
Ajax Abuse Todcon2008
Ajax Abuse Todcon2008Ajax Abuse Todcon2008
Ajax Abuse Todcon2008Jesse Rodgers
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorialoscon2007
 
Brainwave A Basic Overview Bar Camp
Brainwave A Basic Overview Bar CampBrainwave A Basic Overview Bar Camp
Brainwave A Basic Overview Bar CampAbhishek Chamaria
 
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar TechnologiesRob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologiesgeorge.james
 
plumbing for the next web
plumbing for the next webplumbing for the next web
plumbing for the next webIan Forrester
 
qooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkqooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkecker
 
Ajax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web ApplicationsAjax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web ApplicationsSiva Kumar
 
Advantages and disadvantages of an ajax based client application
Advantages and disadvantages of an ajax based client applicationAdvantages and disadvantages of an ajax based client application
Advantages and disadvantages of an ajax based client applicationPlacinta Alin
 
Practical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter SvenssonPractical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter Svenssonrajivmordani
 
Asynchronous javascript and xml
Asynchronous javascript and xmlAsynchronous javascript and xml
Asynchronous javascript and xmlBui Kiet
 
JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014Ryan Cuprak
 

Similar to Web 2.0 & Ajax Basics (20)

Web 2.0
Web 2.0Web 2.0
Web 2.0
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
 
Ajax World West
Ajax World WestAjax World West
Ajax World West
 
Drupal 6 JavaScript and jQuery
Drupal 6 JavaScript and jQueryDrupal 6 JavaScript and jQuery
Drupal 6 JavaScript and jQuery
 
AJAX\'s Impact on Telecom
AJAX\'s Impact on TelecomAJAX\'s Impact on Telecom
AJAX\'s Impact on Telecom
 
Transforming the web into a real application platform
Transforming the web into a real application platformTransforming the web into a real application platform
Transforming the web into a real application platform
 
Ajax Ppt 1
Ajax Ppt 1Ajax Ppt 1
Ajax Ppt 1
 
ITI006En-AJAX
ITI006En-AJAXITI006En-AJAX
ITI006En-AJAX
 
Ajax Abuse Todcon2008
Ajax Abuse Todcon2008Ajax Abuse Todcon2008
Ajax Abuse Todcon2008
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
 
Brainwave A Basic Overview Bar Camp
Brainwave A Basic Overview Bar CampBrainwave A Basic Overview Bar Camp
Brainwave A Basic Overview Bar Camp
 
Ajax and PHP
Ajax and PHPAjax and PHP
Ajax and PHP
 
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar TechnologiesRob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
 
plumbing for the next web
plumbing for the next webplumbing for the next web
plumbing for the next web
 
qooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkqooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Framework
 
Ajax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web ApplicationsAjax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web Applications
 
Advantages and disadvantages of an ajax based client application
Advantages and disadvantages of an ajax based client applicationAdvantages and disadvantages of an ajax based client application
Advantages and disadvantages of an ajax based client application
 
Practical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter SvenssonPractical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter Svensson
 
Asynchronous javascript and xml
Asynchronous javascript and xmlAsynchronous javascript and xml
Asynchronous javascript and xml
 
JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

Web 2.0 & Ajax Basics

  • 1. Web 2.0 and AJAX Abhishek Nagar nagar.ksp@gmail.com
  • 2. Agenda • Definitions: Web 2.0 , AJAX • AJAX : Real Life Examples • Why AJAX? • Technologies used in AJAX – XMLHttpRequest • Steps of AJAX Operation • AJAX Security
  • 3. A little Web History • CGI / Perl & C • Servlets • JSP / ASP / PHP • Java Based frameworks – Struts, JSF & many others • Other Scripting – Python, Ruby • But all these kept the same (1.0) UI
  • 4. Web 2.0 by examples Web 1.0 Web 2.0 • • Double Click Google Adsense • • Ofoto Flickr • • Britannica Online Wikipedia • • Personal Websites Blogging • • Directories Social Web
  • 5. Web 2.0 by definitions • Not just a technology • Web as a platform • Collective Intelligence • Data is key and should be shared • Lightweight Programming Models • The network is the computer • Rich User Experience • Largely driven by hobbyists
  • 6. So what is WEB 2.0 • Technologies – Blogging, Wikis – AJAX, Rich Internet clients • Attitudes – Sharing, Connected, Participatory – Services, Users Engaged • Services – Flickr, BitTorrent – Maps, Wikipedia – Google, Yahoo etc • Drivers – Faster Connectivity – More available connectivity – More powerful machines – Customers More Comfortable with Technology – Browser wars (almost) over
  • 7. AJAX Asynchronous Javascript + XML • DHTML plus Asynchronous communication capability through XMLHttpRequest • Pros – Most viable technology so far – Tremendous industry momentum – Several toolkits and frameworks are emerging – No plug-in required • Cons – Still browser incompatibility – JavaScript is hard to maintain and debug neither new, nor a technology
  • 8. AJAX : Real Life Examples • Google Maps – http://maps.google.com/ • Google Suggest – http://www.google.com/webhp?complete=1&hl=en • Gmail – http://gmail.com/ • Yahoo Maps (New) – http://maps.yahoo.com/ • Wikipedia – http://en.wikipedia.com/ • Many many more
  • 9. Why AJAX? • Intuitive and natural user interaction – No clicking required – Mouse movement is a sufficient event trigger • quot;Partial screen updatequot; replaces the quot;click, wait, and refreshquot; user interaction model – Only user interface elements that contain new information are updated (fast response) – The rest of the user interface remains displayed without interruption (no loss of operational context) • Data-driven (as opposed to page-driven) – UI is handled in the client while the server provides data
  • 10. Why AJAX? • Asynchronous communication replaces synchronous request/response model. – A user can continue to use the application while the client program requests information from the server in the background – Separation of displaying from data fetching
  • 11. Technologies Used in AJAX • Javascript • DOM • CSS • XMLHttpRequest
  • 12. XMLHttpRequest • Javascript • Adopted from modern browsers – Mozilla, Safari and Opera • Communicates with a server via standard HTTP GET/POST • XMLHttpRequest object works in the background for performing asynchronous communication with the backend server – Does not interrupt user operation
  • 13. Browsers which support XMLHttpRequest •Mozilla Firefox 1.0 and above •Netscape version 7.1 and above •Apple Safari 1.2 and above. •Microsoft Internet Exporer 5 and above •Konqueror •Opera 7.6 and above and many more
  • 15. Classic Model Interrupted user operation while the data is being fetched
  • 16. The AJAX Model Uninterrupted user operation while the data is being fetched
  • 17. Steps of AJAX operation • A client event occurs • An XMLHttpRequest object is created • The XMLHttpRequest object is configured • The XMLHttpRequest object makes an async. Request • The Validate Servlet returns an XML document containing the result • The XMLHttpRequest object calls the callback() function and processes the result • The HTML DOM is updated
  • 18. AJAX Security : Server Side • AJAX-based Web applications use the same server side security schemes of regular Web applications • AJAX-based Web applications are subject to the same security threats as regular Web applications
  • 19. AJAX Security : Client Side • JavaScript code is visible to a user/hacker • JavaScript code is downloaded from the server and executed at the client
  • 20. Thank You Abhishek Nagar