SlideShare una empresa de Scribd logo
1 de 46
D06 Real-world Dojo Mobile Applications




     Andrew Ferrier | Web 2.0 / Mobile Consultant |
     IBM Software Services for WebSphere, UK




                                                      © IBM Corporation 2012
© IBM Corporation 2011
Agenda
• Recap: what is Web 2.0?

• What is Dojo/Dojo Mobile?

• Digression: What is Worklight?

• Project Lifecycle: Best Practices and
  Approach for building Dojo Mobile
  Applications
Recap: what is Web
       2.0?
Web 1.0 Model
   Static HTML content, little-
    to-no-dynamicity                    (1) User actions
                                         trigger HTTP
   Most folks know this                  request to a
    already                               web server

   Server-side-driven
    content
       Perhaps with a small            (2) Server does

        amount of JavaScript for       some processing

        effects or form validation           and
                                       returns an HTML
       Traditionally written with a    page to client
        variety of technologies –
        Servlets, JSPs, etc.
Has disadvantages...
   Interaction is awkward
   Slow response time – every action requires a
    entire page refresh
       W3C states that 1 second is highest acceptable
        response time for interactive action
   Often ugly, flickery, content
Web 2.0 Model
                             (1) User actions
   Browser using AJAX/     trigger JavaScript

    XHR to communicate      call to Ajax engine

    with server               (2) Ajax engine
                             Invokes asynch
   Lightweight RESTful           request
    Services (often using
                             (3) Server does
    JSON data)                processing and
                            returns XML to the
   Service Gateway or         Ajax engine

    other technology to       (4) Ajax engine

    proxy all service       Displays the XML
                              in the browser
    invocations
Recap: What is Dojo?
   Dojo is a set of common JavaScript libraries used for creating
    Ajax and DHTML web applications
   http://dojotoolkit.org
       Open Source
       Large widget collection (“dijits”)‫‏‬
       Powerful I/O (XHR)‫‏‬
       Data abstraction layer
       Event management
       Logging and debugging
       Extensible modular architecture
       Declarative and programmatic
What is Dojo’s Position?

• IBM supports, and contributes to, Dojo,
  through:

 • WebSphere Feature Pack for Web 2.0 and
   Mobile

 • IBM Worklight and Mobile Platform
What is Dojo Mobile?

• Dojo-based widget set
  specifically for building
  mobile applications

• Available since Dojo 1.5+

• Mobile web with native look
  ‘n’ feel
What’s Different about
    Dojo Mobile?
• Extra-lightweight widgets

 • No support for non-WebKit browsers by
   default (e.g. Firefox)

• No use of images

• Encourages dojox.mobile.View model where
  pages are dynamically loaded into DOM
Example of View
                    Navigation
<body>

         <View id=ViewA>

           <Heading>ViewA</Heading>

           <RoundRectList>

            <ListItem moveTo=ViewB>Item 1</ListItem>


             <ListItem moveTo=ViewB>Item 2</ListItem>


             <ListItem moveTo=ViewB>Item 3</ListItem>




          <View id=ViewB>                               Slide

            <Heading moveTo="ViewA">ViewB</Heading>

           <RoundRectList>

               <ListItem>Video</ListItem>


               <ListItem>Maps</ListItem>


               <ListItem>Phone</ListItem>
A Digression: what is
       Worklight?
• IBM Worklight is a platform for developing
  mobile applications and web applications
Web                             Mobile Web                   Hybrid Mobile                     Native Mobile
                               Application                        Application                   Application                       Application
   Characteristics




                         Desktop and mobile using open       Mobile only using open web    Mobile only, app runs on the      Mobile only, developed using
                         web (HTML, JavaScript) client       (HTML5, JavaScript) client   device, but leverages open web   native languages or transcode to
                             programming models                programming models           (HTML5, JS) via JavaScript           native via MAP tools
                                                                                                        bridge
                          Limited to no device-specific          Off-line capabilities                                         Native appearance and
                                  functionality                                              Native device capabilities    device capabilities, performance
                                                                                             (GPS, camera, contacts)
                                                                                             Mimic native appearance



                                        Mobile Browser Execution                                       AppStore download and install
Traditional Trade-offs
(without MEAP/MAP)




                                                          Richness of Mobile Presentation / Services

                                                            Portability (cross-device reuse)

                                                                         Maintenance Cost (TCO)
IBM Worklight...
• ...can develop mobile websites and
  pure 'native' applications, but main
  focus is 'hybrid' applications, which:   Na#ve&Shell

                                            Web&Code
                                           <!DOCTYPE&html&PUBLIC
                                           <html>
                                           <!&>&>&created&2003>12>1


 • Reside in a native shell                <head><#tle>XYZ</#tle
                                           </head>
                                           </body>
                                           </html>




 • Are coded as mobile web                 Device&APIs

   applications, although may have
   some native components
IBM Worklight

• There are some Worklight-specific JavaScript
  APIs, but...

• Typically 90% of the content inside a
  Worklight Application is standard JavaScript

• So in this presentation we’ll focus on the 90%
Project Lifecycle
• Design

• Develop

• Build

• Test

• Deploy
Design: UX
• Work with a User EXperience designer

• Especially important for consumer-facing content

• Ensure they understand mobile:

  • Performance Considerations

  • Screen simplicity

  • Locality of site usage

  • Screen size variations (incl. Portrait / Landscape)

  • Touch input implications

  • Limitations/strengths of toolkit and web model
Design: Usage
          Variations
• How will you handle:

 • Software platforms you don’t support?

 • m.mycorp.com or www.mycorp.com?

 • What happens if a customer wants to go to
   the full site on mobile? ...

 • .. Or the mobile on desktop?
Design: Simplicity
• Manage business expectations - keep pages
  simple

 • Minimal content, short phrases

 • Minimal or no promotional/ad content

 • No paragraphs of text

• Mobile websites are not regular websites crammed
  into a smaller space!
Design: Outputs
• Design

  • Pixel-perfect images of design

  • Working prototype

  • Input into use case / design documents

• Style guide that specifies:

  • Minimum font size/size for interaction elements

  • L’n’F - platform-native or custom (examples)
Design: Platforms
• Decide early on which hardware platforms and
  versions you will support

 • Typical choices are iOS 4.0+, Android 2.2+

 • Affects look and feel

 • Affects the way pages scale across devices

   • Ensure prototype works on all intended devices
Design: Standards
• Use standard mobile paradigms

 • Headers, Lists, Dividers etc.

 • Dojo Mobile supports a lot of this OOB:

 • Also get multi-platform L’n’F for free:
Design: Bijits
• Consider componentising more complex
  pages or common elements between
  pages

• Using Bijit technique (i.e. a business-
  focused Dojo dijit) can work well here.

• Break page into reusable business-
  focused widgets (e.g. address entry)

• Put appropriate properties / events /
  methods on them

• Don’t overuse this on mobile
Design/Develop:
    Responsive Design
• Consider responsive design as an approach to
  managing differing screen sizes

 • Multi-column layouts on desktop / tablets




 • Single column layouts on phones
Design/Develop:
    Responsive Design

• Don’t apply responsive design naively to
  everything

• Many UI elements may be irrelevant on
  smaller devices anything requiring
  significant data entry
Develop: JavaScript
• JavaScript is not Java

• Follow JavaScript good practices

 • http://javascript.crockford.com/
   code.html

• Read and absorb “JavaScript: the
  Good Parts”

• Use Dojo’s class mechanism fully (a
  combination of AMD and declare)
Develop: MVC
• Think about Model-View-Controller

 • View: typically page content is represented
   using a dojox.mobile.View

 • Controller: often this is just a Dojo class, or
   might use dojox.app

 • Model: dojox.app can be used for this, but
   avoid for simple applications
Develop: MVC Options
• dojox.app: http://www.sitepen.com/blog/2011/09/30/
  dojox-app-a-single-page-application-framework/

• IBM services offerings

• Roll your own...

  • Simple controller classes

  • Use dojox/mvc for live data binding to store/model
Develop: Services

• Make all services use JSON payloads for
  simplicity:
        {
            “name”: “Fred Bloggs”,
            “address”: “123 Anytown”
        }
Develop: Services
   Find a way to describe JSON-based services
   Decouples implementation of UI from services
   No widely-accepted JSON schema description
       JSON is so simple, doesn't need one
Develop: Services
• Ignore Web 1.0 practice of rendering any content on the server -
  always render data

• Think about RESTful best practices:

  • Cacheability

  • Security

  • Fine-grained-ness (especially important for mobile, XHRs are
    expensive)

  • Pagination / Querying / Sorting

• Session D07 for more information
Develop: Persistence
• Think about short-term (session) data is
  persisted between ‘pages’

• Using dojox.mobile.View model, it can simply
  be saved as a local variable

• If real navigation is done, HTML5 local storage
  is an option

• Otherwise persist to server...
Develop: Other
        Considerations
• Think about standardized approaches for:

 • XHRs - error handling / envelope
   unwrapping etc.

 • Client-side validation

 • Error-handling
Develop/Build: AMD
• Use modern AMD constructs throughout: http://
  dojotoolkit.org/documentation/tutorials/1.7/modules/
  • require([moduleList], function() { // code here });

  • define([moduleList], function() { // factory function });


  • More fine-grained

  • More asynchronous

• Documentation, examples, tutorials, etc. still use
  dojo.require() and dojo.provide() - don’t use these.
Build
• Optimise your build: http://dojotoolkit.org/
  reference-guide/1.8/build/

• Primarily for performance reasons (strip out
  unused code, also minifies remaining code)

• Particularly important for Mobile with slow
  connections
Build/Performance
• Set HTTP headers to cache static
  content: .js, .css, .html, .png, etc.

• Consider using AppCache in HTML5 to more
  permanently cache content

  • Whitelist REST services

  • Generate AppCache automatically - must
    contain everything required and nothing more
Test (for Developers)
• Developers can (and should) do 80% of
  testing in Chrome / Firefox

  • Debugging tools are far better

  • Google Chrome Mobile now allows
    remote debugging, though

  • If using Worklight, the simulator is useful
    for this

• iOS: Developers (with a Mac) can use iOS
  emulator to get pretty good fidelity

• Android: testing in the emulator is
  unwieldy and slow - consider using a real
  phone
Test (for Testers)
• iOS: Generally sufficient to test on one or two physical
  devices.

• Android: Huge diversity of UIs and UI tweaks to WebKit
  and browser. Consider all modern phones that user
  might use (experience tip: HTCs particularly painful)

• Consider a service such as DeviceAnywhere:

  • http://www.keynotedeviceanywhere.com/

• Testing team should also test on real phones
Test (for Testers)
• Think about how to simulate network issues

 • Test on real 3G/4G/non-Wifi data
   connections

 • Provide services with simulated slowdowns

 • Provide services with simulated failure
Test
• Instrument app during development to output to console,
  especially using a test build

  • Can use console.log(), console.error(), etc.

• Can turn on a basic web console:

  • Android: http://developer.android.com/guide/webapps/
    debugging.html

  • iOS: http://bit.ly/P9YTIb

• Always test with built version of Dojo, occasionally there are
  subtle bugs with build process
Deploy
• Need to find a way to ensure .html files refer to:

 • Unbuilt Dojo during development

 • Built Dojo in test / production

• Provide commented-out sections in all .html
  files which are switched automatically during
  build (e.g. in Ant script)
Key Points

• Design and test the app with an
  understanding of what platforms you are
  targeting

• Design specifically for mobile

• Decide your MVC architecture early on
Further Learning
• Summary of Features: http://dojotoolkit.org/
  features/mobile

• Tutorials: http://dojotoolkit.org/documentation/
  #mobile

• User Interface Design for the Mobile Web: http://
  www.ibm.com/developerworks/web/library/wa-
  interface/index.html

• Blog: http://dojotipsntricks.com/
http://demos.dojotoolkit.org/demos/mobileGallery/demo-
                      iphone.html
IBM WebSphere Technical Convention 2012 – Berlin, Germany

Questions?




As a reminder, please fill out a session evaluation


                                                                        © IBM Corporation 2012
IBM WebSphere Technical Convention 2012 – Berlin, Germany

Copyright Information
© Copyright IBM Corporation 2012. All Rights Reserved. IBM, the IBM logo, ibm.com, AppScan, CICS,
   Cloudburst, Cognos, CPLEX, DataPower, DB2, FileNet, ILOG, IMS, InfoSphere, Lotus, Lotus Notes,
   Maximo, Quickr, Rational, Rational Team Concert, Sametime, Tivoli, WebSphere, and z/OS are
   trademarks or registered trademarks of International Business Machines Corporation in the United
   States, other countries, or both. If these and other IBM trademarked terms are marked on their first
   occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S.
   registered or common law trademarks owned by IBM at the time this information was published. Such
   trademarks may also be registered or common law trademarks in other countries. A current list of IBM
   trademarks is available on the Web at “Copyright and trademark information” at ibm.com/legal/
   copytrade.shtml.
Coremetrics is a trademark or registered trademark of Coremetrics, Inc., an IBM Company.
SPSS is a trademark or registered trademark of SPSS, Inc. (or its affiliates), an IBM Company.
Unica is a trademark or registered trademark of Unica Corporation, an IBM Company.
Java and all Java-based trademarks and logos are trademarks of Oracle and/or its affiliates. Other
   company, product and service names may be trademarks or service marks of others. References in
   this publication to IBM products and services do not imply that IBM intends to make them available in
   all countries in which IBM operates.




                                                                                        © IBM Corporation 2012

Más contenido relacionado

La actualidad más candente

Kentico Technical Learning: Exploring jQuery Mobile
Kentico Technical Learning: Exploring jQuery MobileKentico Technical Learning: Exploring jQuery Mobile
Kentico Technical Learning: Exploring jQuery MobileThomas Robbins
 
Creating Mobile Websites with Kentico CMS 7
Creating Mobile Websites with Kentico CMS 7Creating Mobile Websites with Kentico CMS 7
Creating Mobile Websites with Kentico CMS 7Thomas Robbins
 
AD107 Microsoft SharePoint meets IBM Lotus Domino
AD107 Microsoft SharePoint meets IBM Lotus DominoAD107 Microsoft SharePoint meets IBM Lotus Domino
AD107 Microsoft SharePoint meets IBM Lotus DominoStephan H. Wissel
 
Briding the Gap between Desktop and Mobile publishing
Briding the Gap between Desktop and Mobile publishingBriding the Gap between Desktop and Mobile publishing
Briding the Gap between Desktop and Mobile publishingTom Deryckere
 
Grameen Solutions Application Development Featured Projects 2009 11 15
Grameen Solutions   Application Development Featured Projects 2009 11 15Grameen Solutions   Application Development Featured Projects 2009 11 15
Grameen Solutions Application Development Featured Projects 2009 11 15Grameen Solutions
 
Becoming an IBM Connections Developer
Becoming an IBM Connections DeveloperBecoming an IBM Connections Developer
Becoming an IBM Connections DeveloperRob Novak
 
Station Four: Web Redesign Presentation
Station Four: Web Redesign PresentationStation Four: Web Redesign Presentation
Station Four: Web Redesign Presentationcolberding
 
Usability In Mobile Applications
Usability In Mobile ApplicationsUsability In Mobile Applications
Usability In Mobile ApplicationsBruno Figueiredo
 
J query mobile tech talk
J query mobile tech talkJ query mobile tech talk
J query mobile tech talkwoliverj
 
Building mobile website with Joomla - Joomla!Days NL 2010 #jd10nl
Building mobile website with Joomla -  Joomla!Days NL 2010 #jd10nlBuilding mobile website with Joomla -  Joomla!Days NL 2010 #jd10nl
Building mobile website with Joomla - Joomla!Days NL 2010 #jd10nlJoomla!Days Netherlands
 
AD106 - IBM Lotus Domino XPages anywhere - Write them once, See them Everywhere
AD106 - IBM Lotus Domino XPages anywhere - Write them once, See them EverywhereAD106 - IBM Lotus Domino XPages anywhere - Write them once, See them Everywhere
AD106 - IBM Lotus Domino XPages anywhere - Write them once, See them EverywhereStephan H. Wissel
 
Adobe AIR Development for the BlackBerry PlayBook
Adobe AIR Development for the BlackBerry PlayBookAdobe AIR Development for the BlackBerry PlayBook
Adobe AIR Development for the BlackBerry PlayBookKyle McInnes
 
Magic mobile webinar_Jan2013
Magic mobile webinar_Jan2013Magic mobile webinar_Jan2013
Magic mobile webinar_Jan2013Magic Software
 
Developing Exceptional Mobile Application
Developing Exceptional Mobile ApplicationDeveloping Exceptional Mobile Application
Developing Exceptional Mobile ApplicationVincent Perrin
 
Effectively using Nokia Web Tools 2.0 templates for Series 40 web apps
Effectively using Nokia Web Tools 2.0 templates for Series 40 web appsEffectively using Nokia Web Tools 2.0 templates for Series 40 web apps
Effectively using Nokia Web Tools 2.0 templates for Series 40 web appsMicrosoft Mobile Developer
 

La actualidad más candente (20)

Kentico Technical Learning: Exploring jQuery Mobile
Kentico Technical Learning: Exploring jQuery MobileKentico Technical Learning: Exploring jQuery Mobile
Kentico Technical Learning: Exploring jQuery Mobile
 
Creating Mobile Websites with Kentico CMS 7
Creating Mobile Websites with Kentico CMS 7Creating Mobile Websites with Kentico CMS 7
Creating Mobile Websites with Kentico CMS 7
 
AD107 Microsoft SharePoint meets IBM Lotus Domino
AD107 Microsoft SharePoint meets IBM Lotus DominoAD107 Microsoft SharePoint meets IBM Lotus Domino
AD107 Microsoft SharePoint meets IBM Lotus Domino
 
Briding the Gap between Desktop and Mobile publishing
Briding the Gap between Desktop and Mobile publishingBriding the Gap between Desktop and Mobile publishing
Briding the Gap between Desktop and Mobile publishing
 
DDive- Giuseppe Grasso - mobile su Lotus
DDive- Giuseppe Grasso - mobile su LotusDDive- Giuseppe Grasso - mobile su Lotus
DDive- Giuseppe Grasso - mobile su Lotus
 
Grameen Solutions Application Development Featured Projects 2009 11 15
Grameen Solutions   Application Development Featured Projects 2009 11 15Grameen Solutions   Application Development Featured Projects 2009 11 15
Grameen Solutions Application Development Featured Projects 2009 11 15
 
Resume
ResumeResume
Resume
 
Becoming an IBM Connections Developer
Becoming an IBM Connections DeveloperBecoming an IBM Connections Developer
Becoming an IBM Connections Developer
 
Station Four: Web Redesign Presentation
Station Four: Web Redesign PresentationStation Four: Web Redesign Presentation
Station Four: Web Redesign Presentation
 
Ideas for addictive series 40 web apps
Ideas for addictive series 40 web appsIdeas for addictive series 40 web apps
Ideas for addictive series 40 web apps
 
Usability In Mobile Applications
Usability In Mobile ApplicationsUsability In Mobile Applications
Usability In Mobile Applications
 
Gs Web Marketing Portfolio
Gs Web Marketing PortfolioGs Web Marketing Portfolio
Gs Web Marketing Portfolio
 
J query mobile tech talk
J query mobile tech talkJ query mobile tech talk
J query mobile tech talk
 
Building mobile website with Joomla - Joomla!Days NL 2010 #jd10nl
Building mobile website with Joomla -  Joomla!Days NL 2010 #jd10nlBuilding mobile website with Joomla -  Joomla!Days NL 2010 #jd10nl
Building mobile website with Joomla - Joomla!Days NL 2010 #jd10nl
 
AD106 - IBM Lotus Domino XPages anywhere - Write them once, See them Everywhere
AD106 - IBM Lotus Domino XPages anywhere - Write them once, See them EverywhereAD106 - IBM Lotus Domino XPages anywhere - Write them once, See them Everywhere
AD106 - IBM Lotus Domino XPages anywhere - Write them once, See them Everywhere
 
Adobe AIR Development for the BlackBerry PlayBook
Adobe AIR Development for the BlackBerry PlayBookAdobe AIR Development for the BlackBerry PlayBook
Adobe AIR Development for the BlackBerry PlayBook
 
Magic mobile webinar_Jan2013
Magic mobile webinar_Jan2013Magic mobile webinar_Jan2013
Magic mobile webinar_Jan2013
 
Developing Exceptional Mobile Application
Developing Exceptional Mobile ApplicationDeveloping Exceptional Mobile Application
Developing Exceptional Mobile Application
 
Getting Started with BB Development..
Getting Started with BB Development..Getting Started with BB Development..
Getting Started with BB Development..
 
Effectively using Nokia Web Tools 2.0 templates for Series 40 web apps
Effectively using Nokia Web Tools 2.0 templates for Series 40 web appsEffectively using Nokia Web Tools 2.0 templates for Series 40 web apps
Effectively using Nokia Web Tools 2.0 templates for Series 40 web apps
 

Similar a Real-world Dojo Mobile

Integrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenterIntegrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenterBrian Huff
 
Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Jeff Haynie
 
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator TitaniumMobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator TitaniumJeff Haynie
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application developmentKunjan Thakkar
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile DevelopmentManesh Lad
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development LandscapeAmbert Ho
 
Development Workshop on ET1, Android and Motorola RhoElements
Development Workshop on ET1, Android and Motorola RhoElementsDevelopment Workshop on ET1, Android and Motorola RhoElements
Development Workshop on ET1, Android and Motorola RhoElementsRomin Irani
 
Developing a native mobile apps using Ionic&Cordova
Developing a native mobile apps using Ionic&CordovaDeveloping a native mobile apps using Ionic&Cordova
Developing a native mobile apps using Ionic&CordovaDamir Beylkhanov
 
Understanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile ArchitecturesUnderstanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile ArchitecturesSalesforce Developers
 
Hybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSHybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSZvika Epstein
 
Synapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile applicationSynapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile applicationsaritasingh19866
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDee Sadler
 
Cross platform development - Rhomobile
Cross platform development - RhomobileCross platform development - Rhomobile
Cross platform development - RhomobileKonstantin Rybas
 
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicErmias Bayu
 
Top Ten Tips for HTML5/Mobile Web Development
Top Ten Tips for HTML5/Mobile Web DevelopmentTop Ten Tips for HTML5/Mobile Web Development
Top Ten Tips for HTML5/Mobile Web DevelopmentSimon Guest
 

Similar a Real-world Dojo Mobile (20)

Native Touches to your Hybrid Mobile Apps
Native Touches to your Hybrid Mobile AppsNative Touches to your Hybrid Mobile Apps
Native Touches to your Hybrid Mobile Apps
 
Integrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenterIntegrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenter
 
Mobile for the rest of us
Mobile for the rest of usMobile for the rest of us
Mobile for the rest of us
 
Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0
 
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator TitaniumMobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application development
 
Service worker API
Service worker APIService worker API
Service worker API
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
Development Workshop on ET1, Android and Motorola RhoElements
Development Workshop on ET1, Android and Motorola RhoElementsDevelopment Workshop on ET1, Android and Motorola RhoElements
Development Workshop on ET1, Android and Motorola RhoElements
 
Developing a native mobile apps using Ionic&Cordova
Developing a native mobile apps using Ionic&CordovaDeveloping a native mobile apps using Ionic&Cordova
Developing a native mobile apps using Ionic&Cordova
 
Understanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile ArchitecturesUnderstanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile Architectures
 
Hybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSHybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJS
 
Synapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile applicationSynapse india reviews on asp.net mobile application
Synapse india reviews on asp.net mobile application
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile design
 
20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
Cross platform development - Rhomobile
Cross platform development - RhomobileCross platform development - Rhomobile
Cross platform development - Rhomobile
 
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
 
Top Ten Tips for HTML5/Mobile Web Development
Top Ten Tips for HTML5/Mobile Web DevelopmentTop Ten Tips for HTML5/Mobile Web Development
Top Ten Tips for HTML5/Mobile Web Development
 

Más de Andrew Ferrier

Artificial Intelligence 101: What is It and Why is it Suddenly a Big Deal Again?
Artificial Intelligence 101: What is It and Why is it Suddenly a Big Deal Again?Artificial Intelligence 101: What is It and Why is it Suddenly a Big Deal Again?
Artificial Intelligence 101: What is It and Why is it Suddenly a Big Deal Again?Andrew Ferrier
 
What *Is* Cloud? - A introduction for non-techies
What *Is* Cloud? - A introduction for non-techiesWhat *Is* Cloud? - A introduction for non-techies
What *Is* Cloud? - A introduction for non-techiesAndrew Ferrier
 
Integration (Application?) Modernization with IBM Garage
Integration (Application?) Modernization with IBM GarageIntegration (Application?) Modernization with IBM Garage
Integration (Application?) Modernization with IBM GarageAndrew Ferrier
 
Why is Infrastructure-as-Code essential in the Cloud Age?
Why is Infrastructure-as-Code essential in the Cloud Age?Why is Infrastructure-as-Code essential in the Cloud Age?
Why is Infrastructure-as-Code essential in the Cloud Age?Andrew Ferrier
 
Become an IBM Cloud Architect in 40 Minutes
Become an IBM Cloud Architect in 40 MinutesBecome an IBM Cloud Architect in 40 Minutes
Become an IBM Cloud Architect in 40 MinutesAndrew Ferrier
 
Creating Effective Mobile Applications with IBM Bluemix
Creating Effective Mobile Applications with IBM BluemixCreating Effective Mobile Applications with IBM Bluemix
Creating Effective Mobile Applications with IBM BluemixAndrew Ferrier
 
Understanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container ServiceUnderstanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container ServiceAndrew Ferrier
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformAndrew Ferrier
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesAndrew Ferrier
 

Más de Andrew Ferrier (11)

Artificial Intelligence 101: What is It and Why is it Suddenly a Big Deal Again?
Artificial Intelligence 101: What is It and Why is it Suddenly a Big Deal Again?Artificial Intelligence 101: What is It and Why is it Suddenly a Big Deal Again?
Artificial Intelligence 101: What is It and Why is it Suddenly a Big Deal Again?
 
What *Is* Cloud? - A introduction for non-techies
What *Is* Cloud? - A introduction for non-techiesWhat *Is* Cloud? - A introduction for non-techies
What *Is* Cloud? - A introduction for non-techies
 
Integration (Application?) Modernization with IBM Garage
Integration (Application?) Modernization with IBM GarageIntegration (Application?) Modernization with IBM Garage
Integration (Application?) Modernization with IBM Garage
 
Why is Infrastructure-as-Code essential in the Cloud Age?
Why is Infrastructure-as-Code essential in the Cloud Age?Why is Infrastructure-as-Code essential in the Cloud Age?
Why is Infrastructure-as-Code essential in the Cloud Age?
 
Become an IBM Cloud Architect in 40 Minutes
Become an IBM Cloud Architect in 40 MinutesBecome an IBM Cloud Architect in 40 Minutes
Become an IBM Cloud Architect in 40 Minutes
 
Creating Effective Mobile Applications with IBM Bluemix
Creating Effective Mobile Applications with IBM BluemixCreating Effective Mobile Applications with IBM Bluemix
Creating Effective Mobile Applications with IBM Bluemix
 
Understanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container ServiceUnderstanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container Service
 
MEAPs meet the Cloud
MEAPs meet the CloudMEAPs meet the Cloud
MEAPs meet the Cloud
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst Platform
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best Practices
 
Worklight Overview
Worklight OverviewWorklight Overview
Worklight Overview
 

Último

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Último (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Real-world Dojo Mobile

  • 1. D06 Real-world Dojo Mobile Applications Andrew Ferrier | Web 2.0 / Mobile Consultant | IBM Software Services for WebSphere, UK © IBM Corporation 2012 © IBM Corporation 2011
  • 2. Agenda • Recap: what is Web 2.0? • What is Dojo/Dojo Mobile? • Digression: What is Worklight? • Project Lifecycle: Best Practices and Approach for building Dojo Mobile Applications
  • 3. Recap: what is Web 2.0?
  • 4. Web 1.0 Model  Static HTML content, little- to-no-dynamicity (1) User actions trigger HTTP  Most folks know this request to a already web server  Server-side-driven content  Perhaps with a small (2) Server does amount of JavaScript for some processing effects or form validation and returns an HTML  Traditionally written with a page to client variety of technologies – Servlets, JSPs, etc.
  • 5. Has disadvantages...  Interaction is awkward  Slow response time – every action requires a entire page refresh  W3C states that 1 second is highest acceptable response time for interactive action  Often ugly, flickery, content
  • 6. Web 2.0 Model (1) User actions  Browser using AJAX/ trigger JavaScript XHR to communicate call to Ajax engine with server (2) Ajax engine Invokes asynch  Lightweight RESTful request Services (often using (3) Server does JSON data) processing and returns XML to the  Service Gateway or Ajax engine other technology to (4) Ajax engine proxy all service Displays the XML in the browser invocations
  • 7. Recap: What is Dojo?  Dojo is a set of common JavaScript libraries used for creating Ajax and DHTML web applications  http://dojotoolkit.org  Open Source  Large widget collection (“dijits”)‫‏‬  Powerful I/O (XHR)‫‏‬  Data abstraction layer  Event management  Logging and debugging  Extensible modular architecture  Declarative and programmatic
  • 8. What is Dojo’s Position? • IBM supports, and contributes to, Dojo, through: • WebSphere Feature Pack for Web 2.0 and Mobile • IBM Worklight and Mobile Platform
  • 9. What is Dojo Mobile? • Dojo-based widget set specifically for building mobile applications • Available since Dojo 1.5+ • Mobile web with native look ‘n’ feel
  • 10. What’s Different about Dojo Mobile? • Extra-lightweight widgets • No support for non-WebKit browsers by default (e.g. Firefox) • No use of images • Encourages dojox.mobile.View model where pages are dynamically loaded into DOM
  • 11. Example of View Navigation <body> <View id=ViewA> <Heading>ViewA</Heading> <RoundRectList> <ListItem moveTo=ViewB>Item 1</ListItem> <ListItem moveTo=ViewB>Item 2</ListItem> <ListItem moveTo=ViewB>Item 3</ListItem> <View id=ViewB> Slide <Heading moveTo="ViewA">ViewB</Heading> <RoundRectList> <ListItem>Video</ListItem> <ListItem>Maps</ListItem> <ListItem>Phone</ListItem>
  • 12. A Digression: what is Worklight? • IBM Worklight is a platform for developing mobile applications and web applications
  • 13. Web Mobile Web Hybrid Mobile Native Mobile Application Application Application Application Characteristics Desktop and mobile using open Mobile only using open web Mobile only, app runs on the Mobile only, developed using web (HTML, JavaScript) client (HTML5, JavaScript) client device, but leverages open web native languages or transcode to programming models programming models (HTML5, JS) via JavaScript native via MAP tools bridge Limited to no device-specific Off-line capabilities Native appearance and functionality Native device capabilities device capabilities, performance (GPS, camera, contacts) Mimic native appearance Mobile Browser Execution AppStore download and install Traditional Trade-offs (without MEAP/MAP) Richness of Mobile Presentation / Services Portability (cross-device reuse) Maintenance Cost (TCO)
  • 14. IBM Worklight... • ...can develop mobile websites and pure 'native' applications, but main focus is 'hybrid' applications, which: Na#ve&Shell Web&Code <!DOCTYPE&html&PUBLIC <html> <!&>&>&created&2003>12>1 • Reside in a native shell <head><#tle>XYZ</#tle </head> </body> </html> • Are coded as mobile web Device&APIs applications, although may have some native components
  • 15. IBM Worklight • There are some Worklight-specific JavaScript APIs, but... • Typically 90% of the content inside a Worklight Application is standard JavaScript • So in this presentation we’ll focus on the 90%
  • 16. Project Lifecycle • Design • Develop • Build • Test • Deploy
  • 17. Design: UX • Work with a User EXperience designer • Especially important for consumer-facing content • Ensure they understand mobile: • Performance Considerations • Screen simplicity • Locality of site usage • Screen size variations (incl. Portrait / Landscape) • Touch input implications • Limitations/strengths of toolkit and web model
  • 18. Design: Usage Variations • How will you handle: • Software platforms you don’t support? • m.mycorp.com or www.mycorp.com? • What happens if a customer wants to go to the full site on mobile? ... • .. Or the mobile on desktop?
  • 19. Design: Simplicity • Manage business expectations - keep pages simple • Minimal content, short phrases • Minimal or no promotional/ad content • No paragraphs of text • Mobile websites are not regular websites crammed into a smaller space!
  • 20. Design: Outputs • Design • Pixel-perfect images of design • Working prototype • Input into use case / design documents • Style guide that specifies: • Minimum font size/size for interaction elements • L’n’F - platform-native or custom (examples)
  • 21. Design: Platforms • Decide early on which hardware platforms and versions you will support • Typical choices are iOS 4.0+, Android 2.2+ • Affects look and feel • Affects the way pages scale across devices • Ensure prototype works on all intended devices
  • 22. Design: Standards • Use standard mobile paradigms • Headers, Lists, Dividers etc. • Dojo Mobile supports a lot of this OOB: • Also get multi-platform L’n’F for free:
  • 23. Design: Bijits • Consider componentising more complex pages or common elements between pages • Using Bijit technique (i.e. a business- focused Dojo dijit) can work well here. • Break page into reusable business- focused widgets (e.g. address entry) • Put appropriate properties / events / methods on them • Don’t overuse this on mobile
  • 24. Design/Develop: Responsive Design • Consider responsive design as an approach to managing differing screen sizes • Multi-column layouts on desktop / tablets • Single column layouts on phones
  • 25. Design/Develop: Responsive Design • Don’t apply responsive design naively to everything • Many UI elements may be irrelevant on smaller devices anything requiring significant data entry
  • 26. Develop: JavaScript • JavaScript is not Java • Follow JavaScript good practices • http://javascript.crockford.com/ code.html • Read and absorb “JavaScript: the Good Parts” • Use Dojo’s class mechanism fully (a combination of AMD and declare)
  • 27. Develop: MVC • Think about Model-View-Controller • View: typically page content is represented using a dojox.mobile.View • Controller: often this is just a Dojo class, or might use dojox.app • Model: dojox.app can be used for this, but avoid for simple applications
  • 28. Develop: MVC Options • dojox.app: http://www.sitepen.com/blog/2011/09/30/ dojox-app-a-single-page-application-framework/ • IBM services offerings • Roll your own... • Simple controller classes • Use dojox/mvc for live data binding to store/model
  • 29. Develop: Services • Make all services use JSON payloads for simplicity: { “name”: “Fred Bloggs”, “address”: “123 Anytown” }
  • 30. Develop: Services  Find a way to describe JSON-based services  Decouples implementation of UI from services  No widely-accepted JSON schema description  JSON is so simple, doesn't need one
  • 31. Develop: Services • Ignore Web 1.0 practice of rendering any content on the server - always render data • Think about RESTful best practices: • Cacheability • Security • Fine-grained-ness (especially important for mobile, XHRs are expensive) • Pagination / Querying / Sorting • Session D07 for more information
  • 32. Develop: Persistence • Think about short-term (session) data is persisted between ‘pages’ • Using dojox.mobile.View model, it can simply be saved as a local variable • If real navigation is done, HTML5 local storage is an option • Otherwise persist to server...
  • 33. Develop: Other Considerations • Think about standardized approaches for: • XHRs - error handling / envelope unwrapping etc. • Client-side validation • Error-handling
  • 34. Develop/Build: AMD • Use modern AMD constructs throughout: http:// dojotoolkit.org/documentation/tutorials/1.7/modules/ • require([moduleList], function() { // code here }); • define([moduleList], function() { // factory function }); • More fine-grained • More asynchronous • Documentation, examples, tutorials, etc. still use dojo.require() and dojo.provide() - don’t use these.
  • 35. Build • Optimise your build: http://dojotoolkit.org/ reference-guide/1.8/build/ • Primarily for performance reasons (strip out unused code, also minifies remaining code) • Particularly important for Mobile with slow connections
  • 36. Build/Performance • Set HTTP headers to cache static content: .js, .css, .html, .png, etc. • Consider using AppCache in HTML5 to more permanently cache content • Whitelist REST services • Generate AppCache automatically - must contain everything required and nothing more
  • 37. Test (for Developers) • Developers can (and should) do 80% of testing in Chrome / Firefox • Debugging tools are far better • Google Chrome Mobile now allows remote debugging, though • If using Worklight, the simulator is useful for this • iOS: Developers (with a Mac) can use iOS emulator to get pretty good fidelity • Android: testing in the emulator is unwieldy and slow - consider using a real phone
  • 38. Test (for Testers) • iOS: Generally sufficient to test on one or two physical devices. • Android: Huge diversity of UIs and UI tweaks to WebKit and browser. Consider all modern phones that user might use (experience tip: HTCs particularly painful) • Consider a service such as DeviceAnywhere: • http://www.keynotedeviceanywhere.com/ • Testing team should also test on real phones
  • 39. Test (for Testers) • Think about how to simulate network issues • Test on real 3G/4G/non-Wifi data connections • Provide services with simulated slowdowns • Provide services with simulated failure
  • 40. Test • Instrument app during development to output to console, especially using a test build • Can use console.log(), console.error(), etc. • Can turn on a basic web console: • Android: http://developer.android.com/guide/webapps/ debugging.html • iOS: http://bit.ly/P9YTIb • Always test with built version of Dojo, occasionally there are subtle bugs with build process
  • 41. Deploy • Need to find a way to ensure .html files refer to: • Unbuilt Dojo during development • Built Dojo in test / production • Provide commented-out sections in all .html files which are switched automatically during build (e.g. in Ant script)
  • 42. Key Points • Design and test the app with an understanding of what platforms you are targeting • Design specifically for mobile • Decide your MVC architecture early on
  • 43. Further Learning • Summary of Features: http://dojotoolkit.org/ features/mobile • Tutorials: http://dojotoolkit.org/documentation/ #mobile • User Interface Design for the Mobile Web: http:// www.ibm.com/developerworks/web/library/wa- interface/index.html • Blog: http://dojotipsntricks.com/
  • 45. IBM WebSphere Technical Convention 2012 – Berlin, Germany Questions? As a reminder, please fill out a session evaluation © IBM Corporation 2012
  • 46. IBM WebSphere Technical Convention 2012 – Berlin, Germany Copyright Information © Copyright IBM Corporation 2012. All Rights Reserved. IBM, the IBM logo, ibm.com, AppScan, CICS, Cloudburst, Cognos, CPLEX, DataPower, DB2, FileNet, ILOG, IMS, InfoSphere, Lotus, Lotus Notes, Maximo, Quickr, Rational, Rational Team Concert, Sametime, Tivoli, WebSphere, and z/OS are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at ibm.com/legal/ copytrade.shtml. Coremetrics is a trademark or registered trademark of Coremetrics, Inc., an IBM Company. SPSS is a trademark or registered trademark of SPSS, Inc. (or its affiliates), an IBM Company. Unica is a trademark or registered trademark of Unica Corporation, an IBM Company. Java and all Java-based trademarks and logos are trademarks of Oracle and/or its affiliates. Other company, product and service names may be trademarks or service marks of others. References in this publication to IBM products and services do not imply that IBM intends to make them available in all countries in which IBM operates. © IBM Corporation 2012

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n