Hybrid mobile apps with AngularJS and Ionic
CONTENTS AT A GLANCE
1. Hybrid vs Native
2. Ionic Framework overview
3. UI Elements
4. The CLI
5. The future
6. probably a DEMO...probably
"Cool...let's go native!"
Downsides of native
More Platforms. More Problems.
So, what's the alternative?
What's that, Zack?
What's that, Zack?
http://techcrunch.com/2012/09/11/mark-zuckerberg-our-biggest-mistake-with-mobile-was-betting-too-much-on-html5/
You're (probably) not building Facebook
OK, native SDKs are kinda cool
"Hybrid apps are sooo slooow"
Your hybrid app is so slow that when it tried to cross the road it got a parking ticket
Hybrid mobile apps...
True, BUT...
...times are changing, mobile devices are rapidly evolving
Year | Device | Processor | RAM |
---|---|---|---|
2007 | iPhone | 620 MHz | 128 MB |
2010 | iPhone 4 | 1 GHz | 512 MB |
2015 | iPhone 6 | 1.4 GHz dual-core | 1 GB |
https://mixpanel.com/trends/#report/ios_8/from_date:-209,report_unit:day,to_date:0
https://mixpanel.com/trends/#report/android_os_adoption/from_date:-364,to_date:1
Built in font-icons set - Ionicons
Ionic Adoption
But how does it work?
Your app
Ionic
AngularJS
Cordova (WebView)
Native Wrapper (SDK)
Show me some code!
Ionic UI components
Lists
<ion-content>
<ion-list>
<ion-item ng-repeat="item in items">
Item {{ item.id }}
<!-- delete -->
<ion-delete-button class="ion-minus-circled"
ng-click="onItemDelete(item)">
</ion-delete-button>
<!-- Option buttons -->
<ion-option-button class="button-assertive">
Edit
</ion-option-button>
<ion-option-button class="button-calm">
Share
</ion-option-button>
<!-- reorder -->
<ion-reorder-button class="ion-navicon"
on-reorder="moveItem(item,$fromIndex,$toIndex)">
</ion-reorder-button>
</ion-item>
</ion-list>
</ion-content>
Navigation and 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>
Side menu
<ion-side-menu-content>
<ion-nav-view name="menuContent"></ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left">
<ion-header-bar class="bar-assertive">
<h1 class="title">Left Menu</h1>
</ion-header-bar>
<ion-content>
...
</ion-content>
</ion-side-menu>
</ion-side-menus>
Modals
$ionicModal.fromTemplateUrl('modal.html', {
scope: $scope
}).then(function(modal) {
$scope.modal = modal;
});
Other cool stuff worth mentioning
Other cool stuff worth mentioning
Ionic Creator
Ionic View mobile app
Ionic CLI
Creating a project, as easy as...
The future
Alternatives worth mentioning
Last but not least...
DEMO TIME, as promised :)