INTRODUCTION TO JQUERY MOBILE
FRAMEWORK
ABOUT THE AUTHOR
Name: Shreerang Patwardhan
A Sr. Web Developer with a MNC in India and loves the
Jquery Mobile Framework....
AGENDA
Overview
 Why mobile?
 What’s the big deal?
 The problem
 Responsive Web Design
 What’s Jquery Mobile?
 Why J...
WHY MOBILE?
Personal
 Billion Users
 Will be the #1 web
browsing device soon
 Makes users focus
 Always available
 … ...
WHAT’S THE BIG DEAL?

Web development is still HTML, CSS,
Javascript; isn’t it? What’s the big deal
with the mobile web th...
THE PROBLEM… WELL PROBLEMS
CLIENT REQUIREMENTS V/S WHAT IS
ACHIEVABLE
What Clients want

What is achievable
LOTS OF PLATFORMS















Tizen
Jolla
Firefox OS
Ubuntu OS
Android
iOS
Blackberry
Windows
Bada
Meego
...
LOTS OF MOBILE WEB BROWSERS


Too many



(some) too limited



(some) too innovative



(some) proxy based



(most)...
OTHER MAJOR CHALLENGES


Mobile devices available in several form factors (sizes)






Comparisons to native web app...
RESPONSIVE WEB DESIGN
INTRODUCTION TO RESPONSIVE WEB DESIGN
Why do we need RWD?
It is an approach aimed at crafting sites to provide
an Optimal ...
JQUERY MOBILE FRAMEWORK
INTRODUCTION TO JQUERY MOBILE
What is Jquery Mobile?
It is a unified UI system that works seamlessly
across popular mobile...
INTRODUCTION TO JQUERY MOBILE
Why Jquery Mobile?
Jquery Mobile is a new, easy to learn and simple to
use UI framework for ...
JQUERY MOBILE FEATURES
Lightweight and minimal dependency on images
 Progressive enhancement
 Responsive Design
 Powerf...
JQUERY MOBILE SUPPORTED PLATFORMS


Platform support is available in 3 grades
A-grade : Fully enhanced experience with AJ...
JQUERY MOBILE SUPPORTED PLATFORMS (AGRADE)
Platforms

Browsers

Apple iOS 3.2*-6.1

Chrome for Android 18

Android 2.1-2.3...
JQUERY MOBILE COMPONENTS
JQUERY MOBILE – SINGLE PAGE
ARCHITECTURE










Page is a primary unit of interaction in Jquery Mobile.
Jquery M...
JQUERY MOBILE – MARKUP ENHANCEMENT

Semantic
HTML Markup

Jquery Mobile
Page
Enhancements
JQUERY MOBILE – MULTI PAGE
ARCHITECTURE
Multiple “pages” are loaded by stacking multiple
divs with a data-role of “page”
...
JQUERY MOBILE – AJAX NAVIGATION &
TRANSITIONS






Jquery Mobile includes a navigation system to load pages into
the D...
JQUERY MOBILE - LISTVIEWS


















A listview is coded as a simple unordered list (ul) or an order...
JQUERY MOBILE – COLLAPSIBLE LISTVIEW
Creating a collapsible listview or in common terms
the Accordion control is simple wi...
JQUERY MOBILE – FORM ELEMENTS












All form elements are native form elements enhanced to make them
more ...
JQUERY MOBILE – TOOLBARS & NAVBARS


Header Toolbar







Footer Toolbar







Serves as a page title
Usually...
JQUERY MOBILE - DIALOGS
A page presented as a modal dialog.
 Implementation is done in 2 parts:


Anchor link with data-...
JQUERY MOBILE - POPUP


Wide range of implementation from a small tooltip to a
large photo lightbox.
Implementation is do...
JQUERY MOBILE - PANELS










Popular mode of providing site navigation
Panel markup is at the same level (sibl...
JQUERY MOBILE – TABLE: COLUMN TOGGLE
Selectively hide columns at narrower widths.
 Allows users to select which columns t...
JQUERY MOBILE – TABLE: REFLOW
A stacjed representation of table columns like
blocks of label/data pairs of each row.
 Tab...
JQUERY MOBILE - GRIDS
Jquery Mobile provides a simple way to build CSSbased clumns which can also be made responsive.
 Gr...
THEMEROLLER & SWATCHES
Jquery Mobile theme contains a global setting for
things like rounded corner radius and active (on)...
WHAT DESIGNERS SHOULD TAKE CARE OF..










Fixed footer should be avoided as it causes a lot of
issues in the i...
MOBILE APPLICATION DEBUGGING
DEBUGGING ON DESKTOP


Mozilla Firefox is your best friend.
Offers resizing your browser to various mobile device
sizes (...
DEBUGGING ON IOS PLATFORM
Remote debugging can now be done from iOS 6
and above.
 Connect your iOS 6 device to your Mac m...
DEBUGGING ON ANDROID PLATFORM


Requirements
Android device with Chrome browser installed
 Windows machine with Chrome b...
ADVANTAGES OF JQUERY MOBILE
Saves development time to a great extent.
 Accelerates the development
 Takes care of device...
DISADVANTAGES OF JQUERY MOBILE
Certain level of design constraints
 Customization overload

QUERIES?
You can redirect your queries on my blog “Spatial
Unlimited” or tweet me at @shreerangp
THANK YOU
- Shreerang Patwardhan
Upcoming SlideShare
Loading in …5
×

Introduction to j query mobile framework

2,354 views

Published on

In this presentation, we will take a look at all the components of Jquery Mobile 1.3.1. We will also cover the design constraints that need to be considered when using Jquery Mobile for a project. We will also take a look at the ways of effectively debugging our mobile web application from desktop as well as remote debugging.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,354
On SlideShare
0
From Embeds
0
Number of Embeds
1,342
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to j query mobile framework

  1. 1. INTRODUCTION TO JQUERY MOBILE FRAMEWORK
  2. 2. ABOUT THE AUTHOR Name: Shreerang Patwardhan A Sr. Web Developer with a MNC in India and loves the Jquery Mobile Framework. He actively blog about Jquery Mobile on his blog “Spatial Unlimited”.
  3. 3. AGENDA Overview  Why mobile?  What’s the big deal?  The problem  Responsive Web Design  What’s Jquery Mobile?  Why Jquery Mobile? Features  Compatibility (Supported Platforms)      Jquery Mobile Components (JQM 1.3.1 is used) Theming Debugging mobile applications Pros & Cons of Jquery Mobile
  4. 4. WHY MOBILE? Personal  Billion Users  Will be the #1 web browsing device soon  Makes users focus  Always available  … and everywhere 
  5. 5. WHAT’S THE BIG DEAL? Web development is still HTML, CSS, Javascript; isn’t it? What’s the big deal with the mobile web then?
  6. 6. THE PROBLEM… WELL PROBLEMS
  7. 7. CLIENT REQUIREMENTS V/S WHAT IS ACHIEVABLE What Clients want What is achievable
  8. 8. LOTS OF PLATFORMS               Tizen Jolla Firefox OS Ubuntu OS Android iOS Blackberry Windows Bada Meego Symbian S40 Nokia Proprietary … and about a ton more Further fragmented in versions as well…
  9. 9. LOTS OF MOBILE WEB BROWSERS  Too many  (some) too limited  (some) too innovative  (some) proxy based  (most) without documentation  (most) without a name  (most) without debugging tools  (some) touch based  (some) multi-touch based  (some) with zooming support  (most) unknown to web devs  (all) available in various versions
  10. 10. OTHER MAJOR CHALLENGES  Mobile devices available in several form factors (sizes)     Comparisons to native web applications    Speed Animations Lack of definitions    Mobile devices ranging from 2” to 5” Phablets ranging from 5” to 7” Tablets ranging from 7” to 10” Mobile web lacks standards and a defined set of rules There are no guidelines set to mobile web development Testing & Debugging     Device specific issues OS version specific issues Browser specific issues … and yes a combination of all the above
  11. 11. RESPONSIVE WEB DESIGN
  12. 12. INTRODUCTION TO RESPONSIVE WEB DESIGN Why do we need RWD? It is an approach aimed at crafting sites to provide an Optimal Viewing Experience across a wide range of devices.  Portrait and Landscape mode on the same device  Scalability across device form factors  All widths to be in percentage  Images should be responsive too… 
  13. 13. JQUERY MOBILE FRAMEWORK
  14. 14. INTRODUCTION TO JQUERY MOBILE What is Jquery Mobile? It is a unified UI system that works seamlessly across popular mobile device platforms.  Built on HTML5, CSS3, Jquery and Jquery UI.  A wide variety of mobile platforms are targeted, so that no browser or device is left behind.  All Jquery pages are built using a clean, semantic HTML to ensure compatibility with a wide range of platforms.  Accessibility features like the WAI-ARIA are tightly integrated. 
  15. 15. INTRODUCTION TO JQUERY MOBILE Why Jquery Mobile? Jquery Mobile is a new, easy to learn and simple to use UI framework for building cross-platform mobile web applications.  The framework is optimized to run on several phones, phablets, tablets, desktops and e-readers.  Helps create a unified user-experience across various platforms.  Constantly evolving and improving.  A large user base and community. 
  16. 16. JQUERY MOBILE FEATURES Lightweight and minimal dependency on images  Progressive enhancement  Responsive Design  Powerful AJAX-navigation system  Touch and mouse event support  Powerful theming framework  Easily customizable  Built on Jquery core  Compatible on various device platforms and mobile web browsers  HTML5 markup-driven configuration for fast development and minimal required scripting 
  17. 17. JQUERY MOBILE SUPPORTED PLATFORMS  Platform support is available in 3 grades A-grade : Fully enhanced experience with AJAX-based animated page transitions  B-grade : Enhanced experience without the AJAX navigation features  C-grade: Basic, non-enhanced HTML experience that is still functional 
  18. 18. JQUERY MOBILE SUPPORTED PLATFORMS (AGRADE) Platforms Browsers Apple iOS 3.2*-6.1 Chrome for Android 18 Android 2.1-2.3 Skyfire 4.1 Android 3.2 Opera Mobile 11.5-12 Android 4.0 UC Browser Windows Phone 7.5-7.8 Internet Explorer 8-10 Blackberry 6-10 Firefox Desktop 10-18 Blackberry Playbook (1.0-2.0) Opera Desktop 10-12 Palm WebOS (1.4-3.0) Safari Desktop 5-6 Firefox Mobile 18 Chrome Desktop 16-24 Tizen Meego 1.2 Samsung Bada 2.0 Kindle3, Fire and Fire HD
  19. 19. JQUERY MOBILE COMPONENTS
  20. 20. JQUERY MOBILE – SINGLE PAGE ARCHITECTURE        Page is a primary unit of interaction in Jquery Mobile. Jquery Mobile page must start with HTML5 doctype. In the head – references to Jquery, Jquery Mobile and Jquery Mobile CSS are all required to strat things off. Include the mobile spedific viewport meta tag. Inside the <body> tag, each view or “page” on the mobile device is identified with an element (usually a div) with the data-role=“page” attribute. For typical pages in Jquery Mobile, the intermediate children of a “page” are divs with data roles of “header”, “content” and “footer”. Demo link: Basic single page template
  21. 21. JQUERY MOBILE – MARKUP ENHANCEMENT Semantic HTML Markup Jquery Mobile Page Enhancements
  22. 22. JQUERY MOBILE – MULTI PAGE ARCHITECTURE Multiple “pages” are loaded by stacking multiple divs with a data-role of “page”  Each “page” block needs to have a unique id which is used to link internally.  All “pages” loaded at once and so available in the DOM at the same time.  Demo link: Basic multi page template 
  23. 23. JQUERY MOBILE – AJAX NAVIGATION & TRANSITIONS    Jquery Mobile includes a navigation system to load pages into the DOM via AJAX, enhance the new content, then display pages with a rich set of animated transitions. Jquery Mobile supports a wide range of animations for interpage transitions, opening/closing dialogs, pop-ups, panels and many such components. Transitions supported include:       Fade Slidefade Pop Flip Slide SlideUp Turn SlideDown Flow None Some patforms currently have issues with transitions, especially Android Devices that lack 3D support will fail for several transitions and fallback to “fade” Caution: Use transitions with care Demo link: Inter Page transitions
  24. 24. JQUERY MOBILE - LISTVIEWS                A listview is coded as a simple unordered list (ul) or an ordered list (ol) with data-role=“listview” attribute and has a wide range of features and theming. Read only ordered/unorderd Linked Inset Filter Filter reveal List dividers Auto list dividers Count bubbles Icons Thumbnails Split buttons Formatted content Theming icons Customization – The easy way & The challenging way
  25. 25. JQUERY MOBILE – COLLAPSIBLE LISTVIEW Creating a collapsible listview or in common terms the Accordion control is simple with Jquery Mobile.  Wrap your content within a div with datarole=“collapsible”  A collection of collapsibles can be created by wrapping the divs with data-role=“collapsible” within a div with data-role=“collapsible-set”  Collapsible/ Accordion  Collapsible Set 
  26. 26. JQUERY MOBILE – FORM ELEMENTS           All form elements are native form elements enhanced to make them more attractive and finger-friendly. HTML5 input types are further enhanced. Buttons Slider Range slider Flip switch Check boxes Radio buttons Selects Text inputs & Textareas Different styles with the basic input type text Other input types Advantage of HTML5 input types in the mobile web  Customizing the input type search      Native Form elements Refreshing form elements
  27. 27. JQUERY MOBILE – TOOLBARS & NAVBARS  Header Toolbar      Footer Toolbar      Serves as a page title Usually the first element inside each mobile page Usually contains page title and up to 2 buttons Demo link: Header Toolbar Usually the last element inside each mobile page More freedom compared to the header toolbar Usually contains a combination of text and buttons Demo link: Footer Toolbar Navbar A coded unordered list of links wrapped in a container element with data-role=“navbar”  Useful for providing up to 5 buttons with optional icons in a bar  Demo link: Navbar 
  28. 28. JQUERY MOBILE - DIALOGS A page presented as a modal dialog.  Implementation is done in 2 parts:  Anchor link with data-rel=“dialog”  A container element with data-role=“dialog”  Animation can be provided using data-transition attribute.  Jquery Mobile dialog can be implemented in 2 ways:  Using a multi-page approach  Including the dialog in a different HTML page altogether   Demo link: Dialog
  29. 29. JQUERY MOBILE - POPUP  Wide range of implementation from a small tooltip to a large photo lightbox. Implementation is done in 2 parts: Anchor link with data-rel=“dialog”  A container element with data-role=“dialog”         Animation can be provided using data-transition attribute Basic Popup Tooltip Photo lightbox Menu popup Nested menu popup Form popup
  30. 30. JQUERY MOBILE - PANELS         Popular mode of providing site navigation Panel markup is at the same level (sibling to) other components like header, content and footer inside a Jquery Mobile page. Animations can be provided for opening/closing a panel. Absolute positioned and fixed positioned panels are used. Responsive non-modal panel can be created for larger displays Basic Panel Panel with position fixed Responsive Panel
  31. 31. JQUERY MOBILE – TABLE: COLUMN TOGGLE Selectively hide columns at narrower widths.  Allows users to select which columns they want to see.  Set the priority for each column using “data-priority” attribute.  Important markup: <table data-role=“table” datamode=“columntoggle” id=“my-table”>  Demo link: Table: Column Toggle 
  32. 32. JQUERY MOBILE – TABLE: REFLOW A stacjed representation of table columns like blocks of label/data pairs of each row.  Table element should be with data-role=“table”  thead and tbody elements need to be included.  A preset responsive breakpoint can be applied via ui-responsive class.  Custom breakpoints can also be included.  Demo link: Table: Reflow 
  33. 33. JQUERY MOBILE - GRIDS Jquery Mobile provides a simple way to build CSSbased clumns which can also be made responsive.  Grids are       100% width Completely invisible (no borders, no backgrounds, no padding, no margins) Single, 2-column, 3-column, 4-column, 5-column and responsive Fixed column grid Responsive grid
  34. 34. THEMEROLLER & SWATCHES Jquery Mobile theme contains a global setting for things like rounded corner radius and active (on) states.  Up to 26 swatches lettered from A-Z can be creaated.  ThemeRoller allows for easy customization and creation of themes which can be shared and downloaded.  Demo link: http://jquerymobile.com/themeroller 
  35. 35. WHAT DESIGNERS SHOULD TAKE CARE OF..        Fixed footer should be avoided as it causes a lot of issues in the iOS and Android devices. JQM default styles which include background-gradient, rounded corners should be used. Icon sizes should always be double the actual size which is required for retina display devices. Inter-page transitions should be avoided as Android does not support transitions really well. Listviews should be an integral part of the design if Jquery Mobile framework is to be used. Large content in dialogs and popups must be avoided as scrolling the content in dialogs and popups results in several issues in various platforms and browsers. Tables with large number of columns and tabular layout in general should be avoided.
  36. 36. MOBILE APPLICATION DEBUGGING
  37. 37. DEBUGGING ON DESKTOP  Mozilla Firefox is your best friend. Offers resizing your browser to various mobile device sizes (Press Ctrl+Shift+M)  Firebug to override the Jquery Mobile default CSS.  User-agents help to some extent in resolving the platform OS version specific issues.  Caution: Changing user-agent does not help resolving platform-specific and device-specific issues. 
  38. 38. DEBUGGING ON IOS PLATFORM Remote debugging can now be done from iOS 6 and above.  Connect your iOS 6 device to your Mac machine and open up Safari browser on your machine.  Select the remote debugging option and you can debug your web page on the connected iOS device.  Requirements:  Mobile OS version: iOS 6  Mac machine  Safari browser on Mac machine version: 6.0+ 
  39. 39. DEBUGGING ON ANDROID PLATFORM  Requirements Android device with Chrome browser installed  Windows machine with Chrome browser installed  USB cable to connect the device to the machine.  USB debugging enabled on the Android device 
  40. 40. ADVANTAGES OF JQUERY MOBILE Saves development time to a great extent.  Accelerates the development  Takes care of device, OS and browser fragmentation to a great level.  Includes media queries that support a wide range of device form-factors  This framework is pretty light-weight.  A large user base and community for all the help that you need during development. 
  41. 41. DISADVANTAGES OF JQUERY MOBILE Certain level of design constraints  Customization overload 
  42. 42. QUERIES? You can redirect your queries on my blog “Spatial Unlimited” or tweet me at @shreerangp
  43. 43. THANK YOU - Shreerang Patwardhan

×