SlideShare ist ein Scribd-Unternehmen logo
1 von 99
Downloaden Sie, um offline zu lesen
Ionic Framework

One Day Training
17 January 2015 - Irvine, CA
Troy Miles
Agenda
JavaScript
AngularJS
PhoneGap/Cordova
Plugins
The Ionic Framework
Debugging
ui router
YP.com
Google Maps
Making Coffee!
Your clients
Want good looking, well performing mobile apps
They normally don’t care how you create them
It is usually your choice of tools to use to give the
clients the results they want
JavaScript
Quick History of JavaScript
Initial version built in 10 days by Brendan Eich
Original name was LiveScript
Greatly influenced by a language called Scheme
Changed to please Sun Microsystems
Converted into a curly brace language
Renamed JavaScript
Why JavaScript Sucks?
Its use of global variables
It has strange scoping rules
It thinks it is smarter than you
Why writing good JS is
hard?
Most programmers don’t bother to learn it
It is changed not embraced
The page load has protected you
Why JS is beautiful?
It is a functional language, close to Lisp and Scheme
than Java or C
First class functions
Dynamic objects
Loose typing
and more…
Keywords
JavaScript has surprisingly few keywords
break, case, catch, continue, debugger, default, delete,
do, else, finally, for, function, if, in, instance, new return,
switch, this, throw, try, typeof, var, while, with
Keywords not used
class, enum, export, extends, import, super,
implements, interface, let, package, private, protected,
public, static, yield
Using keywords in variables
Can’t be used as variables or parameters
But can be used as properties
Legal uses:
a.import = “test”;
a[“import”] = “test”;
a = {import: “test”};
Why the weirdness?
When the Internet was young, pages were badly coded
Both the DOM and JS interpreter tried to correct bad
code
The results were less than stellar
Coercion
Attempts to force two variables to be the same type
Unfortunately the results are illogical
Always use === and !==
Never use == or !=
Hoisting
JavaScript is function scoped
Variables have a two step creation process: declaration
and assignment
variables are always declared at the beginning of a
function
Function Power!
Functions are first class objects
Functions can be treated like any other object
They can make you code dynamic
Anonymous function
Functions don’t need to have a name
Can help minimize global space pollution
ex.
function() {

/* code goes here */

}
Immediate functions
Functions are normally executed only when called
It is possible to create a function executes itself
ex.
function superFunction(){

/* code goes here */

}();

Immediately Invoked
Function Expression (IIFE)
Has no name
Immediately executed
Used to create a namespaces
Use in many JS libraries
IIFE (continued)
(function() {

/* Nothing inside of the function can be seen on

on the outside, unless we want it to */

}());
Object Literals
A pair of curly braces surrounding name/value pairs
Can appear anywhere an expression can
The property’s name can be ANY string
Quotes only need when the name is not a legal variable
name
Object Literals
var empty = {};
var name = {

“first-name”: “Alan”,

“last-name”: “Turing”

};
Arrays vs. Objects
Arrays are not true arrays
Sort of a special kind of object literal
Both can mix types
Not the same
Arrays inherit from Array.prototype
Objects inherit from Object.prototype
More on objects
JavaScript objects are always dynamic
New properties can always be assigned
There is no class in JavaScript
Closure defined
In computer science, a closure is a function or
reference to a function together with a referencing
environment—a table storing a reference to each of the
non-local variables (also called free variables) of that
function.[1]
—Wikipedia
A bit more comprehensible
When an inner function has a longer lifetime than its
outer function and retains access to the context in
which it was created
Strict Mode
Functional “strict mode” used heavily
Eliminates many JavaScript silent errors
Fixes some JavaScript mistakes
https://developer.mozilla.org/en-US/docs/Web/
JavaScript/Reference/Strict_mode
AngularJS
AngularJS
Created by Miško Hevery and
Adam Abrons in 2009
JavaScript MVC
106 kb production version
(minimized, not gzipped)
Declarative programming for
UI
Imperative programming for
business logic
AngularJS Key Features
Model View Controller (MVC)
Data Binding
HTML Templates
Dependency Injection
Deep Linking
Directives
AngularJS
<!DOCTYPE html>

<html ng-app="moduleName">

<head lang="en">

<meta charset="UTF-8">

<title>NG-Skeleton</title>

</head>

<body>

<div ng-controller="aController">

</div>

<div ng-controller="anotherController">

</div>



<!-- if using jQuery it goes here -->

<script src="../libs/angular.min.js"></script>

<!-- other libs and script files -->

</body>

</html>

ng-app
Declares the boundary of an Angular app
The first ng-app found will be auto-bootstrapped
ng-app can optionally name a module
Can encompass the entire page <html ng-app>
Or only part of it, <div ng-app>
What the Browser Does?
Loads the HTML
Parses it into a Document Object Model or DOM
The angular.js script is loaded and parse
Angular waits for the DOMContentLoaded event
AngularJS’ bootstrap code executed
DOMContentLoaded vs load
event
The load event fires once everything has loaded
The DOMContentLoaded event fires once the DOM
has been created
DOMContentLoaded doesn’t wait for CSS, images, or
iFrames to load
DOMContentLoaded fires well before load
AngularJS’ Bootstrap
Bootstrap looks for the ng-app directive
There can only be one of these
The module specification is optional
The module specification tells the $injector service
which defined module to load
Model View Controller
Uses MVC or MVVM or MV* depends on who you ask
The goal is clear separation of concerns
The model is only concerned with data
The view presents the data to the user
The controller applies the business logic
Data Binding
In Angular, binding is built into the framework
Replaces text content of HTML element with the value
of the expression
{{ expression }}
<ANY ng-bind=“expression”>…</ANY>
<ANY class=“ng-bind: expression;”>…</ANY>
HTML Templates
Many JavaScript MVC Frameworks use a client-side
templating engine
AngularJS doesn’t
Angular uses HTML as its templating engine
No extra markup, no extra libraries
Dependency Injection
A software design pattern that implements inversion of
control and allows a program design to follow the
dependency inversion principle
Allows a dependency to be passed to an object
Allows code to clearly state dependencies
Leads to code which is easier to debug and test
Makes it possible to minimize apps without breaking them
Dependency Injection
The DI pattern in AngularJS looks funky due to
JavaScript’s shortcomings
The pattern is name of module, dot, name of provider,
name of object, an array with the list of dependencies
in strings and a function as the last item in the array
tempApp.controller('CurrentCtrl', ['$scope', function ($scope) {

$scope.temp = 17;

}]);
Deep Linking
Deep Linking enables a website to restore state from a
URL
URL and bookmarks are key part of the web
Early Single Page Apps lacked deep linking
They broke SEO and user expectation
Directives
“The coolest feature of AngularJS” - Misko Hervey
Attach behavior to DOM elements
Can nearly turn HTML into a DSL
Plain Old JavaScript Objects
Angular uses dirty checking to keep the model and
view in sync
Dirty checking runs equality checks over the data the
view depends, it is a brute force method
Watch expressions are run every time data could
change
Watch expression should be fast and idempotent
The methods on the $scope
$watch()
$apply()
$digest()
$watch()
Watches for model mutations
$watch(watched expression/function, handler, …)
Watch expression must be fast and idempotent
$apply()
Called when you are transitioning from non-angular
world into angular world
calls $digest
$digest()
A digest is just plain old dirty checking
It works on all browsers and is totally predictable
Digest Loop
Possibility of an endless loop
Will only go 10 deep before exception is thrown
NOT like a game loop
Module
A collection of configuration and run blocks which get
applied to the app during bootstrap
Most apps will have one module
Most 3rd party libraries will come with their own
You inject dependent modules into yours
Configuration Blocks
Get executed during the provider registration and
configuration phase
Only providers and constants can be injected into
configuration blocks
Shortcut methods available for some common
configuration blocks
Configuration Shortcuts
value(‘constantName’, 123)
factory(‘factoryName’, function(){return 123;})
directive(‘directiveName’, …)
filter(‘filterName’, …)
Run Blocks
Closest thing Angular has to a main method
Executed after services have been configured
Typically contains code which is hard to unit test
Order of Execution
Configuration blocks
Run blocks
Directive compile functions
Controllers
Directive link functions
$timeout
guaranteed to fire after current digest loop
If you use a setTimeOut, you will also need to do
$apply
$timeout does this for you
PhoneGap/Cordova
The Brief History of Cordova
2009: 1st developed at an iPhoneDevCamp event
2009: Developers form a company, Nitobi
2011: Adobe acquires Nitobi
2011: Adobe open sources PhoneGap project to
Apache
2012: Apache gives the project the name Cordova
What Cordova isn’t?
A website packaged in an app
A converter which turns JavaScript into native code
How Cordova differs from
PhoneGap?
Cordova is an open source product
It serves as the base platform for quite a few
commercial implementations
One of those is Adobe’s PhoneGap
Others are IBM Worklight, Motorola Solutions
RhoMobile Suite, Intel XDK, plus more.
Cordova CLI
Command Line Interface
Two types of commands, global & project
Global Commands
create - creates a project
help - display help text or help for a specific command
Project Commands
info
platform
plugin
prepare
compile
run
serve
build
emulate
Directory structure
config.xml - global configuration file
hooks - scripts used to customize Cordova commands
platforms - native application projects
plugins - added plugins go here
www - your app’s code
(merges) - platform specific overrides
Hello Cordova World steps
1. cordova create helloapp com.rnc.helloapp
2. cd helloapp
3. cordova platform add android
4. cordova build android
5. cordova run android or cordova serve
Plugins
As of version 3.0 Cordova is implemented mainly as a
collection of plugins surrounding a small core
Plugins are implemented in native code and/or
JavaScript
Without plugins your application can’t communicate
with the device’s hardware
Over 600 plugins currently available
Installing/Removing Plugins
Find plugins at: http://plugins.cordova.io/
cordova plugin add org.apache.cordova.device
cordova plugin remove org.apache.cordova.device
Two essential plugins are device & console
Plugins not available until after deviceready event
Plugin Anatomy
Documentation: doc/index.md
Native code in src directory
JavaScript in www directory
Using a Plugin
Remember: You must wait for the deviceready event
Read the plugin’s documentation
Implement the functionality according to docs
Best practice: Sniff for the property before use
Debugging First Look
Two browsers have built-in remote debugging
For Android, Chrome is your best friend
menu -> More tools -> Inspect Devices
For iOS, Safari is your best friend
Preferences -> Advanced -> Show develop
For both the device must be connected via USB
Adding Libraries
Most popular open source libraries will also work in a
Cordova app
Add the library with the script tag, same as always:
<script src=“js/jquery.min.js”></script>
For performance sake, place the minimized library in
the www directory, don’t load from web
Simple Ajax Functionality
Cordova apps not bound by HTML same origin policy
But accessible websites must be included on the
whitelist
By default access is allowed to all sites, but not
recommended for production
Housekeeping
At some point in the app lifecycle, you may wish to
update Cordova or one of the plugins
Update Cordova: sudo npm update -g cordova
Update a plugin: remove it and add it back
BE CAREFUL - Newer versions may break your app
Problems with raw Cordova
No user interface
No support for HTML templates
No application framework
The Ionic Framework
The Ionic Framework?
Combines Apache Cordova
with Google's AngularJS
along with lots custom
JavaScript, HTML, and CSS3
to create purpose built mobile
apps
which perform like native ones
and look beautiful
Supported Devices
iOS 6+
Android 4+
Windows Phone 8+ (coming)
FireFox OS (coming)
Drifty Co.
Founded in 2012 by Ben Sperry (CEO) and Max Lynch
(CTO)
Based in Madison, WI
Creators of Codiqa, JetStrap, and Ionic
Raised $1 million from Arthur Ventures earlier this year
Are people actually using it?
Mallzee
Replaced their hand
built PhoneGap app with
Ionic in May
Excellent UI
Songhop
The fastest way to find
new music
5 star rated
iPhone only
Keychain
Like Uber for trucks
iOS and Android version
Scrapped prior version
built with PhoneGap
Sworkit
Created by Ryan Hanna
alone
Featured in the Health and
Fitness section of the App
Store
Downloaded over 3 million
times
in the App Store, Google
Play and Amazon Store
Modern Web Skills
HTML 5 / CSS 3 / JavaScript
Comfortable with command line tools
AngularJS
Sass (optional)
Prerequisites
Java SDK 6 or 7
Android SDK + Eclipse/Android Studio
Node / NPM
Cordova
Gulp
Ionic
Why do I need Node?
Node apps are built in JavaScript
JavaScript runs on all platforms
Node comes bundled with NPM, Node Package
Manager
It makes installing, running, and updating tools easy
Hence Node is a popular way to ship tools
Is there an easier way?
The Ionic Box
Install VirtualBox, its free and available for most
platforms
Install Vagrant, its free too
Install the Ionic Box
See blog post for complete instructions:

http://therockncoder.blogspot.com/2014/10/getting-
started-building-mobile-apps.html
Ionic and Cordova
Ionic is built on top of Cordova
It also wraps many of its commands
Commands like build, platform, plugin all directly call
Cordova
It also adds its own like serve, which makes it easier to
run apps in browser
Create ionic app
ionic start myApp <template>
blank
tabs
sideMenu
Ionicons
http://ionicons.com/
Can search from
website
Can easily change size
free & open source
ngCordova
Cordova has a lot of available plugins
Plugins give access to the machine functions
ngCordova "Angularizes" plugins for ready use
You are always free to write your own wrapper code
What about tablets?
Ionic supports responsive design
Ionic’s grid with CSS Flexbox support
Side menu can be set auto open on wide displays
Workflow
ionic serve
Google Chrome mobile emulator
iOS Simulator / Android Emulator / Genymotion
iOS / Android device
Crosswalk for Android
Versions of Android before 4.4 use Android’s no named
default browser which is slower and less compliant
than Chrome
It also means you can’t be exactly sure how your
Cordova app will perform on these phones
Crosswalk allows you to specify a version of Chrome to
run in your Android Cordova app
Crosswalk
You can see up to a 10x increase in HTML/CSS
rendering and JavaScript performance
Your app will grow 10-15 MB in size
Ways to break up an app
By file type
Files are placed into directories by their type: js, html, etc.
May be subdivided further: controllers, directives, etc
By feature
The files which make up a feature are placed into the
same directories

Coffee!
An ajax app which uses a third party services from
YP.com for data and Google Maps for maps
For those who have taken other classes from me, this
app is simply too cool to die
Steps to make coffee
Make a side menu template app
Modify menu markup
Modify routes
Add listings service
Add lists
Steps…
Add detail page
Add map page
Add Google Maps
Add markers to map
Make markers clickable
Resources
http://learn.ionicframework.com/
http://ionicframework.com/
https://angularjs.org/
http://www.appiconsizes.com/
http://therockncoder.blogspot.com/
https://twitter.com/therockncoder
Summary
Cordova is a platform which allows for the building of
mobile apps using web technologies
Ionic builds on top of that by providing a good looking
performance driven UI and better developer tools
Ionic uses AngularJS as its JavaScript MVC framework

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Hybrid Apps with Ionic Framework
Hybrid Apps with Ionic FrameworkHybrid Apps with Ionic Framework
Hybrid Apps with Ionic Framework
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Building mobile app with Ionic Framework
Building mobile app with Ionic FrameworkBuilding mobile app with Ionic Framework
Building mobile app with Ionic Framework
 
Mobile Applications with Angular 4 and Ionic 3
Mobile Applications with Angular 4 and Ionic 3Mobile Applications with Angular 4 and Ionic 3
Mobile Applications with Angular 4 and Ionic 3
 
Cordova, Angularjs & Ionic @ Codeaholics
Cordova, Angularjs & Ionic @ CodeaholicsCordova, Angularjs & Ionic @ Codeaholics
Cordova, Angularjs & Ionic @ Codeaholics
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
 
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
 
Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic Framework
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Introduction to Ionic framework
Introduction to Ionic frameworkIntroduction to Ionic framework
Introduction to 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
 
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
 
IONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentIONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App Development
 
Ionic Crash Course! Hack-a-ton SF
Ionic Crash Course! Hack-a-ton SFIonic Crash Course! Hack-a-ton SF
Ionic Crash Course! Hack-a-ton SF
 
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without CompromisesIonic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
 
Use Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile applicationUse Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile application
 
Ionic CLI Adventures
Ionic CLI AdventuresIonic CLI Adventures
Ionic CLI Adventures
 
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 2 intro
Ionic 2   introIonic 2   intro
Ionic 2 intro
 

Andere mochten auch

Introduction to Mobile Programming 2 - course
Introduction to Mobile Programming 2 - courseIntroduction to Mobile Programming 2 - course
Introduction to Mobile Programming 2 - course
Jussi Pohjolainen
 

Andere mochten auch (16)

Building Mobile Applications with Ionic
Building Mobile Applications with IonicBuilding Mobile Applications with Ionic
Building Mobile Applications with Ionic
 
Cordova: APIs and instruments
Cordova: APIs and instrumentsCordova: APIs and instruments
Cordova: APIs and instruments
 
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSSCordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
 
Ionic - Hybrid Mobile Application Framework
Ionic - Hybrid Mobile Application FrameworkIonic - Hybrid Mobile Application Framework
Ionic - Hybrid Mobile Application Framework
 
Ionic Hybrid Mobile Application
Ionic Hybrid Mobile ApplicationIonic Hybrid Mobile Application
Ionic Hybrid Mobile Application
 
Cross-Platform Mobile Development with Ionic Framework and Angular
Cross-Platform Mobile Development with Ionic Framework and AngularCross-Platform Mobile Development with Ionic Framework and Angular
Cross-Platform Mobile Development with Ionic Framework and Angular
 
Mobile app development - course intro
Mobile app development - course introMobile app development - course intro
Mobile app development - course intro
 
Introduction to Mobile Programming 2 - course
Introduction to Mobile Programming 2 - courseIntroduction to Mobile Programming 2 - course
Introduction to Mobile Programming 2 - course
 
Mobile Web Dev
Mobile Web DevMobile Web Dev
Mobile Web Dev
 
georchestra SDI: Project Status Report
georchestra SDI: Project Status Reportgeorchestra SDI: Project Status Report
georchestra SDI: Project Status Report
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinDeploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
 
moscmy2016: Extending Docker
moscmy2016: Extending Dockermoscmy2016: Extending Docker
moscmy2016: Extending Docker
 
Building Hybrid Apps with AngularJS and Ionic
Building Hybrid Apps with AngularJS and IonicBuilding Hybrid Apps with AngularJS and Ionic
Building Hybrid Apps with AngularJS and Ionic
 
Oeb09 Session1 Basic To Mobile20
Oeb09 Session1 Basic To Mobile20Oeb09 Session1 Basic To Mobile20
Oeb09 Session1 Basic To Mobile20
 

Ähnlich wie Ionic framework one day training

Beginning AngularJS
Beginning AngularJSBeginning AngularJS
Beginning AngularJS
Troy Miles
 
AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)
Abhishek Anand
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 

Ähnlich wie Ionic framework one day training (20)

AngularJS Beginner Day One
AngularJS Beginner Day OneAngularJS Beginner Day One
AngularJS Beginner Day One
 
Training On Angular Js
Training On Angular JsTraining On Angular Js
Training On Angular Js
 
Beginning AngularJS
Beginning AngularJSBeginning AngularJS
Beginning AngularJS
 
Intro to AngularJs
Intro to AngularJsIntro to AngularJs
Intro to AngularJs
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Angular 9
Angular 9 Angular 9
Angular 9
 
How do i implement command design pattern in the java programming course with...
How do i implement command design pattern in the java programming course with...How do i implement command design pattern in the java programming course with...
How do i implement command design pattern in the java programming course with...
 
AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)
 
WJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJSWJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJS
 
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJSKarlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
Spring boot
Spring bootSpring boot
Spring boot
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 
Angular training - Day 3 - custom directives, $http, $resource, setup with ye...
Angular training - Day 3 - custom directives, $http, $resource, setup with ye...Angular training - Day 3 - custom directives, $http, $resource, setup with ye...
Angular training - Day 3 - custom directives, $http, $resource, setup with ye...
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
Handlebars and Require.js
Handlebars and Require.jsHandlebars and Require.js
Handlebars and Require.js
 

Mehr von Troy Miles

Mehr von Troy Miles (20)

Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web Servers
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot Camp
 
AWS Lambda Function with Kotlin
AWS Lambda Function with KotlinAWS Lambda Function with Kotlin
AWS Lambda Function with Kotlin
 
React Native One Day
React Native One DayReact Native One Day
React Native One Day
 
React Native Evening
React Native EveningReact Native Evening
React Native Evening
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
React Development with the MERN Stack
React Development with the MERN StackReact Development with the MERN Stack
React Development with the MERN Stack
 
Angular Application Testing
Angular Application TestingAngular Application Testing
Angular Application Testing
 
ReactJS.NET
ReactJS.NETReactJS.NET
ReactJS.NET
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?
 
Angular Weekend
Angular WeekendAngular Weekend
Angular Weekend
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in Clojure
 
MEAN Stack Warm-up
MEAN Stack Warm-upMEAN Stack Warm-up
MEAN Stack Warm-up
 
The JavaScript You Wished You Knew
The JavaScript You Wished You KnewThe JavaScript You Wished You Knew
The JavaScript You Wished You Knew
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutes
 
Quick & Dirty & MEAN
Quick & Dirty & MEANQuick & Dirty & MEAN
Quick & Dirty & MEAN
 
A Quick Intro to ReactiveX
A Quick Intro to ReactiveXA Quick Intro to ReactiveX
A Quick Intro to ReactiveX
 

Kürzlich hochgeladen

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Ionic framework one day training

  • 1. Ionic Framework
 One Day Training 17 January 2015 - Irvine, CA Troy Miles
  • 3. Your clients Want good looking, well performing mobile apps They normally don’t care how you create them It is usually your choice of tools to use to give the clients the results they want
  • 5. Quick History of JavaScript Initial version built in 10 days by Brendan Eich Original name was LiveScript Greatly influenced by a language called Scheme Changed to please Sun Microsystems Converted into a curly brace language Renamed JavaScript
  • 6. Why JavaScript Sucks? Its use of global variables It has strange scoping rules It thinks it is smarter than you
  • 7. Why writing good JS is hard? Most programmers don’t bother to learn it It is changed not embraced The page load has protected you
  • 8. Why JS is beautiful? It is a functional language, close to Lisp and Scheme than Java or C First class functions Dynamic objects Loose typing and more…
  • 9. Keywords JavaScript has surprisingly few keywords break, case, catch, continue, debugger, default, delete, do, else, finally, for, function, if, in, instance, new return, switch, this, throw, try, typeof, var, while, with
  • 10. Keywords not used class, enum, export, extends, import, super, implements, interface, let, package, private, protected, public, static, yield
  • 11. Using keywords in variables Can’t be used as variables or parameters But can be used as properties Legal uses: a.import = “test”; a[“import”] = “test”; a = {import: “test”};
  • 12. Why the weirdness? When the Internet was young, pages were badly coded Both the DOM and JS interpreter tried to correct bad code The results were less than stellar
  • 13. Coercion Attempts to force two variables to be the same type Unfortunately the results are illogical Always use === and !== Never use == or !=
  • 14. Hoisting JavaScript is function scoped Variables have a two step creation process: declaration and assignment variables are always declared at the beginning of a function
  • 15. Function Power! Functions are first class objects Functions can be treated like any other object They can make you code dynamic
  • 16. Anonymous function Functions don’t need to have a name Can help minimize global space pollution ex. function() {
 /* code goes here */
 }
  • 17. Immediate functions Functions are normally executed only when called It is possible to create a function executes itself ex. function superFunction(){
 /* code goes here */
 }();

  • 18. Immediately Invoked Function Expression (IIFE) Has no name Immediately executed Used to create a namespaces Use in many JS libraries
  • 19. IIFE (continued) (function() {
 /* Nothing inside of the function can be seen on
 on the outside, unless we want it to */
 }());
  • 20. Object Literals A pair of curly braces surrounding name/value pairs Can appear anywhere an expression can The property’s name can be ANY string Quotes only need when the name is not a legal variable name
  • 21. Object Literals var empty = {}; var name = {
 “first-name”: “Alan”,
 “last-name”: “Turing”
 };
  • 22. Arrays vs. Objects Arrays are not true arrays Sort of a special kind of object literal Both can mix types Not the same Arrays inherit from Array.prototype Objects inherit from Object.prototype
  • 23. More on objects JavaScript objects are always dynamic New properties can always be assigned There is no class in JavaScript
  • 24. Closure defined In computer science, a closure is a function or reference to a function together with a referencing environment—a table storing a reference to each of the non-local variables (also called free variables) of that function.[1] —Wikipedia
  • 25. A bit more comprehensible When an inner function has a longer lifetime than its outer function and retains access to the context in which it was created
  • 26. Strict Mode Functional “strict mode” used heavily Eliminates many JavaScript silent errors Fixes some JavaScript mistakes https://developer.mozilla.org/en-US/docs/Web/ JavaScript/Reference/Strict_mode
  • 28. AngularJS Created by Miško Hevery and Adam Abrons in 2009 JavaScript MVC 106 kb production version (minimized, not gzipped) Declarative programming for UI Imperative programming for business logic
  • 29. AngularJS Key Features Model View Controller (MVC) Data Binding HTML Templates Dependency Injection Deep Linking Directives
  • 30. AngularJS <!DOCTYPE html>
 <html ng-app="moduleName">
 <head lang="en">
 <meta charset="UTF-8">
 <title>NG-Skeleton</title>
 </head>
 <body>
 <div ng-controller="aController">
 </div>
 <div ng-controller="anotherController">
 </div>
 
 <!-- if using jQuery it goes here -->
 <script src="../libs/angular.min.js"></script>
 <!-- other libs and script files -->
 </body>
 </html>

  • 31. ng-app Declares the boundary of an Angular app The first ng-app found will be auto-bootstrapped ng-app can optionally name a module Can encompass the entire page <html ng-app> Or only part of it, <div ng-app>
  • 32. What the Browser Does? Loads the HTML Parses it into a Document Object Model or DOM The angular.js script is loaded and parse Angular waits for the DOMContentLoaded event AngularJS’ bootstrap code executed
  • 33. DOMContentLoaded vs load event The load event fires once everything has loaded The DOMContentLoaded event fires once the DOM has been created DOMContentLoaded doesn’t wait for CSS, images, or iFrames to load DOMContentLoaded fires well before load
  • 34. AngularJS’ Bootstrap Bootstrap looks for the ng-app directive There can only be one of these The module specification is optional The module specification tells the $injector service which defined module to load
  • 35. Model View Controller Uses MVC or MVVM or MV* depends on who you ask The goal is clear separation of concerns The model is only concerned with data The view presents the data to the user The controller applies the business logic
  • 36. Data Binding In Angular, binding is built into the framework Replaces text content of HTML element with the value of the expression {{ expression }} <ANY ng-bind=“expression”>…</ANY> <ANY class=“ng-bind: expression;”>…</ANY>
  • 37. HTML Templates Many JavaScript MVC Frameworks use a client-side templating engine AngularJS doesn’t Angular uses HTML as its templating engine No extra markup, no extra libraries
  • 38. Dependency Injection A software design pattern that implements inversion of control and allows a program design to follow the dependency inversion principle Allows a dependency to be passed to an object Allows code to clearly state dependencies Leads to code which is easier to debug and test Makes it possible to minimize apps without breaking them
  • 39. Dependency Injection The DI pattern in AngularJS looks funky due to JavaScript’s shortcomings The pattern is name of module, dot, name of provider, name of object, an array with the list of dependencies in strings and a function as the last item in the array tempApp.controller('CurrentCtrl', ['$scope', function ($scope) {
 $scope.temp = 17;
 }]);
  • 40. Deep Linking Deep Linking enables a website to restore state from a URL URL and bookmarks are key part of the web Early Single Page Apps lacked deep linking They broke SEO and user expectation
  • 41. Directives “The coolest feature of AngularJS” - Misko Hervey Attach behavior to DOM elements Can nearly turn HTML into a DSL
  • 42. Plain Old JavaScript Objects Angular uses dirty checking to keep the model and view in sync Dirty checking runs equality checks over the data the view depends, it is a brute force method Watch expressions are run every time data could change Watch expression should be fast and idempotent
  • 43. The methods on the $scope $watch() $apply() $digest()
  • 44. $watch() Watches for model mutations $watch(watched expression/function, handler, …) Watch expression must be fast and idempotent
  • 45. $apply() Called when you are transitioning from non-angular world into angular world calls $digest
  • 46. $digest() A digest is just plain old dirty checking It works on all browsers and is totally predictable
  • 47. Digest Loop Possibility of an endless loop Will only go 10 deep before exception is thrown NOT like a game loop
  • 48. Module A collection of configuration and run blocks which get applied to the app during bootstrap Most apps will have one module Most 3rd party libraries will come with their own You inject dependent modules into yours
  • 49. Configuration Blocks Get executed during the provider registration and configuration phase Only providers and constants can be injected into configuration blocks Shortcut methods available for some common configuration blocks
  • 50. Configuration Shortcuts value(‘constantName’, 123) factory(‘factoryName’, function(){return 123;}) directive(‘directiveName’, …) filter(‘filterName’, …)
  • 51. Run Blocks Closest thing Angular has to a main method Executed after services have been configured Typically contains code which is hard to unit test
  • 52. Order of Execution Configuration blocks Run blocks Directive compile functions Controllers Directive link functions
  • 53. $timeout guaranteed to fire after current digest loop If you use a setTimeOut, you will also need to do $apply $timeout does this for you
  • 55. The Brief History of Cordova 2009: 1st developed at an iPhoneDevCamp event 2009: Developers form a company, Nitobi 2011: Adobe acquires Nitobi 2011: Adobe open sources PhoneGap project to Apache 2012: Apache gives the project the name Cordova
  • 56. What Cordova isn’t? A website packaged in an app A converter which turns JavaScript into native code
  • 57. How Cordova differs from PhoneGap? Cordova is an open source product It serves as the base platform for quite a few commercial implementations One of those is Adobe’s PhoneGap Others are IBM Worklight, Motorola Solutions RhoMobile Suite, Intel XDK, plus more.
  • 58. Cordova CLI Command Line Interface Two types of commands, global & project
  • 59. Global Commands create - creates a project help - display help text or help for a specific command
  • 61. Directory structure config.xml - global configuration file hooks - scripts used to customize Cordova commands platforms - native application projects plugins - added plugins go here www - your app’s code (merges) - platform specific overrides
  • 62. Hello Cordova World steps 1. cordova create helloapp com.rnc.helloapp 2. cd helloapp 3. cordova platform add android 4. cordova build android 5. cordova run android or cordova serve
  • 63. Plugins As of version 3.0 Cordova is implemented mainly as a collection of plugins surrounding a small core Plugins are implemented in native code and/or JavaScript Without plugins your application can’t communicate with the device’s hardware Over 600 plugins currently available
  • 64. Installing/Removing Plugins Find plugins at: http://plugins.cordova.io/ cordova plugin add org.apache.cordova.device cordova plugin remove org.apache.cordova.device Two essential plugins are device & console Plugins not available until after deviceready event
  • 65. Plugin Anatomy Documentation: doc/index.md Native code in src directory JavaScript in www directory
  • 66. Using a Plugin Remember: You must wait for the deviceready event Read the plugin’s documentation Implement the functionality according to docs Best practice: Sniff for the property before use
  • 67. Debugging First Look Two browsers have built-in remote debugging For Android, Chrome is your best friend menu -> More tools -> Inspect Devices For iOS, Safari is your best friend Preferences -> Advanced -> Show develop For both the device must be connected via USB
  • 68. Adding Libraries Most popular open source libraries will also work in a Cordova app Add the library with the script tag, same as always: <script src=“js/jquery.min.js”></script> For performance sake, place the minimized library in the www directory, don’t load from web
  • 69. Simple Ajax Functionality Cordova apps not bound by HTML same origin policy But accessible websites must be included on the whitelist By default access is allowed to all sites, but not recommended for production
  • 70. Housekeeping At some point in the app lifecycle, you may wish to update Cordova or one of the plugins Update Cordova: sudo npm update -g cordova Update a plugin: remove it and add it back BE CAREFUL - Newer versions may break your app
  • 71. Problems with raw Cordova No user interface No support for HTML templates No application framework
  • 73. The Ionic Framework? Combines Apache Cordova with Google's AngularJS along with lots custom JavaScript, HTML, and CSS3 to create purpose built mobile apps which perform like native ones and look beautiful
  • 74. Supported Devices iOS 6+ Android 4+ Windows Phone 8+ (coming) FireFox OS (coming)
  • 75. Drifty Co. Founded in 2012 by Ben Sperry (CEO) and Max Lynch (CTO) Based in Madison, WI Creators of Codiqa, JetStrap, and Ionic Raised $1 million from Arthur Ventures earlier this year
  • 76. Are people actually using it?
  • 77. Mallzee Replaced their hand built PhoneGap app with Ionic in May Excellent UI
  • 78. Songhop The fastest way to find new music 5 star rated iPhone only
  • 79. Keychain Like Uber for trucks iOS and Android version Scrapped prior version built with PhoneGap
  • 80. Sworkit Created by Ryan Hanna alone Featured in the Health and Fitness section of the App Store Downloaded over 3 million times in the App Store, Google Play and Amazon Store
  • 81. Modern Web Skills HTML 5 / CSS 3 / JavaScript Comfortable with command line tools AngularJS Sass (optional)
  • 82. Prerequisites Java SDK 6 or 7 Android SDK + Eclipse/Android Studio Node / NPM Cordova Gulp Ionic
  • 83. Why do I need Node? Node apps are built in JavaScript JavaScript runs on all platforms Node comes bundled with NPM, Node Package Manager It makes installing, running, and updating tools easy Hence Node is a popular way to ship tools
  • 84. Is there an easier way?
  • 85. The Ionic Box Install VirtualBox, its free and available for most platforms Install Vagrant, its free too Install the Ionic Box See blog post for complete instructions:
 http://therockncoder.blogspot.com/2014/10/getting- started-building-mobile-apps.html
  • 86. Ionic and Cordova Ionic is built on top of Cordova It also wraps many of its commands Commands like build, platform, plugin all directly call Cordova It also adds its own like serve, which makes it easier to run apps in browser
  • 87. Create ionic app ionic start myApp <template> blank tabs sideMenu
  • 88. Ionicons http://ionicons.com/ Can search from website Can easily change size free & open source
  • 89. ngCordova Cordova has a lot of available plugins Plugins give access to the machine functions ngCordova "Angularizes" plugins for ready use You are always free to write your own wrapper code
  • 90. What about tablets? Ionic supports responsive design Ionic’s grid with CSS Flexbox support Side menu can be set auto open on wide displays
  • 91. Workflow ionic serve Google Chrome mobile emulator iOS Simulator / Android Emulator / Genymotion iOS / Android device
  • 92. Crosswalk for Android Versions of Android before 4.4 use Android’s no named default browser which is slower and less compliant than Chrome It also means you can’t be exactly sure how your Cordova app will perform on these phones Crosswalk allows you to specify a version of Chrome to run in your Android Cordova app
  • 93. Crosswalk You can see up to a 10x increase in HTML/CSS rendering and JavaScript performance Your app will grow 10-15 MB in size
  • 94. Ways to break up an app By file type Files are placed into directories by their type: js, html, etc. May be subdivided further: controllers, directives, etc By feature The files which make up a feature are placed into the same directories

  • 95. Coffee! An ajax app which uses a third party services from YP.com for data and Google Maps for maps For those who have taken other classes from me, this app is simply too cool to die
  • 96. Steps to make coffee Make a side menu template app Modify menu markup Modify routes Add listings service Add lists
  • 97. Steps… Add detail page Add map page Add Google Maps Add markers to map Make markers clickable
  • 99. Summary Cordova is a platform which allows for the building of mobile apps using web technologies Ionic builds on top of that by providing a good looking performance driven UI and better developer tools Ionic uses AngularJS as its JavaScript MVC framework