Session D9 Mobile App Development For Informix: What Options Are There? Shawn Moe IBM 1
Acknowledgements and Disclaimers Availability. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant. While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it 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, this presentation or any other materials. Nothing contained in this presentation 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. All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. Copyright IBM Corporation 2015. All rights reserved. U.S. Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. IBM, the IBM logo, ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol ( or TM), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at Copyright and trademark information at www.ibm.com/legal/copytrade.shtml Other company, product, or service names may be trademarks or service marks of others. 2
Agenda Mobile Explosion Where we are coming from Some options for your next mobile application Dojo Mobile Toolkit Cloudant Bluemix WorkLight Informix REST interface Genero Mobile 3 Need webcast troubleshooting help? Click attachments
New business models are placing demands on mobile and data apps Cloud Computing Mobile Social Media Internet of Things
Key trends motivating mobile application developers Supporting the business trends more interactions In 2013, smartphones overtook non-smart phones globally (>50%) mind-share of non-mobile is dwindling ability to eat your own dog food Android + ios now make up well over 90% of smartphone sales consolidation capture broader base with fewer ports The app market was worth $70 billion in 2013, expected to double by 2016 developer interest in a growing market for making $$ Android now mandatory it s only a matter of priority which one to do first 70% of developers that target mobile create apps for Android the market is now flooded with Android platforms easy to obtain Tablet users grew by 3x from 2011 to 2014 (U.S. 90 million 2014) widespread use is replacing desktop and laptop as primary platform Internet-of-things goes hand-in-hand with mobile access devices and data from everywhere end users now expect a mobile app to access the things Mobile Fraud Detection Digital Ads NoQL Market $14 billion 2013-2018 Documents Customer Loyalty Market Analysis Billing Pricing
Some general approaches to mobile app development Mobile web sites (HTML, CSS, PHP, and other standards, with mobile device detection) lowest on the UX scale, with network-dependent performance lowest on the NX scale, no access to device features Mobile web applications (typically HTML5, JavaScript, and other standards) more modern version of web apps which leverage devices better; decent UX typically moderate dependency on network connected-mode can be designed to work without mods on wide range of devices Cross-platform frameworks (write once, run everywhere) cross-compilation, produce complete native apps from common code base Hybrid special case of cross-platform HTML wrapped in a native container, install app on the device in a standard way typically supports some level of disconnected-mode Native applications developer kit for the device tools, IDEs separate code lines per devices, but best UX and NX UX = User Experience NX = Native Experience
Mobile Application Paradigms Native Advanced UI actions Best performance App store distribution Hybrid Web developer skills Native access App store distribution HTML5 Web developer skills Cross platform Instant updates Unrestricted distribution No offline mode
Cloud and Mobile Application Characteristics Experimental in nature - Require rapid iteration - Faster time to market - May be decommissioned quickly need environments in minutes versus days or weeks Written in multiple languages - Web: JavaScript, Ruby, Java, PHP - Mobile: ios, Android, Hybrid Composed of Services - Built using a composition model of stitching capabilities together - Capabilities often require time to test in app beyond the scope of a free trial Integrate with existing systems - Data is often located in multiple places (public, private, traditional data center) - Existing systems may not scale at the same the level of cloud applications 9
10 Where we are coming from
One Customer s Mobile Environment Web Server Current Scenario: Simple home grown mobile app outgrew its initial purpose and requirements Connected Web application serving hundreds of sales associates Access mostly via smart phone browser, but also via laptop browser PHP application Informix data repository New Requirements: Disconnected Mode Access to local device address book, calendar, etc. Better authentication
Second Customer s Mobile Environment Tables Users Current Scenario: JDBC Replication XML DB2E is handling 3500 PDAs DB2 Everyplace Web Sphere Windows Server Quad Core 04Gb RAM 32Bits Sync 3500PDAs Windows mobile 6.1 and 6.5 running on PSION,PITION, MOTOROLA,HTC,SA NSUMG,HHP DB2 Everyplace to connect field technicians to Informix database with service request data, dispatching service orders to mobile users who are equipped with handheld devices, improving responsiveness to service outages. Currently using Windows mobile 6.1 and 6.5 running on PSION,PITION, MOTOROLA, HTC, SAMSUNG, and HHP devices Developed home-grown applications using.net. Some devices sync online and others offline
One Mobile Data Synchronization Story System Of Engagement Cloudant NoSQL DB Mobile Data Services (Bluemix) Integration Services - Cast Iron/DataStage System Of Record DataStage, Cloudant replication to IDS Enterprise Data Store (Informix) On Device data persistence (SQLite) Data Sync between devices and to Cloudant data store Update/Write to System Of Record through the front door (Using Enterprise app. APIs) Using Cloudant SDK on device Cast Iron Write/Update System Of Record Enterprise App. APIs
Dojo Mobile Toolkit The Dojo Mobile toolkit is a powerful JavaScript framework that provides all of the building blocks required to develop lightweight, high-performance mobile web applications. 14
Dojo Mobile Toolkit One of the choices in the busy HTML5 & CSS3 category Mobile toolkit extends the existing Dojo toolkit to deal with: Input device differences Smaller screen sizes Reduced processing power and footprint requirements of mobile devices Good option for mobile apps where connectivity is consistent Database connectivity is standard PHP database driver Easy to enforce consistency across screens and applications with style sheets
Photo Share demo built using IBM Dojo Mobile Toolkit Hosted via Softlayer @ nosqldemo.com Built for IOD 2013 to demonstrate Informix hybrid (JSON, relational and time series) application support PHP app using the MongoDB PHP driver for connectivity to the Informix database
Cloudant A distributed database as a service (DBaaS) allowing developers of fast-growing web and mobile apps to focus on building and improving their products, instead of worrying about scaling and managing databases on their own. 17
Cloudant Overview Operational JSON data store RESTful CouchDB API Advanced APIs Replication & Sync Lucene full-text search Geo-spatial Incremental MapReduce Scalable, Highly Available Performance Cross-data center data distribution & fail over Geo load balancing Multi-tenant and dedicated-tenant clusters Monitoring, administration, & development dashboards Managed 24x7 by IBM Available in Rackspace, IBM/SoftLayer and AWS data centers On-premise version, Cloudant Local, that you can run yourself on any private, public, or hybrid cloud platform you choose 18
Store and Access Data Everywhere Store data on the server and/or the local device Native libraries support synchronization process and local storage management Synchronize data between devices by replicating data from Cloudant Local Storage Local Storage 3
Putting Data at the Edge Geographically disperse your data across multiple data centers to allow for easy access depending on location Ability to store data across 35 geographic locations 4
Always On. Read/write from local storage when connection is unavailable Restored connection will sync the data with the server and other devices connected to same source Local Storage Data redundancy across data centers 5
Based on Open Industry Standards Any device using HTTP and JSON can interact with Cloudant HTTP HTTP JSON HTTP Cloudant HTTP JSON HTTP JSON JSON JSON JSON 7
Cloudant Sync Available for Android and IOS Leverages device s on-board SQLite database for persistence Cloudant defines indexing scheme for optimizing use of relational SQLite DB with application s JSON storage requirements Multi version concurrency control Replication to the Cloudant server in the cloud via HTTP Mobile application does include and interact with Cloudant SDK software which resides on the device Cloudant Code is native (Java for Android, Objective C for IOS)
Sync Cloudant with Informix Leverage entire Cloudant implementation Cloudant Sync on the mobile device and Cloudant in the cloud Cloudant is the sync server with the mobile application Solution to sync data between the Cloudant server and the IBM data server would be a home grown solution One option would be to use REST API to pull data from Cloudant to Informix via stored procedures Standalone REST API based program to extract from Cloudant and insert into Informix Data exchanged as JSON documents IBM Data Stage supports JSON and could be leveraged here Informix working with Cloudant team to support more replication currently this is in place for timeseries data
Bluemix Bluemix is an open-standards, cloud-based platform offering a single solution environment with the instant resources and infrastructure you need to develop and deploy apps across multiple domains fast. 25
Bluemix A rich set of mobile ready APIs that you can mix and match to power your App Run Your Apps The developer can chose any language runtime or bring their own. Just upload your code and go. DevOps Development, monitoring, deployment and logging tools allow the developer to run the entire application APIs and Services A catalog of open source, IBM and third party APIs services allow a developer to stitch together an application in minutes. 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. Big Data Manage your Big Data requirements with BLU Acceleration, Hadoop based analytics, and your sensor and device Internet of Things data.
Mobile Cloud Boilerplate Powered by Cloudant Node.js includes SDK for data sync Primary development language for mobile and server side scripting. Includes templates and SDK for syncing with the database in the cloud. Mobile Application Security basic app security framework - enabling the developer to block access to apps on specific devices. Push Create and schedule push notifications for ios and Android devices to engage users when they aren't using the app. Mobile Data SDKs to sync mobile shared data with the scalable, managed Cloudant database as a service.
28 Bluemix Mobile Services Cloud Services for Mobile in Minutes Simplify app deployment, infrastructure maintenance, and improve app quality with cloud services for mobile. Accelerates app development with SDKs for ios and Android. Mobile Data Enhance your mobile app with a shared, managed database in the Cloud that can be accessed using native SDKs for ios and Android. Twilio Build apps that communicate. Integrate voice, messaging and VoIP into your web and mobile apps. Mobile Application Management Centrally manage app access through a web based console. Control and secure apps through containerization and control over the operational lifecycle Mobile Quality Assurance Instrument apps to capture tester and liveuser experiences, including context-aware crash log and in-app bug reports, in-app user feedback and insightful and streamlined quality metrics. Push Create and schedule push notifications for ios and Android devices to engage users when they aren t using the app. User tagging enables the user to select desired push topics. Internet of Things Internet of Things APIs allowing Bluemix applications to access device data simply and swiftly. Build apps for a smarter planet!
Why Bluemix Mobile Services? Simplicity and speed for mobile developers to develop and deploy a mobile backend to share data and business logic Native SDKs for Android and ios make coding intuitive for mobile app developers Reduced cost of maintenance with fully managed services; Integrated App Quality and App Management capability Integrated platform to extend mobile applications with enterprise data or to new scenarios such as Web, APIs, or Internet of Things 29
Mobile Data Service With the Mobile Data service, you can store, delete, update, and query objects that are stored in the cloud. You can use a REST URL to interrogate the data classes and content that is stored in the cloud. With the Mobile Cloud Services SDK, you can embed a special managed directory in your application. Any files that are stored in this managed directory can be monitored and synchronized. The application can share the contents of this managed directory by connecting to Mobile Data service with the same application ID and user ID. By sharing the directory contents, different instances of an application can have synchronized copies of the files You can import JSON or tabular data into Mobile Data service File Sync is a separate plugin and that can be added to your mobile app Currenty a "last write wins" policy when multiple applications are updating the same files
Bluemix Mobile Data solution Mobile Device Mobile App Mobile Data Service Mobile Data API Cache (SQLite) Bluemix Mobile Data Service Data Viewer JSON Object Store
Accessing Data in your Bluemix Database Accessing data in the SQLDB (DB2) service: DB2 APIs MongoDB APIs Accessing data in the dashdb (DB2 with BLU Acceleration) service: DB2 JDBC, Ruby, Node.js, Python, and PHP APIs Accessing data in the TimeSeries Database (Informix) service: Informix REST APIs Informix SQLI APIs (JDBC, ODBC, ESQL/C, etc) MongoDB APIs Accessing data in the Cloudant NoSQL DB service: Cloudant REST services
Accessing your Informix Enterprise Data from Bluemix Accessing your on-premises enterprise database from your Bluemix app would be a custom home grown application All of your Bluemix data is resident in the Bluemix Cloud Enterprise access would be possible if you want to move your enterprise data to the SQLDB service (DB2) or TimeSeries Database (Informix) Or, access your on-premises enterprise data using REST or web services from your Bluemix application Or, perhaps use Bluemix as a development sandbox and then shift to SoftLayer where your Enterprise environment could be hosted
IBM MobileFirst Platform Foundation (was WorkLight ) IBM MobileFirst Platform Foundation, formerly IBM Worklight, helps enterprises deliver on their mobile strategy. It provides an open and comprehensive platform to not only build, but test, run and manage native, hybrid and mobile web apps. Available as an on premises or private cloud solution, IBM MobileFirst Foundation can help reduce both application development and maintenance costs, improve time-to-market and enhance mobile application governance and security. 34
IBM Worklight: A mobile application platform Speeding the development, integration and management of mobile applications and infrastructure Accelerate Development Web, hybrid, and native development: open, flexible, standard-based, multi-screen/omni-channel Functional testing Development lifecycle tools and integration Facilitate App Security and Trust Server-enforced authentication App authenticity and user-app-device binding Secure and syncable on-device storage App version enforcement "Best Mobile Development Solution" voted by SIIA members, 2013 CODiE Awards Enable User Engagement Unified push and SMS notifications Geolocation and context collections and intelligence Mobile-friendly integration Support Mobile Analytics Efficient acquisition of analytics data Development, operational, and business analytics Offline and online event management integration
Components of the IBM Worklight Mobile Platform plus Worklight Mobile Test Workbench for automated functional testing and Worklight Analytics Platform for an aggregated view of server and client/mobile information
Worklight Server Procedures & Adapters Worklight Server resident procedures perform the interaction between the application and the back end applications. Procedures are written in Javascript and interact with mobile applications over HTTP using JSON-formatted data Procedures perform the conversions between JSON format and the format required by the back end application SQL Adapters are procedures which can be configured to execute parameterized SQL queries and stored procedures, in order to retrieve or update data in the database Worklight SQL adapters for DB2, MySQL and Oracle using JDBC connectivity Additional SQL adapters (Informix) can be created using provided template Other custom adapters can be developed to interact with other data sources New adapter for Cloudant, for example
Worklight Adapters Connect to enterprise applications and cloud services: Deliver data to and from mobile applications Perform any necessary server-side logic on this data. Query 2 3 Response Update data JMS SAP SQL Cast Iron HTTP Cloudant Worklight 1 Invoke adapter procedure Data/Result as JSON 4
Worklight Server SQL Adapters would be required to link your enterprise data store with your mobile application
Bluemix complements Worklight IBM Worklight IBM Bluemix IBM & Third Party APIs for + Mobile Web Integration Devops Big Data & Analytics and More Extend your enterprise mobile app platform investment through Cloud APIs: In Worklight 6.2: Worklight ready SDK that can be plugged into your project Lifecycle management controls API access for Bluemix services Worklight security framework integrates with Bluemix SSO
Worklight with Bluemix Worklight Server Adapters: Server-side logic in JavaScript Read-only or Txn Secure and Uniform access to business data Enterprise Data and Services Cloud Data and Services
Informix REST interface
Informix REST API Informix REST API Exposes full database capabilities to the application Access time series, spatial, relational, and JSON data Supports cursors and more complex queries Provides tremendous flexibility for mobile applications. Pretty much any popular mobile development environment can now be used with Informix REST Interface permits use with ANY programming language or environment that supports HTTP 43
Informix REST - HTTP Method Overview Method Path Description POST / Create a new database POST /db Create a new collection POST /db/collection Creates a new document GET / Database listing GET /db Collection listing GET /db/collection Query the collection GET /db/collection?query={ } Query documents that satisfy query document DELETE / Drop all databases DELETE /db Drop a database DELETE /db/collection Drop a collection DELETE /db/collection?query={...} Delete documents that satisfy the query from a collection PUT /db/collection Update a document 44
Informix REST with SQL pass through http://localhost:27018/stores_demo/system.sql?query= {"$sql":"select tstamp, value from ts_data_v where loc_esi_id=4727354321000111"} TimeSeries SQL query can run against VTI or as a direct timeseries SQL query 45
Informix REST tips Data is returned as JSON Data is formatted as per MongoDB specs Why? Our REST interface is built on the NoSQL listener and is intended for compatibility with MongoDB 46
Genero Mobile A integrated platform for the rapid development of rich business applications, taking your application ideas to the desktop, web, and now to mobile devices while fulfilling the promise of Write Once, Run Anywhere!
Genero Key features - Write once, deploy everywhere! Rapid Development of rich business applications Modernize legacy 4 th generation language (green screen) apps Desktop, web and now mobile applications Developed by IBM Business Partner 4Js Native Dynamic Virtual Machine for mobile platforms (ios & Android) Native GUI, native performance Connected/disconnected mode SQLite access on mobile device Server database synchronization with Informix, DB2, and other RDBMS UTF-8 JSON, Web Services, RESTful services App store or Over the Air installation
Genero Mobile Flexible Deployment one source code base, 90% market coverage FUNCTION edit_customer(num) DEFINE num LIKE customer.customer_num LET int_flag = FALSE SELECT * INTO customer.* FROM customer WHERE @customer_num == num INPUT BY NAME customer.* WITHOUT DEFAULTS ON ACTION zoom INFIELD state LET customer.state = states.getstate(customer.state) DISPLAY BY NAME customer.state END INPUT IF NOT int_flag THEN UPDATE customer SET customer.* = customer.* WHERE @customer_num = num ELSE SELECT * INTO customer.* FROM customer WHERE @customer_num == num DISPLAY BY NAME customer.* END IF END FUNCTION
Summary Back to our customer s mobile application
One Customer s Mobile Environment One New Scenario Worklight Server WebSphere App Server Authentication SQL Adapter Possible New Scenario: IBM Worklight based solution Native ios and Android mobile applications Native apps can run in disconnected mode using local device data storage Sync between device data storage and Informix data repository server using SQL Adapter Native apps access local device resources Enterprise authentication and mobile device management
Second Customer s Mobile Environment One New Scenario On Premises data center SoftLayer Sync program REST over HTTP Cloudant CloudSync Tables Users 10,000+ Android tablets Mobile app using Cloudant SDK Possible New Scenario: New Android tablets Cloudant SDK on the mobile device and CloudSync to sync the devices with the Cloudant server(s) Custom REST based sync program to sync the Cloud-based Cloudant server with the on-premises Informix servers
Wrap up There is no single solution Application requirements + time to market + will determine your mobile strategy More and more users are expecting native experience, but these apps take longer to develop and need multiple code bases for various platforms Web toolkits will continue to add functionality 53
Questions? smoe@us.ibm.com 54
Resources Informix downloads: http://www.ibm.com/software/data/informix/downloads.html Informix videos on YouTube: https://www.ibm.com/developerworks/community/blogs/idsd oc/entry/informix_videos_on_youtube_channels IBM Mobile Development and Connectivity: http://www.ibm.com/software/products/en/category/mobiledevelopment-connectivity Bluemix: https://ace.stage1.ng.bluemix.net/ What s new in Dojo Mobile 1.8 (DW article), Parts 1, 2 and 3: http://www.ibm.com/developerworks/mobile/library/modojo-mobile-new-18-1 55
Resources (continued) Worklight (v6.1) InfoCenter - http://pic.dhe.ibm.com/infocenter/wrklight/v6r1 m0/index.jsp?topic=%2fcom.ibm.help.doc%2fwl _home.html IBM Worklight developerworks - http://www.ibm.com/developerworks/mobile/w orklight/ IBM Worklight home page - http://www- 03.ibm.com/software/products/en/worklight Genero Mobile www.4js.com