SlideShare una empresa de Scribd logo
1 de 22
BUILT IN FAIRFIELD COUNT Y:
FRONT END DEVELOPERS MEETUP
TUES. JUNE 11, 2013
JSON Part 2:
Working with Ajax
About Jeff Fox (@jfox015)
 16 year web development professional
 (Almost) entirely self taught
 Thorough front and back end experience
 Develops JavaScript based web apps that rely on JSON and
Ajax for data workflow
 Not to be confused with the former Connecticut News
weatherman (That’s Geoff Fox)
Overview
 JSON Review
 What is Ajax?
 Benefits
 Drawbacks?
 Ajax and JQuery
 Live Demo
JSON Review
JSON Highlights
 A lightweight text based data interchange format
 Use it to transfer JavaScript object data to and from a
remote data source
 Language independent
 Based on a subset of the JavaScript Programming
Language
 Easy to understand, manipulate and generate
Why use it?
 Straightforward syntax
 Easy to create and manipulate
 Can be parsed to a native JavaScript object using
JSON.parse()
 Supported by (most) major browsers and JavaScript
frameworks
 Built in support in most backend technologies
Onto AJAX…
…with a little history for good measure
What is Ajax?
 Ajax stands for “Asynchronous JavaScript and XML”
 JavaScript API for exchanging data with a web server and
returning the response to JavaScript
 You’re not stuck with only asynchronous operations
 You don’t have to use XML to use Ajax
Where did Ajax come from?
 Microsoft first added an XMLHTTP ActiveX control to Internet
Explorer 5 in 1999
 The Mozilla project next added the XMLHttpRequest object
with the same functionality to the Gecko layout engine
 Safari, Konqueror and Opera all followed suit implementing
the XMLHttpRequest object as well
 W3C issued a working draft specification for it in 2006
 IE 7 added support for XMLHttpRequest
First Usages
 Google wowed everyone when they made email cool in
2004 using Ajax in Gmail
 Then followed up with their equally
impressive Maps in 2005
And the crowd went wild!
Benefits of Ajax
Benefits of Ajax
 Improved user experience (no page refresh)
 Makes web (and mobile web) applications feel more like
native applications
 Faster than a full page refresh (targeted content and data
vs. complete load of all HTML, JS, CSS and image assets)
 Developers can write endpoints for specific user
operations instead of heavy, all-inclusive scripts
Drawbacks?
Drawbacks
 Ajax operations can sometimes be difficult to debug
 That’s why we love Firebug though, right?
 Poorly designed Ajax driven apps can create a confusing
or detrimental user experience
 Loss of addressability (Everything has the same URL)
Ajax and JQuery
Typical Ajax Functions in JQuery
 $.ajax({
type: "POST",
url: "somescript.php",
data: { “name”: “Jeff", “location”: “Norwalk" }
).done(function() { … });
 $.getJSON("somescript.php").done(function() { … });
 $.post ("somescript.php“, { “key”: “value” }
).done(function() { … });
Live Example
Dynamic App Demo
 JSON Driven App Dashboard
 All data loaded as JSON via Ajax calls using JQuery
 Display received data in UI
 No page refreshes
Questions?
Resources
 Demo source code on Github:
https://github.com/jfox015/BIFC-JSON-Dashboard
 XMLHttpRequest @ Wikipedia:
http://en.wikipedia.org/wiki/XMLHttpRequest
 Medialoot HTML 5 Template used in this demo:
http://medialoot.com/item/html5-admin-template/
JSON Part 2: Working with Ajax

Más contenido relacionado

La actualidad más candente

Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...Codemotion
 
From rest api to graph ql a 10 year journey
From rest api to graph ql a 10 year journeyFrom rest api to graph ql a 10 year journey
From rest api to graph ql a 10 year journeyArno Schulz
 
Building configurable applications for the web
Building configurable applications for the webBuilding configurable applications for the web
Building configurable applications for the websupertom
 
RubyConf Taiwan 2016 - Large scale Rails applications
RubyConf Taiwan 2016 - Large scale Rails applicationsRubyConf Taiwan 2016 - Large scale Rails applications
RubyConf Taiwan 2016 - Large scale Rails applicationsFlorian Dutey
 
GraphQL IndyJS April 2016
GraphQL IndyJS April 2016GraphQL IndyJS April 2016
GraphQL IndyJS April 2016Brad Pillow
 
Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Yuriy Shapovalov
 
«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​FDConf
 
Single page application
Single page applicationSingle page application
Single page applicationJeremy Lee
 
«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​
«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​
«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​FDConf
 
RubyConf China 2015 - Rails off assets pipeline
RubyConf China 2015 - Rails off assets pipelineRubyConf China 2015 - Rails off assets pipeline
RubyConf China 2015 - Rails off assets pipelineFlorian Dutey
 
The Apollo and GraphQL Stack
The Apollo and GraphQL StackThe Apollo and GraphQL Stack
The Apollo and GraphQL StackSashko Stubailo
 
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...Codemotion
 
Web-centric application architectures
Web-centric application architecturesWeb-centric application architectures
Web-centric application architecturesKosala Nuwan Perera
 
Xml usage in my work
Xml usage in my workXml usage in my work
Xml usage in my workJoniKettunen
 
Modern SharePoint Development using Visual Studio Code
Modern SharePoint Development using Visual Studio CodeModern SharePoint Development using Visual Studio Code
Modern SharePoint Development using Visual Studio CodeJared Matfess
 

La actualidad más candente (20)

Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...
 
Browser Developer Tools
Browser Developer ToolsBrowser Developer Tools
Browser Developer Tools
 
From rest api to graph ql a 10 year journey
From rest api to graph ql a 10 year journeyFrom rest api to graph ql a 10 year journey
From rest api to graph ql a 10 year journey
 
Single page application
Single page applicationSingle page application
Single page application
 
React introduction
React introductionReact introduction
React introduction
 
Building configurable applications for the web
Building configurable applications for the webBuilding configurable applications for the web
Building configurable applications for the web
 
RubyConf Taiwan 2016 - Large scale Rails applications
RubyConf Taiwan 2016 - Large scale Rails applicationsRubyConf Taiwan 2016 - Large scale Rails applications
RubyConf Taiwan 2016 - Large scale Rails applications
 
GraphQL IndyJS April 2016
GraphQL IndyJS April 2016GraphQL IndyJS April 2016
GraphQL IndyJS April 2016
 
Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4
 
«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​
 
Single page application
Single page applicationSingle page application
Single page application
 
«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​
«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​
«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​
 
RubyConf China 2015 - Rails off assets pipeline
RubyConf China 2015 - Rails off assets pipelineRubyConf China 2015 - Rails off assets pipeline
RubyConf China 2015 - Rails off assets pipeline
 
The Apollo and GraphQL Stack
The Apollo and GraphQL StackThe Apollo and GraphQL Stack
The Apollo and GraphQL Stack
 
Visual resume
Visual resumeVisual resume
Visual resume
 
Static is just a cache
Static is just a cacheStatic is just a cache
Static is just a cache
 
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...
 
Web-centric application architectures
Web-centric application architecturesWeb-centric application architectures
Web-centric application architectures
 
Xml usage in my work
Xml usage in my workXml usage in my work
Xml usage in my work
 
Modern SharePoint Development using Visual Studio Code
Modern SharePoint Development using Visual Studio CodeModern SharePoint Development using Visual Studio Code
Modern SharePoint Development using Visual Studio Code
 

Similar a JSON Part 2: Working with Ajax

NetBeans Support for EcmaScript 6
NetBeans Support for EcmaScript 6NetBeans Support for EcmaScript 6
NetBeans Support for EcmaScript 6Kostas Saidis
 
Ajax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE EnvironmentAjax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE Environmentstarchaser
 
4005-713 ` XML Architecture, Tools & Technique ` Presentation
4005-713 ` XML Architecture, Tools & Technique ` Presentation4005-713 ` XML Architecture, Tools & Technique ` Presentation
4005-713 ` XML Architecture, Tools & Technique ` Presentationlitcigar
 
Introduction to ajax
Introduction  to  ajaxIntroduction  to  ajax
Introduction to ajaxPihu Goel
 
Ajax: User Experience
Ajax: User ExperienceAjax: User Experience
Ajax: User Experiencepetrov
 
Ajax Introduction Presentation
Ajax   Introduction   PresentationAjax   Introduction   Presentation
Ajax Introduction Presentationthinkphp
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat ClientPaul Klipp
 
UIT: Our Skills
UIT: Our SkillsUIT: Our Skills
UIT: Our Skillsuitpramati
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by GoogleASG
 
RICH INTERNET APPLICATIONS - RIA Tools
RICH INTERNET APPLICATIONS - RIA ToolsRICH INTERNET APPLICATIONS - RIA Tools
RICH INTERNET APPLICATIONS - RIA ToolsMeghana Chandrashekar
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slidesSmithss25
 
INTRODUCTION.docx
INTRODUCTION.docxINTRODUCTION.docx
INTRODUCTION.docxKaiSane1
 

Similar a JSON Part 2: Working with Ajax (20)

Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
NetBeans Support for EcmaScript 6
NetBeans Support for EcmaScript 6NetBeans Support for EcmaScript 6
NetBeans Support for EcmaScript 6
 
Ajax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE EnvironmentAjax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE Environment
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
4005-713 ` XML Architecture, Tools & Technique ` Presentation
4005-713 ` XML Architecture, Tools & Technique ` Presentation4005-713 ` XML Architecture, Tools & Technique ` Presentation
4005-713 ` XML Architecture, Tools & Technique ` Presentation
 
Introduction to ajax
Introduction  to  ajaxIntroduction  to  ajax
Introduction to ajax
 
Ajax: User Experience
Ajax: User ExperienceAjax: User Experience
Ajax: User Experience
 
Ajax Introduction Presentation
Ajax   Introduction   PresentationAjax   Introduction   Presentation
Ajax Introduction Presentation
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
 
UIT: Our Skills
UIT: Our SkillsUIT: Our Skills
UIT: Our Skills
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
 
Ajax
AjaxAjax
Ajax
 
RICH INTERNET APPLICATIONS - RIA Tools
RICH INTERNET APPLICATIONS - RIA ToolsRICH INTERNET APPLICATIONS - RIA Tools
RICH INTERNET APPLICATIONS - RIA Tools
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slides
 
Jake_Park_resume
Jake_Park_resumeJake_Park_resume
Jake_Park_resume
 
M Ramya
M RamyaM Ramya
M Ramya
 
INTRODUCTION.docx
INTRODUCTION.docxINTRODUCTION.docx
INTRODUCTION.docx
 
25250716 seminar-on-ajax text
25250716 seminar-on-ajax text25250716 seminar-on-ajax text
25250716 seminar-on-ajax text
 
RIA - Rich Internet Applications
RIA - Rich Internet ApplicationsRIA - Rich Internet Applications
RIA - Rich Internet Applications
 

Último

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

JSON Part 2: Working with Ajax

  • 1. BUILT IN FAIRFIELD COUNT Y: FRONT END DEVELOPERS MEETUP TUES. JUNE 11, 2013 JSON Part 2: Working with Ajax
  • 2. About Jeff Fox (@jfox015)  16 year web development professional  (Almost) entirely self taught  Thorough front and back end experience  Develops JavaScript based web apps that rely on JSON and Ajax for data workflow  Not to be confused with the former Connecticut News weatherman (That’s Geoff Fox)
  • 3. Overview  JSON Review  What is Ajax?  Benefits  Drawbacks?  Ajax and JQuery  Live Demo
  • 5. JSON Highlights  A lightweight text based data interchange format  Use it to transfer JavaScript object data to and from a remote data source  Language independent  Based on a subset of the JavaScript Programming Language  Easy to understand, manipulate and generate
  • 6. Why use it?  Straightforward syntax  Easy to create and manipulate  Can be parsed to a native JavaScript object using JSON.parse()  Supported by (most) major browsers and JavaScript frameworks  Built in support in most backend technologies
  • 7. Onto AJAX… …with a little history for good measure
  • 8. What is Ajax?  Ajax stands for “Asynchronous JavaScript and XML”  JavaScript API for exchanging data with a web server and returning the response to JavaScript  You’re not stuck with only asynchronous operations  You don’t have to use XML to use Ajax
  • 9. Where did Ajax come from?  Microsoft first added an XMLHTTP ActiveX control to Internet Explorer 5 in 1999  The Mozilla project next added the XMLHttpRequest object with the same functionality to the Gecko layout engine  Safari, Konqueror and Opera all followed suit implementing the XMLHttpRequest object as well  W3C issued a working draft specification for it in 2006  IE 7 added support for XMLHttpRequest
  • 10. First Usages  Google wowed everyone when they made email cool in 2004 using Ajax in Gmail  Then followed up with their equally impressive Maps in 2005
  • 11. And the crowd went wild!
  • 13. Benefits of Ajax  Improved user experience (no page refresh)  Makes web (and mobile web) applications feel more like native applications  Faster than a full page refresh (targeted content and data vs. complete load of all HTML, JS, CSS and image assets)  Developers can write endpoints for specific user operations instead of heavy, all-inclusive scripts
  • 15. Drawbacks  Ajax operations can sometimes be difficult to debug  That’s why we love Firebug though, right?  Poorly designed Ajax driven apps can create a confusing or detrimental user experience  Loss of addressability (Everything has the same URL)
  • 17. Typical Ajax Functions in JQuery  $.ajax({ type: "POST", url: "somescript.php", data: { “name”: “Jeff", “location”: “Norwalk" } ).done(function() { … });  $.getJSON("somescript.php").done(function() { … });  $.post ("somescript.php“, { “key”: “value” } ).done(function() { … });
  • 19. Dynamic App Demo  JSON Driven App Dashboard  All data loaded as JSON via Ajax calls using JQuery  Display received data in UI  No page refreshes
  • 21. Resources  Demo source code on Github: https://github.com/jfox015/BIFC-JSON-Dashboard  XMLHttpRequest @ Wikipedia: http://en.wikipedia.org/wiki/XMLHttpRequest  Medialoot HTML 5 Template used in this demo: http://medialoot.com/item/html5-admin-template/