SlideShare a Scribd company logo
Connecting Xamarin
Apps with
IBM Worklight
Chief Architect, IBM MobileFirst
gtruty@us.ibm.com
Greg Truty
Introducing IBM Worklight
With the Worklight SDK for Xamarin
developers Enterprise grade security,
integration and app management following
features of Worklight
Security and Trust
• Single sign-on mechanism
• SSL encryption
• Multi-factor authentication
• Secured offline access
• On device encryption of user data
Enterprise Integration
• Direct access to back-end systems
• Leverage existing SOA services
• Server-side caching
• Unified push and SMS notifications
Application Management
• App distribution
• App Version management
• Remote disabling apps
• Push Notification service management
• Analytics and Usage report
• Log collection for problem determination
IBM Worklight goes beyond mobile app UI creation to deliver
mobile optimized, standards-based, middleware and tools
for enterprise-grade mobile applications and services
creation
“Best Enterprise Mobility Application Development Platform"
by Compass Intelligence for 2014 Mobility Awards
Worklight CLI & Studio
Leading tools for native and
hybrid development that
maximize code reuse, accelerate
development, and promote team
work
Operational Console
UI for app deployment, management, and version
enforcement, real-time operational analytics, push
notifications
Worklight App Center
A non-MDM, cross-platform, private mobile app store tailored to the needs of development
team or as an enterprise store
IBM Worklight – Main Components
App Runtime
Client APIs available for native, hybrid, and web apps
Worklight Server
Gateway for mobile user engagement, security,
analytics, and application control
Run TimeDevelopment
The IBM Worklight SDK for Xamarin
Security
Authentication
Integration
Notifications
App Management
Analytics
Xamarin
Studio
Integrated
Services
Create rich native applications in C# in Xamarin Studio
leveraging enterprise grade app services that speed
development and enhance app capabilities and
performance
Speed development Add rich app services
Speed integration Ease troubleshootingSpeed integration
Leverage robust security
and authentication
Get control of
your applications
What does this do for mobile application
developers?
and More
IBM Bluemix
A rich set of mobile ready APIs that you can mix and match to power your App
Run Code
The developer can chose from multiple language runtimes or bring
their own. Just upload your code and go.
Store Data
The developer can store data in the cloud as a service easily without
needing to administer the databases.
Cloud Integration
Build hybrid environments. Connect to on-premises systems of record
plus other public and private clouds. Expose your own APIs to your
developers.
Built on IBM SoftLayer
Runs on top of IBM’s leading infrastructure as a service.
A catalog of developer friendly APIs (IBM & third party) with mobile
SDKs, that can be composed into new and existing mobile apps.
Configure and manage through the BlueMix portal.
API Catalog
Big Data &
Analytics
Categories Data
Inte-
gration
WebMobile
Enterprise Integration
Worklight
Mobile
Server
Firewall
Existing
Integration Hub
backend integration
HTTP(S)
Database
WebService
REST
JMS
MQ
File
FTP
SAP
Siebel
:
JDBC
Web Service
JMSJSONXamarin
Studio
C# App built with
Xamarin Studio
Worklight server provides a single secure point of integration into the Enterprise that speeds
integration and enables management of mobile solutions
Enterprise
Applications
IBM
MobileFirst
SDK
Bring Your Own Tools!
Developers have the flexibility to use the development tools of their choice
• Worklight Studio
• Command Line Interface (CLI) is provided to enable the use of other development tools
The CLI provides the following capabilities:
• Add Worklight SDKs to a native project
• Create Worklight hybrid projects
• Add environments to a Worklight hybrid project
• Create Worklight Adapters
• Test Worklight Adapters
• Deploy Worklight applications and adapters to the Worklight Server
• Start and stop the Worklight Server
• Launch the Worklight administrative console
Worklight SDK for Xamarin – Developer Workflow
9
• Create Worklight server side artifacts and
deploy using Command Line Interface
• Install IBM Worklight
component in Xamarin studio
• Use Worklight APIs in your application
• Extensive libraries and client APIs that expose
and interface with native device functionality
• Build Apps
• Deploy/Manage/Monitor Apps
Add the IBM MobileFirst SDK Component
Interact with IBM Worklight via the Xamarin
IDE
Worklight CLI and JDK configuration
$ wl create XTest
$ wl add api XTestiOS –environment ios
$ wl build
$ wl start
$ wl deploy
Create a Worklight application (to manage the
application)
Ibm xamarin gtruty
Ibm xamarin gtruty
Ibm xamarin gtruty
Ibm xamarin gtruty
Worklight Server: Adapters
Worklight Server
SQL / JDBC
ESB
SOAP / HTTP
JMS
CAST IRON
REST
Java Extension
Node*
For the server developer
• JS anywhere: Simple APIs for server-side JavaScript development
• Extensibility: Java API for custom adapters
For the client developer
• Easy-to-use, consistent client-side API to call any back-end system
Enterprise back-ends and cloud
services
Run time
• Lightweight server-side logic to expose data in a mobile-friendly way
• Automatic JSON transformation of enterprise data for quick transport and ease of
consumption by mobile developer
• Server-side service composition to reduce requests over slow mobile network
• XSLT to reduce fat SOAP responses
• Security
• Automatic enablement of server-side authentication control and audit
• Analytics
• Automatic collection of user actions and device and app properties
• Mobile user engagement
• Push notifications
public async Task<String> InvokeTransferFunds(string acctFrom, string acctTo, string amount
{
WorklightProcedureInvocationData invocationData =
new WorklightProcedureInvocationData("HttpMyBankAdapter",
"getTransferFunds",
new object[] {acctFrom, acctTo, amount});
WorklightResponse task = await client.InvokeProcedure(invocationData);
if (task.Success)
{
:
}
}
Invoke an Adapter method from Xamarin
function getTransferFunds (acctFrom, acctTo, amount) {
:
if ((1*amount) > 0) {
users[index].accts[f].balance = users[index].accts[f].balance - amount;
users[index].accts[t].balance = (1*users[index].accts[t].balance) + (1*amount);
result = true;
}
:
path = getPath(interest);
var input = {
method : 'get',
returnedContentType : 'xml',
path : path
};
return WL.Server.invokeHttp(input);
}
Implement Adapter methods to driver enterprise
integration and implement common server side
logic
Modify Adapter configuration
<displayName>MyBankAdapter</displayName>
<description>MyBankAdapter</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>http</protocol>
<domain>rss.cnn.com</domain>
<port>80</port>
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2" />
</connectivity>
<procedure name="getDriveLogin"/>
<procedure name="getAccounts"/>
<procedure name="getTransactions"/>
<procedure name="getTransferFunds"/>
$ wl add adapter MyBankAdapter –-type http
$ subl adapters/MyBankAdapter/MyBankAdapter-impl.js
$ wl build
$ wl deploy
Create and implement desired adapter procedures
Invoke the Adapter interactively
laptop:XTest gregtruty$
] Which adapter do you want to use? (Use arrow keys)
HTTP
HttpMyBankAdapter
❯ MyBankAdapter
SQLMyBankAdapter
[?] Which procedure do you want to invoke? (Use arrow keys)
getDriveLogin
❯ getAccounts
getTransactions
getTransferFunds
[?] Enter the comma-separated parameters:
Invoking MyBankAdapter:getAccounts...
Arguments:
[ "Greg” ]
Invocation result:
{
"isSuccessful": true,
"accts": [
{ "balance": 8247.22,
"number": "182729382",
"type": "Savings” },
{ "balance": 1452.23,
"number": "582729382",
"type": "Checking” } ]
}
wl invoke “Greg”
Invoke the Adapter directly
laptop:XTest gregtruty$ wl invoke MyBankAdapter:getAccounts '"Greg"'
{
"isSuccessful": true,
"accts": [
{
"balance": 8247.22,
"number": "182729382",
"type": "Savings"
},
{
"balance": 1452.23,
"number": "582729382",
"type": "Checking"
}
]
}
Automatic adapter generation for SOAP and
SAP NetWeaver
• Speed-up creation of mobile apps which interact with Enterprise back-
end system of records
• Reduce the amount to coding to zero or near-zero for invoking SOAP
based web services and services from the SAP NetWeaver Gateway
• Consume these services via the generated adapter from your web, hybrid,
or native app
Unified Push Notifications
Register for, notify, and receive a notification via Worklight APIs
Back-end
System
Back-end
System
Back-end
System
Back-end
System
Polling
Adapters
Message-
based
Adapters
Unified Push
API
Notification
State
Database
User-Device
Database
iOS
Dispatcher
Android
Dispatcher
Windows
Phone
Dispatcher
SMS
Dispatcher
Apple Push
Servers (APN)
Google Push
Servers (GCM)
Microsoft
Push Servers
SMS/MMS
Brokers
Administrative Console
Notification statistics, SMS subscription control
Worklight
Client-side Push
Services
iOS
Push API
Android
Push API
Windows
Push API
Broker API
Worklight
Client-side Push
Services
Worklight
Client-side
Push Services
Optional 2-way SMS
Recent Push notification enhancements in
Worklight Foundation
Group notifications based on tags
 Notifications are targeted to only a select set of users based on their topics of interest
 Tags allow message producers / senders to segment devices
 One or more tags can exist per application
 Defined in application-descriptor.xml – created during deployment
Broadcast, unicast and narrowcast notifications
 APIs available to send a notification to all the devices that installed the application
 Also provides for an option to opt out of receiving broadcast notifications
 Enhanced APIs to send a notification to specific user or device that installed the application
 Support for a notification targeted to devices of a particular platform that installed the application
 Server side REST APIs for device and subscription management
 Improved scalability of the push infrastructure to handle large volumes of push messages
Application Security
Security
Application Security
Protecting data on the device
Authentication
integration
framework
Data protection
realms
Using device id
as 2nd factor
Code
obfuscation
SSL with server
identity
verification
Proven platform
security
App authenticity
testing
Compatible with
Jailbreak /malware
detection
Secure challenge-
response on
startup
Encrypted offline
cache
Offline
authentication
Enforcing Security Updates
Remote disable Direct update
 Security for enterprise application is the biggest concern of CTO’s
 Rich Worklight security features can now be used
Worklight security – concepts
Security Tests
A security test defines a security configuration for a protected resource
Authentication realms
Resources are protected by authentication realms. Authentication processes can be
interactive or non-interactive.
Authenticators and login modules
An authenticator collects client credentials. A login module validates them.
Adapters can point to security tests
<displayName>MyBankAdapter</displayName>
<description>MyBankAdapter</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>http</protocol>
<domain>rss.cnn.com</domain>
<port>80</port>
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2" />
</connectivity>
<procedure name="getDriveLogin” securityTest="Adapter-securityTest” />
<procedure name="getAccounts” />
<procedure name="getTransactions” />
<procedure name="getTransferFunds” />
Security configuration is under the project
<securityTests>
<customSecurityTest name="Adapter-securityTest">
<test realm="SampleAppRealm" isInternalUserID="true"/>
</customSecurityTest>
</securityTests>
<realms>
<realm name="SampleAppRealm" loginModule="StrongDummy">
<className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
</realm>
</realms>
<loginModules>
<loginModule name="StrongDummy">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule>
</loginModules>
Code up the client-side challenge handler
public override void HandleChallenge(WorklightResponse challenge)
{
Console.WriteLine ("We were challenged.. so we are handling it");
Dictionary<String,String > parms = new Dictionary<String, String> ();
parms.Add ("j_username", "worklight");
parms.Add ("j_password", "password");
LoginFormParameters = new LoginFormInfo ("j_security_check", parms,
null, 30000, "post");
shouldSubmitLoginForm = true;
}
Configure on the connect to Worklight
public async void Connect(){
//lets send a message to the server
client.Analytics.Log("Trying to connect to server",metadata);
ChallengeHandler customCH = new CustomChallengeHandler (appRealm);
client.RegisterChallengeHandler(customCH);
WorklightResponse task = await client.Connect ();
//lets log to the local client (not server)
client.Logger("Xamarin").Trace ("connection");
//write to the server the connection status
client.Analytics.Log ("Connect response : " + task.Success);
//return task;
}
Device Single Sign-On (SSO)
• Enables a mobile user to authenticate once and gain access to all apps from the same
organization (technically, with the same developer certificate) without re-authenticating.
• Integration with DataPower, ISAM, and other gateways
App 1
secureMobileOSkey
store
Worklight
Server
App 2
ID
Session x
Session y
Duplicate
after
receiving ID
from App 2
Implementation
 Implemented using combination of
server-side capabilities (realms) and
unique device identification (device ID)
 On successful login the authentication
state is saved in the database and used
for validations in subsequent sessions
from the same device.
Manage the Worklight applications
Application Management
• Better control of your
application
• Active
• Active, Notifying
(useful for informing users
of scheduled outages or
future pending updates)
• Access Disabled
(useful for forcing upgrades
to new versions)
Disable or Notify the end user
Remote-controlled client-side log collection
• Worklight provides Native and JavaScript API for client-side logging
• Administrator defines log collection profiles on the server which are automatically retrieved by the Worklight client-side runtime
• By default sent on init, resume, and 75% full – can be customized
• Administrator can perform analysis and text search of client-side
logs via server-side analytics console
Unified Client and Server Analytics
Out-of-the-box analytics address the following:
• User adoption, device and app properties
• User actions and called adapter procedures
• Performance and data usage information
• Exceptions, crashes, logs, response time
Analytics component provided in a WAR for simple install and administration
Service integration analytics
Robust analytics for adapter usage including average response time, average data usage,
and server usage statistics
Server and Client log inspection made easy
Worklight Analytics Console enables easy searching of both client and server
logs
Worklight provides C# API documentation
Worklight
Cluster
Load
Balancer
Backend 1 Backend 2
Worklight
Database
Web SSO
Server
Corporate LAN
Corporate DMZ
IBM Worklight Foundation – Typical Topology
Seek community forum/support at Stack Overflow
http://stackoverflow.com/questions/tagged/worklight
Demo
Resources
Worklight Getting Started (documentation, CLI reference, sample adapters, etc…)
http://www.ibm.com/developerworks/mobile/worklight/getting-started.html
Worklight CLI Download
http://www.ibm.com/developerworks/mobile/worklight/download/cli.html
Xamarin and Worklight information
http://www.xamarin.com/ibm
Worklight Support
http://stackoverflow.com/questions/tagged/worklight
Thank You
Greg Truty
gtruty@us.ibm.com
http://www.ibm.com/developerworks/mobile/worklight
© Copyright IBM Corporation 2013. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or
implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating
any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials
to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in these materials may change at any
time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, Rational, the
Rational logo, Telelogic, the Telelogic logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company,
product, or service names may be trademarks or service marks of others.
Invoke the Adapter interactively
laptop:XTest gregtruty$ wl invoke
] Which adapter do you want to use? (Use arrow keys)
HTTP
HttpMyBankAdapter
❯ MyBankAdapter
SQLMyBankAdapter
[?] Which procedure do you want to invoke? (Use arrow keys)
getDriveLogin
❯ getAccounts
getTransactions
getTransferFunds
[?] Enter the comma-separated parameters: "Greg"
Invoking MyBankAdapter:getAccounts...
Arguments:
[ "Greg” ]
Invocation result:
{
"isSuccessful": true,
"accts": [
{ "balance": 8247.22,
"number": "182729382",
"type": "Savings” },
{ "balance": 1452.23,
"number": "582729382",
"type": "Checking” } ]
}

More Related Content

PPTX
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
PPTX
Cloud application architecture with sql azure and windows azure
PPTX
Microservices
PDF
Developing scalable enterprise serverless applications on azure with .net
PDF
Handling Asynchronous Workloads With OpenShift and Iron.io
PPTX
Introduction to Azure Functions
PDF
Developing applications with a microservice architecture (svcc)
PDF
Microsoft Azure For Solutions Architects
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
Cloud application architecture with sql azure and windows azure
Microservices
Developing scalable enterprise serverless applications on azure with .net
Handling Asynchronous Workloads With OpenShift and Iron.io
Introduction to Azure Functions
Developing applications with a microservice architecture (svcc)
Microsoft Azure For Solutions Architects

What's hot (17)

PDF
Decomposing applications for deployability and scalability #springone2gx #s12gx
PDF
M meijer paas - tech-days 2015
PDF
API Strategy Austin - App-centric vs Job-centric Microservices
PPTX
Creation of cloud application using microsoft azure by vaishali sahare [katkar]
PPTX
An Overview of Windows Azure
PDF
Cloud native architeturecture
PPTX
Windows Azure
PDF
Java on Your Terms with Azure
PPTX
Introduction of Windows azure and overview
PPTX
Azure Overview
PPTX
Software Architectures, Week 3 - Microservice-based Architectures
PDF
Microservices: Decomposing Applications for Deployability and Scalability (ja...
PPTX
Microsoft private cloud
PPTX
Microsoft Azure Overview
PDF
Interconnect Mobile Application Development on Bluemix!!
PDF
Introduction to MicroServices (Oakjug)
PDF
Understanding the Windows Azure platform - june
Decomposing applications for deployability and scalability #springone2gx #s12gx
M meijer paas - tech-days 2015
API Strategy Austin - App-centric vs Job-centric Microservices
Creation of cloud application using microsoft azure by vaishali sahare [katkar]
An Overview of Windows Azure
Cloud native architeturecture
Windows Azure
Java on Your Terms with Azure
Introduction of Windows azure and overview
Azure Overview
Software Architectures, Week 3 - Microservice-based Architectures
Microservices: Decomposing Applications for Deployability and Scalability (ja...
Microsoft private cloud
Microsoft Azure Overview
Interconnect Mobile Application Development on Bluemix!!
Introduction to MicroServices (Oakjug)
Understanding the Windows Azure platform - june
Ad

Similar to Ibm xamarin gtruty (20)

PPTX
Connecting Xamarin Apps with IBM Worklight in Bluemix
 
PPT
Mobile Patterns with WebSphere Message Broker
PDF
Presentation build and connect apps, devices and data ibm worklight overview
PDF
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
PDF
Ibm empresa movil
PPT
2109 mobile cloud integrating your mobile workloads with the enterprise
PDF
IBM Worklight Whitepaper
PDF
IBM MobileFirst - Hybrid App Development
PDF
1040 ibm worklight delivering agility to mobile cloud deployments
PDF
Nordics IBM Mobile Foundation Integration in Action
PDF
Impact 2014 The Mobile Enterprise
PPTX
Worklight 5.0 Webinar 7 12 V2
PDF
IBM MobileFirst - Hybrid Application Development with Worklight
PDF
IBM Worklight
PPTX
Ibm worklight - going from xpages mobile to native mobile applications
PDF
Worklight technical intro v2
PDF
June 25 webcast adding mobile to power applications
PDF
Soa architect summit mobile 2013_mar [compatibility mode]
PPTX
Do Try This at Home! Extend IBM Connections using IBM Worklight
PPT
DevBeat 2013 IBM Master Class presentation
Connecting Xamarin Apps with IBM Worklight in Bluemix
 
Mobile Patterns with WebSphere Message Broker
Presentation build and connect apps, devices and data ibm worklight overview
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
Ibm empresa movil
2109 mobile cloud integrating your mobile workloads with the enterprise
IBM Worklight Whitepaper
IBM MobileFirst - Hybrid App Development
1040 ibm worklight delivering agility to mobile cloud deployments
Nordics IBM Mobile Foundation Integration in Action
Impact 2014 The Mobile Enterprise
Worklight 5.0 Webinar 7 12 V2
IBM MobileFirst - Hybrid Application Development with Worklight
IBM Worklight
Ibm worklight - going from xpages mobile to native mobile applications
Worklight technical intro v2
June 25 webcast adding mobile to power applications
Soa architect summit mobile 2013_mar [compatibility mode]
Do Try This at Home! Extend IBM Connections using IBM Worklight
DevBeat 2013 IBM Master Class presentation
Ad

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation theory and applications.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
cuic standard and advanced reporting.pdf
PPT
Teaching material agriculture food technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
Approach and Philosophy of On baking technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Unlocking AI with Model Context Protocol (MCP)
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MYSQL Presentation for SQL database connectivity
Encapsulation theory and applications.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
cuic standard and advanced reporting.pdf
Teaching material agriculture food technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Review of recent advances in non-invasive hemoglobin estimation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation_ Review paper, used for researhc scholars
Diabetes mellitus diagnosis method based random forest with bat algorithm
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

Ibm xamarin gtruty

  • 1. Connecting Xamarin Apps with IBM Worklight Chief Architect, IBM MobileFirst gtruty@us.ibm.com Greg Truty
  • 2. Introducing IBM Worklight With the Worklight SDK for Xamarin developers Enterprise grade security, integration and app management following features of Worklight Security and Trust • Single sign-on mechanism • SSL encryption • Multi-factor authentication • Secured offline access • On device encryption of user data Enterprise Integration • Direct access to back-end systems • Leverage existing SOA services • Server-side caching • Unified push and SMS notifications Application Management • App distribution • App Version management • Remote disabling apps • Push Notification service management • Analytics and Usage report • Log collection for problem determination IBM Worklight goes beyond mobile app UI creation to deliver mobile optimized, standards-based, middleware and tools for enterprise-grade mobile applications and services creation “Best Enterprise Mobility Application Development Platform" by Compass Intelligence for 2014 Mobility Awards
  • 3. Worklight CLI & Studio Leading tools for native and hybrid development that maximize code reuse, accelerate development, and promote team work Operational Console UI for app deployment, management, and version enforcement, real-time operational analytics, push notifications Worklight App Center A non-MDM, cross-platform, private mobile app store tailored to the needs of development team or as an enterprise store IBM Worklight – Main Components App Runtime Client APIs available for native, hybrid, and web apps Worklight Server Gateway for mobile user engagement, security, analytics, and application control Run TimeDevelopment
  • 4. The IBM Worklight SDK for Xamarin Security Authentication Integration Notifications App Management Analytics Xamarin Studio Integrated Services Create rich native applications in C# in Xamarin Studio leveraging enterprise grade app services that speed development and enhance app capabilities and performance
  • 5. Speed development Add rich app services Speed integration Ease troubleshootingSpeed integration Leverage robust security and authentication Get control of your applications What does this do for mobile application developers?
  • 6. and More IBM Bluemix A rich set of mobile ready APIs that you can mix and match to power your App Run Code The developer can chose from multiple language runtimes or bring their own. Just upload your code and go. Store Data The developer can store data in the cloud as a service easily without needing to administer the databases. Cloud Integration Build hybrid environments. Connect to on-premises systems of record plus other public and private clouds. Expose your own APIs to your developers. Built on IBM SoftLayer Runs on top of IBM’s leading infrastructure as a service. A catalog of developer friendly APIs (IBM & third party) with mobile SDKs, that can be composed into new and existing mobile apps. Configure and manage through the BlueMix portal. API Catalog Big Data & Analytics Categories Data Inte- gration WebMobile
  • 7. Enterprise Integration Worklight Mobile Server Firewall Existing Integration Hub backend integration HTTP(S) Database WebService REST JMS MQ File FTP SAP Siebel : JDBC Web Service JMSJSONXamarin Studio C# App built with Xamarin Studio Worklight server provides a single secure point of integration into the Enterprise that speeds integration and enables management of mobile solutions Enterprise Applications IBM MobileFirst SDK
  • 8. Bring Your Own Tools! Developers have the flexibility to use the development tools of their choice • Worklight Studio • Command Line Interface (CLI) is provided to enable the use of other development tools The CLI provides the following capabilities: • Add Worklight SDKs to a native project • Create Worklight hybrid projects • Add environments to a Worklight hybrid project • Create Worklight Adapters • Test Worklight Adapters • Deploy Worklight applications and adapters to the Worklight Server • Start and stop the Worklight Server • Launch the Worklight administrative console
  • 9. Worklight SDK for Xamarin – Developer Workflow 9 • Create Worklight server side artifacts and deploy using Command Line Interface • Install IBM Worklight component in Xamarin studio • Use Worklight APIs in your application • Extensive libraries and client APIs that expose and interface with native device functionality • Build Apps • Deploy/Manage/Monitor Apps
  • 10. Add the IBM MobileFirst SDK Component
  • 11. Interact with IBM Worklight via the Xamarin IDE
  • 12. Worklight CLI and JDK configuration
  • 13. $ wl create XTest $ wl add api XTestiOS –environment ios $ wl build $ wl start $ wl deploy Create a Worklight application (to manage the application)
  • 18. Worklight Server: Adapters Worklight Server SQL / JDBC ESB SOAP / HTTP JMS CAST IRON REST Java Extension Node* For the server developer • JS anywhere: Simple APIs for server-side JavaScript development • Extensibility: Java API for custom adapters For the client developer • Easy-to-use, consistent client-side API to call any back-end system Enterprise back-ends and cloud services Run time • Lightweight server-side logic to expose data in a mobile-friendly way • Automatic JSON transformation of enterprise data for quick transport and ease of consumption by mobile developer • Server-side service composition to reduce requests over slow mobile network • XSLT to reduce fat SOAP responses • Security • Automatic enablement of server-side authentication control and audit • Analytics • Automatic collection of user actions and device and app properties • Mobile user engagement • Push notifications
  • 19. public async Task<String> InvokeTransferFunds(string acctFrom, string acctTo, string amount { WorklightProcedureInvocationData invocationData = new WorklightProcedureInvocationData("HttpMyBankAdapter", "getTransferFunds", new object[] {acctFrom, acctTo, amount}); WorklightResponse task = await client.InvokeProcedure(invocationData); if (task.Success) { : } } Invoke an Adapter method from Xamarin
  • 20. function getTransferFunds (acctFrom, acctTo, amount) { : if ((1*amount) > 0) { users[index].accts[f].balance = users[index].accts[f].balance - amount; users[index].accts[t].balance = (1*users[index].accts[t].balance) + (1*amount); result = true; } : path = getPath(interest); var input = { method : 'get', returnedContentType : 'xml', path : path }; return WL.Server.invokeHttp(input); } Implement Adapter methods to driver enterprise integration and implement common server side logic
  • 21. Modify Adapter configuration <displayName>MyBankAdapter</displayName> <description>MyBankAdapter</description> <connectivity> <connectionPolicy xsi:type="http:HTTPConnectionPolicyType"> <protocol>http</protocol> <domain>rss.cnn.com</domain> <port>80</port> </connectionPolicy> <loadConstraints maxConcurrentConnectionsPerNode="2" /> </connectivity> <procedure name="getDriveLogin"/> <procedure name="getAccounts"/> <procedure name="getTransactions"/> <procedure name="getTransferFunds"/>
  • 22. $ wl add adapter MyBankAdapter –-type http $ subl adapters/MyBankAdapter/MyBankAdapter-impl.js $ wl build $ wl deploy Create and implement desired adapter procedures
  • 23. Invoke the Adapter interactively laptop:XTest gregtruty$ ] Which adapter do you want to use? (Use arrow keys) HTTP HttpMyBankAdapter ❯ MyBankAdapter SQLMyBankAdapter [?] Which procedure do you want to invoke? (Use arrow keys) getDriveLogin ❯ getAccounts getTransactions getTransferFunds [?] Enter the comma-separated parameters: Invoking MyBankAdapter:getAccounts... Arguments: [ "Greg” ] Invocation result: { "isSuccessful": true, "accts": [ { "balance": 8247.22, "number": "182729382", "type": "Savings” }, { "balance": 1452.23, "number": "582729382", "type": "Checking” } ] } wl invoke “Greg”
  • 24. Invoke the Adapter directly laptop:XTest gregtruty$ wl invoke MyBankAdapter:getAccounts '"Greg"' { "isSuccessful": true, "accts": [ { "balance": 8247.22, "number": "182729382", "type": "Savings" }, { "balance": 1452.23, "number": "582729382", "type": "Checking" } ] }
  • 25. Automatic adapter generation for SOAP and SAP NetWeaver • Speed-up creation of mobile apps which interact with Enterprise back- end system of records • Reduce the amount to coding to zero or near-zero for invoking SOAP based web services and services from the SAP NetWeaver Gateway • Consume these services via the generated adapter from your web, hybrid, or native app
  • 26. Unified Push Notifications Register for, notify, and receive a notification via Worklight APIs Back-end System Back-end System Back-end System Back-end System Polling Adapters Message- based Adapters Unified Push API Notification State Database User-Device Database iOS Dispatcher Android Dispatcher Windows Phone Dispatcher SMS Dispatcher Apple Push Servers (APN) Google Push Servers (GCM) Microsoft Push Servers SMS/MMS Brokers Administrative Console Notification statistics, SMS subscription control Worklight Client-side Push Services iOS Push API Android Push API Windows Push API Broker API Worklight Client-side Push Services Worklight Client-side Push Services Optional 2-way SMS
  • 27. Recent Push notification enhancements in Worklight Foundation Group notifications based on tags  Notifications are targeted to only a select set of users based on their topics of interest  Tags allow message producers / senders to segment devices  One or more tags can exist per application  Defined in application-descriptor.xml – created during deployment Broadcast, unicast and narrowcast notifications  APIs available to send a notification to all the devices that installed the application  Also provides for an option to opt out of receiving broadcast notifications  Enhanced APIs to send a notification to specific user or device that installed the application  Support for a notification targeted to devices of a particular platform that installed the application  Server side REST APIs for device and subscription management  Improved scalability of the push infrastructure to handle large volumes of push messages
  • 28. Application Security Security Application Security Protecting data on the device Authentication integration framework Data protection realms Using device id as 2nd factor Code obfuscation SSL with server identity verification Proven platform security App authenticity testing Compatible with Jailbreak /malware detection Secure challenge- response on startup Encrypted offline cache Offline authentication Enforcing Security Updates Remote disable Direct update  Security for enterprise application is the biggest concern of CTO’s  Rich Worklight security features can now be used
  • 29. Worklight security – concepts Security Tests A security test defines a security configuration for a protected resource Authentication realms Resources are protected by authentication realms. Authentication processes can be interactive or non-interactive. Authenticators and login modules An authenticator collects client credentials. A login module validates them.
  • 30. Adapters can point to security tests <displayName>MyBankAdapter</displayName> <description>MyBankAdapter</description> <connectivity> <connectionPolicy xsi:type="http:HTTPConnectionPolicyType"> <protocol>http</protocol> <domain>rss.cnn.com</domain> <port>80</port> </connectionPolicy> <loadConstraints maxConcurrentConnectionsPerNode="2" /> </connectivity> <procedure name="getDriveLogin” securityTest="Adapter-securityTest” /> <procedure name="getAccounts” /> <procedure name="getTransactions” /> <procedure name="getTransferFunds” />
  • 31. Security configuration is under the project <securityTests> <customSecurityTest name="Adapter-securityTest"> <test realm="SampleAppRealm" isInternalUserID="true"/> </customSecurityTest> </securityTests> <realms> <realm name="SampleAppRealm" loginModule="StrongDummy"> <className>com.worklight.core.auth.ext.FormBasedAuthenticator</className> </realm> </realms> <loginModules> <loginModule name="StrongDummy"> <className>com.worklight.core.auth.ext.NonValidatingLoginModule</className> </loginModule> </loginModules>
  • 32. Code up the client-side challenge handler public override void HandleChallenge(WorklightResponse challenge) { Console.WriteLine ("We were challenged.. so we are handling it"); Dictionary<String,String > parms = new Dictionary<String, String> (); parms.Add ("j_username", "worklight"); parms.Add ("j_password", "password"); LoginFormParameters = new LoginFormInfo ("j_security_check", parms, null, 30000, "post"); shouldSubmitLoginForm = true; }
  • 33. Configure on the connect to Worklight public async void Connect(){ //lets send a message to the server client.Analytics.Log("Trying to connect to server",metadata); ChallengeHandler customCH = new CustomChallengeHandler (appRealm); client.RegisterChallengeHandler(customCH); WorklightResponse task = await client.Connect (); //lets log to the local client (not server) client.Logger("Xamarin").Trace ("connection"); //write to the server the connection status client.Analytics.Log ("Connect response : " + task.Success); //return task; }
  • 34. Device Single Sign-On (SSO) • Enables a mobile user to authenticate once and gain access to all apps from the same organization (technically, with the same developer certificate) without re-authenticating. • Integration with DataPower, ISAM, and other gateways App 1 secureMobileOSkey store Worklight Server App 2 ID Session x Session y Duplicate after receiving ID from App 2 Implementation  Implemented using combination of server-side capabilities (realms) and unique device identification (device ID)  On successful login the authentication state is saved in the database and used for validations in subsequent sessions from the same device.
  • 35. Manage the Worklight applications
  • 36. Application Management • Better control of your application • Active • Active, Notifying (useful for informing users of scheduled outages or future pending updates) • Access Disabled (useful for forcing upgrades to new versions)
  • 37. Disable or Notify the end user
  • 38. Remote-controlled client-side log collection • Worklight provides Native and JavaScript API for client-side logging • Administrator defines log collection profiles on the server which are automatically retrieved by the Worklight client-side runtime • By default sent on init, resume, and 75% full – can be customized • Administrator can perform analysis and text search of client-side logs via server-side analytics console
  • 39. Unified Client and Server Analytics Out-of-the-box analytics address the following: • User adoption, device and app properties • User actions and called adapter procedures • Performance and data usage information • Exceptions, crashes, logs, response time Analytics component provided in a WAR for simple install and administration
  • 40. Service integration analytics Robust analytics for adapter usage including average response time, average data usage, and server usage statistics
  • 41. Server and Client log inspection made easy Worklight Analytics Console enables easy searching of both client and server logs
  • 42. Worklight provides C# API documentation
  • 43. Worklight Cluster Load Balancer Backend 1 Backend 2 Worklight Database Web SSO Server Corporate LAN Corporate DMZ IBM Worklight Foundation – Typical Topology
  • 44. Seek community forum/support at Stack Overflow http://stackoverflow.com/questions/tagged/worklight
  • 45. Demo
  • 46. Resources Worklight Getting Started (documentation, CLI reference, sample adapters, etc…) http://www.ibm.com/developerworks/mobile/worklight/getting-started.html Worklight CLI Download http://www.ibm.com/developerworks/mobile/worklight/download/cli.html Xamarin and Worklight information http://www.xamarin.com/ibm Worklight Support http://stackoverflow.com/questions/tagged/worklight
  • 48. © Copyright IBM Corporation 2013. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, Rational, the Rational logo, Telelogic, the Telelogic logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.
  • 49. Invoke the Adapter interactively laptop:XTest gregtruty$ wl invoke ] Which adapter do you want to use? (Use arrow keys) HTTP HttpMyBankAdapter ❯ MyBankAdapter SQLMyBankAdapter [?] Which procedure do you want to invoke? (Use arrow keys) getDriveLogin ❯ getAccounts getTransactions getTransferFunds [?] Enter the comma-separated parameters: "Greg" Invoking MyBankAdapter:getAccounts... Arguments: [ "Greg” ] Invocation result: { "isSuccessful": true, "accts": [ { "balance": 8247.22, "number": "182729382", "type": "Savings” }, { "balance": 1452.23, "number": "582729382", "type": "Checking” } ] }