SlideShare ist ein Scribd-Unternehmen logo
1 von 43
BP103 jQuery - The world's most
                    popular JavaScript library comes to
                    XPages

                    Dr. Mark Roden
                    Senior Consultant, PSC Group LLC



© 2013 IBM Corporation
About Marky

 Over 15 years IBM Notes Domino® work
 Senior Consultant at PSC Group
  • XPages Developer
  • Project Leader
  • jQuery Specialist

 Contact Information
  –   Blog: http://www.xomino.com
  –   Email: mroden@psclistens.com
                                     www.psclistens.com   @pscgroup
  –   Twitter: @markyroden
  –   Skype: marky.roden
Agenda

 What is jQuery?
 What about Dojo? When should I use jQuery?
 How does jQuery work?
 How do I add jQuery to my XPages?
 What are jQuery plugins?
 How can jQuery plugins solve my requirements
Agenda

 What is jQuery?
 What about Dojo? When should I use jQuery?
 How does jQuery work?
 How do I add jQuery to my XPages?
 What are jQuery plugins?
 How can jQuery plugins solve my requirements
What is jQuery anyway?

 A JavaScript library which simplifies the common
  every day web development tasks of Document
  Model manipulation, event handling, animation and
  AJAX/JSON

 Created: June 2006 by John Resig

 Removes browser dependencies

 Open Source (MIT License)
What is jQuery anyway?

 60% of world‟s top 10,000 websites use jQuery
  http://trends.builtwith.com/javascript (*Dec 2012)

 Used by Microsoft .Net v4 as part of the ASP.NET AJAX
 framework

 Some websites you probably know using jQuery

      Amazon                     Google
      Twitter                    Dell
      Wordpress                  Bank of America
      Stackoverflow              Drupal
      BestBuy                    Wordpress
What is jQuery anyway?

 Core
  – Document Model (DOM) Manipulation
  – Simple Animations

 UI
  – Pre-packages functional capabilities
  – Analogous to Dojo Widgets

 Mobile
  – A unified, HTML5-based user interface system for all
    popular mobile device platforms, built on the rock-solid
    jQuery and jQuery UI foundation.
Agenda

 What is jQuery?
 What about Dojo? When should I use jQuery?
 How does jQuery work?
 How do I add jQuery to my XPages?
 What are jQuery plugins?
 How can jQuery plugins solve my requirements
What about Dojo? When should I use jQuery?

 Dojo and jQuery have the same basic premise:
  – Browser compatibility / Code simplification

 Many similar capabilities.
  – DOM manipulation
  – Widgets (Date pickers, sliders etc)

 Many differences
  – Dojo intended for larger client applications
  – jQuery intended to make coding as easy as possible
Where‟s the balance?

 Many factors determine the balance
  – Network connectivity
  – Functional requirements
  – Developmental experience with Dojo/jQuery
  – Project timeline
  – Maintainability of the application
  – jQuery v2.0 (future) will not support IE<9
    • “The entire jQuery core team instantly became giddy as they started
       ripping out oldIE support for jQuery 2.0.”
       17 Dec 2012 - Scott González (jQuery contributor)
Don‟t use jQuery when….

 There isn‟t a justifiable reason to use it
 jQuery is an additional download (~94k)
  – Version 1.8 does allow for exclusion of code which is not
    necessary

 When not to use jQuery :
  – Simple DOM manipulation
  – To provide functionality which is already provided by Dojo
    Widgets
  – To determine runtime events in the onLoad event
  – If you are using OneUI (*not for beginners)
  – Because you don‟t want to learn Dojo
Use jQuery when……

 Enhanced functionality not provided by Dojo
  – Specific jQuery or jQuery UI functionality
  – Specific Animation requirements
  – Broader browser compatibility

 The business plan supports jQuery usage
 The requirements are best suited to a jQuery
  solution

          >>>>> The Plugin Community <<<<
Agenda

 What is jQuery?
 What about Dojo? When should I use jQuery?
 How does jQuery work?
 How do I add jQuery to my XPages?
 What are jQuery plugins?
 How can jQuery plugins solve my requirements
How does jQuery work - API References
 API references                              Examples
Selectors               (“ELEMENT”)      (“.class”)         (“#idTag”)

Attributes              .attr()          .html()            .toggleClass()
Traversing              .children()      .closest()         .find()
Manipulation            .appendTo()      .css()             .val()
CSS                     .height()        .position()        .width()
Events                  .blur()          .bind()            .keypress()
Effects                 .animate()       .fadeIn()          .slideToggle()
Ajax                    .get()           .getJSON()         .serialize()
Utilities               .grep()          .each()            .inArray()
Internals               .error()         .pushStack()       .context()

                  Example API reference methods and properties
                              http://api.jquery.com
Select and conquer

1) Select the DOM elements you wish to affect

     $(„.myClass‟)            Select all elements with a class “myClass”

2) Concatenate the API reference to use

     $(„.myClass‟).css(„display‟, „none‟)    Set the display style to none

3) Execute
Chaining

 All methods/properties return a jQuery object
  – Allows for chaining of *all* other API references

  $("p")                              Select All Paragraph nodes
                                      Within each node find all words containing
        .find(":contains('t')")       the letter t
        .css('color','red')           Color those matches red

 Advantages
  –   Object reuse: Lower memory consumption and faster
  –   Shorter more manageable code
  –   Easier syntax for beginners
  –   Easy plugin creation
Agenda

 What is jQuery?
 What about Dojo? When should I use jQuery?
 How does jQuery work?
 How do I add jQuery to my XPages?
 What are jQuery plugins?
 How can jQuery plugins solve my requirements
Adding jQuery to the application

 jQuery is a Client Side JavaScript library
  – Can be added to the application
  – Can be referenced externally to the database


 jQuery plugins contain images and style sheets
  – A complete miniaturized application
  – More than just JavaScript Code
  – Could be complicated to maintain if all files were added
    as resources
Adding jQuery to the database

Download the jQuery library
  – http://jquery.com
  – Save in a “js” folder on your computer
Adding jQuery to the database

 Don‟t add it to the database as a file resource
 Don‟t add it to the database as a js library
 Domino Designer in Eclipse (DDE) reads and
  processes resources
  – More time consuming (slows DDE)

 Less maintainable
Adding jQuery to the database

 The WebContent folder
  – Acts like the root folder within your database
  – All files referenced to the .nsf/ in the URL
  – Much easier to maintain files in one place
  – Makes jQuery plugin management much easier
Adding jQuery to the database

 Drag and Drop the js folder into WebContent
Adding jQuery to the application

 Directly added to the XPage source panel

   <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
Adding jQuery to the application

 Through a Theme
  <resource>
     <content-type>application/x-javascript</content-type>
     <href>js/jquery-1.8.3.min.js</href>
  </resource>
Adding jQuery to your XPages - Example

 Modernizing a notes view
Adding User interactivity

 Add a basic viewPanel control to your XPage


                             An un-styled viewPanel

                             Functional but not aesthetically
                             pleasing
Adding User interactivity - demonstration

 Using jQuery, user interactivity can be added to a viewPanel
  to make it more functional and improve the user experience.




         The following link has an example of the demonstration
                     http://bit.ly/MarkyIC13Demo
Agenda

 What is jQuery?
 What about Dojo? When should I use jQuery?
 How does jQuery work?
 How do I add jQuery to my XPages?
 What are jQuery plugins?
 How can jQuery plugins solve my requirements
jQuery plugins

 Extensions of the jQuery API code base
 The plugin is called in the same was as a normal
  API reference
 $(„.myClass‟).doSomething()
 To achieve the desired functionality additional resources
  are often necessary
  – CSS
  – Images
  – Other JavaScript files
jQuery plugins

 Additional JavaScript Libraries
  – May also include
     • Images
     • CSS
  – Added to your XPage database
    through WebContent folder as
    before
jQuery plugins - example

 Joyride.js – Website feature tour

     – Requirement:
       • Provide a visual cue for website users
         to the new features available
       • Make it simple to use
       • Make it one time only




31
jQuery plugins - example

 Joyride – Website feature tour




     By clicking a button
     users are guided
     around the new
     website




32
jQuery plugins - example

 Joyride – Website feature tour




         All the properties available with the Joyride plugin



33
jQuery plugins

 For more information on how to add a jQuery
  plugin to your database:
 Notes in 9 Episode 74
  – Getting started with jQuery Plugins in XPages


                 http://bit.ly/Nin9Ep74
Agenda

 What is jQuery?
 What about Dojo? When should I use jQuery?
 How does jQuery work?
 How do I add jQuery to my XPages?
 What are jQuery plugins?
 How can jQuery plugins solve my requirements
Functionality in a box
 Yesterday your boss could have said:
  –“I need a slideshow adding to the website by tomorrow, needs
   to allow users to see thumbnails and cycle through them
   quickly…..”
 You would have panicked
 You could have remembered Google is your friend..
 and found a great reference on jQuery slideshows
 http://speckyboy.com/2009/06/03/15-amazing-jquery-
 image-galleryslideshow-plugins-and-tutorials/
 You would then have responded: “Which one sir?” 
Functionality in a box
 Over 3000 jQuery plugins created and registered

   Charting                    Modal Window
   Form Validation             Mobile
   Responsive Layouts          Web Typography
   Sliders                     Animation
   Galleries                   Tables
   Carousels                   Form Select and Combo
   Time and Date Pickers

   And almost all of them are FREE
Demonstrations

 Demonstrations of jQuery plugins in XPages can
  be found at:


   http://www.xomino.com/IBMConnect13Demo


             http://demo.xomino.com
 Questions and Answers


          http://www.xomino.com
          http://demo.xomino.com
          twitter: @MarkyRoden


 Please don‟t forget to do your evaluations
Legal disclaimer
     © IBM Corporation 2013. All Rights Reserved.


     The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is
              provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM‟s current product plans and strategy, which are subject to change by IBM without notice. IBM
              shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect
              of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.


     References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this
             presentation may change at any time at IBM‟s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way.
             Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.




40           © 2013 IBM Corporation
Extra Slides
Resources

 www.jquery.com
     Download the latest version
     Review the documentation
     Look through the Tutorials
 www.jqueryui.com
    Fantastic working examples/code
    Themebuilder
 www.jquerymobile.com
    Documentation
    Example code
    Example builder
 www.stackoverflow.com (*Jan 2013)
    ~267,000 questions/answers tagged jQuery !
    (~4,300 questions tagged Dojo)
    (~950 questions tagged XPages)

Weitere ähnliche Inhalte

Was ist angesagt?

jQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsjQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsBradley Holt
 
Html5 with SharePoint 2010
Html5 with SharePoint 2010Html5 with SharePoint 2010
Html5 with SharePoint 2010Hemant Joshi
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript WidgetsBob German
 
2012 - HTML5, CSS3 and jQuery with SharePoint 2010
2012 - HTML5, CSS3 and jQuery with SharePoint 20102012 - HTML5, CSS3 and jQuery with SharePoint 2010
2012 - HTML5, CSS3 and jQuery with SharePoint 2010Chris O'Connor
 
Ask the XPages Experts
Ask the XPages ExpertsAsk the XPages Experts
Ask the XPages ExpertsTeamstudio
 
Develop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveDevelop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveChris Love
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizationsChris Love
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Doris Chen
 
HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?Chris Mills
 
What's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovationWhat's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovationMarakana Inc.
 
Engineering the New LinkedIn Profile
Engineering the New LinkedIn ProfileEngineering the New LinkedIn Profile
Engineering the New LinkedIn ProfileJosh Clemm
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesedm00se
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 
Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Herman Peeren
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?Mike Wilcox
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryAlek Davis
 
Building an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stackBuilding an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stackdivyapisces
 
Building Web Sites that Work Everywhere
Building Web Sites that Work EverywhereBuilding Web Sites that Work Everywhere
Building Web Sites that Work EverywhereDoris Chen
 

Was ist angesagt? (20)

jQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsjQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchApps
 
Html5 with SharePoint 2010
Html5 with SharePoint 2010Html5 with SharePoint 2010
Html5 with SharePoint 2010
 
Flash And Dom
Flash And DomFlash And Dom
Flash And Dom
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript Widgets
 
2012 - HTML5, CSS3 and jQuery with SharePoint 2010
2012 - HTML5, CSS3 and jQuery with SharePoint 20102012 - HTML5, CSS3 and jQuery with SharePoint 2010
2012 - HTML5, CSS3 and jQuery with SharePoint 2010
 
Ask the XPages Experts
Ask the XPages ExpertsAsk the XPages Experts
Ask the XPages Experts
 
Develop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveDevelop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will love
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
 
HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?
 
What's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovationWhat's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovation
 
Engineering the New LinkedIn Profile
Engineering the New LinkedIn ProfileEngineering the New LinkedIn Profile
Engineering the New LinkedIn Profile
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPages
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
 
Building an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stackBuilding an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stack
 
Building Web Sites that Work Everywhere
Building Web Sites that Work EverywhereBuilding Web Sites that Work Everywhere
Building Web Sites that Work Everywhere
 

Andere mochten auch

Ibm worklight - going from xpages mobile to native mobile applications
Ibm worklight - going from xpages mobile to native mobile applicationsIbm worklight - going from xpages mobile to native mobile applications
Ibm worklight - going from xpages mobile to native mobile applicationsMark Roden
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationSean Burgess
 
Websockets: Pushing the web forward
Websockets: Pushing the web forwardWebsockets: Pushing the web forward
Websockets: Pushing the web forwardMark Roden
 
Angular.js in XPages
Angular.js in XPagesAngular.js in XPages
Angular.js in XPagesMark Roden
 
The fork in the road - the Application Modernization Roadmap for Notes/Domin...
The fork in the road -  the Application Modernization Roadmap for Notes/Domin...The fork in the road -  the Application Modernization Roadmap for Notes/Domin...
The fork in the road - the Application Modernization Roadmap for Notes/Domin...John Head
 
XPages Mobile Controls
XPages Mobile ControlsXPages Mobile Controls
XPages Mobile ControlsPeter Presnell
 
JMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityJMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityTony McGuckin
 
Wireless Wednesdays: Part 4
Wireless Wednesdays: Part 4Wireless Wednesdays: Part 4
Wireless Wednesdays: Part 4Teamstudio
 
Ich dachte, meine Website ist responsive. Aber was ich dann sah, war unglaubl...
Ich dachte, meine Website ist responsive. Aber was ich dann sah, war unglaubl...Ich dachte, meine Website ist responsive. Aber was ich dann sah, war unglaubl...
Ich dachte, meine Website ist responsive. Aber was ich dann sah, war unglaubl...Sebastian Schally
 
PHP UG Karlsruhe - Zend Framework Introduction
PHP UG Karlsruhe - Zend Framework IntroductionPHP UG Karlsruhe - Zend Framework Introduction
PHP UG Karlsruhe - Zend Framework Introductionmaexpower
 
High Security PHP Applications
High Security PHP ApplicationsHigh Security PHP Applications
High Security PHP Applicationsguest0e6d5e
 
Show110 | Using the XPages Extension Library for the Real World
Show110 | Using the XPages Extension Library for the Real WorldShow110 | Using the XPages Extension Library for the Real World
Show110 | Using the XPages Extension Library for the Real Worldpdhannan
 
App.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application DevelopmentApp.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application DevelopmentTeamstudio
 
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg Ralf Eggert
 
Entwicklercamp responive web design
Entwicklercamp   responive web designEntwicklercamp   responive web design
Entwicklercamp responive web designHenning Schmidt
 
Webentwicklung mit PHP und MySQL
Webentwicklung mit PHP und MySQLWebentwicklung mit PHP und MySQL
Webentwicklung mit PHP und MySQLKerstin Puschke
 
Domino, Notes, and Verse - Where are We and Whats the Future?
Domino, Notes, and Verse - Where are We and Whats the Future?Domino, Notes, and Verse - Where are We and Whats the Future?
Domino, Notes, and Verse - Where are We and Whats the Future?Teamstudio
 
The Skeleton And Joints Wk3
The Skeleton And Joints Wk3The Skeleton And Joints Wk3
The Skeleton And Joints Wk3MrHall
 

Andere mochten auch (20)

Ibm worklight - going from xpages mobile to native mobile applications
Ibm worklight - going from xpages mobile to native mobile applicationsIbm worklight - going from xpages mobile to native mobile applications
Ibm worklight - going from xpages mobile to native mobile applications
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
 
Websockets: Pushing the web forward
Websockets: Pushing the web forwardWebsockets: Pushing the web forward
Websockets: Pushing the web forward
 
Angular.js in XPages
Angular.js in XPagesAngular.js in XPages
Angular.js in XPages
 
The fork in the road - the Application Modernization Roadmap for Notes/Domin...
The fork in the road -  the Application Modernization Roadmap for Notes/Domin...The fork in the road -  the Application Modernization Roadmap for Notes/Domin...
The fork in the road - the Application Modernization Roadmap for Notes/Domin...
 
XPages Mobile Controls
XPages Mobile ControlsXPages Mobile Controls
XPages Mobile Controls
 
JMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityJMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages Scalability
 
Wireless Wednesdays: Part 4
Wireless Wednesdays: Part 4Wireless Wednesdays: Part 4
Wireless Wednesdays: Part 4
 
Ich dachte, meine Website ist responsive. Aber was ich dann sah, war unglaubl...
Ich dachte, meine Website ist responsive. Aber was ich dann sah, war unglaubl...Ich dachte, meine Website ist responsive. Aber was ich dann sah, war unglaubl...
Ich dachte, meine Website ist responsive. Aber was ich dann sah, war unglaubl...
 
PHP UG Karlsruhe - Zend Framework Introduction
PHP UG Karlsruhe - Zend Framework IntroductionPHP UG Karlsruhe - Zend Framework Introduction
PHP UG Karlsruhe - Zend Framework Introduction
 
PHP_Codesniffer
PHP_CodesnifferPHP_Codesniffer
PHP_Codesniffer
 
Baustein 07 grundlagen-html-css-php
Baustein 07 grundlagen-html-css-phpBaustein 07 grundlagen-html-css-php
Baustein 07 grundlagen-html-css-php
 
High Security PHP Applications
High Security PHP ApplicationsHigh Security PHP Applications
High Security PHP Applications
 
Show110 | Using the XPages Extension Library for the Real World
Show110 | Using the XPages Extension Library for the Real WorldShow110 | Using the XPages Extension Library for the Real World
Show110 | Using the XPages Extension Library for the Real World
 
App.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application DevelopmentApp.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application Development
 
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg
 
Entwicklercamp responive web design
Entwicklercamp   responive web designEntwicklercamp   responive web design
Entwicklercamp responive web design
 
Webentwicklung mit PHP und MySQL
Webentwicklung mit PHP und MySQLWebentwicklung mit PHP und MySQL
Webentwicklung mit PHP und MySQL
 
Domino, Notes, and Verse - Where are We and Whats the Future?
Domino, Notes, and Verse - Where are We and Whats the Future?Domino, Notes, and Verse - Where are We and Whats the Future?
Domino, Notes, and Verse - Where are We and Whats the Future?
 
The Skeleton And Joints Wk3
The Skeleton And Joints Wk3The Skeleton And Joints Wk3
The Skeleton And Joints Wk3
 

Ähnlich wie jQuery - the world's most popular java script library comes to XPages

Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQueryAnil Kumar
 
J query presentation
J query presentationJ query presentation
J query presentationakanksha17
 
J query presentation
J query presentationJ query presentation
J query presentationsawarkar17
 
jQuery - Web Engineering
jQuery - Web Engineering jQuery - Web Engineering
jQuery - Web Engineering adeel990
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks TriviaCognizant
 
Top 45 jQuery Interview Questions and Answers | Edureka
Top 45 jQuery Interview Questions and Answers | EdurekaTop 45 jQuery Interview Questions and Answers | Edureka
Top 45 jQuery Interview Questions and Answers | EdurekaEdureka!
 
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)Doris Chen
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryAlek Davis
 
jQuery - Chapter 1 - Introduction
 jQuery - Chapter 1 - Introduction jQuery - Chapter 1 - Introduction
jQuery - Chapter 1 - IntroductionWebStackAcademy
 
JavaScript Library Overview
JavaScript Library OverviewJavaScript Library Overview
JavaScript Library Overviewjeresig
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointRene Modery
 
Yeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web appsYeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web appsclimboid
 
jQuery From the Ground Up
jQuery From the Ground UpjQuery From the Ground Up
jQuery From the Ground UpKevin Griffin
 
Approaches to mobile site development
Approaches to mobile site developmentApproaches to mobile site development
Approaches to mobile site developmentErik Mitchell
 

Ähnlich wie jQuery - the world's most popular java script library comes to XPages (20)

Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
J query presentation
J query presentationJ query presentation
J query presentation
 
J query presentation
J query presentationJ query presentation
J query presentation
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
Jquery beltranhomewrok
Jquery beltranhomewrokJquery beltranhomewrok
Jquery beltranhomewrok
 
Jquery beltranhomewrok
Jquery beltranhomewrokJquery beltranhomewrok
Jquery beltranhomewrok
 
jQuery - Web Engineering
jQuery - Web Engineering jQuery - Web Engineering
jQuery - Web Engineering
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
Jquery
JqueryJquery
Jquery
 
Top 45 jQuery Interview Questions and Answers | Edureka
Top 45 jQuery Interview Questions and Answers | EdurekaTop 45 jQuery Interview Questions and Answers | Edureka
Top 45 jQuery Interview Questions and Answers | Edureka
 
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)
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
JQuery UI
JQuery UIJQuery UI
JQuery UI
 
jQuery - Chapter 1 - Introduction
 jQuery - Chapter 1 - Introduction jQuery - Chapter 1 - Introduction
jQuery - Chapter 1 - Introduction
 
JavaScript Library Overview
JavaScript Library OverviewJavaScript Library Overview
JavaScript Library Overview
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
 
Yeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web appsYeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web apps
 
jQuery From the Ground Up
jQuery From the Ground UpjQuery From the Ground Up
jQuery From the Ground Up
 
Approaches to mobile site development
Approaches to mobile site developmentApproaches to mobile site development
Approaches to mobile site development
 
J query
J queryJ query
J query
 

jQuery - the world's most popular java script library comes to XPages

  • 1. BP103 jQuery - The world's most popular JavaScript library comes to XPages Dr. Mark Roden Senior Consultant, PSC Group LLC © 2013 IBM Corporation
  • 2. About Marky  Over 15 years IBM Notes Domino® work  Senior Consultant at PSC Group • XPages Developer • Project Leader • jQuery Specialist  Contact Information – Blog: http://www.xomino.com – Email: mroden@psclistens.com www.psclistens.com @pscgroup – Twitter: @markyroden – Skype: marky.roden
  • 3. Agenda  What is jQuery?  What about Dojo? When should I use jQuery?  How does jQuery work?  How do I add jQuery to my XPages?  What are jQuery plugins?  How can jQuery plugins solve my requirements
  • 4. Agenda  What is jQuery?  What about Dojo? When should I use jQuery?  How does jQuery work?  How do I add jQuery to my XPages?  What are jQuery plugins?  How can jQuery plugins solve my requirements
  • 5. What is jQuery anyway?  A JavaScript library which simplifies the common every day web development tasks of Document Model manipulation, event handling, animation and AJAX/JSON Created: June 2006 by John Resig Removes browser dependencies Open Source (MIT License)
  • 6. What is jQuery anyway?  60% of world‟s top 10,000 websites use jQuery http://trends.builtwith.com/javascript (*Dec 2012) Used by Microsoft .Net v4 as part of the ASP.NET AJAX framework Some websites you probably know using jQuery Amazon Google Twitter Dell Wordpress Bank of America Stackoverflow Drupal BestBuy Wordpress
  • 7. What is jQuery anyway?  Core – Document Model (DOM) Manipulation – Simple Animations  UI – Pre-packages functional capabilities – Analogous to Dojo Widgets  Mobile – A unified, HTML5-based user interface system for all popular mobile device platforms, built on the rock-solid jQuery and jQuery UI foundation.
  • 8. Agenda  What is jQuery?  What about Dojo? When should I use jQuery?  How does jQuery work?  How do I add jQuery to my XPages?  What are jQuery plugins?  How can jQuery plugins solve my requirements
  • 9. What about Dojo? When should I use jQuery?  Dojo and jQuery have the same basic premise: – Browser compatibility / Code simplification  Many similar capabilities. – DOM manipulation – Widgets (Date pickers, sliders etc)  Many differences – Dojo intended for larger client applications – jQuery intended to make coding as easy as possible
  • 10. Where‟s the balance?  Many factors determine the balance – Network connectivity – Functional requirements – Developmental experience with Dojo/jQuery – Project timeline – Maintainability of the application – jQuery v2.0 (future) will not support IE<9 • “The entire jQuery core team instantly became giddy as they started ripping out oldIE support for jQuery 2.0.” 17 Dec 2012 - Scott González (jQuery contributor)
  • 11. Don‟t use jQuery when….  There isn‟t a justifiable reason to use it  jQuery is an additional download (~94k) – Version 1.8 does allow for exclusion of code which is not necessary  When not to use jQuery : – Simple DOM manipulation – To provide functionality which is already provided by Dojo Widgets – To determine runtime events in the onLoad event – If you are using OneUI (*not for beginners) – Because you don‟t want to learn Dojo
  • 12. Use jQuery when……  Enhanced functionality not provided by Dojo – Specific jQuery or jQuery UI functionality – Specific Animation requirements – Broader browser compatibility  The business plan supports jQuery usage  The requirements are best suited to a jQuery solution >>>>> The Plugin Community <<<<
  • 13. Agenda  What is jQuery?  What about Dojo? When should I use jQuery?  How does jQuery work?  How do I add jQuery to my XPages?  What are jQuery plugins?  How can jQuery plugins solve my requirements
  • 14. How does jQuery work - API References API references Examples Selectors (“ELEMENT”) (“.class”) (“#idTag”) Attributes .attr() .html() .toggleClass() Traversing .children() .closest() .find() Manipulation .appendTo() .css() .val() CSS .height() .position() .width() Events .blur() .bind() .keypress() Effects .animate() .fadeIn() .slideToggle() Ajax .get() .getJSON() .serialize() Utilities .grep() .each() .inArray() Internals .error() .pushStack() .context() Example API reference methods and properties http://api.jquery.com
  • 15. Select and conquer 1) Select the DOM elements you wish to affect $(„.myClass‟) Select all elements with a class “myClass” 2) Concatenate the API reference to use $(„.myClass‟).css(„display‟, „none‟) Set the display style to none 3) Execute
  • 16. Chaining  All methods/properties return a jQuery object – Allows for chaining of *all* other API references $("p") Select All Paragraph nodes Within each node find all words containing .find(":contains('t')") the letter t .css('color','red') Color those matches red  Advantages – Object reuse: Lower memory consumption and faster – Shorter more manageable code – Easier syntax for beginners – Easy plugin creation
  • 17. Agenda  What is jQuery?  What about Dojo? When should I use jQuery?  How does jQuery work?  How do I add jQuery to my XPages?  What are jQuery plugins?  How can jQuery plugins solve my requirements
  • 18. Adding jQuery to the application  jQuery is a Client Side JavaScript library – Can be added to the application – Can be referenced externally to the database  jQuery plugins contain images and style sheets – A complete miniaturized application – More than just JavaScript Code – Could be complicated to maintain if all files were added as resources
  • 19. Adding jQuery to the database Download the jQuery library – http://jquery.com – Save in a “js” folder on your computer
  • 20. Adding jQuery to the database  Don‟t add it to the database as a file resource  Don‟t add it to the database as a js library  Domino Designer in Eclipse (DDE) reads and processes resources – More time consuming (slows DDE)  Less maintainable
  • 21. Adding jQuery to the database  The WebContent folder – Acts like the root folder within your database – All files referenced to the .nsf/ in the URL – Much easier to maintain files in one place – Makes jQuery plugin management much easier
  • 22. Adding jQuery to the database  Drag and Drop the js folder into WebContent
  • 23. Adding jQuery to the application  Directly added to the XPage source panel <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
  • 24. Adding jQuery to the application  Through a Theme <resource> <content-type>application/x-javascript</content-type> <href>js/jquery-1.8.3.min.js</href> </resource>
  • 25. Adding jQuery to your XPages - Example  Modernizing a notes view
  • 26. Adding User interactivity  Add a basic viewPanel control to your XPage An un-styled viewPanel Functional but not aesthetically pleasing
  • 27. Adding User interactivity - demonstration  Using jQuery, user interactivity can be added to a viewPanel to make it more functional and improve the user experience. The following link has an example of the demonstration http://bit.ly/MarkyIC13Demo
  • 28. Agenda  What is jQuery?  What about Dojo? When should I use jQuery?  How does jQuery work?  How do I add jQuery to my XPages?  What are jQuery plugins?  How can jQuery plugins solve my requirements
  • 29. jQuery plugins  Extensions of the jQuery API code base  The plugin is called in the same was as a normal API reference  $(„.myClass‟).doSomething()  To achieve the desired functionality additional resources are often necessary – CSS – Images – Other JavaScript files
  • 30. jQuery plugins  Additional JavaScript Libraries – May also include • Images • CSS – Added to your XPage database through WebContent folder as before
  • 31. jQuery plugins - example  Joyride.js – Website feature tour – Requirement: • Provide a visual cue for website users to the new features available • Make it simple to use • Make it one time only 31
  • 32. jQuery plugins - example  Joyride – Website feature tour By clicking a button users are guided around the new website 32
  • 33. jQuery plugins - example  Joyride – Website feature tour All the properties available with the Joyride plugin 33
  • 34. jQuery plugins  For more information on how to add a jQuery plugin to your database:  Notes in 9 Episode 74 – Getting started with jQuery Plugins in XPages http://bit.ly/Nin9Ep74
  • 35. Agenda  What is jQuery?  What about Dojo? When should I use jQuery?  How does jQuery work?  How do I add jQuery to my XPages?  What are jQuery plugins?  How can jQuery plugins solve my requirements
  • 36. Functionality in a box  Yesterday your boss could have said: –“I need a slideshow adding to the website by tomorrow, needs to allow users to see thumbnails and cycle through them quickly…..”  You would have panicked  You could have remembered Google is your friend.. and found a great reference on jQuery slideshows  http://speckyboy.com/2009/06/03/15-amazing-jquery- image-galleryslideshow-plugins-and-tutorials/  You would then have responded: “Which one sir?” 
  • 37. Functionality in a box  Over 3000 jQuery plugins created and registered Charting Modal Window Form Validation Mobile Responsive Layouts Web Typography Sliders Animation Galleries Tables Carousels Form Select and Combo Time and Date Pickers And almost all of them are FREE
  • 38. Demonstrations  Demonstrations of jQuery plugins in XPages can be found at: http://www.xomino.com/IBMConnect13Demo http://demo.xomino.com
  • 39.  Questions and Answers http://www.xomino.com http://demo.xomino.com twitter: @MarkyRoden  Please don‟t forget to do your evaluations
  • 40. Legal disclaimer © IBM Corporation 2013. All Rights Reserved. The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM‟s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM‟s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. 40 © 2013 IBM Corporation
  • 41.
  • 43. Resources  www.jquery.com Download the latest version Review the documentation Look through the Tutorials www.jqueryui.com Fantastic working examples/code Themebuilder www.jquerymobile.com Documentation Example code Example builder www.stackoverflow.com (*Jan 2013) ~267,000 questions/answers tagged jQuery ! (~4,300 questions tagged Dojo) (~950 questions tagged XPages)