SlideShare una empresa de Scribd logo
1 de 85
Descargar para leer sin conexión
MOBILE
DEVELOPMENT
OPTIONS
!
PRATIK PATEL | CTO | TripLingo
twitter: @prpatel
TOPICS
• Android, iOS, HTML5/CSS3, Phonegap,
Titanium, and jQuery Mobile
• native, cross-platform-to-native, and mobile
web
• deep dive into:
- phonegap
- titanium
PRATIK PATEL | CTO
WE’ll FOCUS
ON
PRATIK PATEL | CTO
MY EXPERIENCE
PRATIK PATEL | CTO
overview of the
options
!
!
!
!
NATIVE MOBILE
• Must know Objective-C & Java very well
• SDK is closed source, many open-source
libs available
PRATIK PATEL | CTO
NATIVE II
• MUST KNOW THE TOOL chain for each
platform
PRATIK PATEL | CTO
ANDROID
PRATIK PATEL | CTO
XCODE
PRATIK PATEL | CTO
NATIVE III
• ABILITY TO CREATE best possible app
• time & effort multiplied by platform
• obviously not cross-platform
PRATIK PATEL | CTO
PRATIK PATEL | CTO
PHONEGAP
• native wrapper
- bootstraps a webkit browser
!
• open-source as “Apache Cordova”
PRATIK PATEL | CTO
PHONEGAP
• provides hooks into native functions
- camera, contacts, accelerometer, etc
PRATIK PATEL | CTO
PRATIK PATEL | CTO
http://www.melablog.it/post/11421/phonegap-riceve-il-nulla-osta-di-apple-per-app-store
PHONEGAP
• Must use native toolchain to build
phonegap wrapper
PRATIK PATEL | CTO
CROSS PLATFORM
PRATIK PATEL | CTO
http://mashable.com/2011/02/22/html-mobile-development/
CODING PHONEGAP
• you can develop right in a desktop browser
for most of your app!
PRATIK PATEL | CTO
MOBILE WEB LIBS
- jquery mobile
- sencha touch
- jo (joapp.com)
- kendoui
PRATIK PATEL | CTO
PRATIK PATEL | CTO
phonegap DIAGRAM
Operating System (iOS/Android)
Phonegap native 	

wrapper app
Webkit browser	

engineYour
code
runs
here
PRATIK PATEL | CTO
phonegap on ios
APP DEV
PLATFORMS
PRATIK PATEL | CTO
APP DEV PLATFORMS
• Xamarin (formerly monotouch) (C#)
• Ansca Corona (LUA)
• Appcelerator TITANIUM (JAVASCRIPT)
• Only TITANIUM is open-source
PRATIK PATEL | CTO
APP DEV PLATFORMS
• do _NOT_ generate code
• bridge from LANG <X> to native
• uses native toolchain
PRATIK PATEL | CTO
BRIDGE
• VENDOR WRITES HOOKS to native API
• vendor marshalls / unmarshalls calls & data
in both directions
PRATIK PATEL | CTO
PRATIK PATEL | CTO
how they work
you code here
var win1 = Titanium.UI.createWindow({ 	
url:'main.js', 	
title:'Spice Guide',	
// backgroundImage:'./images/bg.png',	
navBarHidden: false,	
tabBarHidden: true	
});
app platform
android sdkios sdk
platform provides API
platform bridges to native
TITANIUM
PRATIK PATEL | CTO
TITANIUM
• open source, 100% free
• IDE - titanium studio - based on eclipse
PRATIK PATEL | CTO
TITANIUM II
• code in javascript
• again, not a generator
!
PRATIK PATEL | CTO
CODE REUSE?
• 100% Of non-UI code is reusable
• 80% of UI code is reusable
• UI code can become more reusable with
experience and patterns!
PRATIK PATEL | CTO
TITANIUM == NATIVE
PRATIK PATEL | CTO
• Titanium api calls native objects/methods
• no code generation
• native widgets
• Tons of open-source modules available!
PRATIK PATEL | CTO
titanium live coding
notice something
common?
!
!
!
!
NATIVE
TOOLCHAIN!
PRATIK PATEL | CTO
PRATIK PATEL | CTO
you must learn the
native toolchain for
any of the options!
NATIVE TOOLCHAIN
• you must learn the native toolchain
• spend a few days building a native app for
each platform you’re interested in
• the time you invest in this will be paid back
100x
PRATIK PATEL | CTO
COMPARING
THE OPTIONS
PRATIK PATEL | CTO
NATIVE
• no code reuse
• best possible experience
• games, low-level needs
• cost: $$$$$
PRATIK PATEL | CTO
PHONEGAP
• use tech you know (HTML/JS/CSS)
• Rapid development
• user experience is hard to perFect
• bad performance
• nuances of browser tech = black hole of
effort
PRATIK PATEL | CTO
APP DEV PLATFORMS
• can get good code reuse
• performance is very close to native
• must learn a new tool/platform
• abstraction distractions
• rapid development
PRATIK PATEL | CTO
PRATIK PATEL | CTO
PRATIK PATEL | CTO
PRATIK PATEL | CTO
AU REVOIR!
!
Follow me on twitter: @PRPATEL
NATIVE
PRATIK PATEL | CTO
IOS
• OBJECTIVE-C language
• dispatch model is very powerful
• NOT low ceremony
PRATIK PATEL | CTO
ANDROID
• Java with limitations (Davlik VM)
• open source platform
• tools you know and love (?)
!
PRATIK PATEL | CTO
NATIVE II
• developing the ‘same’ app for 2+ platforms
== $$$$
• “LOW LEVEL” programming
PRATIK PATEL | CTO
PHONEGAP
PRATIK PATEL | CTO
PHONEGAP
• open source, 100% free
• APACHE PROJECT
• large community
• tons of plugins
PRATIK PATEL | CTO
MIND THE GAP II
• wraps a web browser in a native project
• your code runs in the browser
• plugins allow more native functions
• provides hooks into native functions
- camera, contacts, accelerometer, etc
!
PRATIK PATEL | CTO
MIND THE GAP III
• you can develop right in a desktop browser
for most of your app!
• can use mobile web libs:
- jquery mobile
- sencha touch
- jo (joapp.com)
- kendoui
PRATIK PATEL | CTO
phonegap demo
!
!
!
!
APP DEV
PLATFORMS
PRATIK PATEL | CTO
BRIDGE
• vendor provides proprietary API on top
• you code to this API
• VENDOR WRITES HOOKS to native API
• vendor marshalls / unmarshalls calls & data
in both directions
• again, no code generation!
PRATIK PATEL | CTO
PRATIK PATEL | CTO
how they work
you code here
var win1 = Titanium.UI.createWindow({ 	
url:'main.js', 	
title:'Spice Guide',	
// backgroundImage:'./images/bg.png',	
navBarHidden: false,	
tabBarHidden: true	
});
app platform
android sdkios sdk
platform provides API
platform bridges to native
MONOTOUCH
• based on mono
• C#
• $600 for both ios and android
PRATIK PATEL | CTO
ANSCA CORONA
• based on LUA - a script lang for c
• popular with game devs
• $349 for both ios and android
• less bridGing
PRATIK PATEL | CTO
RUBYMOTION
• based on RUBY - but ios only
• fairly new
• $199
• live REPL, other nice features
PRATIK PATEL | CTO
TITANIUM
PRATIK PATEL | CTO
TITANIUM
• open source, 100% free
• support contract costs $
• extra modules cost $ (ex: storekit)
• IDE - titanium studio - based on eclipse
PRATIK PATEL | CTO
TITANIUM II
• code in javascript
• again, not a generator
!
PRATIK PATEL | CTO
PLATFORMS
• iOS
• ANDROID
• Mobile web (beta)
• Blackberry 10 coming soon
PRATIK PATEL | CTO
Titanium SDK
• Javascript to native bridge
• Code to Titanium API (proprietary)
• Write once, deploy to iOS + ANdroid
• platform specific API’s too!
PRATIK PATEL | CTO
WIDGETS
• Buttons, Labels, Windows, Views
• Sliders, TextFields, WebViews
• Pickers, Tables
PRATIK PATEL | CTO
EVENTS
• ADD / Fire events
• Very much like “web” Javascript dev
PRATIK PATEL | CTO
CODE REUSE?
• 100% Of non-UI code is reusable
• 50% of UI code is reusable
• UI code can become more reusable with
experience and patterns!
PRATIK PATEL | CTO
TITANIUM == NATIVE
PRATIK PATEL | CTO
• Titanium api calls native objects/methods
• no code generation
• native widgets
TITANIUM MODULES
• Titanium is based on modules
• Each module represents an API
• Bridge from JavaScript to native runtime
• Example modules: networking, database,
Filesystem, UI, Yahoo, Media, Map, Facebook,
Accelerometer
PRATIK PATEL | CTO
let’s write a
Titanium app
Layouts code
var	
  view	
  =	
  Ti.UI.createView({	
  
	
  	
  	
  	
  backgroundColor:'transparent',	
  
	
  	
  	
  	
  top:0,	
  
	
  	
  	
  	
  left:0,	
  
	
  	
  	
  	
  width:'100%',	
  
	
  	
  	
  	
  height:'100%',	
  
	
  	
  	
  	
  layout:'vertical'	
  
});	
  
//	
  create	
  labels,	
  buttons,	
  text	
  fields	
  
!
view.add(usernameLabel);	
  
view.add(usernameField);	
  
view.add(submitButton);
PRATIK PATEL | CTO
Events code
Ti.App.addEventListener('event_type',	
  function(e)	
  
{	
  
	
  	
  	
  	
  Ti.API.info('The	
  '+e.type+'	
  event	
  happened');	
  
});	
  
!
Ti.App.fireEvent('click',	
  	
  
{datakey:	
  'value'});	
  
PRATIK PATEL | CTO
Custom Controls
var buttonView1 = Titanium.UI.createView({	
	 top: 0, left: 0, height: 50, width: 50,	
	 borderRadius: 10,	
	 backgroundColor: '#cef7ff' });	
var selection1 = Titanium.UI.createLabel({	
	 text : 'Fish',	
	 color : '#f79e18',	
	 font : {fontSize : 40},	
	 textAlign: 'center' });	
buttonView1.add(selection1);
PRATIK PATEL | CTO
HttpClient
var	
  url	
  =	
  "https://www.google.com";	
  
var	
  xhr	
  =	
  Ti.Network.createHTTPClient({	
  
	
  	
  	
  	
  onload:	
  function(e)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  Ti.API.debug(this.responseText);	
  
	
  	
  	
  	
  	
  	
  	
  	
  alert('success');	
  
	
  	
  	
  	
  },	
  
	
  	
  	
  	
  onerror:	
  function(e)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  Ti.API.debug(e.error);	
  
	
  	
  	
  	
  	
  	
  	
  	
  alert('error');	
  
	
  	
  	
  	
  },	
  timeout:5000	
  
});	
  
xhr.open("GET",	
  url);	
  
xhr.send();
PRATIK PATEL | CTO
Database
var	
  db	
  =	
  Titanium.Database.open('mydb');	
  
!
db.execute('CREATE	
  TABLE	
  IF	
  NOT	
  EXISTS	
  DATABASETEST	
  	
  (ID	
  INTEGER,	
  NAME	
  
TEXT)');	
  
db.execute('DELETE	
  FROM	
  DATABASETEST');	
  
!
db.execute('INSERT	
  INTO	
  DATABASETEST	
  (ID,	
  NAME	
  )	
  VALUES(?,?)',1,'Name	
  
1');	
  
db.execute('UPDATE	
  DATABASETEST	
  SET	
  NAME	
  =	
  ?	
  WHERE	
  ID	
  =	
  ?',	
  updateName,	
  
updateId);	
  
var	
  rows	
  =	
  db.execute('SELECT	
  *	
  FROM	
  DATABASETEST');	
  
!
while	
  (rows.isValidRow())	
  
{	
  
	
   Titanium.API.info('ID:	
  '	
  +	
  rows.field(0)	
  +	
  '	
  NAME:	
  '	
  +	
  
rows.fieldByName('name')	
  +	
  '	
  COLUMN	
  NAME	
  '	
  +	
  rows.fieldName(0));	
  
	
   rows.next();	
  
}
PRATIK PATEL | CTO
Facebook
var	
  fbButton	
  =	
  Titanium.Facebook.createLoginButton({	
  
	
   'style':'wide',	
  
	
   'apikey':'9494e611f2a93b8d7bfcdfa8cefdaf9f',	
  
	
   'sessionProxy':'http://api.appcelerator.net/p/fbconnect/',	
  
	
   bottom:10,	
  height:30,	
  width:300	
  
});	
  
Titanium.Facebook.publishStream("Set	
  your	
  status",null,null,function(r)	
  
	
   {	
  
	
   	
   Titanium.API.info("received	
  status	
  response	
  =	
  "+JSON.stringify(r));	
  
	
   	
   if	
  (r.success)	
  
{Ti.UI.createAlertDialog({title:'Facebook',	
  	
  
message:'Your	
  status	
  was	
  ublished'}).show();	
  
	
   	
   }	
  
	
   	
   else	
  
	
   	
   {Ti.UI.createAlertDialog({title:'Facebook',	
  message:'Error	
  '	
  +	
  
	
  r.error}).show();	
  	
  
	
   	
   }	
  
	
   });
PRATIK PATEL | CTO
Animations
	
   var	
  t3	
  =	
  Ti.UI.create2DMatrix();	
  
	
   t3	
  =	
  t3.rotate(20);	
  
	
   t3	
  =	
  t3.scale(1.5);	
  
!
	
   var	
  a	
  =	
  Titanium.UI.createAnimation();	
  
	
   a.transform	
  =	
  t3;	
  
	
   a.duration	
  =	
  3000;	
  
!
var	
  view1	
  =	
  Titanium.UI.createView({	
  
	
   backgroundColor:'#336699',	
  
	
   top:10,	
  left:220,	
  height:50,	
  width:50,	
  
	
   anchorPoint:{x:0,y:0}	
  
});	
  
win.add(view1);	
  
topLeft.addEventListener('click',	
  function()	
  
{	
  
	
   view1.animate(a);	
  
});
PRATIK PATEL | CTO
app dev
platforms
PRATIK PATEL | CTO
REDUX
• APP dev PLATFORMS: a high level env
• reuse code
• access to native (and specific) API’s
PRATIK PATEL | CTO
REDUX II
• performance is near native (95%)
• drawbacks:
- abstraction
- must know app platform + native platform
PRATIK PATEL | CTO
choosing
PRATIK PATEL | CTO
NATIVE
• no code reuse
• best possible experience
• games, low-level needs
• cost: $$$$$
PRATIK PATEL | CTO
PHONEGAP
• use tech you know (HTML/JS/CSS)
• user experience is hard to perFect
• bad performance
• nuances of browser tech = black hole of
effort
PRATIK PATEL | CTO
APP DEV PLATFORMS
• can get good code reuse
• performance is very close to native
• must learn a new tool/platform
• abstraction distractions
• rapid development
PRATIK PATEL | CTO
what would you
pick?
!
!
!
!
AU REVOIR
PRATIK PATEL
@PRPATEL
PRPATEL@TRIPLINGO.COM

Más contenido relacionado

La actualidad más candente

Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
Wojciech Koszek
 

La actualidad más candente (14)

Hybrid HTML5 Apps
Hybrid HTML5 AppsHybrid HTML5 Apps
Hybrid HTML5 Apps
 
Lesson 1. Create project Sunshine
Lesson 1. Create project SunshineLesson 1. Create project Sunshine
Lesson 1. Create project Sunshine
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
 
Google's serverless journey: past to present
Google's serverless journey: past to presentGoogle's serverless journey: past to present
Google's serverless journey: past to present
 
Publishing strategies for API documentation
Publishing strategies for API documentationPublishing strategies for API documentation
Publishing strategies for API documentation
 
Programming the Real World: Javascript for Makers
Programming the Real World: Javascript for MakersProgramming the Real World: Javascript for Makers
Programming the Real World: Javascript for Makers
 
UI Beyond the Browser - Software for Hardware Projects
UI Beyond the Browser - Software for Hardware ProjectsUI Beyond the Browser - Software for Hardware Projects
UI Beyond the Browser - Software for Hardware Projects
 
Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Nativescript with angular 2
Nativescript with angular 2Nativescript with angular 2
Nativescript with angular 2
 
The Power, and Pain, of Cordova Plugins
The Power, and Pain, of Cordova PluginsThe Power, and Pain, of Cordova Plugins
The Power, and Pain, of Cordova Plugins
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golang
 
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
React Native for multi-platform mobile applications  - Matteo Manchi - Codemo...React Native for multi-platform mobile applications  - Matteo Manchi - Codemo...
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
 

Similar a Mobile Development Options

Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
Nicholas Jansma
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
Aaron Saunders
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
Kevin Decker
 
Building Papers
Building PapersBuilding Papers
Building Papers
Mahmoud
 

Similar a Mobile Development Options (20)

Titanium #MDS13
Titanium #MDS13Titanium #MDS13
Titanium #MDS13
 
Old code doesn't stink - Detroit
Old code doesn't stink - DetroitOld code doesn't stink - Detroit
Old code doesn't stink - Detroit
 
Desktop Apps with PHP and Titanium
Desktop Apps with PHP and TitaniumDesktop Apps with PHP and Titanium
Desktop Apps with PHP and Titanium
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
 
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
 
APIs for the Internet of Things
APIs for the Internet of ThingsAPIs for the Internet of Things
APIs for the Internet of Things
 
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator Titanium
 
PaaS + Appcelerator = WIN
PaaS + Appcelerator = WINPaaS + Appcelerator = WIN
PaaS + Appcelerator = WIN
 
Old code doesn't stink
Old code doesn't stinkOld code doesn't stink
Old code doesn't stink
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 
PhoneGap at Facebook Mobile Hack
PhoneGap at Facebook Mobile HackPhoneGap at Facebook Mobile Hack
PhoneGap at Facebook Mobile Hack
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
 
Building Papers
Building PapersBuilding Papers
Building Papers
 
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
 
.NET6.pptx
.NET6.pptx.NET6.pptx
.NET6.pptx
 
Titanium Mobile
Titanium MobileTitanium Mobile
Titanium Mobile
 
Programming for the Internet of Things
Programming for the Internet of ThingsProgramming for the Internet of Things
Programming for the Internet of Things
 

Más de Great Wide Open

Más de Great Wide Open (20)

The Little Meetup That Could
The Little Meetup That CouldThe Little Meetup That Could
The Little Meetup That Could
 
Lightning Talk - 5 Hacks to Getting the Job of Your Dreams
Lightning Talk - 5 Hacks to Getting the Job of Your DreamsLightning Talk - 5 Hacks to Getting the Job of Your Dreams
Lightning Talk - 5 Hacks to Getting the Job of Your Dreams
 
Breaking Free from Proprietary Gravitational Pull
Breaking Free from Proprietary Gravitational PullBreaking Free from Proprietary Gravitational Pull
Breaking Free from Proprietary Gravitational Pull
 
Dealing with Unstructured Data: Scaling to Infinity
Dealing with Unstructured Data: Scaling to InfinityDealing with Unstructured Data: Scaling to Infinity
Dealing with Unstructured Data: Scaling to Infinity
 
You Don't Know Node: Quick Intro to 6 Core Features
You Don't Know Node: Quick Intro to 6 Core FeaturesYou Don't Know Node: Quick Intro to 6 Core Features
You Don't Know Node: Quick Intro to 6 Core Features
 
Hidden Features in HTTP
Hidden Features in HTTPHidden Features in HTTP
Hidden Features in HTTP
 
Using Cryptography Properly in Applications
Using Cryptography Properly in ApplicationsUsing Cryptography Properly in Applications
Using Cryptography Properly in Applications
 
Lightning Talk - Getting Students Involved In Open Source
Lightning Talk - Getting Students Involved In Open SourceLightning Talk - Getting Students Involved In Open Source
Lightning Talk - Getting Students Involved In Open Source
 
You have Selenium... Now what?
You have Selenium... Now what?You have Selenium... Now what?
You have Selenium... Now what?
 
How Constraints Cultivate Growth
How Constraints Cultivate GrowthHow Constraints Cultivate Growth
How Constraints Cultivate Growth
 
Inner Source 101
Inner Source 101Inner Source 101
Inner Source 101
 
Running MySQL on Linux
Running MySQL on LinuxRunning MySQL on Linux
Running MySQL on Linux
 
Search is the new UI
Search is the new UISearch is the new UI
Search is the new UI
 
Troubleshooting Hadoop: Distributed Debugging
Troubleshooting Hadoop: Distributed DebuggingTroubleshooting Hadoop: Distributed Debugging
Troubleshooting Hadoop: Distributed Debugging
 
The Current Messaging Landscape
The Current Messaging LandscapeThe Current Messaging Landscape
The Current Messaging Landscape
 
Apache httpd v2.4
Apache httpd v2.4Apache httpd v2.4
Apache httpd v2.4
 
Understanding Open Source Class 101
Understanding Open Source Class 101Understanding Open Source Class 101
Understanding Open Source Class 101
 
Thinking in Git
Thinking in GitThinking in Git
Thinking in Git
 
Antifragile Design
Antifragile DesignAntifragile Design
Antifragile Design
 
Elasticsearch for SQL Users
Elasticsearch for SQL UsersElasticsearch for SQL Users
Elasticsearch for SQL Users
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Mobile Development Options

  • 1. MOBILE DEVELOPMENT OPTIONS ! PRATIK PATEL | CTO | TripLingo twitter: @prpatel
  • 2. TOPICS • Android, iOS, HTML5/CSS3, Phonegap, Titanium, and jQuery Mobile • native, cross-platform-to-native, and mobile web • deep dive into: - phonegap - titanium PRATIK PATEL | CTO
  • 6. NATIVE MOBILE • Must know Objective-C & Java very well • SDK is closed source, many open-source libs available PRATIK PATEL | CTO
  • 7. NATIVE II • MUST KNOW THE TOOL chain for each platform PRATIK PATEL | CTO
  • 10. NATIVE III • ABILITY TO CREATE best possible app • time & effort multiplied by platform • obviously not cross-platform PRATIK PATEL | CTO
  • 12. PHONEGAP • native wrapper - bootstraps a webkit browser ! • open-source as “Apache Cordova” PRATIK PATEL | CTO
  • 13. PHONEGAP • provides hooks into native functions - camera, contacts, accelerometer, etc PRATIK PATEL | CTO
  • 14. PRATIK PATEL | CTO http://www.melablog.it/post/11421/phonegap-riceve-il-nulla-osta-di-apple-per-app-store
  • 15. PHONEGAP • Must use native toolchain to build phonegap wrapper PRATIK PATEL | CTO
  • 16. CROSS PLATFORM PRATIK PATEL | CTO http://mashable.com/2011/02/22/html-mobile-development/
  • 17. CODING PHONEGAP • you can develop right in a desktop browser for most of your app! PRATIK PATEL | CTO
  • 18. MOBILE WEB LIBS - jquery mobile - sencha touch - jo (joapp.com) - kendoui PRATIK PATEL | CTO
  • 19. PRATIK PATEL | CTO phonegap DIAGRAM Operating System (iOS/Android) Phonegap native wrapper app Webkit browser engineYour code runs here
  • 20. PRATIK PATEL | CTO phonegap on ios
  • 22. APP DEV PLATFORMS • Xamarin (formerly monotouch) (C#) • Ansca Corona (LUA) • Appcelerator TITANIUM (JAVASCRIPT) • Only TITANIUM is open-source PRATIK PATEL | CTO
  • 23. APP DEV PLATFORMS • do _NOT_ generate code • bridge from LANG <X> to native • uses native toolchain PRATIK PATEL | CTO
  • 24. BRIDGE • VENDOR WRITES HOOKS to native API • vendor marshalls / unmarshalls calls & data in both directions PRATIK PATEL | CTO
  • 25. PRATIK PATEL | CTO how they work you code here var win1 = Titanium.UI.createWindow({ url:'main.js', title:'Spice Guide', // backgroundImage:'./images/bg.png', navBarHidden: false, tabBarHidden: true }); app platform android sdkios sdk platform provides API platform bridges to native
  • 27. TITANIUM • open source, 100% free • IDE - titanium studio - based on eclipse PRATIK PATEL | CTO
  • 28. TITANIUM II • code in javascript • again, not a generator ! PRATIK PATEL | CTO
  • 29. CODE REUSE? • 100% Of non-UI code is reusable • 80% of UI code is reusable • UI code can become more reusable with experience and patterns! PRATIK PATEL | CTO
  • 30. TITANIUM == NATIVE PRATIK PATEL | CTO • Titanium api calls native objects/methods • no code generation • native widgets • Tons of open-source modules available!
  • 31. PRATIK PATEL | CTO titanium live coding
  • 34. PRATIK PATEL | CTO you must learn the native toolchain for any of the options!
  • 35. NATIVE TOOLCHAIN • you must learn the native toolchain • spend a few days building a native app for each platform you’re interested in • the time you invest in this will be paid back 100x PRATIK PATEL | CTO
  • 37. NATIVE • no code reuse • best possible experience • games, low-level needs • cost: $$$$$ PRATIK PATEL | CTO
  • 38. PHONEGAP • use tech you know (HTML/JS/CSS) • Rapid development • user experience is hard to perFect • bad performance • nuances of browser tech = black hole of effort PRATIK PATEL | CTO
  • 39. APP DEV PLATFORMS • can get good code reuse • performance is very close to native • must learn a new tool/platform • abstraction distractions • rapid development PRATIK PATEL | CTO
  • 43. AU REVOIR! ! Follow me on twitter: @PRPATEL
  • 45. IOS • OBJECTIVE-C language • dispatch model is very powerful • NOT low ceremony PRATIK PATEL | CTO
  • 46. ANDROID • Java with limitations (Davlik VM) • open source platform • tools you know and love (?) ! PRATIK PATEL | CTO
  • 47. NATIVE II • developing the ‘same’ app for 2+ platforms == $$$$ • “LOW LEVEL” programming PRATIK PATEL | CTO
  • 49. PHONEGAP • open source, 100% free • APACHE PROJECT • large community • tons of plugins PRATIK PATEL | CTO
  • 50. MIND THE GAP II • wraps a web browser in a native project • your code runs in the browser • plugins allow more native functions • provides hooks into native functions - camera, contacts, accelerometer, etc ! PRATIK PATEL | CTO
  • 51. MIND THE GAP III • you can develop right in a desktop browser for most of your app! • can use mobile web libs: - jquery mobile - sencha touch - jo (joapp.com) - kendoui PRATIK PATEL | CTO
  • 54. BRIDGE • vendor provides proprietary API on top • you code to this API • VENDOR WRITES HOOKS to native API • vendor marshalls / unmarshalls calls & data in both directions • again, no code generation! PRATIK PATEL | CTO
  • 55. PRATIK PATEL | CTO how they work you code here var win1 = Titanium.UI.createWindow({ url:'main.js', title:'Spice Guide', // backgroundImage:'./images/bg.png', navBarHidden: false, tabBarHidden: true }); app platform android sdkios sdk platform provides API platform bridges to native
  • 56. MONOTOUCH • based on mono • C# • $600 for both ios and android PRATIK PATEL | CTO
  • 57. ANSCA CORONA • based on LUA - a script lang for c • popular with game devs • $349 for both ios and android • less bridGing PRATIK PATEL | CTO
  • 58. RUBYMOTION • based on RUBY - but ios only • fairly new • $199 • live REPL, other nice features PRATIK PATEL | CTO
  • 60. TITANIUM • open source, 100% free • support contract costs $ • extra modules cost $ (ex: storekit) • IDE - titanium studio - based on eclipse PRATIK PATEL | CTO
  • 61. TITANIUM II • code in javascript • again, not a generator ! PRATIK PATEL | CTO
  • 62. PLATFORMS • iOS • ANDROID • Mobile web (beta) • Blackberry 10 coming soon PRATIK PATEL | CTO
  • 63. Titanium SDK • Javascript to native bridge • Code to Titanium API (proprietary) • Write once, deploy to iOS + ANdroid • platform specific API’s too! PRATIK PATEL | CTO
  • 64. WIDGETS • Buttons, Labels, Windows, Views • Sliders, TextFields, WebViews • Pickers, Tables PRATIK PATEL | CTO
  • 65. EVENTS • ADD / Fire events • Very much like “web” Javascript dev PRATIK PATEL | CTO
  • 66. CODE REUSE? • 100% Of non-UI code is reusable • 50% of UI code is reusable • UI code can become more reusable with experience and patterns! PRATIK PATEL | CTO
  • 67. TITANIUM == NATIVE PRATIK PATEL | CTO • Titanium api calls native objects/methods • no code generation • native widgets
  • 68. TITANIUM MODULES • Titanium is based on modules • Each module represents an API • Bridge from JavaScript to native runtime • Example modules: networking, database, Filesystem, UI, Yahoo, Media, Map, Facebook, Accelerometer PRATIK PATEL | CTO
  • 70. Layouts code var  view  =  Ti.UI.createView({          backgroundColor:'transparent',          top:0,          left:0,          width:'100%',          height:'100%',          layout:'vertical'   });   //  create  labels,  buttons,  text  fields   ! view.add(usernameLabel);   view.add(usernameField);   view.add(submitButton); PRATIK PATEL | CTO
  • 71. Events code Ti.App.addEventListener('event_type',  function(e)   {          Ti.API.info('The  '+e.type+'  event  happened');   });   ! Ti.App.fireEvent('click',     {datakey:  'value'});   PRATIK PATEL | CTO
  • 72. Custom Controls var buttonView1 = Titanium.UI.createView({ top: 0, left: 0, height: 50, width: 50, borderRadius: 10, backgroundColor: '#cef7ff' }); var selection1 = Titanium.UI.createLabel({ text : 'Fish', color : '#f79e18', font : {fontSize : 40}, textAlign: 'center' }); buttonView1.add(selection1); PRATIK PATEL | CTO
  • 73. HttpClient var  url  =  "https://www.google.com";   var  xhr  =  Ti.Network.createHTTPClient({          onload:  function(e)  {                  Ti.API.debug(this.responseText);                  alert('success');          },          onerror:  function(e)  {                  Ti.API.debug(e.error);                  alert('error');          },  timeout:5000   });   xhr.open("GET",  url);   xhr.send(); PRATIK PATEL | CTO
  • 74. Database var  db  =  Titanium.Database.open('mydb');   ! db.execute('CREATE  TABLE  IF  NOT  EXISTS  DATABASETEST    (ID  INTEGER,  NAME   TEXT)');   db.execute('DELETE  FROM  DATABASETEST');   ! db.execute('INSERT  INTO  DATABASETEST  (ID,  NAME  )  VALUES(?,?)',1,'Name   1');   db.execute('UPDATE  DATABASETEST  SET  NAME  =  ?  WHERE  ID  =  ?',  updateName,   updateId);   var  rows  =  db.execute('SELECT  *  FROM  DATABASETEST');   ! while  (rows.isValidRow())   {     Titanium.API.info('ID:  '  +  rows.field(0)  +  '  NAME:  '  +   rows.fieldByName('name')  +  '  COLUMN  NAME  '  +  rows.fieldName(0));     rows.next();   } PRATIK PATEL | CTO
  • 75. Facebook var  fbButton  =  Titanium.Facebook.createLoginButton({     'style':'wide',     'apikey':'9494e611f2a93b8d7bfcdfa8cefdaf9f',     'sessionProxy':'http://api.appcelerator.net/p/fbconnect/',     bottom:10,  height:30,  width:300   });   Titanium.Facebook.publishStream("Set  your  status",null,null,function(r)     {       Titanium.API.info("received  status  response  =  "+JSON.stringify(r));       if  (r.success)   {Ti.UI.createAlertDialog({title:'Facebook',     message:'Your  status  was  ublished'}).show();       }       else       {Ti.UI.createAlertDialog({title:'Facebook',  message:'Error  '  +    r.error}).show();         }     }); PRATIK PATEL | CTO
  • 76. Animations   var  t3  =  Ti.UI.create2DMatrix();     t3  =  t3.rotate(20);     t3  =  t3.scale(1.5);   !   var  a  =  Titanium.UI.createAnimation();     a.transform  =  t3;     a.duration  =  3000;   ! var  view1  =  Titanium.UI.createView({     backgroundColor:'#336699',     top:10,  left:220,  height:50,  width:50,     anchorPoint:{x:0,y:0}   });   win.add(view1);   topLeft.addEventListener('click',  function()   {     view1.animate(a);   }); PRATIK PATEL | CTO
  • 78. REDUX • APP dev PLATFORMS: a high level env • reuse code • access to native (and specific) API’s PRATIK PATEL | CTO
  • 79. REDUX II • performance is near native (95%) • drawbacks: - abstraction - must know app platform + native platform PRATIK PATEL | CTO
  • 81. NATIVE • no code reuse • best possible experience • games, low-level needs • cost: $$$$$ PRATIK PATEL | CTO
  • 82. PHONEGAP • use tech you know (HTML/JS/CSS) • user experience is hard to perFect • bad performance • nuances of browser tech = black hole of effort PRATIK PATEL | CTO
  • 83. APP DEV PLATFORMS • can get good code reuse • performance is very close to native • must learn a new tool/platform • abstraction distractions • rapid development PRATIK PATEL | CTO