KEMBAR78
Hybrid vs. Native app - Ionic Framework with AngularJS | PPTX
The beautiful, open source framework for developing hybrid
mobile apps with HTML5
@Zvika Epstein
Overview
1. Native vs Hybrid Apps
2. Intro Ionic
3. UI Components
4. Ionic CLI
โ€œI want a native app!โ€
The Pros of a Native
โ— Performance - Full use of functionality and Hardware
- GPS, Contacts etc.
โ— Run on the deviceโ€™s operating system.
โ— Fast graphics
The Downsides of a Native
โ— Proficiency in each platform required
โ— Entirely separate code bases
โ— Timely & expensive development
More Platforms. More Problems.
Why are we still coding for multiple platforms?
โ€œIs there an alternative?โ€
Hybrid Apps!
โ— HTML5 that acts like native
โ— Web wrapped in native layer
โ— Direct access to native APIs
โ— Phonegap renamed to Cordova
โ— Familiar web dev environment
โ— Fast deployment
โ— Develop a single code base (web platform)
Cons of a Hybrid App
โ— Performance - extra layer between the source
code and the target mobile platform
โ— rely on a third party
โ— UI assets of iOS or Android
Apache Cordova is a platform for building native mobile
applications using HTML, CSS and Javascript
ngCordova Plugins
โ— Battery Status
โ— Calendar
โ— Camera
โ— Clipboard
โ— Contacts
โ— More plugins
So, how do we bridge the gap
between web and native?
โ€œHello.โ€
โ— The ionic is an open source framework for developing
hybrid mobile applications using AngularJS, Sass and
Cordova.
โ— Ionic is the front-end framework.
โ— Ionic mainly uses Cordova to create, build, run and deploy
the mobile applications.
โ— Modeled off of native SDKs
โ— Performance - Hardware accelerated animations
What is Ionic?
Web Technologies You
Already Know and Love
Standing on the Shoulders of
AngularJS
โ— UI Components are AngularJS Directives
โ— Ready to work with your app
Native Focused
Modeled off of native SDKs
Built to work with Cordova
Performance Obsessed
Hardware accelerated animations
Minimal DOM Manipulation
โ€œIonic is Bootstrap for Nativeโ€
โ— Responsive - Ionic solves multiple device
resolution issues.
โ— Icons
โ— UI Components
Icons
Over 700 MIT licensed font-icons included ionicons.com
UI Component Overview
Lists
<div class="list">
<div class="item item-divider">
Candy Bars
</div>
<a class="item" href="#">
Butterfinger
</a>
<a class="item" href="#">
Kit Kat
</a>
...
</div>
Tabs
<ion-tabs>
<ion-tab title="Home" icon="ion-home">
<ion-nav-view name="home"></ion-nav-view>
</ion-tab>
<ion-tab title="About" icon="ion-information">
<ion-nav-view name="about"></ion-nav-view>
</ion-tab>
<ion-tab title="Contact" icon="ion-ios7-world">
<ion-nav-view name="contact"></ion-nav-view>
</ion-tab>
</ion-tabs>
Complex Lists
โ— AngularJS Directive
โ— Buttons exposed by swiping
โ— Reorder
โ— Delete
<ion-list>
<ion-item ng-repeat="item in items"
class="item-thumbnail-left">
<img ng-src="{{ item.pic }}">
<h2>{{ item.name }}</h2>
<p>{{ item.quote }}</p>
</ion-item>
</ion-list>
Slide box
<ion-slide-box on-slide-changed="change(index)">
<ion-slide>
Slide 1
</ion-slide>
<ion-slide>
Slide 2
</ion-slide>
<ion-slide>
Slide 3
</ion-slide>
</ion-slide-box>
Pull to Refresh
<ion-content on-refresh="refreshData()">
<ion-refresher></ion-refresher>
<!-- content -->
</ion-content>
Ionic CLI
$ npm install -g ionic cordova
$ ionic start myapp sidemenu
$ cd myapp
$ ionic serve
Thank You!

Hybrid vs. Native app - Ionic Framework with AngularJS

  • 1.
    The beautiful, opensource framework for developing hybrid mobile apps with HTML5 @Zvika Epstein
  • 2.
    Overview 1. Native vsHybrid Apps 2. Intro Ionic 3. UI Components 4. Ionic CLI
  • 3.
    โ€œI want anative app!โ€
  • 4.
    The Pros ofa Native โ— Performance - Full use of functionality and Hardware - GPS, Contacts etc. โ— Run on the deviceโ€™s operating system. โ— Fast graphics
  • 5.
    The Downsides ofa Native โ— Proficiency in each platform required โ— Entirely separate code bases โ— Timely & expensive development
  • 6.
    More Platforms. MoreProblems. Why are we still coding for multiple platforms?
  • 7.
    โ€œIs there analternative?โ€
  • 8.
    Hybrid Apps! โ— HTML5that acts like native โ— Web wrapped in native layer โ— Direct access to native APIs โ— Phonegap renamed to Cordova โ— Familiar web dev environment โ— Fast deployment โ— Develop a single code base (web platform)
  • 9.
    Cons of aHybrid App โ— Performance - extra layer between the source code and the target mobile platform โ— rely on a third party โ— UI assets of iOS or Android
  • 10.
    Apache Cordova isa platform for building native mobile applications using HTML, CSS and Javascript
  • 11.
    ngCordova Plugins โ— BatteryStatus โ— Calendar โ— Camera โ— Clipboard โ— Contacts โ— More plugins
  • 12.
    So, how dowe bridge the gap between web and native?
  • 13.
  • 14.
    โ— The ionicis an open source framework for developing hybrid mobile applications using AngularJS, Sass and Cordova. โ— Ionic is the front-end framework. โ— Ionic mainly uses Cordova to create, build, run and deploy the mobile applications. โ— Modeled off of native SDKs โ— Performance - Hardware accelerated animations What is Ionic?
  • 15.
  • 16.
    Standing on theShoulders of AngularJS โ— UI Components are AngularJS Directives โ— Ready to work with your app
  • 17.
    Native Focused Modeled offof native SDKs Built to work with Cordova
  • 18.
    Performance Obsessed Hardware acceleratedanimations Minimal DOM Manipulation
  • 20.
    โ€œIonic is Bootstrapfor Nativeโ€ โ— Responsive - Ionic solves multiple device resolution issues. โ— Icons โ— UI Components
  • 21.
    Icons Over 700 MITlicensed font-icons included ionicons.com
  • 22.
  • 23.
    Lists <div class="list"> <div class="itemitem-divider"> Candy Bars </div> <a class="item" href="#"> Butterfinger </a> <a class="item" href="#"> Kit Kat </a> ... </div>
  • 24.
    Tabs <ion-tabs> <ion-tab title="Home" icon="ion-home"> <ion-nav-viewname="home"></ion-nav-view> </ion-tab> <ion-tab title="About" icon="ion-information"> <ion-nav-view name="about"></ion-nav-view> </ion-tab> <ion-tab title="Contact" icon="ion-ios7-world"> <ion-nav-view name="contact"></ion-nav-view> </ion-tab> </ion-tabs>
  • 25.
    Complex Lists โ— AngularJSDirective โ— Buttons exposed by swiping โ— Reorder โ— Delete <ion-list> <ion-item ng-repeat="item in items" class="item-thumbnail-left"> <img ng-src="{{ item.pic }}"> <h2>{{ item.name }}</h2> <p>{{ item.quote }}</p> </ion-item> </ion-list>
  • 26.
    Slide box <ion-slide-box on-slide-changed="change(index)"> <ion-slide> Slide1 </ion-slide> <ion-slide> Slide 2 </ion-slide> <ion-slide> Slide 3 </ion-slide> </ion-slide-box>
  • 27.
    Pull to Refresh <ion-contenton-refresh="refreshData()"> <ion-refresher></ion-refresher> <!-- content --> </ion-content>
  • 28.
    Ionic CLI $ npminstall -g ionic cordova $ ionic start myapp sidemenu $ cd myapp $ ionic serve
  • 29.