Appcelerator Mobile. The Doppelgänger to
XPages
Another Story by John Jardin
Who is John Jardin?
• CTO of Ukuvuma Solutions.
• Responsible for pushing the
boundaries on technology and
productizing it for businesses.
• Developer for 12 Years, primarily
focused on IBM Domino.
• I almost, almost, became a Domino
Administrator.
• IBM Champion 2013.
What you will learn in this Presentation
•
•
•
•
•
•

What is Appcelerator Titanium and why use it.
How to install Titanium Studio and what is required.
How to create a Mobile Project from scratch.
Let’s create a Login Window similar to our Login XPage.
Now, let’s compare Appcelerator and XPages.
Is TiDomino real or just a myth?
What is Appcelerator Titanium?
• A platform for developing mobile and web applications using web
technologies instead of the Operating System’s core
programming language.
• Develop mobile apps for iOS, Android, BB10 and Tizen (Windows
8 Mobile coming soon).
• Built on top of Eclipse and node.js.
Why use Appcelerator Titanium?
•
•
•
•
•

Very easy to set up and get going.
Has a well structured Object Model for cross platform development.
Has a Free Edition (Community Edition) which offers plenty.
No Objective-C, Java or C# skills required.
Instead, the minimum skillset required is:
• JavaScript
• CSS
• XML
• An understanding of the Titanium Object Model
• Extendable framework using Modules.
• Titanium converts your mobile project into a native project relevant to the
target Operating System.
• NB: Your mobile application is native, not a hybrid.
Appcelerator mobile. the doppelgänger to XPages
What you will learn in this Presentation
•
•
•
•
•
•

What is Appcelerator Titanium and why use it.
How to install Titanium Studio and what is required.
How to create a Mobile Project from scratch.
Let’s create a Login Window similar to our Login XPage.
Now, let’s compare Appcelerator and XPages.
Is TiDomino real or just a myth?
System Requirements
• Appcelerator Account (Register on appcelerator.com).
• Mac, Windows, Linux.
• At least 1 SDK (iOS, Android, BB10, Tizen).
How to install Titanium Studio
•
•
•
•

Download Titanium Studio from appcelerator.com.
Follow the easy install wizard to get Titanium Studio installed.
Open Titanium Studio and log in with your Appcelerator Account.
Validate that your SDKs are installed and mapped properly.
Download Titanium Studio
Log into Titanium Studio
Validate SDKs in Titanium Studio
What you will learn in this Presentation
•
•
•
•
•
•

What is Appcelerator Titanium and why use it.
How to install Titanium Studio and what is required.
How to create a Mobile Project from scratch.
Let’s create a Login Window similar to our Login XPage.
Now, let’s compare Appcelerator and XPages.
Is TiDomino real or just a myth?
Create a new Mobile Project
• Example Info Required:
• Project Name (DanNotes)
• App ID (com.ukuvuma.dannotes)
• Deployment Targets (iPhone, iPad, Android, etc.)
Appcelerator mobile. the doppelgänger to XPages
What you will learn in this Presentation
•
•
•
•
•
•

What is Appcelerator Titanium and why use it.
How to install Titanium Studio and what is required.
How to create a Mobile Project from scratch.
Let’s create a Login Window similar to our Login XPage.
Now, let’s compare Appcelerator and XPages.
Is TiDomino real or just a myth?
Quick things you need to know
• Appcelerator makes use of Alloy MVC.
• index.xml, index.css, index.js are the starting points of any Alloy
Mobile Project.
• Alloy Models, in my opinion, have a long way to go still and will
not be used in our demo.
• The Window control is almost always used to display content on a
mobile device.
• Asynchronous functions are often used, so an understanding of
callback functions is a must.
Appcelerator mobile. the doppelgänger to XPages
What you will learn in this Presentation
•
•
•
•
•
•

What is Appcelerator Titanium and why use it.
How to install Titanium Studio and what is required.
How to create a Mobile Project from scratch.
Let’s create a Login Window similar to our Login XPage.
Now, let’s compare Appcelerator and XPages.
Is TiDomino real or just a myth?
Code for Login Page - Appcelerator
<Alloy>
<Window class="window">
<ImageView id="image1" class="image"></ImageView>
<Label id="label1" class="label" text="Username"></Label>
<TextField id="username" class="field"></TextField>
<Label id="label2" class="label" text=”Password"></Label>
<TextField id="password" class="field"></TextField>
<Button id="button" class="button" title="Submit"></Button>
</Window>
</Alloy>
Code for Login Page – XPages
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.resources><xp:styleSheet href="/index.css"></xp:styleSheet></xp:this.resources>
<xp:div styleClass="window">
<xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Username" id="label1" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="username" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Password" id="label2" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="password" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:button value="Submit" id="button" styleClass="button"></xp:button>
</xp:div>
</xp:view>
Remove XML Header
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.resources><xp:styleSheet href="/index.css"></xp:styleSheet></xp:this.resources>
<xp:div styleClass="window">
<xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Username" id="label1" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="username" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Password" id="label2" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="password" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:button value="Submit" id="button" styleClass="button"></xp:button>
</xp:div>
</xp:view>
Remove XML Header
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.resources><xp:styleSheet href="/index.css"></xp:styleSheet></xp:this.resources>
<xp:div styleClass="window">
<xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Username" id="label1" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="username" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Password" id="label2" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="password" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:button value="Submit" id="button" styleClass="button"></xp:button>
</xp:div>
</xp:view>
Remove reference to Stylesheet
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.resources><xp:styleSheet href="/index.css"></xp:styleSheet></xp:this.resources>
<xp:div styleClass="window">
<xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Username" id="label1" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="username" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Password" id="label2" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="password" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:button value="Submit" id="button" styleClass="button"></xp:button>
</xp:div>
</xp:view>
Remove reference to Stylesheet
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:div styleClass="window">
<xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Username" id="label1" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="username" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Password" id="label2" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="password" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:button value="Submit" id="button" styleClass="button"></xp:button>
</xp:div>
</xp:view>
Remove Style Separators
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:div styleClass="window">
<xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Username" id="label1" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="username" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:label value="Password" id="label2" styleClass="label"></xp:label>
<xp:div styleClass="separator"></xp:div>
<xp:inputText id="password" styleClass="field"></xp:inputText>
<xp:div styleClass="separator"></xp:div>
<xp:button value="Submit" id="button" styleClass="button"></xp:button>
</xp:div>
</xp:view>
Remove Style Separators
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:div styleClass="window">
<xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image>
<xp:label value="Username" id="label1" styleClass="label"></xp:label>
<xp:inputText id="username" styleClass="field"></xp:inputText>
<xp:label value="Password" id="label2" styleClass="label"></xp:label>
<xp:inputText id="password" styleClass="field"></xp:inputText>
<xp:button value="Submit" id="button" styleClass="button"></xp:button>
</xp:div>
</xp:view>
Code for Login Page – XPages
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:div styleClass="window">
<xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image>
<xp:label value="Username" id="label1" styleClass="label"></xp:label>
<xp:inputText id="username" styleClass="field"></xp:inputText>
<xp:label value="Password" id="label2" styleClass="label"></xp:label>
<xp:inputText id="password" styleClass="field"></xp:inputText>
<xp:button value="Submit" id="button" styleClass="button"></xp:button>
</xp:div>
</xp:view>
Both
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:div styleClass="window">
<xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image>
<xp:label value="Username" id="label1" styleClass="label"></xp:label>
<xp:inputText id="username" styleClass="field"></xp:inputText>
<xp:label value="Password" id="label2" styleClass="label"></xp:label>
<xp:inputText id="password" styleClass="field"></xp:inputText>
<xp:button value="Submit" id="button" styleClass="button"></xp:button>
</xp:div>
</xp:view>
<Alloy>
<Window class="window">
<ImageView id="image1" class="image"></ImageView>
<Label id="label1" class="label" text="Username"></Label>
<TextField id="username" class="field"></TextField>
<Label id="label2" class="label" text=”Password"></Label>
<TextField id="password" class="field"></TextField>
<Button id="button" class="button" title="Submit"></Button>
</Window>
</Alloy>
What you will learn in this Presentation
•
•
•
•
•
•

What is Appcelerator Titanium and why use it.
How to install Titanium Studio and what is required.
How to create a Mobile Project from scratch.
Let’s create a Login Window similar to our Login XPage.
Now, let’s compare Appcelerator and XPages.
Is TiDomino real or just a myth?
What is TiDomino?
• An Open Source JavaScript Module allowing Appcelerator
developers to use IBM Domino scripting patterns to structure
local data sets and integrate with IBM Domino Applications.
• Licensed under Apache 2.
• Consists of 1 JavaScript file and 1 IBM Notes Database (NSF).
• The JavaScript file is used in your Appcelerator Mobile
Application.
• The Notes Database runs on your Domino Server and acts as a
communicator for your Appcelerator Mobile Application.
• Available on OpenNTF.org.
Why did I create TiDomino?
• Mobile applications make use of HTTP requests and Web Services
to send and receive data to and from remote servers.
• For most Mobile Operating Systems, these requests are
asynchronous, so callbacks will need to be managed carefully.
• In summary, a simple task like authenticating with a remote
server could require around 80 lines of code depending on the
checks that need to be performed.
• Also, asynchronous functions and callbacks might not be common
practices to XPages Developers.
How to install TiDomino
• Import the “TiDomino.js” file into the “Lib” folder of your
Appcelerator Mobile application.
• Extract the Notes Database (tidomino.nsf) to the “Data” directory
of your IBM Domino Server.
• Sign the Notes Database (tidomino.nsf) with an ID that will be
allowed to perform read/write operations to your business
applications.
• Tweak the Access Control List of the Notes Database to fit your
company’s policies.
TiDomino will allow you to peform the
following functions:
• Authenticate with a Domino Server (Login and Logout).
• Perform a “GetAllDocumentsByKey” method against a
NotesDatabase View.
• Submit new or update existing NotesDocument Objects to the
Domino Server.
• Execute custom XAgents that you’ve set up in your XPages
Applications.
Authenticate with a Domino Server

Execute a function called “signIn()”
Authenticate with a Domino Server
function signIn() {
//First validate fields
var username = $.username.value;
var password = $.password.value;
//Add your code here
}

return true;
Authenticate with a Domino Server
//Add your code here  (From Previous Slide)
var Session = require('TiDomino');
var ss = new Session();
//Create Server Connection
var serverKey = "acme"; //Any Key
var dominoServer = "ACME/Server”, hostName = "www.acme.com";
var isHTTPS = false, requireInternet = false;
var con = ss.createServerConnection(serverKey,
dominoServer, hostName, isHTTPS, requireInternet);
ss.loginUser(con, username, password, getAllClients, null);
Get All Documents By Key
//ss.loginUser(con, username, password, getAllClients, null);  (From Previous Slide)

function getAllClients(result, params){
var db = ss.getDatabase(con, "crm.nsf");
var view = db.getView("AllClients");
var fieldsToReturn = "Date,Employee,TimeAllocation";
view.getAllDocumentsByKey("Active", true, fieldsToReturn,
processResults, null);
}

return true;
Create and save Notes Document
function submitNotesDocument(){
var db = ss.getDatabase(con, "crm.nsf");
var doc = db.createDocument({
Form:'TitaniumDoc',
Status:'New’
});
doc.Title = "Test Title";

}

doc.save(processSaveNotesDocument, null);
return true;
Run XAgent
function runXAgent(){
var db = ss.getDatabase(con, "crm.nsf");
db.runXAgent(”getClients.xsp", {processType:"1"},
processRunXAgent, null);
return true;
}
What’s next for TiDomino?
•
•
•
•
•
•

More Domino Objects.
Increased Performance.
Integration with IBM Domino REST APIs.
Integration with SQLite local storage facility.
Replication.
And much much more.
Some useful links
•
•
•
•
•

TiDomino on OpenNTF
http://docs.appcelerator.com - (API Docs)
http://developer.appcelerator.com - (Q&A Forum)
http://stackoverflow.com - (tag: appcelerator)
Many groups on LinkedIn and Google+
How to contact me
•
•
•
•
•
•
•

johnjardin.ukuvuma.co.za - (My Blog)
www.ukuvuma.co.za - (Website)
Twitter – (@John_Ukuvuma)
LinkedIn – (John Jardin)
Google+ - (John Jardin)
E-Mail (john.jardin@ukuvuma.co.za)
Skype – (john.v.jardin)
Thank you 

More Related Content

PPT
Mobile Blast - Mobile strategy for developers
PDF
打造你的第一個iPhone APP
PPTX
Developing a Modern Mobile App Strategy
PPTX
Mobile applications chapter 5
PPTX
Journey to the center of the software industry world
PPTX
Mobile Development with Adobe AIR
PDF
Appcelerator Overview
PPT
On Mobile- Product Strategy
Mobile Blast - Mobile strategy for developers
打造你的第一個iPhone APP
Developing a Modern Mobile App Strategy
Mobile applications chapter 5
Journey to the center of the software industry world
Mobile Development with Adobe AIR
Appcelerator Overview
On Mobile- Product Strategy

What's hot (20)

PPTX
Developing Enterprise-Grade Mobile Applications
PPT
iPhone Development: Zero to Sixty
PDF
Hybrid mobile apps
PDF
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
PDF
Nascent tawkon ux design process
PPTX
02 BlackBerry Application Development
PPTX
Mobility testing day_1_ppt
PPTX
Native vs Web vs Hybrid Mobile Application Development
PDF
iTunes App Store Submission Process
PDF
Native Application Development Company
PDF
The Great Mobile Debate: Native vs. Hybrid App Development
PPT
Hybrid mobile app development
PDF
Making money with apps
KEY
Building a sustainable, cross-platform mobile application strategy - SoCon 20...
PPTX
Cross Platform Mobile Application Architecture
PDF
Mobile application development strategy and execution
PDF
Mobile app development - course intro
PPTX
Why software architecture (Mobile Architecture)?
PDF
Post Windows Mobile: New Application Development Platforms
KEY
HTML5 로 iPhone App 만들기
Developing Enterprise-Grade Mobile Applications
iPhone Development: Zero to Sixty
Hybrid mobile apps
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
Nascent tawkon ux design process
02 BlackBerry Application Development
Mobility testing day_1_ppt
Native vs Web vs Hybrid Mobile Application Development
iTunes App Store Submission Process
Native Application Development Company
The Great Mobile Debate: Native vs. Hybrid App Development
Hybrid mobile app development
Making money with apps
Building a sustainable, cross-platform mobile application strategy - SoCon 20...
Cross Platform Mobile Application Architecture
Mobile application development strategy and execution
Mobile app development - course intro
Why software architecture (Mobile Architecture)?
Post Windows Mobile: New Application Development Platforms
HTML5 로 iPhone App 만들기
Ad

Similar to Appcelerator mobile. the doppelgänger to XPages (20)

PPTX
Appcelerator Titanium Intro
PPTX
Getting started with Appcelerator Titanium
PDF
An introduction to Titanium
PPTX
Getting started with titanium
PDF
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
PPTX
Proactive Citrix Logon Monitoring with Free Citrix Logon Simulator
PPT
Native Mobile Application Using Open Source
PPT
OSCON Titanium Tutorial
PPTX
Appcelerator Alloy Deep Dive - tiTokyo 2013
PPTX
Appcelerator Alloy Deep Dive - tiTokyo 2013
PPTX
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
KEY
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
ZIP
iPhone/iPad Development with Titanium
PPTX
Jump start your application monitoring with APM
PPTX
How to build your own Android App -Step by Step Guide
PDF
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PDF
Appcelerator Titanium Intro (2014)
PPT
Live Source - an Agile Toolkit
PPTX
How to build a SaaS solution in 60 days
PDF
Android development made easy with appcelerator titanium
Appcelerator Titanium Intro
Getting started with Appcelerator Titanium
An introduction to Titanium
Getting started with titanium
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Proactive Citrix Logon Monitoring with Free Citrix Logon Simulator
Native Mobile Application Using Open Source
OSCON Titanium Tutorial
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
iPhone/iPad Development with Titanium
Jump start your application monitoring with APM
How to build your own Android App -Step by Step Guide
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
Appcelerator Titanium Intro (2014)
Live Source - an Agile Toolkit
How to build a SaaS solution in 60 days
Android development made easy with appcelerator titanium
Ad

Recently uploaded (20)

PDF
Flame analysis and combustion estimation using large language and vision assi...
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Architecture types and enterprise applications.pdf
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
The various Industrial Revolutions .pptx
PDF
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
STKI Israel Market Study 2025 version august
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
A review of recent deep learning applications in wood surface defect identifi...
Flame analysis and combustion estimation using large language and vision assi...
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Chapter 5: Probability Theory and Statistics
Benefits of Physical activity for teenagers.pptx
Architecture types and enterprise applications.pdf
UiPath Agentic Automation session 1: RPA to Agents
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Custom Battery Pack Design Considerations for Performance and Safety
A contest of sentiment analysis: k-nearest neighbor versus neural network
Improvisation in detection of pomegranate leaf disease using transfer learni...
Credit Without Borders: AI and Financial Inclusion in Bangladesh
The influence of sentiment analysis in enhancing early warning system model f...
The various Industrial Revolutions .pptx
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
1 - Historical Antecedents, Social Consideration.pdf
STKI Israel Market Study 2025 version august
Taming the Chaos: How to Turn Unstructured Data into Decisions
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
A review of recent deep learning applications in wood surface defect identifi...

Appcelerator mobile. the doppelgänger to XPages

  • 1. Appcelerator Mobile. The Doppelgänger to XPages Another Story by John Jardin
  • 2. Who is John Jardin? • CTO of Ukuvuma Solutions. • Responsible for pushing the boundaries on technology and productizing it for businesses. • Developer for 12 Years, primarily focused on IBM Domino. • I almost, almost, became a Domino Administrator. • IBM Champion 2013.
  • 3. What you will learn in this Presentation • • • • • • What is Appcelerator Titanium and why use it. How to install Titanium Studio and what is required. How to create a Mobile Project from scratch. Let’s create a Login Window similar to our Login XPage. Now, let’s compare Appcelerator and XPages. Is TiDomino real or just a myth?
  • 4. What is Appcelerator Titanium? • A platform for developing mobile and web applications using web technologies instead of the Operating System’s core programming language. • Develop mobile apps for iOS, Android, BB10 and Tizen (Windows 8 Mobile coming soon). • Built on top of Eclipse and node.js.
  • 5. Why use Appcelerator Titanium? • • • • • Very easy to set up and get going. Has a well structured Object Model for cross platform development. Has a Free Edition (Community Edition) which offers plenty. No Objective-C, Java or C# skills required. Instead, the minimum skillset required is: • JavaScript • CSS • XML • An understanding of the Titanium Object Model • Extendable framework using Modules. • Titanium converts your mobile project into a native project relevant to the target Operating System. • NB: Your mobile application is native, not a hybrid.
  • 7. What you will learn in this Presentation • • • • • • What is Appcelerator Titanium and why use it. How to install Titanium Studio and what is required. How to create a Mobile Project from scratch. Let’s create a Login Window similar to our Login XPage. Now, let’s compare Appcelerator and XPages. Is TiDomino real or just a myth?
  • 8. System Requirements • Appcelerator Account (Register on appcelerator.com). • Mac, Windows, Linux. • At least 1 SDK (iOS, Android, BB10, Tizen).
  • 9. How to install Titanium Studio • • • • Download Titanium Studio from appcelerator.com. Follow the easy install wizard to get Titanium Studio installed. Open Titanium Studio and log in with your Appcelerator Account. Validate that your SDKs are installed and mapped properly.
  • 12. Validate SDKs in Titanium Studio
  • 13. What you will learn in this Presentation • • • • • • What is Appcelerator Titanium and why use it. How to install Titanium Studio and what is required. How to create a Mobile Project from scratch. Let’s create a Login Window similar to our Login XPage. Now, let’s compare Appcelerator and XPages. Is TiDomino real or just a myth?
  • 14. Create a new Mobile Project • Example Info Required: • Project Name (DanNotes) • App ID (com.ukuvuma.dannotes) • Deployment Targets (iPhone, iPad, Android, etc.)
  • 16. What you will learn in this Presentation • • • • • • What is Appcelerator Titanium and why use it. How to install Titanium Studio and what is required. How to create a Mobile Project from scratch. Let’s create a Login Window similar to our Login XPage. Now, let’s compare Appcelerator and XPages. Is TiDomino real or just a myth?
  • 17. Quick things you need to know • Appcelerator makes use of Alloy MVC. • index.xml, index.css, index.js are the starting points of any Alloy Mobile Project. • Alloy Models, in my opinion, have a long way to go still and will not be used in our demo. • The Window control is almost always used to display content on a mobile device. • Asynchronous functions are often used, so an understanding of callback functions is a must.
  • 19. What you will learn in this Presentation • • • • • • What is Appcelerator Titanium and why use it. How to install Titanium Studio and what is required. How to create a Mobile Project from scratch. Let’s create a Login Window similar to our Login XPage. Now, let’s compare Appcelerator and XPages. Is TiDomino real or just a myth?
  • 20. Code for Login Page - Appcelerator <Alloy> <Window class="window"> <ImageView id="image1" class="image"></ImageView> <Label id="label1" class="label" text="Username"></Label> <TextField id="username" class="field"></TextField> <Label id="label2" class="label" text=”Password"></Label> <TextField id="password" class="field"></TextField> <Button id="button" class="button" title="Submit"></Button> </Window> </Alloy>
  • 21. Code for Login Page – XPages <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:this.resources><xp:styleSheet href="/index.css"></xp:styleSheet></xp:this.resources> <xp:div styleClass="window"> <xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image> <xp:div styleClass="separator"></xp:div> <xp:label value="Username" id="label1" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="username" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:label value="Password" id="label2" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="password" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:button value="Submit" id="button" styleClass="button"></xp:button> </xp:div> </xp:view>
  • 22. Remove XML Header <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:this.resources><xp:styleSheet href="/index.css"></xp:styleSheet></xp:this.resources> <xp:div styleClass="window"> <xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image> <xp:div styleClass="separator"></xp:div> <xp:label value="Username" id="label1" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="username" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:label value="Password" id="label2" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="password" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:button value="Submit" id="button" styleClass="button"></xp:button> </xp:div> </xp:view>
  • 23. Remove XML Header <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:this.resources><xp:styleSheet href="/index.css"></xp:styleSheet></xp:this.resources> <xp:div styleClass="window"> <xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image> <xp:div styleClass="separator"></xp:div> <xp:label value="Username" id="label1" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="username" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:label value="Password" id="label2" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="password" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:button value="Submit" id="button" styleClass="button"></xp:button> </xp:div> </xp:view>
  • 24. Remove reference to Stylesheet <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:this.resources><xp:styleSheet href="/index.css"></xp:styleSheet></xp:this.resources> <xp:div styleClass="window"> <xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image> <xp:div styleClass="separator"></xp:div> <xp:label value="Username" id="label1" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="username" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:label value="Password" id="label2" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="password" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:button value="Submit" id="button" styleClass="button"></xp:button> </xp:div> </xp:view>
  • 25. Remove reference to Stylesheet <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:div styleClass="window"> <xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image> <xp:div styleClass="separator"></xp:div> <xp:label value="Username" id="label1" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="username" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:label value="Password" id="label2" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="password" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:button value="Submit" id="button" styleClass="button"></xp:button> </xp:div> </xp:view>
  • 26. Remove Style Separators <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:div styleClass="window"> <xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image> <xp:div styleClass="separator"></xp:div> <xp:label value="Username" id="label1" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="username" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:label value="Password" id="label2" styleClass="label"></xp:label> <xp:div styleClass="separator"></xp:div> <xp:inputText id="password" styleClass="field"></xp:inputText> <xp:div styleClass="separator"></xp:div> <xp:button value="Submit" id="button" styleClass="button"></xp:button> </xp:div> </xp:view>
  • 27. Remove Style Separators <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:div styleClass="window"> <xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image> <xp:label value="Username" id="label1" styleClass="label"></xp:label> <xp:inputText id="username" styleClass="field"></xp:inputText> <xp:label value="Password" id="label2" styleClass="label"></xp:label> <xp:inputText id="password" styleClass="field"></xp:inputText> <xp:button value="Submit" id="button" styleClass="button"></xp:button> </xp:div> </xp:view>
  • 28. Code for Login Page – XPages <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:div styleClass="window"> <xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image> <xp:label value="Username" id="label1" styleClass="label"></xp:label> <xp:inputText id="username" styleClass="field"></xp:inputText> <xp:label value="Password" id="label2" styleClass="label"></xp:label> <xp:inputText id="password" styleClass="field"></xp:inputText> <xp:button value="Submit" id="button" styleClass="button"></xp:button> </xp:div> </xp:view>
  • 29. Both <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:div styleClass="window"> <xp:image url="/UkuvumaLogoOnly.png" id="image1" styleClass="image"></xp:image> <xp:label value="Username" id="label1" styleClass="label"></xp:label> <xp:inputText id="username" styleClass="field"></xp:inputText> <xp:label value="Password" id="label2" styleClass="label"></xp:label> <xp:inputText id="password" styleClass="field"></xp:inputText> <xp:button value="Submit" id="button" styleClass="button"></xp:button> </xp:div> </xp:view> <Alloy> <Window class="window"> <ImageView id="image1" class="image"></ImageView> <Label id="label1" class="label" text="Username"></Label> <TextField id="username" class="field"></TextField> <Label id="label2" class="label" text=”Password"></Label> <TextField id="password" class="field"></TextField> <Button id="button" class="button" title="Submit"></Button> </Window> </Alloy>
  • 30. What you will learn in this Presentation • • • • • • What is Appcelerator Titanium and why use it. How to install Titanium Studio and what is required. How to create a Mobile Project from scratch. Let’s create a Login Window similar to our Login XPage. Now, let’s compare Appcelerator and XPages. Is TiDomino real or just a myth?
  • 31. What is TiDomino? • An Open Source JavaScript Module allowing Appcelerator developers to use IBM Domino scripting patterns to structure local data sets and integrate with IBM Domino Applications. • Licensed under Apache 2. • Consists of 1 JavaScript file and 1 IBM Notes Database (NSF). • The JavaScript file is used in your Appcelerator Mobile Application. • The Notes Database runs on your Domino Server and acts as a communicator for your Appcelerator Mobile Application. • Available on OpenNTF.org.
  • 32. Why did I create TiDomino? • Mobile applications make use of HTTP requests and Web Services to send and receive data to and from remote servers. • For most Mobile Operating Systems, these requests are asynchronous, so callbacks will need to be managed carefully. • In summary, a simple task like authenticating with a remote server could require around 80 lines of code depending on the checks that need to be performed. • Also, asynchronous functions and callbacks might not be common practices to XPages Developers.
  • 33. How to install TiDomino • Import the “TiDomino.js” file into the “Lib” folder of your Appcelerator Mobile application. • Extract the Notes Database (tidomino.nsf) to the “Data” directory of your IBM Domino Server. • Sign the Notes Database (tidomino.nsf) with an ID that will be allowed to perform read/write operations to your business applications. • Tweak the Access Control List of the Notes Database to fit your company’s policies.
  • 34. TiDomino will allow you to peform the following functions: • Authenticate with a Domino Server (Login and Logout). • Perform a “GetAllDocumentsByKey” method against a NotesDatabase View. • Submit new or update existing NotesDocument Objects to the Domino Server. • Execute custom XAgents that you’ve set up in your XPages Applications.
  • 35. Authenticate with a Domino Server Execute a function called “signIn()”
  • 36. Authenticate with a Domino Server function signIn() { //First validate fields var username = $.username.value; var password = $.password.value; //Add your code here } return true;
  • 37. Authenticate with a Domino Server //Add your code here  (From Previous Slide) var Session = require('TiDomino'); var ss = new Session(); //Create Server Connection var serverKey = "acme"; //Any Key var dominoServer = "ACME/Server”, hostName = "www.acme.com"; var isHTTPS = false, requireInternet = false; var con = ss.createServerConnection(serverKey, dominoServer, hostName, isHTTPS, requireInternet); ss.loginUser(con, username, password, getAllClients, null);
  • 38. Get All Documents By Key //ss.loginUser(con, username, password, getAllClients, null);  (From Previous Slide) function getAllClients(result, params){ var db = ss.getDatabase(con, "crm.nsf"); var view = db.getView("AllClients"); var fieldsToReturn = "Date,Employee,TimeAllocation"; view.getAllDocumentsByKey("Active", true, fieldsToReturn, processResults, null); } return true;
  • 39. Create and save Notes Document function submitNotesDocument(){ var db = ss.getDatabase(con, "crm.nsf"); var doc = db.createDocument({ Form:'TitaniumDoc', Status:'New’ }); doc.Title = "Test Title"; } doc.save(processSaveNotesDocument, null); return true;
  • 40. Run XAgent function runXAgent(){ var db = ss.getDatabase(con, "crm.nsf"); db.runXAgent(”getClients.xsp", {processType:"1"}, processRunXAgent, null); return true; }
  • 41. What’s next for TiDomino? • • • • • • More Domino Objects. Increased Performance. Integration with IBM Domino REST APIs. Integration with SQLite local storage facility. Replication. And much much more.
  • 42. Some useful links • • • • • TiDomino on OpenNTF http://docs.appcelerator.com - (API Docs) http://developer.appcelerator.com - (Q&A Forum) http://stackoverflow.com - (tag: appcelerator) Many groups on LinkedIn and Google+
  • 43. How to contact me • • • • • • • johnjardin.ukuvuma.co.za - (My Blog) www.ukuvuma.co.za - (Website) Twitter – (@John_Ukuvuma) LinkedIn – (John Jardin) Google+ - (John Jardin) E-Mail (john.jardin@ukuvuma.co.za) Skype – (john.v.jardin)