SlideShare uma empresa Scribd logo
1 de 15
AJAX, JSON, AND
CLIENT SIDE TEMPLATES
AJAX
• Asynchronous Javascript And XML
  • HTML and CSS
  • Document Object Model
  • XML and XSLT
  • XMLHttpRequest
  • JavaScript
Web 1.0




          Example: www.ebay.ca
Web 2.0!




           Example: dhtmlxScheduler
JSON
• JavaScript Object Notation
   • Lightweight data-interchange format
   • Easy for humans to read and write
   • Easy for machines to parse and generate
JSON
• Built on two structures:
  • Name value pairs (aka object)
       { Name: “Value”, Name2: 2, Name3: true }


  • Ordered list of values (aka array)
       [ “value”, 2, true ]


  • Combination thereof
       [ { Name: “Object 1”, Numbers: [1,2,3] },
         { Name: “Object 2”, Numbers: [4,5,6] } ]

  • Virtually all languages support these structures
JSON vs XML
JSON vs XML
Old HTML Way
               Page,
               ViewPerPage, ID
               Search,
               Name Search,
               SKU Search, Price
               From,
               Price To, Position
               From, Position To
AJAX Partial Rendering Way

                ID Search,
                Name Search,
                SKU Search,
                Price From,
                Price To, Position
                From, Position To
Client Side Templates


                                         GET /Products?Page=2




   [ {Product}, {Product}, {Product} ]
Client Side Templates
• Pros
  • Separation of data and layout
  • Faster page load
    • No wait time on server, simply serving up a HTML document
    • Less content
  • Less network traffic
    • Smaller requests and responses
  • Server doesn’t have to worry about generating HTML
  • Able to maintain page state in JavaScript if needed
  • Lots of opportunities to cache
Client Side Templates
• Cons
  • Initial page load is essentially empty
     • Bad idea for pages you want indexed by a search engine
  • JavaScript heavy
  • No canned controls
  • Async can be tough on groups of objects or sequential operations
Example!



           http://localhost:8080/Playlists
Questions!?

Mais conteúdo relacionado

Mais procurados

Mais procurados (19)

Ajax Presentation
Ajax PresentationAjax Presentation
Ajax Presentation
 
Css3 Presetation
Css3 PresetationCss3 Presetation
Css3 Presetation
 
Ajax
AjaxAjax
Ajax
 
Ajax ppt
Ajax pptAjax ppt
Ajax ppt
 
Comparisons of web languages
Comparisons of web languagesComparisons of web languages
Comparisons of web languages
 
Web Scraping Technologies
Web Scraping TechnologiesWeb Scraping Technologies
Web Scraping Technologies
 
An Introduction to Ajax Programming
An Introduction to Ajax ProgrammingAn Introduction to Ajax Programming
An Introduction to Ajax Programming
 
Ajax Presentation
Ajax PresentationAjax Presentation
Ajax Presentation
 
Ajax
AjaxAjax
Ajax
 
Ajax.ppt
Ajax.pptAjax.ppt
Ajax.ppt
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0
 
AJAX
AJAXAJAX
AJAX
 
Ajax Ppt 1
Ajax Ppt 1Ajax Ppt 1
Ajax Ppt 1
 
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
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
Ajax Introduction Presentation
Ajax   Introduction   PresentationAjax   Introduction   Presentation
Ajax Introduction Presentation
 
Bulletproof Ajax
Bulletproof AjaxBulletproof Ajax
Bulletproof Ajax
 
Introduction to ajax
Introduction  to  ajaxIntroduction  to  ajax
Introduction to ajax
 

Semelhante a AJAX, JSON, and Client-Side Templates

Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajaxNir Elbaz
 
JAVA EE DEVELOPMENT (JSP and Servlets)
JAVA EE DEVELOPMENT (JSP and Servlets)JAVA EE DEVELOPMENT (JSP and Servlets)
JAVA EE DEVELOPMENT (JSP and Servlets)Talha Ocakçı
 
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...Amazon Web Services
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2kriszyp
 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...Liam Cleary [MVP]
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOMMark Rackley
 
Shreeraj - Hacking Web 2 0 - ClubHack2007
Shreeraj - Hacking Web 2 0 - ClubHack2007Shreeraj - Hacking Web 2 0 - ClubHack2007
Shreeraj - Hacking Web 2 0 - ClubHack2007ClubHack
 
Ajax tutorial
Ajax tutorialAjax tutorial
Ajax tutorialKat Roque
 
AJAX Introduction [Autosaved].pptx
AJAX Introduction [Autosaved].pptxAJAX Introduction [Autosaved].pptx
AJAX Introduction [Autosaved].pptxJobin86
 
Web technologies-course 10.pptx
Web technologies-course 10.pptxWeb technologies-course 10.pptx
Web technologies-course 10.pptxStefan Oprea
 
Ajax Introduction
Ajax IntroductionAjax Introduction
Ajax IntroductionOliver Cai
 

Semelhante a AJAX, JSON, and Client-Side Templates (20)

Ajax
AjaxAjax
Ajax
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
Ajax workshop
Ajax workshopAjax workshop
Ajax workshop
 
JAVA EE DEVELOPMENT (JSP and Servlets)
JAVA EE DEVELOPMENT (JSP and Servlets)JAVA EE DEVELOPMENT (JSP and Servlets)
JAVA EE DEVELOPMENT (JSP and Servlets)
 
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
 
Building a spa_in_30min
Building a spa_in_30minBuilding a spa_in_30min
Building a spa_in_30min
 
Building a spa_in_30min
Building a spa_in_30minBuilding a spa_in_30min
Building a spa_in_30min
 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...
 
Ajax Lecture Notes
Ajax Lecture NotesAjax Lecture Notes
Ajax Lecture Notes
 
PHP - Introduction to PHP AJAX
PHP -  Introduction to PHP AJAXPHP -  Introduction to PHP AJAX
PHP - Introduction to PHP AJAX
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
 
Shreeraj - Hacking Web 2 0 - ClubHack2007
Shreeraj - Hacking Web 2 0 - ClubHack2007Shreeraj - Hacking Web 2 0 - ClubHack2007
Shreeraj - Hacking Web 2 0 - ClubHack2007
 
Ajax tutorial
Ajax tutorialAjax tutorial
Ajax tutorial
 
Ajax
AjaxAjax
Ajax
 
AJAX Introduction [Autosaved].pptx
AJAX Introduction [Autosaved].pptxAJAX Introduction [Autosaved].pptx
AJAX Introduction [Autosaved].pptx
 
Web technologies-course 10.pptx
Web technologies-course 10.pptxWeb technologies-course 10.pptx
Web technologies-course 10.pptx
 
Introduction to AJAX
Introduction to AJAXIntroduction to AJAX
Introduction to AJAX
 
Ajax Introduction
Ajax IntroductionAjax Introduction
Ajax Introduction
 

Mais de RTigger

You Can't Buy Agile
You Can't Buy AgileYou Can't Buy Agile
You Can't Buy AgileRTigger
 
Caching up is hard to do: Improving your Web Services' Performance
Caching up is hard to do: Improving your Web Services' PerformanceCaching up is hard to do: Improving your Web Services' Performance
Caching up is hard to do: Improving your Web Services' PerformanceRTigger
 
Ready, set, go! An introduction to the Go programming language
Ready, set, go! An introduction to the Go programming languageReady, set, go! An introduction to the Go programming language
Ready, set, go! An introduction to the Go programming languageRTigger
 
Open source web services
Open source web servicesOpen source web services
Open source web servicesRTigger
 
How to hire a hacker
How to hire a hackerHow to hire a hacker
How to hire a hackerRTigger
 
Windows 8 programming with html and java script
Windows 8 programming with html and java scriptWindows 8 programming with html and java script
Windows 8 programming with html and java scriptRTigger
 
Open regina
Open reginaOpen regina
Open reginaRTigger
 
Single page apps and the web of tomorrow
Single page apps and the web of tomorrowSingle page apps and the web of tomorrow
Single page apps and the web of tomorrowRTigger
 
Async in .NET
Async in .NETAsync in .NET
Async in .NETRTigger
 
Give your web apps some backbone
Give your web apps some backboneGive your web apps some backbone
Give your web apps some backboneRTigger
 
Hackers, hackathons, and you
Hackers, hackathons, and youHackers, hackathons, and you
Hackers, hackathons, and youRTigger
 
JavaScript!
JavaScript!JavaScript!
JavaScript!RTigger
 
Parallel Processing
Parallel ProcessingParallel Processing
Parallel ProcessingRTigger
 
Reactive Extensions
Reactive ExtensionsReactive Extensions
Reactive ExtensionsRTigger
 
Sql vs NoSQL
Sql vs NoSQLSql vs NoSQL
Sql vs NoSQLRTigger
 
Git’in Jiggy With Git
Git’in Jiggy With GitGit’in Jiggy With Git
Git’in Jiggy With GitRTigger
 
What The F#
What The F#What The F#
What The F#RTigger
 
Web Services
Web ServicesWeb Services
Web ServicesRTigger
 
Total Engagement
Total EngagementTotal Engagement
Total EngagementRTigger
 

Mais de RTigger (20)

You Can't Buy Agile
You Can't Buy AgileYou Can't Buy Agile
You Can't Buy Agile
 
Caching up is hard to do: Improving your Web Services' Performance
Caching up is hard to do: Improving your Web Services' PerformanceCaching up is hard to do: Improving your Web Services' Performance
Caching up is hard to do: Improving your Web Services' Performance
 
Ready, set, go! An introduction to the Go programming language
Ready, set, go! An introduction to the Go programming languageReady, set, go! An introduction to the Go programming language
Ready, set, go! An introduction to the Go programming language
 
Open source web services
Open source web servicesOpen source web services
Open source web services
 
How to hire a hacker
How to hire a hackerHow to hire a hacker
How to hire a hacker
 
Windows 8 programming with html and java script
Windows 8 programming with html and java scriptWindows 8 programming with html and java script
Windows 8 programming with html and java script
 
Open regina
Open reginaOpen regina
Open regina
 
Single page apps and the web of tomorrow
Single page apps and the web of tomorrowSingle page apps and the web of tomorrow
Single page apps and the web of tomorrow
 
Async in .NET
Async in .NETAsync in .NET
Async in .NET
 
Give your web apps some backbone
Give your web apps some backboneGive your web apps some backbone
Give your web apps some backbone
 
Hackers, hackathons, and you
Hackers, hackathons, and youHackers, hackathons, and you
Hackers, hackathons, and you
 
JavaScript!
JavaScript!JavaScript!
JavaScript!
 
Parallel Processing
Parallel ProcessingParallel Processing
Parallel Processing
 
Node.js
Node.jsNode.js
Node.js
 
Reactive Extensions
Reactive ExtensionsReactive Extensions
Reactive Extensions
 
Sql vs NoSQL
Sql vs NoSQLSql vs NoSQL
Sql vs NoSQL
 
Git’in Jiggy With Git
Git’in Jiggy With GitGit’in Jiggy With Git
Git’in Jiggy With Git
 
What The F#
What The F#What The F#
What The F#
 
Web Services
Web ServicesWeb Services
Web Services
 
Total Engagement
Total EngagementTotal Engagement
Total Engagement
 

Último

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 

Último (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 

AJAX, JSON, and Client-Side Templates

  • 1. AJAX, JSON, AND CLIENT SIDE TEMPLATES
  • 2. AJAX • Asynchronous Javascript And XML • HTML and CSS • Document Object Model • XML and XSLT • XMLHttpRequest • JavaScript
  • 3. Web 1.0 Example: www.ebay.ca
  • 4. Web 2.0! Example: dhtmlxScheduler
  • 5. JSON • JavaScript Object Notation • Lightweight data-interchange format • Easy for humans to read and write • Easy for machines to parse and generate
  • 6. JSON • Built on two structures: • Name value pairs (aka object) { Name: “Value”, Name2: 2, Name3: true } • Ordered list of values (aka array) [ “value”, 2, true ] • Combination thereof [ { Name: “Object 1”, Numbers: [1,2,3] }, { Name: “Object 2”, Numbers: [4,5,6] } ] • Virtually all languages support these structures
  • 9. Old HTML Way Page, ViewPerPage, ID Search, Name Search, SKU Search, Price From, Price To, Position From, Position To
  • 10. AJAX Partial Rendering Way ID Search, Name Search, SKU Search, Price From, Price To, Position From, Position To
  • 11. Client Side Templates GET /Products?Page=2 [ {Product}, {Product}, {Product} ]
  • 12. Client Side Templates • Pros • Separation of data and layout • Faster page load • No wait time on server, simply serving up a HTML document • Less content • Less network traffic • Smaller requests and responses • Server doesn’t have to worry about generating HTML • Able to maintain page state in JavaScript if needed • Lots of opportunities to cache
  • 13. Client Side Templates • Cons • Initial page load is essentially empty • Bad idea for pages you want indexed by a search engine • JavaScript heavy • No canned controls • Async can be tough on groups of objects or sequential operations
  • 14. Example! http://localhost:8080/Playlists

Notas do Editor

  1. DOM – represents the document as an object,used to create and manipulate elements on a webpageXML – initial standard for transmitting data to and from a web serviceXMLHttpRequest – component that allows a browser to send a web request independent of a page request
  2. The blanks on the client side represent page loading, waiting on the server, and a locked UISystem processing includes processing the request input (viewstate, cookies, authentication, get & post vars), any database or other resource calls necessary to create the page, and the actual generation of the HTML to send to the client
  3. Ajax allows a consistent and responsive user experienceAjax engine runs on a separate thread from the UI and sends and receives data in the backgroundServer is now only responsible for processing input, making any resource calls it needs, and sending data as output
  4. Example result from twitter search APIExtra “fat” in XML:Schema definitionsTag syntaxEscaped XML characters
  5. Same result from twitter search APIMorereadable, no unnecessary content
  6. The entire form’s content is transmitted every request, and the entire page’s content is rendered on the server and transmitted every response
  7. Only the required fields (or at least a subset of all the fields) is sent in the request, and only the affected area(s) of the page are rendered and sent in the response
  8. Initially, the server only sends you the static controls for a page, as well as templates for how to represent the data it’s about to receiveThe browser, once loaded, makes a request for the data to displayThe server processes the request and sends back only the data requestedThe browser combines the data from the server with the client-side template to build the rest of the webpage
  9. Client Side Templates is a good idea for dynamic, task-driven web applications. It’s not a good idea for blogs, corporate websites, or anything that is mostly static content that needs to be indexed.
  10. Start website with debug attached to slow down requestsPoint out how fast initial page loaded (net panel)Show how we’re making three API calls after the page loadsDemonstrate client side template (view source), and then data received from API (catalog call), and finally how it looks on pageShow how categories works now that products are loaded locallyShow how loading a playlist worksShow how an add operation works (drag product to playlist)Show how a bulk operation might work