SlideShare a Scribd company logo
1 of 39
How I Learned
              To Stop Worrying
              and Love jQuery
David Giard, Sogeti USA
     C# MVP
     MCTS, MCSD, MCSE, MCDBA
DavidGiard.com
@DavidGiard
B
E
F
O
R
E
A
F
T
E
R
JavaScript in your page
• <script type="text/javascript">
   …
  </script>

• <script type="text/javascript“
   src=“xxx.js">
  </script>
JavaScript: The Good Parts
• Interactive web pages
• Fast
• Ajax
JavaScript: The Bad Parts
• Cross-browser issues
• Cross-platform issues
JavaScript Frameworks
•   jQuery
     jQuery
•   Prototype
•   Dojo
•   Mootools
•   ExtJs
•   etc…
jQuery
•   JavaScript Abstraction
•   Cross-Browser
•   Built-In Functions
•   Fast
•   Unobtrusive
•   Popular
•   Ships with Visual Studio 2010 and 2012
jQuery Popularity




Source: http://royal.pingdom.com
jQuery Popularity




Source: http://royal.pingdom.com
jQuery Popularity
•   Twitter.com
•   Wikipedia.org
•   MLB.com
•   Amazon.com
•   Bing.com
•   Microsoft.com
•   Bit.ly
•   ESPN.com
•   Digg.com
•   Reddit.com
•   Netflix.com
•   WordPress.com
Unobtrusive JavaScript
• Obtrusive
  <a href=“” onclick=“DoSomething();”>
  Click Me
  </a>

• Unobtrusive
  <script type="text/javascript">
    $(document).ready(function(){
      $(“#Link1”).click(function(){
   DoSomething();
   });
  </script>
  <a href=“” id=“Link1”>
   Click Me
  </a>
Enable jQuery
• Download from jQuery.com
• <script
     type="text/javascript"
     src="scripts/jquery-1.8.3.min.js"></script>
Content Delivery Network
• <script
   type="text/javascript"
   src=“http://ajax.microsoft.com/ajax/jquery/jquery-1.8.3.min.js">
  </script>


• <script
   type="text/javascript"
   src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
  </script>

• <script
   type="text/javascript"
   src="http://code.jquery.com/jquery-1.8.3.min.js ">
  </script>
Non-Minified JavaScript
/*!
 * jQuery JavaScript Library v1.8.2
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2012 jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time)
 */
(function( window, undefined ) {
var
// A central reference to the root jQuery(document)
rootjQuery,

// The deferred used on DOM ready
Minified JavaScript
(function(a,b){function G(a){var b=F[a]={};return
p.each(a.split(s),function(a,c){b[c]=!0}),b}function
J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-
$1").toLowerCase();d=a.getAttribute(e);if(typeof
d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d
)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in
a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}fu
nction ba(){return!1}function bb(){return!0}function
bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do
a=a[b];while(a&&a.nodeType!==1);return a}function
bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var
e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return
a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return
a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return
p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var
b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.creat
eElement(b.pop());return c}function bC(a,b){return
a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}f
Document Object Model (DOM)
<html>
 <head>
  <title>My Page</title>
  <script
    type="text/javascript“
    src="http://code.jquery.com/jquery-1.7.1.min.js ">
                                     Document
  </script>
 </head>
 <body>        Head                                      Body
  <div>
    <p>
     Title a <a href="Page2.htm">link</a> Div
      This          Script                                      Div
    </p>
  </div>
  <div>                                   P                     UL
    Colors:
    <ul>
      <li>Red</li>
                                          A              LI     LI    LI
      <li>Orange</li>
      <li>Yellow</li>
    </ul>
  </div>
 </body>
</html>
Getting an Element
<script type="text/javaScript">
  var id = "Div1";
  var myDiv = document.GetElementById(id);
</script>
…
<div id="Div1">
  …
</div>
Cross-Browser
• Javascript
var id = "Div1";
var elm = null;
 if (document.getElementById)
 {
   elm = document.getElementById(id);
 }
 else if (document.all)
 {
   elm = document.all[id];
 }
 else if (document.layers)
 {
   elm = document.layers[id];
 }

• jQuery
var elm = $("#Div1");
jQuery Syntax
•   jQuery keyword
•   Selectors
•   Events
•   Functions / Methods
“jQuery” Keyword
•   jQuery
•   $
•   Represents the jQuery object
•   Indicates what follows is jQuery
Selectors
• Returns a set of objects
• Call method on each object
• Bind event to each object
CSS Selectors
h2 {
       font-family: "Calibri";               Tag name
       font-size: 66pt;
       font-weight: bold;
}
.FootNote {
       font-family: "Calibri";              Class name
       font-size: 18pt;
       font-weight: bold;
}
#MyElement {
       font-family: “Times New Roman";      Element ID
       font-color: red;
}
div#MyDiv {
       font-family: “Arial";             Combine selectors
       font-size: 48pt;
}
jQuery Selectors
• $(selector)
• where selector is:
Selector   Select by…      Example
 "#xxx"    Id              $("#MyDiv")
 ".xxx"    className       $(".MyClass")
 "xxx"     element type    $("a")
   xxx     variable name   $(document)
(document).ready
$(document).ready(function(){
     …
});
Events
$(document).ready(function(){
    $("#MyDiv").click(function(){
     …
    });
});
Methods
$(document).ready(function(){
    $(“#MyDiv”).click(function(){
     $(“a”).attr(“target”, “_blank”);
    });
});
Methods
$(document).ready(function(){
    $(“#MyDiv”).click(function(){
     $(“a”).attr(“target”, “_blank”);
    });
});
Methods
$(function(){
    $(“#MyDiv”).click(function(){
     $(“a”).attr(“target”, “_blank”);
    });
});
Combining Selectors
• Containership
  $(‘selector1 selector2’)
  Ex:
      $(‘div a’)
• Narrow scope
  $(‘Selector1Selector2’)
  Ex:
      $(‘a#MyLink’)
Set-based Selectors
•   $("div:first")
•   $("div:last")
•   $("div:even")
•   $("div:odd")
Ajax
• Call web service from jQuery
Ajax
$.ajax({
      url: "CustomerWs.asmx/GetCustomerName",
      dataType: "text",
      type: "POST",
      data: {},
      error: function (err) {
         // Code to run when error returned
      },
      success: function (data) {
         // Code to run when successfully returned
      }
Plug-Ins
• jQuery is extensible!
• jQueryUI
jQuery UI
Help!
• docs.jquery.com
• api.jquery.com
• jqueryui.com/demos
More resources
• http://codylindley.com/jqueryselectors/
• http://www.paulstovell.com/jquerypad
David Giard
• DavidGiard.com
• TechnologyAndFriends.com
• @DavidGiard.com
How I Learned to Stop Worrying and Love jQuery (Jan 2013)

More Related Content

What's hot

jQuery Presentation
jQuery PresentationjQuery Presentation
jQuery PresentationRod Johnson
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introductionTomi Juhola
 
jQuery Features to Avoid
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoiddmethvin
 
JavaScript and jQuery Basics
JavaScript and jQuery BasicsJavaScript and jQuery Basics
JavaScript and jQuery BasicsKaloyan Kosev
 
Styling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS EditionStyling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS Editionbensmithett
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScriptbensmithett
 
Getting the Most Out of jQuery Widgets
Getting the Most Out of jQuery WidgetsGetting the Most Out of jQuery Widgets
Getting the Most Out of jQuery Widgetsvelveeta_512
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsMark Rackley
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryGunjan Kumar
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterpriseDave Artz
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkBorisMoore
 
JsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery TemplatesJsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery TemplatesBorisMoore
 

What's hot (20)

jQuery Presentation
jQuery PresentationjQuery Presentation
jQuery Presentation
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introduction
 
jQuery Features to Avoid
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoid
 
JavaScript and jQuery Basics
JavaScript and jQuery BasicsJavaScript and jQuery Basics
JavaScript and jQuery Basics
 
Styling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS EditionStyling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS Edition
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScript
 
Learn css3
Learn css3Learn css3
Learn css3
 
jQuery
jQueryjQuery
jQuery
 
DirectToWeb 2.0
DirectToWeb 2.0DirectToWeb 2.0
DirectToWeb 2.0
 
Getting the Most Out of jQuery Widgets
Getting the Most Out of jQuery WidgetsGetting the Most Out of jQuery Widgets
Getting the Most Out of jQuery Widgets
 
ActiveDOM
ActiveDOMActiveDOM
ActiveDOM
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
 
22 j query1
22 j query122 j query1
22 j query1
 
J query intro_29thsep_alok
J query intro_29thsep_alokJ query intro_29thsep_alok
J query intro_29thsep_alok
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQuery
 
jQuery Essentials
jQuery EssentialsjQuery Essentials
jQuery Essentials
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data Link
 
JsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery TemplatesJsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery Templates
 

Viewers also liked

Gang announcements 2010 06
Gang announcements 2010 06Gang announcements 2010 06
Gang announcements 2010 06David Giard
 
Word Coach - Pitt Sept 08
Word Coach - Pitt Sept 08Word Coach - Pitt Sept 08
Word Coach - Pitt Sept 08r21270
 
A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...Emilio L. Cano
 
Comparative study and non comparative study
Comparative study and non comparative studyComparative study and non comparative study
Comparative study and non comparative studyAbdullah al-kharusi
 
ACHPER QR Code Activity
ACHPER QR Code ActivityACHPER QR Code Activity
ACHPER QR Code Activitymrrobbo
 
Beths Powerpoint
Beths PowerpointBeths Powerpoint
Beths PowerpointJeff Paul
 
Conference Information 2008 Final
Conference Information 2008 FinalConference Information 2008 Final
Conference Information 2008 Finalguest0d8266
 
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.Eugenio Agnello
 
Gang announcements 2011 07
Gang announcements 2011 07Gang announcements 2011 07
Gang announcements 2011 07David Giard
 
SEO Goes Natural and Social
SEO Goes Natural and SocialSEO Goes Natural and Social
SEO Goes Natural and SocialRichard Sink
 
The Business of Mobile Apps
The Business of Mobile AppsThe Business of Mobile Apps
The Business of Mobile AppsNorman Liang
 
Paresi mestresangelsmora
Paresi mestresangelsmoraParesi mestresangelsmora
Paresi mestresangelsmoraToni Monclus
 
Share Point Customization Delivered
Share Point   Customization DeliveredShare Point   Customization Delivered
Share Point Customization DeliveredDavid Giard
 
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012 Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012 Eugenio Agnello
 
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008jackthur
 
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.Liana Lignou
 

Viewers also liked (20)

Calling Watson to Ward 8 Stat
Calling Watson to Ward 8 StatCalling Watson to Ward 8 Stat
Calling Watson to Ward 8 Stat
 
Gang announcements 2010 06
Gang announcements 2010 06Gang announcements 2010 06
Gang announcements 2010 06
 
Word Coach - Pitt Sept 08
Word Coach - Pitt Sept 08Word Coach - Pitt Sept 08
Word Coach - Pitt Sept 08
 
A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...
 
Comparative study and non comparative study
Comparative study and non comparative studyComparative study and non comparative study
Comparative study and non comparative study
 
Global lesson Survey
Global lesson SurveyGlobal lesson Survey
Global lesson Survey
 
ACHPER QR Code Activity
ACHPER QR Code ActivityACHPER QR Code Activity
ACHPER QR Code Activity
 
Beths Powerpoint
Beths PowerpointBeths Powerpoint
Beths Powerpoint
 
Conference Information 2008 Final
Conference Information 2008 FinalConference Information 2008 Final
Conference Information 2008 Final
 
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.
 
Gang announcements 2011 07
Gang announcements 2011 07Gang announcements 2011 07
Gang announcements 2011 07
 
SEO Goes Natural and Social
SEO Goes Natural and SocialSEO Goes Natural and Social
SEO Goes Natural and Social
 
XML Compression Benchmark
XML Compression BenchmarkXML Compression Benchmark
XML Compression Benchmark
 
The Business of Mobile Apps
The Business of Mobile AppsThe Business of Mobile Apps
The Business of Mobile Apps
 
Paresi mestresangelsmora
Paresi mestresangelsmoraParesi mestresangelsmora
Paresi mestresangelsmora
 
Share Point Customization Delivered
Share Point   Customization DeliveredShare Point   Customization Delivered
Share Point Customization Delivered
 
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012 Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012
 
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008
 
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.
 
the great eight
the great eightthe great eight
the great eight
 

Similar to How I Learned to Stop Worrying and Love jQuery (Jan 2013)

Similar to How I Learned to Stop Worrying and Love jQuery (Jan 2013) (20)

Jquery
JqueryJquery
Jquery
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
bcgr3-jquery
bcgr3-jquerybcgr3-jquery
bcgr3-jquery
 
bcgr3-jquery
bcgr3-jquerybcgr3-jquery
bcgr3-jquery
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...
 
Jquery
JqueryJquery
Jquery
 
Introduction to jQuery (Ajax Exp 2006)
Introduction to jQuery (Ajax Exp 2006)Introduction to jQuery (Ajax Exp 2006)
Introduction to jQuery (Ajax Exp 2006)
 
Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)
 
Game jump: frontend introduction #1
Game jump: frontend introduction #1Game jump: frontend introduction #1
Game jump: frontend introduction #1
 
jQuery
jQueryjQuery
jQuery
 
JavaScript!
JavaScript!JavaScript!
JavaScript!
 
Jquery News Packages
Jquery News PackagesJquery News Packages
Jquery News Packages
 
J query training
J query trainingJ query training
J query training
 
jQuery
jQueryjQuery
jQuery
 
前端MVC之BackboneJS
前端MVC之BackboneJS前端MVC之BackboneJS
前端MVC之BackboneJS
 
Plone Interactivity
Plone InteractivityPlone Interactivity
Plone Interactivity
 
JQuery
JQueryJQuery
JQuery
 
Jquery In Rails
Jquery In RailsJquery In Rails
Jquery In Rails
 
Jquery introduction
Jquery introductionJquery introduction
Jquery introduction
 

More from David Giard

Data Visualization - CodeMash 2022
Data Visualization - CodeMash 2022Data Visualization - CodeMash 2022
Data Visualization - CodeMash 2022David Giard
 
Azure data factory
Azure data factoryAzure data factory
Azure data factoryDavid Giard
 
University of Texas lecture: Data Science Tools in Microsoft Azure
University of Texas lecture: Data Science Tools in Microsoft AzureUniversity of Texas lecture: Data Science Tools in Microsoft Azure
University of Texas lecture: Data Science Tools in Microsoft AzureDavid Giard
 
University of Texas, Data Science, March 29, 2018
University of Texas, Data Science, March 29, 2018University of Texas, Data Science, March 29, 2018
University of Texas, Data Science, March 29, 2018David Giard
 
Intro to cloud and azure
Intro to cloud and azureIntro to cloud and azure
Intro to cloud and azureDavid Giard
 
Azure and deep learning
Azure and deep learningAzure and deep learning
Azure and deep learningDavid Giard
 
Azure and Deep Learning
Azure and Deep LearningAzure and Deep Learning
Azure and Deep LearningDavid Giard
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and rollDavid Giard
 
Own your own career advice from a veteran consultant
Own your own career   advice from a veteran consultantOwn your own career   advice from a veteran consultant
Own your own career advice from a veteran consultantDavid Giard
 
You and Your Tech Community
You and Your Tech CommunityYou and Your Tech Community
You and Your Tech CommunityDavid Giard
 
Microsoft Azure IoT overview
Microsoft Azure IoT overviewMicrosoft Azure IoT overview
Microsoft Azure IoT overviewDavid Giard
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and rollDavid Giard
 
Big Data on azure
Big Data on azureBig Data on azure
Big Data on azureDavid Giard
 
Microsoft azure without microsoft
Microsoft azure without microsoftMicrosoft azure without microsoft
Microsoft azure without microsoftDavid Giard
 
Azure mobile apps
Azure mobile appsAzure mobile apps
Azure mobile appsDavid Giard
 
Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesDavid Giard
 
Effective Data Visualization
Effective Data VisualizationEffective Data Visualization
Effective Data VisualizationDavid Giard
 
Angular2 and TypeScript
Angular2 and TypeScriptAngular2 and TypeScript
Angular2 and TypeScriptDavid Giard
 

More from David Giard (20)

Data Visualization - CodeMash 2022
Data Visualization - CodeMash 2022Data Visualization - CodeMash 2022
Data Visualization - CodeMash 2022
 
Azure data factory
Azure data factoryAzure data factory
Azure data factory
 
Azure functions
Azure functionsAzure functions
Azure functions
 
University of Texas lecture: Data Science Tools in Microsoft Azure
University of Texas lecture: Data Science Tools in Microsoft AzureUniversity of Texas lecture: Data Science Tools in Microsoft Azure
University of Texas lecture: Data Science Tools in Microsoft Azure
 
University of Texas, Data Science, March 29, 2018
University of Texas, Data Science, March 29, 2018University of Texas, Data Science, March 29, 2018
University of Texas, Data Science, March 29, 2018
 
Intro to cloud and azure
Intro to cloud and azureIntro to cloud and azure
Intro to cloud and azure
 
Azure and deep learning
Azure and deep learningAzure and deep learning
Azure and deep learning
 
Azure and Deep Learning
Azure and Deep LearningAzure and Deep Learning
Azure and Deep Learning
 
Custom vision
Custom visionCustom vision
Custom vision
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and roll
 
Own your own career advice from a veteran consultant
Own your own career   advice from a veteran consultantOwn your own career   advice from a veteran consultant
Own your own career advice from a veteran consultant
 
You and Your Tech Community
You and Your Tech CommunityYou and Your Tech Community
You and Your Tech Community
 
Microsoft Azure IoT overview
Microsoft Azure IoT overviewMicrosoft Azure IoT overview
Microsoft Azure IoT overview
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and roll
 
Big Data on azure
Big Data on azureBig Data on azure
Big Data on azure
 
Microsoft azure without microsoft
Microsoft azure without microsoftMicrosoft azure without microsoft
Microsoft azure without microsoft
 
Azure mobile apps
Azure mobile appsAzure mobile apps
Azure mobile apps
 
Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web Services
 
Effective Data Visualization
Effective Data VisualizationEffective Data Visualization
Effective Data Visualization
 
Angular2 and TypeScript
Angular2 and TypeScriptAngular2 and TypeScript
Angular2 and TypeScript
 

Recently uploaded

What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Recently uploaded (20)

What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
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.
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

How I Learned to Stop Worrying and Love jQuery (Jan 2013)

  • 1. How I Learned To Stop Worrying and Love jQuery David Giard, Sogeti USA C# MVP MCTS, MCSD, MCSE, MCDBA DavidGiard.com @DavidGiard
  • 4. JavaScript in your page • <script type="text/javascript"> … </script> • <script type="text/javascript“ src=“xxx.js"> </script>
  • 5. JavaScript: The Good Parts • Interactive web pages • Fast • Ajax
  • 6. JavaScript: The Bad Parts • Cross-browser issues • Cross-platform issues
  • 7. JavaScript Frameworks • jQuery jQuery • Prototype • Dojo • Mootools • ExtJs • etc…
  • 8. jQuery • JavaScript Abstraction • Cross-Browser • Built-In Functions • Fast • Unobtrusive • Popular • Ships with Visual Studio 2010 and 2012
  • 11. jQuery Popularity • Twitter.com • Wikipedia.org • MLB.com • Amazon.com • Bing.com • Microsoft.com • Bit.ly • ESPN.com • Digg.com • Reddit.com • Netflix.com • WordPress.com
  • 12. Unobtrusive JavaScript • Obtrusive <a href=“” onclick=“DoSomething();”> Click Me </a> • Unobtrusive <script type="text/javascript"> $(document).ready(function(){ $(“#Link1”).click(function(){ DoSomething(); }); </script> <a href=“” id=“Link1”> Click Me </a>
  • 13. Enable jQuery • Download from jQuery.com • <script type="text/javascript" src="scripts/jquery-1.8.3.min.js"></script>
  • 14. Content Delivery Network • <script type="text/javascript" src=“http://ajax.microsoft.com/ajax/jquery/jquery-1.8.3.min.js"> </script> • <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"> </script> • <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js "> </script>
  • 15. Non-Minified JavaScript /*! * jQuery JavaScript Library v1.8.2 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time) */ (function( window, undefined ) { var // A central reference to the root jQuery(document) rootjQuery, // The deferred used on DOM ready
  • 16. Minified JavaScript (function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"- $1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d )?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}fu nction ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.creat eElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}f
  • 17. Document Object Model (DOM) <html> <head> <title>My Page</title> <script type="text/javascript“ src="http://code.jquery.com/jquery-1.7.1.min.js "> Document </script> </head> <body> Head Body <div> <p> Title a <a href="Page2.htm">link</a> Div This Script Div </p> </div> <div> P UL Colors: <ul> <li>Red</li> A LI LI LI <li>Orange</li> <li>Yellow</li> </ul> </div> </body> </html>
  • 18. Getting an Element <script type="text/javaScript"> var id = "Div1"; var myDiv = document.GetElementById(id); </script> … <div id="Div1"> … </div>
  • 19. Cross-Browser • Javascript var id = "Div1"; var elm = null; if (document.getElementById) { elm = document.getElementById(id); } else if (document.all) { elm = document.all[id]; } else if (document.layers) { elm = document.layers[id]; } • jQuery var elm = $("#Div1");
  • 20. jQuery Syntax • jQuery keyword • Selectors • Events • Functions / Methods
  • 21. “jQuery” Keyword • jQuery • $ • Represents the jQuery object • Indicates what follows is jQuery
  • 22. Selectors • Returns a set of objects • Call method on each object • Bind event to each object
  • 23. CSS Selectors h2 { font-family: "Calibri"; Tag name font-size: 66pt; font-weight: bold; } .FootNote { font-family: "Calibri"; Class name font-size: 18pt; font-weight: bold; } #MyElement { font-family: “Times New Roman"; Element ID font-color: red; } div#MyDiv { font-family: “Arial"; Combine selectors font-size: 48pt; }
  • 24. jQuery Selectors • $(selector) • where selector is: Selector Select by… Example "#xxx" Id $("#MyDiv") ".xxx" className $(".MyClass") "xxx" element type $("a") xxx variable name $(document)
  • 26. Events $(document).ready(function(){ $("#MyDiv").click(function(){ … }); });
  • 27. Methods $(document).ready(function(){ $(“#MyDiv”).click(function(){ $(“a”).attr(“target”, “_blank”); }); });
  • 28. Methods $(document).ready(function(){ $(“#MyDiv”).click(function(){ $(“a”).attr(“target”, “_blank”); }); });
  • 29. Methods $(function(){ $(“#MyDiv”).click(function(){ $(“a”).attr(“target”, “_blank”); }); });
  • 30. Combining Selectors • Containership $(‘selector1 selector2’) Ex: $(‘div a’) • Narrow scope $(‘Selector1Selector2’) Ex: $(‘a#MyLink’)
  • 31. Set-based Selectors • $("div:first") • $("div:last") • $("div:even") • $("div:odd")
  • 32. Ajax • Call web service from jQuery
  • 33. Ajax $.ajax({ url: "CustomerWs.asmx/GetCustomerName", dataType: "text", type: "POST", data: {}, error: function (err) { // Code to run when error returned }, success: function (data) { // Code to run when successfully returned }
  • 34. Plug-Ins • jQuery is extensible! • jQueryUI
  • 38. David Giard • DavidGiard.com • TechnologyAndFriends.com • @DavidGiard.com

Editor's Notes

  1. Sour