24
Building Mobile Apps Using Ionic & MeteorJS Ashish @ashish_fagna

Building mobile apps using meteorJS

Embed Size (px)

Citation preview

Page 1: Building mobile apps using meteorJS

Building Mobile AppsUsing

Ionic & MeteorJSAshish

@ashish_fagna

Page 2: Building mobile apps using meteorJS

Agenda• Ionic• Demo : iOS app using Ionic & Meteor

Page 3: Building mobile apps using meteorJS

GoalBuild Native looking apps, through HTML5, CSS3 and JavaScript

Apple Android Windows

Page 4: Building mobile apps using meteorJS

Downside of Native• Knowledge of each platform• Separate code bases• Expensive

Page 5: Building mobile apps using meteorJS

Cordova, PhoneGap, & Ionic• Apache Cordova is community project, letting you build

mobile apps for various mobile platforms (HTML5, Javascript and CSS3)

• Phonegap is a version of Cordova but it's Adobe's product.

• Ionic Framework is a set of css classes and a library of Javascript directives and modules, built on top of Cordova, with AngularJS.

Page 6: Building mobile apps using meteorJS

Cordova v/s Native• Apache Cordova

–Hybrid Apps–Web wrapped in native–Native APIs–One code base, many platforms

• Native SDKs–Views–UI Components–Navigation–Transitions–Animations–Interactions

Page 7: Building mobile apps using meteorJS

Ionic

Page 8: Building mobile apps using meteorJS

Ionic• A Front-end framework for mobile apps Contains a lot of

mobile-optimized HTML, CSS and JS components

• Uses AngularJS to power up your mobile apps

• Uses Cordova to create, build, run, deploy mobile apps

Page 9: Building mobile apps using meteorJS

Ionic + Meteor

•Ionic : has become one of the most popular solutions to develop hybrid mobile apps fast across different platform.

•Meteor has become the only open source JavaScript platform that supply the complete set of solutions you need to create a real time mobile connected apps.

Page 10: Building mobile apps using meteorJS

AngularJS• MVC framework for Dynamic web apps• Developed by Google and the community• Features:

• Live data binding• Two-way binding• Attaching code-behind to DOM element• Directives, Services• Repeating DOM elements• Templates• Dependencies Injection• Animations and Transitions• Much More…

Page 11: Building mobile apps using meteorJS

Ionic for AngularJS• Ionic has been optimized for AngularJS

Page 12: Building mobile apps using meteorJS

Ionic is “Bootstrap for Native”• Responsive• UI Components• Transitions• Icons

Page 13: Building mobile apps using meteorJS

Ionic Sample Code

Page 14: Building mobile apps using meteorJS

Lists

Ionic Lists

Page 15: Building mobile apps using meteorJS

Tabs• Nested views• Separate history• Angular UI Router

Page 16: Building mobile apps using meteorJS

Side Menu

Page 17: Building mobile apps using meteorJS

Navigation• Angular UI Router• Back button• Transitions

Page 18: Building mobile apps using meteorJS

npm install -g cordova ionic

Ionic FrameworkInstallation:1. Install Node.js2. Install Cordova, Ionic:

For Android:1. Install Android SDK2. Install Brew and Ant3. Install Genymotion for test

For iOS:1. Install ios-sim2. Need to run on Mac

Page 19: Building mobile apps using meteorJS

ionic start <your-app-name>

Ionic FrameworkCreate new project

Test on web browser

ionic serve

Add mobile platform (Android or iOS)

ionic platform add [android/ios]

Run test on device/emulator

ionic [run/emulate] [ android/ios]

Page 20: Building mobile apps using meteorJS

Meteor CLI commands For Ionic App

meteor create IonicMeteorApp

meteor remove ecmascriptmeteor remove blaze-html-templates

meteor add angular

Page 21: Building mobile apps using meteorJS

Meteor CLI commands For Ionic Appmeteor add driftyco:ionicmeteor add mquandalle:bower//create a folder ‘lib/bower’ in project’s root folder, add a file bower.json there

{ "name": "ionicmeteorpost", "version": "0.0.1", "dependencies": { "ngCordova": "latest" }, "private": true}

Page 22: Building mobile apps using meteorJS

Meteor CLI commands For Ionic App

meteor add cordova:[email protected]

meteor add-platform iosmeteor run ios

Page 23: Building mobile apps using meteorJS

Demo

Page 24: Building mobile apps using meteorJS

Thanks