SlideShare une entreprise Scribd logo
1  sur  86
Télécharger pour lire hors ligne
YOUR OPTIONS FOR BUILDING
MOBILE APPS IN 2016
• Computer Science graduate from the American University of Beirut.
• Currently freelancing in software engineering and design
• Focused mainly on Mobile Development using best practices and Agile
methods
• Thriving to be an international speaker in different topics
A BRIEF ABOUT ME
Jad Salhani
What is a Hybrid App?
• HTML5 / CSS / JS
• Web View or Transpiled
• Hybrid Framework
Hybrid. It's Awesome.
• Use Existing Web Skills
• Single Codebase
• Java is Terrible
• Hot-fixes - No Review
• Mostly Platform-Agnostic
• Objective-C is MoonMan
But Isn’t it True That…
• “…hybrid is slow?”
• “…native is more performant?”
• “…hybrid has janky animations?”
• “…hybrid can’t access native features?”
The Short Answer
Devices Have Evolved!
Year Device Processor RAM
2008 iPhone 3 620 MHz 128 MB
2010 iPhone 4 1 GHz 512 MB
2012 iPhone 5 1.3 GHz dual-core 1GB
2014 iPhone 6 1.4 GHz dual-core 1 GB
2016 iPhone 7 2.3 GHz quad-core 2 GB
iOS Adoption…
It’s Awesome!
And Android…
And Android…
Also Awesome!
And Best of All
WKWebView Chromium
Nitro V8
So Awesome
• JIT Machine Code
• Native Scrolling
• Faster Rendering
• Faster Compute
• Latest Device APIs
Art by Christopher Hastings
“So Why Isn’t Everyone Doing Hybrid?”
¯_(ツ)_/¯
JS for Mobile is Hard =(
• No Touch Events
• No Native UI Components
• No Performance Optimization
• No SDK
• No Style
A LITTLE BIT OF
NATIVE IN MY LIFE
NATIVE +
• No middle-man translator
• Access to latest SDK on
release and latest device
features
• Machine-code optimizations
• Best performance
• Native design
NATIVE -
• Supporting more platforms
= More codebases
• Language migration
obstacles (For ex, Swift 2 ->
3)
• Responsive design is hard
• Self-write almost every UI
component
• Slow development
ENTER HYBRID
FRAMEWORKS
A little bit of Hybrid, by my side
OUR STARS FOR TODAY
• Ionic Framework
• NativeScript
• React-Native
• Xamarin
• Appcelerator
What is Ionic?
• Hybrid mobile framework
• Built with AngularJS
• Written in Typescript
• Open Source - MIT License
• Built on Web/Browser Standards
ionicframework.com
Install Ionic
$ npm install -g ionic cordova
$ ionic start myApp blank —v2
Why Angular2?
• Component-based
• Designed for Mobile
• Module-based DI
• Ahead-of-Time Compiling
What About Typescript?
• Superset of Javascript
• ES6 Support
• Type Checking
• Improves Tooling
Everything is a Component
SPA Frameworks are Popular
Angular is SUPER Popular
BAM, SUCKA!
UI Components
UI Components
Theming
• Plain ol’ CSS + Sass
• Easy to override
• Variables based
• 80+ mixins
ionicons
ionicons.com
• Cross-platform • MIT license• 700+ Icons
Ionic Native
• Access Native Device APIs
• Wraps Cordova Plugins
• Written in Typescript
• Adds Promises/Observables
• Framework Agnostic
github.com/driftyco/ionic-native
Ionic Native
Performance Obsessed
• Minimal DOM Manipulation
• Native Scrolling
• Jank-free Page Transitions
• Hardware Accelerated Animations
• Optimized for Touch Events
AoT Compiling
• Build-time Compilation
• Tree Shaking
• Smaller Bundles
• Faster App Launch
• Faster Component Loading
What Else is Ionic?
ionic.io/cloud
Code Once. Run Everywhere.
One Team. One Codebase. Every Platform.
Code Once. Run Everywhere.
Deploying to a Device
• Enable Developer Options
• Enable USB Debugging
• Create Provisioning Profile
• Code Sign .IPA in Xcode
• npm install -g ios-deploy
• bit.ly/deploy-without-dev-account
THE UGLY
Ionic is strongly linked to Angular 2
If Angular 2 introduces breaking changes, most
probably Ionic will too
Still moody about their project architecture and
tools
NativeScript
WHAT IS NATIVESCRIPT?
A runtime for building and running native iOS
and Android apps with a single, JavaScript
code base
INSTALLATION
$ npm install -g nativescript
$ tns create my-app-name
Free and open source
CHOICE IN ARCHITECTURE
Write your
application
using plain
Javascript
Use TypeScript to
get Object
Oriented features
and compile time
error checking
Use Angular to
architect
application. Reuse
almost all code
between web and
mobile
USE LOTS OF PREBUILT CODE
• Use thousands of plugins
from NPM
• Use free native controls
from Cocoapods or Android
Arsenal
Absolute Dock Grid Stack Wrap
NATIVE LAYOUTS
NATIVESCRIPT ANDROID
EXAMPLE
Output:
Look! JavaScript can
create and use Native
Android Java objects!
NATIVESCRIPT IOS EXAMPLE
JavaScript can
create and use
Obj-C objects
too?
HOW DOES THIS WORK?
CALLING ANDROID API
NATIVESCRIPT MODULES
Code Modules Platform API
NATIVESCRIPT FILE MODULE
WHAT IS REACT NATIVE?
• Built by Facebook
• Uses the same architectural
design as React
• Declarative components
• Promoted as
“indistinguishable” from an
app built using Objective-C
or Java
• Embeds native components
for use if needed
INSTALLATION
$ npm install -g react-native-cli
$ react-native init AwesomeProject
• Builds using Native projects
• index.{platform}.js
• Watchman for live-reload
Component-Driven, Easy to structure
1 export default class AwesomeProject extends
2 Component {
3 render() {
4 return (
5 <View style={styles.container}>
6 <Text style={styles.welcome}>
7 Welcome to React Native!
8 </Text>
9 <Text style={styles.instructions}>
10 To get started, edit index.ios.js
11 </Text>
12 <Text style={styles.instructions}>
13 Press Cmd+R to reload,{'n'}
14 Cmd+D or shake for dev menu
15 </Text>
16 </View>
17 );
18 }
19 }
JS + NATIVE COMPONENTS
1 render() {
2 return (
3 <ActivityIndicator
4 animating={this.state.animating}
5 style={[styles.centering, {height: 80}]}
6 size="large"
7 />
8 );
9 }
ANDROID NATIVE
COMPONENTS
1 render: function() {
2 var progressBar =
3 <View style={styles.container}>
4 <ProgressBar styleAttr="Inverse" />
5 </View>;
6
7 return (
8 <MyLoadingComponent
9 componentView={componentView}
10 loadingView={progressBar}
11 style={styles.loadingComponent}
12 />
13 );
14 },
IOS EQUIVALENT
1 render() {
2 return (
3 <View style={styles.container}>
4 <ProgressViewIOS style={styles.
5 progressView}
6 progress={this.
7 getProgress(0)}/>
8 </View>
9 );
10 },
11 });
Live-Reload on running device!
THE UGLY
• index.{platform}.js implies 2 code bases
• Native iOS support much greater than
Android
• Less stable than others
WHAT IS XAMARIN?
• Microsoft’s take on Hybrid Mobile Apps
• Uses C# as main language
• Visual Studio support for native app projects and files
• Native SDKs ported to C# for easier use in code
• Supports wearables
• Not Open-Source, licensed by Microsoft
INSTALLATION
Download Xamarin Installer (https://www.xamarin.com/download)
C# IS YOUR FRIEND
ANDROID UI WIDGETS
IOS DESIGNER
WATCHOS SUPPORT
WRITE ONCE, RUN
ANYWHERE..
• C# adapted to fit platform
architecture
• Cross-compiled to platform
native machine code
• Platform SDK APIs wrapped
in C#
..BUT NOT SO MUCH
• One project per platform
• More than one Codebase
• Write once for a platform,
run for that platform
NOT COMPLETELY FREE TOO
WHAT IS APPCELERATOR?
Mobile Hybrid framework that uses JavaScript
Has custom IDE with SDK Support
Immediate support for each new OS release
App designer that updates running app
INSTALLATION
$ npm install appcelerator -g
$ appc setup
$ appc new
FEATURES
• Appcelerator Studio
• Titanium SDK
• Hyperloop SDK for native
access
• Analytics SDK
• Arrow DAL
DECLARING A VIEW
1 <Alloy>
2 <Window class="container">
3 <Label id="label" onClick="doClick">Hello,
4 World</Label>
5 </Window>
6 </Alloy>
AND ITS JS
1 function doClick(e) {
2 alert($.label.text);
3 }
4
5 $.index.open();
THE UGLY
• Uses Vanilla Javascript with a jQuery-like SDK
• Counter-intuitive XML tags have to be used
• NOT Free
• When in-practice, has poor performance compared to other
frameoworks
CLOSING NOTE
So many more frameworks are available
Choose depending on your use case and your
skills
There is no “One Ring” of hybrid frameworks
THANK YOU!
@jadsalhani http://jadsalhani.com
Q & A

Contenu connexe

Tendances

Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Nick Landry
 

Tendances (20)

Introduction to the Ionic Framework
Introduction to the Ionic FrameworkIntroduction to the Ionic Framework
Introduction to the Ionic Framework
 
Creating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic FrameworkCreating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic Framework
 
Phonegap/Cordova vs Native Application
Phonegap/Cordova vs Native ApplicationPhonegap/Cordova vs Native Application
Phonegap/Cordova vs Native Application
 
Building mobile app with Ionic Framework
Building mobile app with Ionic FrameworkBuilding mobile app with Ionic Framework
Building mobile app with Ionic Framework
 
Hybrid app in ionic framework overview
Hybrid app in ionic framework overviewHybrid app in ionic framework overview
Hybrid app in ionic framework overview
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Building Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and Ionic
 
Workshop Ionic Framework - CC FE & UX
Workshop Ionic Framework - CC FE & UXWorkshop Ionic Framework - CC FE & UX
Workshop Ionic Framework - CC FE & UX
 
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
 
Hybrid mobile and Ionic
Hybrid mobile and IonicHybrid mobile and Ionic
Hybrid mobile and Ionic
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Getting started with the Ionic Framework
Getting started with the Ionic FrameworkGetting started with the Ionic Framework
Getting started with the Ionic Framework
 
Hybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSHybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJS
 
Cross-Platform Development
Cross-Platform DevelopmentCross-Platform Development
Cross-Platform Development
 
Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
Hybrid Mobile Development
Hybrid Mobile DevelopmentHybrid Mobile Development
Hybrid Mobile Development
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
 
Cordova: APIs and instruments
Cordova: APIs and instrumentsCordova: APIs and instruments
Cordova: APIs and instruments
 

Similaire à Your choices for building a mobile app in 2016

Hybrid mobile application with Ionic
Hybrid mobile application with IonicHybrid mobile application with Ionic
Hybrid mobile application with Ionic
Maulik Bamania
 

Similaire à Your choices for building a mobile app in 2016 (20)

Developing a native mobile apps using Ionic&Cordova
Developing a native mobile apps using Ionic&CordovaDeveloping a native mobile apps using Ionic&Cordova
Developing a native mobile apps using Ionic&Cordova
 
Xamarin v.Now
Xamarin v.NowXamarin v.Now
Xamarin v.Now
 
The Great Mobile Debate: Native vs. Hybrid App Development
The Great Mobile Debate: Native vs. Hybrid App DevelopmentThe Great Mobile Debate: Native vs. Hybrid App Development
The Great Mobile Debate: Native vs. Hybrid App Development
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App Development
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application development
 
I knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile appsI knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile apps
 
Hybrid mobile application with Ionic
Hybrid mobile application with IonicHybrid mobile application with Ionic
Hybrid mobile application with Ionic
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
Mono for Android... for Google Devs
Mono for Android... for Google DevsMono for Android... for Google Devs
Mono for Android... for Google Devs
 
Building mobile apps using meteorJS
Building mobile apps using meteorJSBuilding mobile apps using meteorJS
Building mobile apps using meteorJS
 
Cross platform mobile application devlopment
Cross platform mobile application devlopmentCross platform mobile application devlopment
Cross platform mobile application devlopment
 
Developing a mobile cross-platform library
Developing a mobile cross-platform libraryDeveloping a mobile cross-platform library
Developing a mobile cross-platform library
 
Introduction to xamarin
Introduction to xamarin  Introduction to xamarin
Introduction to xamarin
 
«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​
 
Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015
 
Hybrid Mobile App Development - Xamarin
Hybrid Mobile App Development - XamarinHybrid Mobile App Development - Xamarin
Hybrid Mobile App Development - Xamarin
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
React native - React(ive) Way To Build Native Mobile Apps
React native - React(ive) Way To Build Native Mobile AppsReact native - React(ive) Way To Build Native Mobile Apps
React native - React(ive) Way To Build Native Mobile Apps
 
Native - Hybrid - Web Mobile Architectures
Native - Hybrid - Web Mobile ArchitecturesNative - Hybrid - Web Mobile Architectures
Native - Hybrid - Web Mobile Architectures
 
Top Technologies to Develop Mobile Apps.pptx
Top Technologies to Develop Mobile Apps.pptxTop Technologies to Develop Mobile Apps.pptx
Top Technologies to Develop Mobile Apps.pptx
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Your choices for building a mobile app in 2016