21
Building Mobile App with Ionic Framework Huy Tran http://codedaily.vn Da Nang Java Developer Community

Building mobile app with Ionic Framework

Embed Size (px)

DESCRIPTION

Source code: http://codedaily.vn/downloads/todo_ionic_demo.zip

Citation preview

Page 1: Building mobile app with Ionic Framework

Building Mobile App with Ionic Framework

Huy Tranhttp://codedaily.vn

Da Nang Java Developer Community

Page 2: Building mobile app with Ionic Framework

Who am I?

Tran Duc HuyHybrid Mobile Developer at Axon Active VietnamWebsite: http://codedaily.vnSkype: huydotnet

Interest:– Mobile Development– Game Development

Page 3: Building mobile app with Ionic Framework

Agenda

▪ Why make mobile apps?

▪ Hybrid vs Native

▪ Introduce AngularJS

▪ Introduce Ionic Framework

▪ Coding time

▪ Now what?

Page 4: Building mobile app with Ionic Framework

Why make mobile apps?

▪ You want to make mobile app because:–The world is moving–Everybody's making mobile apps these day– It makes million dollars–For your business– ...

Page 5: Building mobile app with Ionic Framework

Why make mobile apps?

▪ But...–You're not mobile app developer?–You don't know Java, Objective-C?–You want to build app that run

everywhere– <ten thousand reasons...>

Page 6: Building mobile app with Ionic Framework

Why make mobile apps?

Let's try Hybrid!

Page 7: Building mobile app with Ionic Framework

Hybrid vs Native

Let's the war begin!

BAD

Only run on browserNo Hardware interactive

GOOD

Use Objective-C, JavaBest performanceHardware interactive

GOOD

Use HTML/CSS/JSRapid development

Easy to customize UICross-platform, Cross-

browserBAD

Not so fast developmentHard to customize UIRun only one platform

Page 8: Building mobile app with Ionic Framework

Hybrid vs Native

A new hero has come!

Page 9: Building mobile app with Ionic Framework

Hybrid vs Native

Page 10: Building mobile app with Ionic Framework

Hybrid vs Native

Page 11: Building mobile app with Ionic Framework

AngularJS

Page 12: Building mobile app with Ionic Framework

AngularJS

is:

- Awesome MVC framework- Developed by Google and the community- Features:• Live data binding• Two-way binding• Attaching code-behind to DOM element• Directives• Repeating DOM elements• Templates• Dependencies Injection

Page 13: Building mobile app with Ionic Framework

Ionic Framework

Page 14: Building mobile app with Ionic Framework

Ionic Framework

• 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

is:

Page 15: Building mobile app with Ionic Framework

npm install -g cordova ionic

Ionic Framework

Installation: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 16: Building mobile app with Ionic Framework

ionic start <your-app-name>

Ionic Framework

Create 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 17: Building mobile app with Ionic Framework

Let's take a break!

OK... enough talk...

Do you have any question?

Page 18: Building mobile app with Ionic Framework

Build a demo

Coding time!

Page 19: Building mobile app with Ionic Framework

Coding time!

This is what we gonna build

Simple To Do List

1. Creating UI with HTML/CSS2. Connecting data (ng-repeat)3. Add new item (ng-click)4. Build to device

Dojo:

5. Check done item (ng-click)6. Search item (filter)7. Done items list (ng-if)8. Saving data (localStorage)

Page 20: Building mobile app with Ionic Framework

Now what?

Slide & source code available at: http://codedaily.vn

Learning AngularJShttps://thinkster.io/angulartutorial/a-better-way-to-learn-angularjs/

Ionic Framework CSS/JS componentshttp://ionicframework.com/docs/

Ionic Framework Exampleshttp://codepen.io/ionic/

IonIcons: Icon library for Ionic http://ionicons.com

Page 21: Building mobile app with Ionic Framework

We’re done!

Thank you!