SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
Crash Course in
AngularJS + Ionic
About Me
● Consultant (southofshasta.com)
– Software Development, Training, Design.
● Using ColdFusion since 1999 (4.x)
● Other stuff: C++, Java, jQuery, PHP, .NET, HTML5,
Android, you get the idea...
● Manager of SacInteractive User Group.
● Reformed Video Game Developer (Grim Fandango,
SimPark, StarWars Rogue Squadron, etc).
● Music Junkie.
Today's Agenda
● Intro to MVC
● Intro to AngularJS
– Some basic features, concepts and code samples.
● Intro to Ionic
– More features, code samples, etc.
● Look at some sample apps running in simulator.
● Other resources.
● Questions.
● Lunch!
Prerequisites
● Good understanding of “modern” JavaScript.
– Scopes, anonymous functions, classes, objects.
● Previous MVC experience is helpful but not
req'd.
● You'll also get exposed to:
– Node.js, PhoneGap/Cordova, mobile SDKs
(Android, Xcode, etc).
● And 1 more thing you need to know...
Prerequisites
● Know that...
– Object Oriented Programming is hard.
– This “hybrid mobile” stuff is different than what you
may be used to.
– And some of it is confusing at first.
● And that's NORMAL.
Single Page Application (SPA)
● Instead of contact.html, about.html, products.html
● You have these guys:
– Sitename.com/#/contact
– Sitename.com/#/products
● The whole site is routed through index.html via
some internal machinery.
● The whole site is downloaded at once, then
accessed via the browser cache.
● Only new data is retrieved from the server.
What is AngularJS?
● MVC framework for JavaScript SPAs.
● Very few moving parts to get started.
– Include 1 JS file, add “ng-app” to your HTML, done!
● Some nice features.
– Dependency Injection
– Routes
– 2-way Data Binding
– Various other things...
How do I get started?
● Easy!
● https://angularjs.org/
● Click “download”.
– (npm and bower options available too)
● Angular.js is all you need to start.
– (Additional JS files for fancier features. We'll get to
that later.)
How do I get started?
● <script src=”angular.js”></script>
● <html ng-app>
● {{variable name / expression}}
● [DEMO 1]
What is MVC?
● Model View Controller
● Design Pattern
● Splits your app up into 3 logical sections.
– Model – where your data and related logic goes.
– View – the parts of your app you “view” (HTML,
CSS).
– Controller – determines what happens next in the
app (some business logic maybe too).
● The “restaurant” analogy.
What is MVC?
Model
- data
- localStorage
- bus. Logic
- etc
Controller
- route user
from point a
to point b
- route user
back to point
a if Model
said
something
was missing
View
- HTML
- CSS
- jQuery
- Bootstrap
- etc.
The “Model”
● Where your data lives.
● Can be a local JS variable.
● Can come from localStorage.
● REST API.
● Some other json/ajax request.
● The app doesn't care.
● Restaurant: the kitchen.
[DEMO 2]
The “View”
● The part of the app you “view”.
– HTML, CSS, JavaScript
<html>
<body>
this part here is the “view”
</body>
</html>
● Restaurant: the menu and plates of food
The “Controller”
● Controls what happens next.
– Send info to the model.
– Update the View with an error/success message.
– Move the User to a new section of the app.
– Etc.
● Restaurant: the waiter.
[DEMO 3]
Getting data via AJAX
● $http.get() method
– Performs HTTP GET to retrieve data in JSON form.
– Could be a local file, REST, anything that returns
JSON.
[DEMO 4]
Routes
● URLs in an Angular app look like so:
– /index.html#/home
● Everything is loaded via index.html
● Each #section as it's own “view” that's
dynamically injected as the app is running.
[DEMO 5]
Custom Directives
● Basically custom tags written in AngularJS.
– <my-custom-widget />
● Works just like regular HTML tags.
● Similar to Polymer.
AngularJS
● That (in an extreme nutshell) is AngularJS.
● Can be used by itself for SPA web apps.
● Not mobile-specific.
● Now, on to Ionic...
Ionic
● Is (essentially) mobile-specific.
● Sits on top of PhoneGap and Angular.
● Built on Angular's “Directives” and “Services”.
● Also uses PhoneGap's “magic”.
● To give a Bootstrap-esque set of functionality
for hybrid mobile apps.
Ionic
● Performance “obsessed”.
– Minimal DOM manipulation
– Removed 300ms tap delay
– Etc
● Lots of other neat features.
● We'll barely scratch the surface today.
Ionic – Getting Started
● Need Node.js, Ionic packages, Cordova
packages.
● If building apps locally, need Android and
iPhone SDKs (or use PhoneGapBuild).
● Initial installation can be a bit of a pain.
– Especially if you don't run bleeding edge OS, dev
tools, etc.
Ionic – Getting Started
● To start:
– ionic start my-app [blank]
– Generates all files needed to start an app.
– “blank” is the template name. Several to pick from,
we're starting with a bare-bones app.
[DEMO 1]
– ionic start my-app tabs
– [DEMO 2]
– ionic start my-app sidemenu
– [DEMO 3]
<ion-*> tags
● <ion-*> tags
● Technically Angular directives and services
under the hood.
● The stuff that looks like Angular IS Angular.
● The <ion-*> tags are the Ionic part.
● All the AngularJS you already know works the
exact same way!
[DEMO 4]
[DEMO 5]
What's the catch?
● Same as any PhoneGap/Cordova project.
● Need to install the SDKs for each platform.
– Takes time, hassles, etc.
– Android isn't super intuitive
– IOS requires Xcode, latest OSX, etc.
Other Resources
● AngularJS.org
● Book “Pro AngularJS”
● Book “PhoneGap Mobile Application Development
Cookbook” – Matt Gifford
● IonicFramework.com
● Ionic Creator IDE
● Ionic View – easy “private QA” app
● “Powering AngularJS With RESTful services” – today at
5:30!
● Dev-Objective “A RESTful day at the SPA with Taffy and
AngularJS”, Matt Graf, CFObjective 2015.
● Ray Camden's Ionic preso from CF.O last year (title?)
Questions? Comments?
● Ways to reach me:
– Southofshasta.com
– nolan@southofshasta.com
– Twitter @southofshasta
Thanks!

Weitere ähnliche Inhalte

Was ist angesagt?

SPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJSSPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJS
Mitch Chen
 

Was ist angesagt? (20)

Spa with angular
Spa with angularSpa with angular
Spa with angular
 
Protractor end-to-end testing framework for angular js
Protractor   end-to-end testing framework for angular jsProtractor   end-to-end testing framework for angular js
Protractor end-to-end testing framework for angular js
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected Journey
 
Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016
Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016
Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016
 
Building testable chrome extensions
Building testable chrome extensionsBuilding testable chrome extensions
Building testable chrome extensions
 
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
 
Test Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEMTest Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEM
 
Join the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.jsJoin the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.js
 
Front-end Automated Testing
Front-end Automated TestingFront-end Automated Testing
Front-end Automated Testing
 
Angular UI Testing with Protractor
Angular UI Testing with ProtractorAngular UI Testing with Protractor
Angular UI Testing with Protractor
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
 
Webdriver.io
Webdriver.io Webdriver.io
Webdriver.io
 
Angular 2: What's New?
Angular 2: What's New?Angular 2: What's New?
Angular 2: What's New?
 
Front-End Testing: Demystified
Front-End Testing: DemystifiedFront-End Testing: Demystified
Front-End Testing: Demystified
 
Testing nightwatch, by David Torroija
Testing nightwatch, by David TorroijaTesting nightwatch, by David Torroija
Testing nightwatch, by David Torroija
 
Angularjs
AngularjsAngularjs
Angularjs
 
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersAngular1x and Angular 2 for Beginners
Angular1x and Angular 2 for Beginners
 
SPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJSSPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJS
 
Better End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using ProtractorBetter End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using Protractor
 

Andere mochten auch

Sitcom quiz!
Sitcom quiz!Sitcom quiz!
Sitcom quiz!
Burtoni
 

Andere mochten auch (20)

ITB2015 - ColdBox 4 MVC Modular Architecture
ITB2015 - ColdBox 4 MVC Modular ArchitectureITB2015 - ColdBox 4 MVC Modular Architecture
ITB2015 - ColdBox 4 MVC Modular Architecture
 
ITB2015 - NoSQL For You And Me
ITB2015 - NoSQL For You And MeITB2015 - NoSQL For You And Me
ITB2015 - NoSQL For You And Me
 
ITB2015 - Customizing ContentBox with Themes, Widgets, and Modules, Oh My!
ITB2015 - Customizing ContentBox with Themes, Widgets, and Modules, Oh My!ITB2015 - Customizing ContentBox with Themes, Widgets, and Modules, Oh My!
ITB2015 - Customizing ContentBox with Themes, Widgets, and Modules, Oh My!
 
ITB2015 - Winning with Vagrant, Puppet and Chef
ITB2015 - Winning with Vagrant, Puppet and ChefITB2015 - Winning with Vagrant, Puppet and Chef
ITB2015 - Winning with Vagrant, Puppet and Chef
 
ITB2015 - Monitoring and Tracking Your Web Applications
ITB2015 - Monitoring and Tracking Your Web ApplicationsITB2015 - Monitoring and Tracking Your Web Applications
ITB2015 - Monitoring and Tracking Your Web Applications
 
ORM Pink Unicorns
ORM Pink UnicornsORM Pink Unicorns
ORM Pink Unicorns
 
ITB2015 - Go Commando with CommandBox CLI
ITB2015 - Go Commando with CommandBox CLIITB2015 - Go Commando with CommandBox CLI
ITB2015 - Go Commando with CommandBox CLI
 
ITB2015 - Behavior Driven Development, Automation and Continuous Integration
ITB2015 - Behavior Driven Development, Automation and Continuous IntegrationITB2015 - Behavior Driven Development, Automation and Continuous Integration
ITB2015 - Behavior Driven Development, Automation and Continuous Integration
 
ITB2015 - Real Life ContentBox Modular CMS
ITB2015 - Real Life ContentBox Modular CMSITB2015 - Real Life ContentBox Modular CMS
ITB2015 - Real Life ContentBox Modular CMS
 
Object Relational Mapping with Dapper (Micro ORM)
Object Relational Mapping with Dapper (Micro ORM)Object Relational Mapping with Dapper (Micro ORM)
Object Relational Mapping with Dapper (Micro ORM)
 
ITB2016 ContentBox CMS for a perfect project fit
ITB2016   ContentBox CMS for a perfect project fitITB2016   ContentBox CMS for a perfect project fit
ITB2016 ContentBox CMS for a perfect project fit
 
Sitcom quiz!
Sitcom quiz!Sitcom quiz!
Sitcom quiz!
 
Center for Education on Social Responsibility (CESR) Introduction
Center for Education on Social Responsibility (CESR) IntroductionCenter for Education on Social Responsibility (CESR) Introduction
Center for Education on Social Responsibility (CESR) Introduction
 
Into The Box 2016 Keynote
Into The Box 2016 KeynoteInto The Box 2016 Keynote
Into The Box 2016 Keynote
 
과제
과제과제
과제
 
ITB2016 - Integration testing in a modern world
ITB2016 - Integration testing in a modern worldITB2016 - Integration testing in a modern world
ITB2016 - Integration testing in a modern world
 
Саші Хортів
Саші ХортівСаші Хортів
Саші Хортів
 
ideological and material structure of Widowhood
ideological and material structure of Widowhoodideological and material structure of Widowhood
ideological and material structure of Widowhood
 
Welcome
WelcomeWelcome
Welcome
 
Pitch
Pitch Pitch
Pitch
 

Ähnlich wie ITB2015 - Crash Course in Ionic + AngularJS

Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"
Fwdays
 

Ähnlich wie ITB2015 - Crash Course in Ionic + AngularJS (20)

Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
Angular Js
Angular JsAngular Js
Angular Js
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for starters
 
Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"
 
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
Final presentation aldy ian - pwa
Final presentation   aldy ian - pwaFinal presentation   aldy ian - pwa
Final presentation aldy ian - pwa
 
20190826 ianjoseph_FinalPresentation
20190826 ianjoseph_FinalPresentation20190826 ianjoseph_FinalPresentation
20190826 ianjoseph_FinalPresentation
 
Dust.js
Dust.jsDust.js
Dust.js
 
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Intro to AngularJs
Intro to AngularJsIntro to AngularJs
Intro to AngularJs
 
AngularJS 101
AngularJS 101AngularJS 101
AngularJS 101
 
Start your journey with angular | Basic Angular
Start your journey with angular | Basic AngularStart your journey with angular | Basic Angular
Start your journey with angular | Basic Angular
 
Angular
AngularAngular
Angular
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
 
Angular js workshop
Angular js workshopAngular js workshop
Angular js workshop
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 

Mehr von Ortus Solutions, Corp

Mehr von Ortus Solutions, Corp (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Ortus Government.pdf
Ortus Government.pdfOrtus Government.pdf
Ortus Government.pdf
 
Luis Majano The Battlefield ORM
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
 
ITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdf
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

ITB2015 - Crash Course in Ionic + AngularJS

  • 2. About Me ● Consultant (southofshasta.com) – Software Development, Training, Design. ● Using ColdFusion since 1999 (4.x) ● Other stuff: C++, Java, jQuery, PHP, .NET, HTML5, Android, you get the idea... ● Manager of SacInteractive User Group. ● Reformed Video Game Developer (Grim Fandango, SimPark, StarWars Rogue Squadron, etc). ● Music Junkie.
  • 3. Today's Agenda ● Intro to MVC ● Intro to AngularJS – Some basic features, concepts and code samples. ● Intro to Ionic – More features, code samples, etc. ● Look at some sample apps running in simulator. ● Other resources. ● Questions. ● Lunch!
  • 4. Prerequisites ● Good understanding of “modern” JavaScript. – Scopes, anonymous functions, classes, objects. ● Previous MVC experience is helpful but not req'd. ● You'll also get exposed to: – Node.js, PhoneGap/Cordova, mobile SDKs (Android, Xcode, etc). ● And 1 more thing you need to know...
  • 5. Prerequisites ● Know that... – Object Oriented Programming is hard. – This “hybrid mobile” stuff is different than what you may be used to. – And some of it is confusing at first. ● And that's NORMAL.
  • 6. Single Page Application (SPA) ● Instead of contact.html, about.html, products.html ● You have these guys: – Sitename.com/#/contact – Sitename.com/#/products ● The whole site is routed through index.html via some internal machinery. ● The whole site is downloaded at once, then accessed via the browser cache. ● Only new data is retrieved from the server.
  • 7. What is AngularJS? ● MVC framework for JavaScript SPAs. ● Very few moving parts to get started. – Include 1 JS file, add “ng-app” to your HTML, done! ● Some nice features. – Dependency Injection – Routes – 2-way Data Binding – Various other things...
  • 8. How do I get started? ● Easy! ● https://angularjs.org/ ● Click “download”. – (npm and bower options available too) ● Angular.js is all you need to start. – (Additional JS files for fancier features. We'll get to that later.)
  • 9. How do I get started? ● <script src=”angular.js”></script> ● <html ng-app> ● {{variable name / expression}} ● [DEMO 1]
  • 10. What is MVC? ● Model View Controller ● Design Pattern ● Splits your app up into 3 logical sections. – Model – where your data and related logic goes. – View – the parts of your app you “view” (HTML, CSS). – Controller – determines what happens next in the app (some business logic maybe too). ● The “restaurant” analogy.
  • 11. What is MVC? Model - data - localStorage - bus. Logic - etc Controller - route user from point a to point b - route user back to point a if Model said something was missing View - HTML - CSS - jQuery - Bootstrap - etc.
  • 12. The “Model” ● Where your data lives. ● Can be a local JS variable. ● Can come from localStorage. ● REST API. ● Some other json/ajax request. ● The app doesn't care. ● Restaurant: the kitchen. [DEMO 2]
  • 13. The “View” ● The part of the app you “view”. – HTML, CSS, JavaScript <html> <body> this part here is the “view” </body> </html> ● Restaurant: the menu and plates of food
  • 14. The “Controller” ● Controls what happens next. – Send info to the model. – Update the View with an error/success message. – Move the User to a new section of the app. – Etc. ● Restaurant: the waiter. [DEMO 3]
  • 15. Getting data via AJAX ● $http.get() method – Performs HTTP GET to retrieve data in JSON form. – Could be a local file, REST, anything that returns JSON. [DEMO 4]
  • 16. Routes ● URLs in an Angular app look like so: – /index.html#/home ● Everything is loaded via index.html ● Each #section as it's own “view” that's dynamically injected as the app is running. [DEMO 5]
  • 17. Custom Directives ● Basically custom tags written in AngularJS. – <my-custom-widget /> ● Works just like regular HTML tags. ● Similar to Polymer.
  • 18. AngularJS ● That (in an extreme nutshell) is AngularJS. ● Can be used by itself for SPA web apps. ● Not mobile-specific. ● Now, on to Ionic...
  • 19. Ionic ● Is (essentially) mobile-specific. ● Sits on top of PhoneGap and Angular. ● Built on Angular's “Directives” and “Services”. ● Also uses PhoneGap's “magic”. ● To give a Bootstrap-esque set of functionality for hybrid mobile apps.
  • 20. Ionic ● Performance “obsessed”. – Minimal DOM manipulation – Removed 300ms tap delay – Etc ● Lots of other neat features. ● We'll barely scratch the surface today.
  • 21. Ionic – Getting Started ● Need Node.js, Ionic packages, Cordova packages. ● If building apps locally, need Android and iPhone SDKs (or use PhoneGapBuild). ● Initial installation can be a bit of a pain. – Especially if you don't run bleeding edge OS, dev tools, etc.
  • 22. Ionic – Getting Started ● To start: – ionic start my-app [blank] – Generates all files needed to start an app. – “blank” is the template name. Several to pick from, we're starting with a bare-bones app. [DEMO 1] – ionic start my-app tabs – [DEMO 2] – ionic start my-app sidemenu – [DEMO 3]
  • 23. <ion-*> tags ● <ion-*> tags ● Technically Angular directives and services under the hood. ● The stuff that looks like Angular IS Angular. ● The <ion-*> tags are the Ionic part. ● All the AngularJS you already know works the exact same way! [DEMO 4] [DEMO 5]
  • 24. What's the catch? ● Same as any PhoneGap/Cordova project. ● Need to install the SDKs for each platform. – Takes time, hassles, etc. – Android isn't super intuitive – IOS requires Xcode, latest OSX, etc.
  • 25. Other Resources ● AngularJS.org ● Book “Pro AngularJS” ● Book “PhoneGap Mobile Application Development Cookbook” – Matt Gifford ● IonicFramework.com ● Ionic Creator IDE ● Ionic View – easy “private QA” app ● “Powering AngularJS With RESTful services” – today at 5:30! ● Dev-Objective “A RESTful day at the SPA with Taffy and AngularJS”, Matt Graf, CFObjective 2015. ● Ray Camden's Ionic preso from CF.O last year (title?)
  • 26. Questions? Comments? ● Ways to reach me: – Southofshasta.com – nolan@southofshasta.com – Twitter @southofshasta Thanks!