+ All Categories
Home > Documents > Mobile Controls for IBM Lotus Domino XPages on OpenNTF

Mobile Controls for IBM Lotus Domino XPages on OpenNTF

Date post: 14-May-2015
Category:
Upload: niklas-heidloff
View: 3,909 times
Download: 4 times
Share this document with a friend
Description:
Description of the OpenNTF project XPages Mobile Controls: http://www.openntf.org/mobile
Popular Tags:
76
1 OpenNTF Project: OpenNTF Project: XPages Mobile Controls XPages Mobile Controls Niklas Heidloff, IBM 05/14/10
Transcript
Page 1: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

1

OpenNTF Project:OpenNTF Project:XPages Mobile ControlsXPages Mobile Controls

Niklas Heidloff, IBM05/14/10

Page 2: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

2

http://www.openntf.org/mobileor

http://www.openntf.org/Projects/pmt.nsf/ProjectLookup/XPages%20Mobile%20Controlsor

Try it !Try it !

Page 3: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

3

AgendaAgenda

● Overview● Mobile apps with native look and feel● Mobile apps accessing native services● Mobile apps caching data and supporting offline

Page 4: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

4

Goals of the ProjectGoals of the Project

● Identify which out of the box app dev functionality for mobile apps IBM® Lotus® Domino® could support in future releases

● Demonstrate how to use the Lotus Domino XPages app dev platform today to build mobile apps with standard web development skills without having to write native/device specific code

● Demonstrate how to build mobile apps for Android™, iPhone® and Blackberry® using XPages

Page 5: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

5

Technical GoalsTechnical Goals

● Enable developers to develop mobile apps via XPages (rapid application development, access to Lotus Domino services, etc.)

● Enable developers to build mobile apps that look & feel like native apps to achieve the best user experience

● Enable developers to build sophisticated mobiles apps accessing native services and supporting offline

● Enable developers to build mobile apps via XPages easily, e.g. via reusable controls

Page 6: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

6

Project OverviewProject Overview

● Reusable XPages Controls using Dojo Mobile 1.5● XPages Sample App using Lotus Domino 8.5.1 only● XCamera using PhoneGap● Simple HTML5 Offline Samples using Lotus Domino

8.5.2● Reusable XPages Controls leveraging Dojo Mobile 1.5

including Offline● Login Control using IBM Lotus iNotes® Ultralite

Page 7: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

7

ScenariosScenarios

● Hide the browser● Provide native look & feel● Access to native services● Offline and cached data

Page 8: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

8

Scenario: Hide the BrowserScenario: Hide the Browser

● Sub scenarios■ Address bars should be hidden■ App specific actions should be shown■ Bookmarks on home screens should look like

bookmarks to native apps● Android and Blackberry show that an app is 'just' a

web app. iPhone is a little better

Page 9: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

9

In the web browser the address bar keeps coming up

and the menu button shows generic browser actions

Android (similar on Blackberry – see appendix)Android (similar on Blackberry – see appendix)

Page 10: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

10

Instead app specific actions should be shown and the browser bar should be hidden

AndroidAndroid

Page 11: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

11

The browser's actions are displayed at the bottom

The address bar can be toggeled on/off

iPhoneiPhone

Page 12: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

12

When launched from home page bookmark the generic actions don't show up

The address bar is toggeled off initially

iPhoneiPhone

Page 13: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

13

Scenario: Hide the BrowserScenario: Hide the Browser

● Hide address bar■ iPhone: Works out of the box■ Android: Dojo 1.5 (dojox/mobile) hides the address

bar automatically ● Hide app specific actions (Android and Blackberry)

■ Possible solutions require native apps/shells with embedded browsers at this point

■ Neither PhoneGap, nor other frameworks support this functionality at this point but hopefully in the future

Page 14: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

14

Scenario: Native LookScenario: Native Look

● Many iPhone apps use the typical iPhone style● Android has it's own style but few apps use it● Blackberry doesn't have it's own style● Not all apps use these styles, but many of the most

popular apps, esp. for iPhone

Page 15: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

15

Scenario: Native FeelScenario: Native Feel

● Most Android and iPhone apps use nice page transitions

● This is not only nice to have, but required to get the necessary user acceptance. Mobile users have high expectations since they know it from other apps

● Technically this means one HTML/XSP page with lot's of hide/show and Ajax

Page 16: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

16

iPhone Style iPhone Style

Page 17: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

17

Android StyleAndroid Style

Page 18: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

18

Dojo 1.5Dojo 1.5

● Dojo 1.5 (dojox/mobile) provides a framework to build web apps that look and feel like native apps

■ Page transitions■ Loading indications■ Typical styles for iPhone and Android

● Dojo 1.5 has not been released yet but the code is available in the dojotoolkit SVN trunk

Page 19: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

19

Reusable XPages Controls using Dojo 1.5Reusable XPages Controls using Dojo 1.5

● The project leverages Dojo 1.5● Custom styles can be used● This part of the project works on Lotus Domino 8.5.1

and iPhone and Android● 10 reusable controls are provided to assemble custom

apps● A live version of this app is available under

http://i.openntf.org

Page 20: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

20

Loading of new ContentLoading of new Content

● View control loadsnew entries auto-matically when scrolling down

● Progress indicatorsfor view and document loading

Page 21: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

21

Creation of new DocumentsCreation of new Documents

● Project shows how to createnew documents (via Ajax)

Page 22: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

22

BookmarksBookmarks

● Pages including pages withdocuments can be bookmarked

■ e.g. http://i.openntf.org/niklas/MobileControls1.0.0.nsf/m.xsp#document&unid=E58F1FE324BBC2418625771A001C5263

Page 23: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

23

NavigationNavigation

● Browser and device navigationbuttons are supported

Page 24: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

24

Sticky ScrollbarsSticky Scrollbars

● When navigating back to the view the scrollbars are sticky

Page 25: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

25

Custom StylesCustom Styles

● Custom styles can be used

Page 26: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

26

ReusableReusableControlsControls● 8 reusable

XPages Controlsare providedto assemblecustom apps

Page 27: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

27

Controls: mConfiguration and mHeaderControls: mConfiguration and mHeader

Page 28: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

28

Controls: mRectangle, Header and EntryControls: mRectangle, Header and Entry

Page 29: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

29

Controls: mPage and mViewControls: mPage and mView

Page 30: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

30

Controls: mPage and mDocumentContainerControls: mPage and mDocumentContainer

Page 31: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

31

Control myDocument is app specificControl myDocument is app specific

Page 32: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

32

New Documents can be created via custom CodeNew Documents can be created via custom Code

Page 33: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

33

SetupSetup

● The Dojo mobile code has to be imported into the NSF (see ReadMe.pdf for more details)

● Copy MobileControls1.0.0.nsf to your data directory and launch the XPages m.xsp or o.xsp

Page 34: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

34

XPages Sample App using Lotus Domino 8.5.1 XPages Sample App using Lotus Domino 8.5.1 onlyonly● Another part of the project shows how to build similar

apps via Lotus Domino 8.5.1 only without Dojo 1.5● This approach also works on some Blackberry devices.

Note that this approach is not as robust on Android and iPhone when compared to Dojo 1.5

● A live version of this app is available underhttp://m.openntf.org

Page 35: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

35

Page 36: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

36

SetupSetup

● Copy MobileControls040.nsf to your data directory and launch m.xsp

Page 37: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

37

Scenario: Access Native ServicesScenario: Access Native Services

● Sub scenarios■ Local contacts■ Camera■ GPS/geolocation■ Accelerometer■ Gestures (e.g. shake, orientation change)■ Local filesystem■ Media (e.g. pick photo)

Page 38: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

38

Sample Scenario: Sample Scenario: Take Picture and upload to DominoTake Picture and upload to Domino

Page 39: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

39

Scenario: Access Native ServicesScenario: Access Native Services

● Most of this functionality is not in webkit and not in HTML5 or any other standard or proposal yet

● PhoneGap provides JavaScript APIs to use this functionality

● PhoneGap is a native app and as such needs to be deployed to mobile devices

● The XPages Mobile Controls project provides a sample how to use PhoneGap

● PhoneGap works on Android, iPhone and Blackberry

Page 40: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

40

PhoneGap Demo AppPhoneGap Demo App

Page 41: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

41

JavaScript to use CameraJavaScript to use Camera

Page 42: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

42

Setup: PhoneGapSetup: PhoneGap

● PhoneGap needs to be configured and then recompiled for the specific platforms -> requires native SDKs

● Config■ Name■ URL■ Icon

Page 43: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

43

Setup: Domino DesignerSetup: Domino Designer

● The PhoneGap JavaScript files(in 0.9 only one file for Android)need to be imported into NSF (see ReadMe.pdf for details)

Page 44: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

44

Scenario: Offline and cached DataScenario: Offline and cached Data

● HTML5 will support caching of resources and provide local storage capabilities

● Some webkit based browsers support today also SQL storage of data

Page 45: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

45

Local Storage Mini SamplesLocal Storage Mini Samples

Page 46: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

46

sessionStorage and localStoragesessionStorage and localStorage

Page 47: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

47

SQL StorageSQL Storage

Page 48: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

48

Cache Resources SamplesCache Resources Samples

● Sample shows how to cache DojoJavaScript files, images and stylesheets

● A reusable control is provided to refresh the cache and to see the cache status and events

Page 49: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

49

Reusable XPages Controls leveraging Dojo Reusable XPages Controls leveraging Dojo Mobile 1.5 including OfflineMobile 1.5 including Offline

● Same blog application as previously taken offline

Page 50: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

50

Reusable XPages Controls leveraging Dojo Reusable XPages Controls leveraging Dojo Mobile 1.5 including OfflineMobile 1.5 including Offline

● This part of the project demonstrates how to take a Notes view and Notes documents offline

● Works on iPhone and Android [and Firefox]● A live version is available under

http://208.85.188.19/niklas/MobileControls200.nsf/m.xsp

Page 51: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

51

Reusable XPages Controls leveraging Dojo Reusable XPages Controls leveraging Dojo Mobile 1.5 including OfflineMobile 1.5 including Offline

● The synchronization and offline mechanism is limited at this point:

■ The synchronization is hardcoded to the last 10 view entries and documents

■ The data is updated automatically when online■ The content of documents is stored locally but without

pictures and other embedded objects■ Comments can be read but no new comments can be

created offline

Page 52: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

52

Manifest FileManifest File

Page 53: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

53

Offline DetectionOffline Detection

Page 54: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

54

SetupSetup

● Register the MIME type in Domino Adminstrator

Page 55: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

55

SetupSetup● Disable the default Dojo

Page 56: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

56

SetupSetup

● Generate a custom Dojo build

Page 57: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

57

SetupSetup

● Import the two generatedjs files into MobileControls200.nsf

● Import dojox/mobile ● See ReadMe.pdf for more details

● Copy MobileControls200.nsf to your Domino data directory and launch m.xsp

Page 58: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

58

Login ControlLogin Control

● Another part of the project is the login control for mobiledevices

● This is not an XPages controlbut leverages Lotus iNotescode

Page 59: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

59

Resources – Open Source ProjectsResources – Open Source Projects

● XPages Mobile Controls Project:http://www.openntf.org/mobile

● PhoneGap: http://www.phonegap.com

● Dojo:http://www.dojotoolkit.org

Page 60: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

60

Resources – DemosResources – Demos

● Dojo sample:http://i.openntf.org

● Dojo sample including offline:http://208.85.188.19/niklas/MobileControls200.nsf/m.xsp

● Non Dojo sample:http://m.openntf.org

Page 61: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

61

Resources – VideosResources – Videos

● Dojo sample:http://www.youtube.com/watch?v=atu7c0wApwY

● Dojo sample including offline:http://www.youtube.com/watch?v=xNht4vviamw

● Non Dojo sample:http://www.youtube.com/watch?v=-efgOkbIK9U

● XCamera:http://www.youtube.com/watch?v=M2DsAuAojnE

● Simple offline samples:http://www.youtube.com/watch?v=XkFWYHO-1ek

Page 62: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

62

Resources – HTML5Resources – HTML5

● Resources:http://www.w3.org/TR/html5/offline.html

● Local storage:http://dev.w3.org/html5/webstorage

● SQL storage:http://www.w3.org/TR/offline-webapps

Page 63: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

63

Project LicenseProject License

OpenNTF Alliance Mobile XPage Controls

© Copyright IBM Corp. 2010

This product includes software contributed to

OpenNTF Alliance – (http://www.OpenNTF.org/)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License

Page 64: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

64

Project LicenseProject License

The dojo/hash.js file is part of Dojo 1.4.

Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.

Available via Academic Free License >= 2.1 OR the modified BSD license.

see http://dojotoolkit.org/license for details

Dojo Mobile 1.5 is required but not part of this project

Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.

Available via Academic Free License >= 2.1 OR the modified BSD license.

see http://dojotoolkit.org/license for details

PhoneGap 0.9.0 is required but not part of this project

http://www.phonegap.com/

Available via MIT

see http://www.phonegap.com/license for details

Page 65: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

65

Appendix - Scenario: Hide the BrowserAppendix - Scenario: Hide the Browser

Page 66: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

66

In the web browser the address bar keeps coming up

and the menu button shows generic browser actions

AndroidAndroid

Page 67: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

67

Bookmarks can be added to home page but they look different to native apps

AndroidAndroid

Page 68: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

68

Only links to native apps look native

AndroidAndroid

Page 69: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

69

This native app uses an embedded web browser

The actions show the app's actions defined in a custom XPage control

AndroidAndroid

Page 70: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

70

Android actions can be defined in custom control

Android &Android &BlackberryBlackberry

Page 71: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

71

In the web browser the menu button shows generic browser actions

BlackberryBlackberry

Page 72: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

72

This native app uses an embedded web browser

The actions show the app's actions defined in a custom XPage control

BlackberryBlackberry

Page 73: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

73

The browser's actions are displayed at the bottom

The address bar can be toggeled on/off

iPhoneiPhone

Page 74: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

74

Bookmarks can be added to home page and they look native

iPhoneiPhone

Page 75: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

75

When launched from home page bookmark the generic actions don't show up

The address bar is toggeled off initially

iPhoneiPhone

Page 76: Mobile Controls for IBM Lotus Domino XPages on OpenNTF

76

Legal DisclaimerLegal Disclaimer● © IBM Corporation 2010. All Rights Reserved.

● The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication 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 this presentation 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 this presentation 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. 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.

● IBM, Lotus Notes, Domino, Lotus iNotes

● Android is a trademark of Google Inc.

● iPhone is a trademark of Apple Inc.

● The Trademark Blackberry is owned by Research In Motion Limited


Recommended