SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Mobile and IBM Worklight
Best Practices
WebSphere User Group, Edinburgh, 24th Sept 2013
Andrew Ferrier
andrew.ferrier@uk.ibm.com
Contributions from:
Nick Maynard
Sean Bedford
Jon Marshall
and others….
Agenda
• Recap: Web 2.0 & Mobile Landscape
• Development Time
– Toolkits & Frameworks
• “Run” Time
– RESTful Services and WL Adapters
– Worklight Lifecycle – Build, Test, Deploy
• Updates/Other Best Practices
Web 1.0: what we used to do
 Static HTML content, little-
to-no-dynamicity
 Server-side-driven content
 Perhaps with a small amount of
JavaScript for effects or form
validation
 Traditionally written with a
variety of technologies –
Servlets, JSPs, PHP, etc.
Embrace Web 2.0
 Server-side-driven content
 J2EE, Servlets, JSPs, PHP, etc.
 Rich client-side
JavaScript
 XHRs for data over
RESTful Services
 JSON Payloads
Hire the Skills Needed!
(The Programming Model)
Understand the Mobile Landscape
Understand Worklight
Native Shell
Web Code
<!DOCTYPE html PUBLIC
<html>
<! - - created 2003-12-1
<head><title>XYZ</title
</head>
</body>
</html>
Device APIs
Understand Worklight
EnterpriseBackendSystems&
CloudServices
Worklight Server
User authentication and
mobile trust
Mashups and service
composition
JSON Translation
Adapter Library for
backend connectivity
StatsAggregation
Unified Push
Notifications
Client-Side
App Resources
Direct Update
Mobile
Web Apps
Device Runtime
Cross-Platform
Compatibility Layer
Encrypted and
Syncable Storage
Runtime Skinning
Server Integration
Framework
Reporting for Statistics
and Diagnostics
ApplicationCode
HTML5, Hybrid,
and Native Coding
Optimization
Framework
Integrated Device
SDKs
3rd Party Library
Integration
BuildEngine
Worklight Studio
Worklight Console
Push /SMS
Management
Reporting and
Analytics
App Version
Management
Public App Stores
Worklight Application Center
Development Team Provisioning
App Feedback Management
Enterprise App Provisioning
and Governance
Blackberry
Android
iOS
Windows
Phone
Java ME
Windows 8
SDKs
Mobile Web
Desktop Web
1 2 3
4
5
TOOLKITS AND FRAMEWORKS
Use a Toolkit
• JavaScript-based libraries, written in
JavaScript, used on top of JavaScript itself
• Why?
– Smooth out the JavaScript’s rough edges
– Add additional features, UI widgets, etc.
Use Dojo
• The largest players in the market are
• Generally, IBM „prefers‟ Dojo
– Shipped with IBM Worklight, WebSphere
Feature Pack for Web 2.0 and Mobile, etc..
Why Dojo?
• Enterprise-grade toolkit and feature set
• Stronger support for structuring large
applications
– e.g. Class system (dojo/declare)
• Better focus on internationalization,
accessibility, etc.
• But jQuery is a supported choice too
for Worklight and still a sensible choice
Consider using framework(s)
• Coding without a JS
toolkit in 2013 is like
entering the program
in binary
• Frameworks sit on
top of a toolkit, but
gives you other things
that are missing. HTML CSS JS
Toolkit
Framework
Your Application
Consider using framework(s)
• For example, a framework might give you:
– Endpoint management (stubbing)
– State / session management
– Responsive Design Benefits (e.g. dojox/app)
– Templating
– Single-page architecture support
– Standardised error-handling
– (… other application-level stuff)
Framework Options
• For Dojo:
– Dojo itself - dojox/mobile, dojox/app,
dojox/mvc
– issw/mobile & issw/pocMobile
– Your own custom framework
• Not as bad an idea as it sounds!
• For jQuery:
– Angular (MVW), mustache (templating),
RequireJS (code loading), Knockout (MVC),
Backbone (MVC), Handlebar (templating)
etc...
Prefer Single Page Architecture
http://x.com/page1
Submit
http://x.com/page2
HTTP
Server
http://x.com/page1
Submit
HTTP
Server
MPA SPA
Page 1 Page 2 Page 2Page 1
Prefer Single Page Architecture
• (… for mobile at least)
• Only one.html page
• Improves performance
• Dojo Mobile has this concept built in –
dojox/mobile/View
• Reuse this concept for Hybrid too
Understand Debugging Options
• iOS 6+: Web Inspector
(Physical & Emulated
Phone)
• Android 4.x: Chrome
Remote Debugging
• Desktop Browser with
Debugging Support –
Chrome, Firefox + Firebug
(plain or Worklight
simulator)
• Worklight logging
• Etc…
RESTFUL SERVICES AND WL
ADAPTERS
RESTful Services
• The world (at least UIs)
are moving to simpler
services
– A RESTful style - plain HTTP
GET, PUT, POST, DELETE
– JSON as the data format
• Practically mandatory for
consumption by Web 2.0
clients
GET
http://mycorp.com/customer/12
34
{
“name”: “Fred Bloggs”,
“address”: “123 Anytown”
}
RESTful Best Practices for Mobile Web
• Use verbs liberally: GET, PUT, POST,
DELETE
– http://mycorp.com/services/createCustomer
• Keep them stateless (independent)
• Don’t send data that’s not needed
– Keep payloads small
– Combine related services
• Think about cacheability
• Think about pagination / querying /
sorting
WL Adapters
• WL adds adapter framework
– Server-side JS and XML
components
– Client-side invocation using JS
API
• Supports HTTP, JMS, SQL,
and Cast Iron adapter types
– Most common use is HTTP
adapter to integrate with
JSON/REST or SOAP/HTTP
WL Adapters - REST & HTTP
• You could use RESTful services directly
from WL container with conventional
XHRs, but you lose:
– WL’s authentication mechanism for
services
– The ability to use the WL server as a
“choke point”
– WL Logging/Auditing
– Analytics integration – Tealeaf usage is
easier
Re-expose even RESTful services
• Even for services already exposed over
REST, re-expose them using the WL
HTTP Adapter.
– This is comparatively straightforward to
do.
• You can also use SOAP services from
WL
– Abilities are limited at the moment so for
more sophisticated scenarios, consider an
ESB (e.g. Cast Iron)
Consider Service & Adapter Versioning
• For RESTful Services:
URL: /maps/version/2/map?...
Custom HTTP Header: X-Version 2.1
Media Types/Content Negotiation:
application/json;version=1
• Versioning Worklight Adapters requires
renaming them
LIFECYCLE
Library Systems
• Worklight can work with most version
control systems that integrate with
Eclipse
• Common choices:
– Rational Team Concert (packaged w/ WL
as IBM Mobile Development Lifecycle
Solution)
– Git
– Subversion
Library Systems 2
• There are files that
must be excluded as
they are part of WL
generated
resources, see here:
– http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0
/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2
Fdevref%2Fr_integrating_with_source_contro.html
Building – Web Components
• You will want to automate your build
(minification)
• Worklight Hybrid: Consider a pre-build
approach for your web code.
– Faster dev time turnaround
• Mobile Web: Consider running a build
every time, using e.g. Dojo Build:
http://dojotoolkit.org/reference-
guide/1.9/build/
• Running jslint / jshint to catch JS errors
Building
• Then build WL project itself
• WL provides the <app-builder>
and <adapter-builder> ANT tasks
– Only builds the Server portion of the
projects - the .war customisation file,
the .wlapp file, and the .adapter files.
– You will need to build the .apk and
.ipa files using platform-native
process.
Building
• During build, externalise certain things:
– worklightServerRootUrl in application-
descriptor.xml
– server/conf/worklight.properties
– maxConcurrentConnectionsPerNode for
adapters
– domain, port for the backend service in
adapter.xml
Deploying
• Deploy the .war using relevant application
server method
– Whenever server/conf/* changes
• Deploy the .wlapp and .adapter server-side
portions of the application using <app-
deployer> and <adapter-deployer> ANT
tasks.
Deployment Topology
• Options include:
– WebSphere Application
Server ND - familiar
– WAS Liberty Profile –
simpler, newer
• Consider HTTPS, load
spraying
Deploying to Phones
• You still need to get the native application
(.ipa, .apk, etc.) onto your user‟s phones.
– Dev Time/Small/Adhoc Projects: Manual install
– Testing lifecycle: AppCenter - comes with WL
server editions
• Install via AppCenter Web or AppCenter App
– B2C: public App Stores (Apple App Store, Google
Play Store)
– B2E: IBM Endpoint Manager or similar
Testing
• Typically you‟ll want to test:
– Manual UI on physical phones
• Coverage across devices
– Automated UI - mocking framework and
automated test tool
• V6.0 - Mobile Test Workbench for Worklight
– (Worklight) Adapters / (Mobile Web) REST
Services - load / performance / functional
tests - just HTTP
Questions?
Andrew Ferrier
andrew.ferrier@uk.ibm.com
http://dojotipsntricks.com
UPDATES
Two Ways to Update - Method 1
• Update your web code
only
• Don’t change the version
number of the application
• Redeploy .wlapp only
• Implicitly encourages a
“Direct Update” next time
client connects.
Two Ways to Update - Method 2
• Method 2:
– Update web code and
custom native code
– Do update the
application version
number
– Re-release via binary
method (App Store, etc.)
Updating Worklight Itself
• Upgrade all studio instances and WL
environments
• All apps at all existing application versions
need to be re-built (.war/.wlapp/.adapter)
• Re-release an app using method 2
– Gets new Device Runtime onto end-users‟
phones
• But end-users can continue using old app;
wire protocol is backward-compatible
OTHER TIPS & BEST PRACTICES
Client-side Worklight
• Hybrid App: Don‟t optimize for size of
the client like you would do for Mobile
Web
• Nevertheless, there is still a browser
control underneath
• Use WL.Logger.{debug,error} API,
logging in development environment is
customizable, & log the username on
errors
Client-side Worklight
• Understand handling errors on client-
side, in particular adapter invocations:
– http://www.ibm.com/developerworks/websphere/techjournal/1212_p
aris/1212_paris.html?ca=drs-
• Use connectOnStartup: false, with
WL.Client.Connect() after startup -
gives more startup control
– Must be done for use of direct
updates, push
notifications, authentication, adapter use
Server-side Worklight JavaScript
• Discourage use of more than one adapter
– Cannot share JavaScript code (can share Java
though)
• Again, understand how to handle errors from
adapter invocations (same article).
• Again, use WL.Logger API - has various levels
of logging, can be configured on server. Log the
username on errors.
– Note: Log level control is currently limited with WAS

Weitere ähnliche Inhalte

Was ist angesagt?

Security and Mobile Application Management with Worklight
Security and Mobile Application Management with WorklightSecurity and Mobile Application Management with Worklight
Security and Mobile Application Management with WorklightIBM WebSphereIndia
 
Hybrid Applications with WebSphere commerce and Worklight
Hybrid Applications with WebSphere commerce and WorklightHybrid Applications with WebSphere commerce and Worklight
Hybrid Applications with WebSphere commerce and WorklightMohammad Omer Raza
 
DevBeat 2013 IBM Master Class presentation
DevBeat 2013 IBM Master Class presentationDevBeat 2013 IBM Master Class presentation
DevBeat 2013 IBM Master Class presentationLeigh Williamson
 
Soa architect summit mobile 2013_mar [compatibility mode]
Soa architect summit mobile 2013_mar [compatibility mode]Soa architect summit mobile 2013_mar [compatibility mode]
Soa architect summit mobile 2013_mar [compatibility mode]Sreeni Pamidala
 
Presentation build and connect apps, devices and data ibm worklight overview
Presentation   build and connect apps, devices and data ibm worklight overviewPresentation   build and connect apps, devices and data ibm worklight overview
Presentation build and connect apps, devices and data ibm worklight overviewxKinAnx
 
Worklight mobile v6
Worklight mobile v6 Worklight mobile v6
Worklight mobile v6 GameStop
 
Worklight 5.0 Webinar 7 12 V2
Worklight 5.0 Webinar 7 12 V2Worklight 5.0 Webinar 7 12 V2
Worklight 5.0 Webinar 7 12 V2gaborvodics
 
Nordics IBM Mobile Foundation Integration in Action
Nordics IBM Mobile Foundation Integration in ActionNordics IBM Mobile Foundation Integration in Action
Nordics IBM Mobile Foundation Integration in ActionIBM Danmark
 
Build and Connect Enterprise Mobile Applications from developerWorks Live!
Build and Connect Enterprise Mobile Applications from developerWorks Live! Build and Connect Enterprise Mobile Applications from developerWorks Live!
Build and Connect Enterprise Mobile Applications from developerWorks Live! Leigh Williamson
 
Application Development for IBM Connections with IBM Bluemix
Application Development  for IBM Connections with IBM BluemixApplication Development  for IBM Connections with IBM Bluemix
Application Development for IBM Connections with IBM BluemixIBM Connections Developers
 
IBM MobileFirst - Hybrid App Development
IBM MobileFirst - Hybrid App DevelopmentIBM MobileFirst - Hybrid App Development
IBM MobileFirst - Hybrid App DevelopmentWim Tobback
 
Apps, Apps, and More Apps: Meet the Very Best Open Source Apps from OpenNTF -...
Apps, Apps, and More Apps: Meet the Very Best Open Source Apps from OpenNTF -...Apps, Apps, and More Apps: Meet the Very Best Open Source Apps from OpenNTF -...
Apps, Apps, and More Apps: Meet the Very Best Open Source Apps from OpenNTF -...Bruce Elgort
 
Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...LetsConnect
 
Kony - The multi Channel Challenge
Kony - The multi Channel Challenge Kony - The multi Channel Challenge
Kony - The multi Channel Challenge mickeyheil
 
Kony Mobile Management
Kony Mobile ManagementKony Mobile Management
Kony Mobile ManagementDipesh Mukerji
 
architecture of mobile software applications
architecture of mobile software applicationsarchitecture of mobile software applications
architecture of mobile software applicationsHassan Dar
 
AnDevCon: Introduction to Darwino
AnDevCon: Introduction to DarwinoAnDevCon: Introduction to Darwino
AnDevCon: Introduction to DarwinoPhilippe Riand
 
IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016ICS User Group
 

Was ist angesagt? (20)

Security and Mobile Application Management with Worklight
Security and Mobile Application Management with WorklightSecurity and Mobile Application Management with Worklight
Security and Mobile Application Management with Worklight
 
Hybrid Applications with WebSphere commerce and Worklight
Hybrid Applications with WebSphere commerce and WorklightHybrid Applications with WebSphere commerce and Worklight
Hybrid Applications with WebSphere commerce and Worklight
 
DevBeat 2013 IBM Master Class presentation
DevBeat 2013 IBM Master Class presentationDevBeat 2013 IBM Master Class presentation
DevBeat 2013 IBM Master Class presentation
 
Soa architect summit mobile 2013_mar [compatibility mode]
Soa architect summit mobile 2013_mar [compatibility mode]Soa architect summit mobile 2013_mar [compatibility mode]
Soa architect summit mobile 2013_mar [compatibility mode]
 
Presentation build and connect apps, devices and data ibm worklight overview
Presentation   build and connect apps, devices and data ibm worklight overviewPresentation   build and connect apps, devices and data ibm worklight overview
Presentation build and connect apps, devices and data ibm worklight overview
 
Worklight mobile v6
Worklight mobile v6 Worklight mobile v6
Worklight mobile v6
 
Worklight 5.0 Webinar 7 12 V2
Worklight 5.0 Webinar 7 12 V2Worklight 5.0 Webinar 7 12 V2
Worklight 5.0 Webinar 7 12 V2
 
Nordics IBM Mobile Foundation Integration in Action
Nordics IBM Mobile Foundation Integration in ActionNordics IBM Mobile Foundation Integration in Action
Nordics IBM Mobile Foundation Integration in Action
 
Build and Connect Enterprise Mobile Applications from developerWorks Live!
Build and Connect Enterprise Mobile Applications from developerWorks Live! Build and Connect Enterprise Mobile Applications from developerWorks Live!
Build and Connect Enterprise Mobile Applications from developerWorks Live!
 
Application Development for IBM Connections with IBM Bluemix
Application Development  for IBM Connections with IBM BluemixApplication Development  for IBM Connections with IBM Bluemix
Application Development for IBM Connections with IBM Bluemix
 
IBM MobileFirst - Hybrid App Development
IBM MobileFirst - Hybrid App DevelopmentIBM MobileFirst - Hybrid App Development
IBM MobileFirst - Hybrid App Development
 
Apps, Apps, and More Apps: Meet the Very Best Open Source Apps from OpenNTF -...
Apps, Apps, and More Apps: Meet the Very Best Open Source Apps from OpenNTF -...Apps, Apps, and More Apps: Meet the Very Best Open Source Apps from OpenNTF -...
Apps, Apps, and More Apps: Meet the Very Best Open Source Apps from OpenNTF -...
 
Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...
 
Kony - The multi Channel Challenge
Kony - The multi Channel Challenge Kony - The multi Channel Challenge
Kony - The multi Channel Challenge
 
Kony plaform short
Kony plaform   shortKony plaform   short
Kony plaform short
 
Kony Mobile Management
Kony Mobile ManagementKony Mobile Management
Kony Mobile Management
 
architecture of mobile software applications
architecture of mobile software applicationsarchitecture of mobile software applications
architecture of mobile software applications
 
IBM Worklight Whitepaper
IBM Worklight WhitepaperIBM Worklight Whitepaper
IBM Worklight Whitepaper
 
AnDevCon: Introduction to Darwino
AnDevCon: Introduction to DarwinoAnDevCon: Introduction to Darwino
AnDevCon: Introduction to Darwino
 
IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016
 

Ähnlich wie Mobile and IBM Worklight Best Practices

SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. Kushan Lahiru Perera
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...Mark Roden
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5Vinayak Tavargeri
 
Cloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumCloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumSteven Miller
 
Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Lucas Jellema
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressDanilo Ercoli
 
GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGGDBologna
 
Introduction to Visual studio 2012
Introduction to Visual studio 2012 Introduction to Visual studio 2012
Introduction to Visual studio 2012 Prashant Chaudhary
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleIT Arena
 
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
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo MobileAndrew Ferrier
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuAppUniverz Org
 
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)TIMETOACT GROUP
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Ganesh Kondal
 
Google appenginejava.ppt
Google appenginejava.pptGoogle appenginejava.ppt
Google appenginejava.pptYoung Alista
 
Simple Cloud with Amazon Lightsail - Mike Coleman
Simple Cloud with Amazon Lightsail - Mike ColemanSimple Cloud with Amazon Lightsail - Mike Coleman
Simple Cloud with Amazon Lightsail - Mike ColemanAmazon Web Services
 
New Approaches to Faster Oracle Forms System Performance
New Approaches to Faster Oracle Forms System PerformanceNew Approaches to Faster Oracle Forms System Performance
New Approaches to Faster Oracle Forms System PerformanceCorrelsense
 

Ähnlich wie Mobile and IBM Worklight Best Practices (20)

SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5
 
Cloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumCloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming Curriculum
 
Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
 
GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPress
 
Introduction to Visual studio 2012
Introduction to Visual studio 2012 Introduction to Visual studio 2012
Introduction to Visual studio 2012
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
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
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
Google App Engine overview (GAE/J)
Google App Engine overview (GAE/J)Google App Engine overview (GAE/J)
Google App Engine overview (GAE/J)
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo Mobile
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. Wu
 
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
Google appenginejava.ppt
Google appenginejava.pptGoogle appenginejava.ppt
Google appenginejava.ppt
 
Simple Cloud with Amazon Lightsail - Mike Coleman
Simple Cloud with Amazon Lightsail - Mike ColemanSimple Cloud with Amazon Lightsail - Mike Coleman
Simple Cloud with Amazon Lightsail - Mike Coleman
 
New Approaches to Faster Oracle Forms System Performance
New Approaches to Faster Oracle Forms System PerformanceNew Approaches to Faster Oracle Forms System Performance
New Approaches to Faster Oracle Forms System Performance
 

Mehr von 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
 
Become a Bluemix Architect in 45 Minutes
Become a Bluemix Architect in 45 MinutesBecome a Bluemix Architect in 45 Minutes
Become a Bluemix Architect in 45 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
 
WebSphere User Group UK: Larger Applications with Worklight
WebSphere User Group UK: Larger Applications with WorklightWebSphere User Group UK: Larger Applications with Worklight
WebSphere User Group UK: Larger Applications with WorklightAndrew Ferrier
 

Mehr von Andrew Ferrier (10)

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
 
Become a Bluemix Architect in 45 Minutes
Become a Bluemix Architect in 45 MinutesBecome a Bluemix Architect in 45 Minutes
Become a Bluemix Architect in 45 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
 
WebSphere User Group UK: Larger Applications with Worklight
WebSphere User Group UK: Larger Applications with WorklightWebSphere User Group UK: Larger Applications with Worklight
WebSphere User Group UK: Larger Applications with Worklight
 

Kürzlich hochgeladen

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
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
 
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
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
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
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
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
 

Kürzlich hochgeladen (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
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...
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
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...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
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
 

Mobile and IBM Worklight Best Practices

  • 1. Mobile and IBM Worklight Best Practices WebSphere User Group, Edinburgh, 24th Sept 2013 Andrew Ferrier andrew.ferrier@uk.ibm.com Contributions from: Nick Maynard Sean Bedford Jon Marshall and others….
  • 2. Agenda • Recap: Web 2.0 & Mobile Landscape • Development Time – Toolkits & Frameworks • “Run” Time – RESTful Services and WL Adapters – Worklight Lifecycle – Build, Test, Deploy • Updates/Other Best Practices
  • 3. Web 1.0: what we used to do  Static HTML content, little- to-no-dynamicity  Server-side-driven content  Perhaps with a small amount of JavaScript for effects or form validation  Traditionally written with a variety of technologies – Servlets, JSPs, PHP, etc.
  • 4. Embrace Web 2.0  Server-side-driven content  J2EE, Servlets, JSPs, PHP, etc.  Rich client-side JavaScript  XHRs for data over RESTful Services  JSON Payloads
  • 5. Hire the Skills Needed! (The Programming Model)
  • 7. Understand Worklight Native Shell Web Code <!DOCTYPE html PUBLIC <html> <! - - created 2003-12-1 <head><title>XYZ</title </head> </body> </html> Device APIs
  • 8. Understand Worklight EnterpriseBackendSystems& CloudServices Worklight Server User authentication and mobile trust Mashups and service composition JSON Translation Adapter Library for backend connectivity StatsAggregation Unified Push Notifications Client-Side App Resources Direct Update Mobile Web Apps Device Runtime Cross-Platform Compatibility Layer Encrypted and Syncable Storage Runtime Skinning Server Integration Framework Reporting for Statistics and Diagnostics ApplicationCode HTML5, Hybrid, and Native Coding Optimization Framework Integrated Device SDKs 3rd Party Library Integration BuildEngine Worklight Studio Worklight Console Push /SMS Management Reporting and Analytics App Version Management Public App Stores Worklight Application Center Development Team Provisioning App Feedback Management Enterprise App Provisioning and Governance Blackberry Android iOS Windows Phone Java ME Windows 8 SDKs Mobile Web Desktop Web 1 2 3 4 5
  • 10. Use a Toolkit • JavaScript-based libraries, written in JavaScript, used on top of JavaScript itself • Why? – Smooth out the JavaScript’s rough edges – Add additional features, UI widgets, etc.
  • 11. Use Dojo • The largest players in the market are • Generally, IBM „prefers‟ Dojo – Shipped with IBM Worklight, WebSphere Feature Pack for Web 2.0 and Mobile, etc..
  • 12. Why Dojo? • Enterprise-grade toolkit and feature set • Stronger support for structuring large applications – e.g. Class system (dojo/declare) • Better focus on internationalization, accessibility, etc. • But jQuery is a supported choice too for Worklight and still a sensible choice
  • 13. Consider using framework(s) • Coding without a JS toolkit in 2013 is like entering the program in binary • Frameworks sit on top of a toolkit, but gives you other things that are missing. HTML CSS JS Toolkit Framework Your Application
  • 14. Consider using framework(s) • For example, a framework might give you: – Endpoint management (stubbing) – State / session management – Responsive Design Benefits (e.g. dojox/app) – Templating – Single-page architecture support – Standardised error-handling – (… other application-level stuff)
  • 15. Framework Options • For Dojo: – Dojo itself - dojox/mobile, dojox/app, dojox/mvc – issw/mobile & issw/pocMobile – Your own custom framework • Not as bad an idea as it sounds! • For jQuery: – Angular (MVW), mustache (templating), RequireJS (code loading), Knockout (MVC), Backbone (MVC), Handlebar (templating) etc...
  • 16. Prefer Single Page Architecture http://x.com/page1 Submit http://x.com/page2 HTTP Server http://x.com/page1 Submit HTTP Server MPA SPA Page 1 Page 2 Page 2Page 1
  • 17. Prefer Single Page Architecture • (… for mobile at least) • Only one.html page • Improves performance • Dojo Mobile has this concept built in – dojox/mobile/View • Reuse this concept for Hybrid too
  • 18. Understand Debugging Options • iOS 6+: Web Inspector (Physical & Emulated Phone) • Android 4.x: Chrome Remote Debugging • Desktop Browser with Debugging Support – Chrome, Firefox + Firebug (plain or Worklight simulator) • Worklight logging • Etc…
  • 19. RESTFUL SERVICES AND WL ADAPTERS
  • 20. RESTful Services • The world (at least UIs) are moving to simpler services – A RESTful style - plain HTTP GET, PUT, POST, DELETE – JSON as the data format • Practically mandatory for consumption by Web 2.0 clients GET http://mycorp.com/customer/12 34 { “name”: “Fred Bloggs”, “address”: “123 Anytown” }
  • 21. RESTful Best Practices for Mobile Web • Use verbs liberally: GET, PUT, POST, DELETE – http://mycorp.com/services/createCustomer • Keep them stateless (independent) • Don’t send data that’s not needed – Keep payloads small – Combine related services • Think about cacheability • Think about pagination / querying / sorting
  • 22. WL Adapters • WL adds adapter framework – Server-side JS and XML components – Client-side invocation using JS API • Supports HTTP, JMS, SQL, and Cast Iron adapter types – Most common use is HTTP adapter to integrate with JSON/REST or SOAP/HTTP
  • 23. WL Adapters - REST & HTTP • You could use RESTful services directly from WL container with conventional XHRs, but you lose: – WL’s authentication mechanism for services – The ability to use the WL server as a “choke point” – WL Logging/Auditing – Analytics integration – Tealeaf usage is easier
  • 24. Re-expose even RESTful services • Even for services already exposed over REST, re-expose them using the WL HTTP Adapter. – This is comparatively straightforward to do. • You can also use SOAP services from WL – Abilities are limited at the moment so for more sophisticated scenarios, consider an ESB (e.g. Cast Iron)
  • 25. Consider Service & Adapter Versioning • For RESTful Services: URL: /maps/version/2/map?... Custom HTTP Header: X-Version 2.1 Media Types/Content Negotiation: application/json;version=1 • Versioning Worklight Adapters requires renaming them
  • 27. Library Systems • Worklight can work with most version control systems that integrate with Eclipse • Common choices: – Rational Team Concert (packaged w/ WL as IBM Mobile Development Lifecycle Solution) – Git – Subversion
  • 28. Library Systems 2 • There are files that must be excluded as they are part of WL generated resources, see here: – http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0 /index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2 Fdevref%2Fr_integrating_with_source_contro.html
  • 29. Building – Web Components • You will want to automate your build (minification) • Worklight Hybrid: Consider a pre-build approach for your web code. – Faster dev time turnaround • Mobile Web: Consider running a build every time, using e.g. Dojo Build: http://dojotoolkit.org/reference- guide/1.9/build/ • Running jslint / jshint to catch JS errors
  • 30. Building • Then build WL project itself • WL provides the <app-builder> and <adapter-builder> ANT tasks – Only builds the Server portion of the projects - the .war customisation file, the .wlapp file, and the .adapter files. – You will need to build the .apk and .ipa files using platform-native process.
  • 31. Building • During build, externalise certain things: – worklightServerRootUrl in application- descriptor.xml – server/conf/worklight.properties – maxConcurrentConnectionsPerNode for adapters – domain, port for the backend service in adapter.xml
  • 32. Deploying • Deploy the .war using relevant application server method – Whenever server/conf/* changes • Deploy the .wlapp and .adapter server-side portions of the application using <app- deployer> and <adapter-deployer> ANT tasks.
  • 33. Deployment Topology • Options include: – WebSphere Application Server ND - familiar – WAS Liberty Profile – simpler, newer • Consider HTTPS, load spraying
  • 34. Deploying to Phones • You still need to get the native application (.ipa, .apk, etc.) onto your user‟s phones. – Dev Time/Small/Adhoc Projects: Manual install – Testing lifecycle: AppCenter - comes with WL server editions • Install via AppCenter Web or AppCenter App – B2C: public App Stores (Apple App Store, Google Play Store) – B2E: IBM Endpoint Manager or similar
  • 35. Testing • Typically you‟ll want to test: – Manual UI on physical phones • Coverage across devices – Automated UI - mocking framework and automated test tool • V6.0 - Mobile Test Workbench for Worklight – (Worklight) Adapters / (Mobile Web) REST Services - load / performance / functional tests - just HTTP
  • 38. Two Ways to Update - Method 1 • Update your web code only • Don’t change the version number of the application • Redeploy .wlapp only • Implicitly encourages a “Direct Update” next time client connects.
  • 39. Two Ways to Update - Method 2 • Method 2: – Update web code and custom native code – Do update the application version number – Re-release via binary method (App Store, etc.)
  • 40. Updating Worklight Itself • Upgrade all studio instances and WL environments • All apps at all existing application versions need to be re-built (.war/.wlapp/.adapter) • Re-release an app using method 2 – Gets new Device Runtime onto end-users‟ phones • But end-users can continue using old app; wire protocol is backward-compatible
  • 41. OTHER TIPS & BEST PRACTICES
  • 42. Client-side Worklight • Hybrid App: Don‟t optimize for size of the client like you would do for Mobile Web • Nevertheless, there is still a browser control underneath • Use WL.Logger.{debug,error} API, logging in development environment is customizable, & log the username on errors
  • 43. Client-side Worklight • Understand handling errors on client- side, in particular adapter invocations: – http://www.ibm.com/developerworks/websphere/techjournal/1212_p aris/1212_paris.html?ca=drs- • Use connectOnStartup: false, with WL.Client.Connect() after startup - gives more startup control – Must be done for use of direct updates, push notifications, authentication, adapter use
  • 44. Server-side Worklight JavaScript • Discourage use of more than one adapter – Cannot share JavaScript code (can share Java though) • Again, understand how to handle errors from adapter invocations (same article). • Again, use WL.Logger API - has various levels of logging, can be configured on server. Log the username on errors. – Note: Log level control is currently limited with WAS