Make Mobile Apps Quickly

G
Gil IrizarryDirector of Engineering at Basis Technology
Make Mobile Apps Quickly
Gil Irizarry
Conoa
About Me
• Launched VC News Daily app on iOS and Android. Over
1200 downloads so far.
• Owner and lead engineer at Conoa, a graphics and
mobile software firm
• gil@conoa.com
• http://www.slideshare.net/conoagil/
About Me
• All examples and sample code in this presentation can
be found at:
– http://conoa.com/hidden/example.zip
Why?
• There are nearly 2 million mobile apps available today.
(http://www.pureoxygenmobile.com/how-many-apps-in-each-app-store/ )
• 1.5 years ago, there were 15K new mobile apps released
each week. (http://www.nytimes.com/2011/12/12/technology/one-million-apps-and-counting.html )
• For many, interacting with software means interacting
with mobile devices (or at least devices that run mobile
software).
What we will do
• We will learn how to build lightweight mobile apps quickly,
using open source tools.
• The apps will be cross-platform.
• However, we must actually pick a platform on which to
build and test the apps.
• For this presentation, we will work in Android since the
tools are free and easily available. We will do this on
Windows.
What we will do
• (Mostly) everything presented today in the Android
environment will apply to iOS, or has an equivalent in that
environment.
• So, let‟s get started…
First, we must download Eclipse
• Suggest using Eclipse Classic. Why? Because the larger
Eclipse is geared towards J2EE development, which we
won‟t need.
• Eclipse Classic 4.2.2 (http://www.eclipse.org/downloads/packages/eclipse-classic-422/junosr2)
Complete environment
• Android has a complete development environment
available in a single download. However, where‟s the fun
in that? 
• It‟s good to understand how the components are
connected together.
Download the Android SDK
• Download and install the Android SDK. The Android SDK
requires that the Java Development Kit (JDK) be installed.
Do that before installing the Android SDK.
• It is a good idea to install the Android SDK into the folder
where Eclipse is located.
Install the ADT plug-in for Eclipse
• This plug-in tells Eclipse where the Android SDK is
located.
• From the Android developer site:
Start Eclipse, then select Help > Install New Software.
Click Add, in the top-right corner.
In the Add Repository dialog that appears, enter "ADT Plugin" for
the Name and the following URL for the Location:
https://dl-ssl.google.com/android/eclipse/
Configure the ADT plug-in
• Open Eclipse and select the Window menu.
• Open the Android SDK and AVD manager.
• Install all available components.
We’re nearly there!
• We still need to define a virtual device so we can run our
apps on the desktop. To do this, we must create an
AVD, Android Virtual Device.
Create an Android Virtual Device
• Again open the Android SDK and AVD Manager.
• Select Virtual Devices then select New.
• Create an AVD for Android 2.2 – API Level 8. Call it
AVD2.2. Selecting an early version of Android ensures the
your app will run on as many devices as possible. You
have to decide whether to use new Android features or
support the widest set of devices.
OK, let’s create our first project!
• In Eclipse, select New then select Project (not Java
Project).
• In the Select A Wizard dialog, select Android Application
Project.
• You should see a window like this:
First Project
Example 0 – Hello World!
• Name your project Example0
• Have the package name be com.siggraph2013.example0
• Select Android 2.2 as the minimum and target SDKs.
• Accept all the defaults in the subsequent screens.
• After the project is created, select Run
Example 0 – Hello World!
• You have created a native Android app.
• Your project should run in the Android 2.2 emulator
• Take a moment to explore the emulator. It features some
basic apps and a full web browser
• Press Ctrl-F12. This simulates a person rotating the
device and allows you to see your app in both landscape
and portrait modes.
PhoneGap
• PhoneGap is a free product, now owned by Adobe, that
allows cross-platform mobile development. It supports
iOS, Android, Blackberry OS, Windows Phone, and more.
• It allows development in HTML, allowing the use of
HTML5, CSS3, Javascript and more.
HTML5
• <!DOCTYPE html> signifies an HTML5 file. Note the
difference from HTML4 and XHTML.
• If you don‟t already, follow the XHTML standard when
coding in HTML5. Close your tags! <br />, not <br>
HTML5
• HTML5 adds:
– formatting tags: header, footer, nav, etc.
– local storage
– geolocation
– canvas element
– video and audio tags
CSS3
• Cascading Style Sheets.
• Codifies what had been loosely defined.
Example 1 – Hello World in PhoneGap
• Select the Example1 project in the Package Explorer in
Eclipse.
• Select Run from the top menu bar
• Once the emulator starts and is finished installing the
app, you should see something like this:
Example 1 – Hello World in PhoneGap
Example 1 – Hello World in PhoneGap
• Find Example1/assets/www/index.html
• Note that it is a standard html file. Make some changes to
it and select Run in the top menu bar to see the effect of
your changes
• The styles are in Example1/assets/www/styles.css. Try
changing those also.
JavaScript
• Scripting language that originally was used in web
browser but, with node.js, is now used on servers as well.
• Allows a website to have increased interactivity and
dynamic content.
jQuery
• The combination of HTML5, CSS3 and Javascript is quite
powerful, but the introduction of frameworks allows some
great results with less effort.
• jQuery is a JavaScript library that simplifies a lot of
JavaScript coding. It features:
– easier traversal of the DOM
– built-in Ajax functions
– effects and animations
– plug-in architecture
Example 2 – Let’s get some data
• Select the Example2 project in the Package Explorer in
Eclipse.
• Select Run from the top menu bar
• Once the emulator starts and is finished installing the
app, you should see something like this:
Example 2 – Let’s get some data
Wait, what happened?
• Does your emulator match the previous slide? Probably
not. What happened?
• When you create a new Android project with default
setting, internet access for the app is not automatically set.
• AndroidManifest.xml is an inventory of what access an
app requires.
• Remove the comment tag from <uses-permission
android:name="android.permission.INTERNET" /> and rebuild.
Example 2 – Under the hood
• This example brings together quite a few components.
• We want to read the Google News RSS feed.
• One way to do that is to use YQL (Yahoo Query
Language). YQL will convert RSS to JSON (JavaScript
Object Notation) via a SQL-like interface. Simply need to
use the RSS URL with the YQL query and pass this to
Yahoo.
Example 2 – Under the hood
• $.getJSON(newsqueryUrl, function (yqlObject) {} );
• $ refers to the jQuery object. getJSON is a function in the
object. It will call the URL in the first argument and pass
the result back to the anonymous function in second.
• This is an example of Ajax (not AJAX!). The anonymous
function will be called asynchronously.
Example 2 – Under the hood
• $(paragraphID).text(yqlObject.query.results.item[headline
Count].title);
• This is another jQuery statement, which says to change
the text associated with the tag that has the specified id.
• Compare this to:
– var tag = document.getElementById(“headline");
– tag.innerHTML = “some headline text”;
Example 3 – Let’s interact
• Select the Example3 project in the Package Explorer in
Eclipse.
• Select Run from the top menu bar
• Once the emulator starts and is finished installing the
app, you should see something like this:
Example 3 – Let’s interact
Example 3 – Let’s interact
• var newsterm = $("#newsterm").val();
• Here we use jQuery to get the value of the input field, then
use it to construct the URL of the RSS feed.
• Try entering different terms for news searches.
Example 4 – Who wants a job?
• Of course, we can use the previous example to connect to
any RSS feed. Example 4 connects to the LA film jobs
feed from Craigslist.
• Select Example 4 from the Package Explorer and run it.
Example 4 – jQuery Mobile
Example 4 – local storage
• This example uses a new feature of HTML5: local storage.
• With local storage, data is stored on the client.
Persistence rules vary between clients but storage should
persist no less than the current session.
• Local storage is insecure.
• HTML5 also supports SQL Lite databases on the client.
Example 4 – local storage
• Local storage is a key-value pair.
• Set:
localStorage.setItem(thisTitle, yqlObject.query.results.ite
m[jobCount].title[0]);
• Get: titleText = localStorage.getItem(thisTitle);
Example 4 – jQuery Mobile
• jQuery Mobile is a JavaScript library that emulates the
iPhone look and feel, among others, in a cross-platform
manner.
• Helps to make an HTML page or app feel „mobile‟.
• Offers different styles and customizations.
Example 4 – jQuery Mobile
• With jQuery Mobile, “pages” are <div> tags with a single
page.
• Navigate between pages by “calling” the id of the
appropriate <div>.
• A single html file can contain multiple pages.
Example 4 – jQuery Mobile
<div data-role="page" id="menu">
<div data-role="header" data-theme="b">
</div>
<div data-role="content">
</div>
</div>
<div data-role="page" id="jobinfo">
<div data-role="header" data-theme="b">
</div>
<div data-role="content">
</div>
</div>
Example 5 – Get some phone data
• Let‟s use PhoneGap to access some data from the device.
In this example, we‟ll access the device‟s contact list.
Normally, accessing this information would involve writing
platform-specific code on Android or iOS.
• With PhoneGap, this looks like the HTML DOM:
•
navigator.contacts.find(fields, onSuccess, onError, options
);
Example 5 – Get some phone data
Example 5 – Get some phone data
• For this project, notice that we have to include cordova.js
in addition to cordova.jar.
• If you don‟t see contact information show up in your
app, it‟s because you don‟t have contacts stored in the
emulator. Go to the main menu, add some contacts, then
run the example again.
PhoneGap APIs
• PhoneGap abstracts the details of accessing device
information. It offers a cross-platform API that is
compatible with HTML and JavaScript.
• Through the PhoneGap APIs, you can access:
– Geolocation
– Contacts
– Camera
– Accelerometer
– Compass
– And more…
Example 6 – Simple Map App
• We can take advantage of JavaScript APIs now that we
have a framework for using them.
• For example, Google Maps offers a JavaScript API. We
can use it to create a basic map application.
• https://developers.google.com/maps/documentation/javas
cript/
Example 6 – Simple Map App
Example 7 – Device Access
• We saw how to access contacts. We can access
information from the hardware too.
• For example, battery events can be abstracted as
JavaScript events.
– window.addEventListener("batterycritical", onBatteryCritical, false
);
– window.addEventListener("batterystatus", onBatteryChange, false
);
– window.addEventListener("batterylow", onBatteryLow, false);
Example 7 – Device Access
• How do we test this?
• We log into the emulator (!)
• Set hardware properties via remote shell and see the
events get fired.
– telnet localhost 5554 for the Android emulator
Example 7 – Device Access
I want to run this on my phone!
• A project gets built into an .apk file.
• To run the file on an actual device, export the .apk file by
selecting File, then Export…
• Select Export Android Application.
• To complete the export, you must digitally sign the
application.
I want to do all of this on iOS!
• The phonegap-based applications will run on iOS in much
the same way they do on Android. No re-coding needed.
• Join the iOS developer program.
• Download XCode.
• Create phonegap project for XCode.
• Copy your html and image files to your XCode project.
Graphics!
• Come to the Graphics on the Go workshop to see how to
draw on a canvas.
Thank You!
1 of 55

Recommended

Crash Course in AngularJS + Ionic (Deep dive) by
Crash Course in AngularJS + Ionic (Deep dive)Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)ColdFusionConference
625 views106 slides
Developing, building, testing and deploying react native apps by
Developing, building, testing and deploying react native appsDeveloping, building, testing and deploying react native apps
Developing, building, testing and deploying react native appsLeena N
1.3K views68 slides
Fewd week4 slides by
Fewd week4 slidesFewd week4 slides
Fewd week4 slidesWilliam Myers
336 views51 slides
Getting Started with React, When You’re an Angular Developer by
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 DeveloperFabrit Global
198 views45 slides
React && React Native workshop by
React && React Native workshopReact && React Native workshop
React && React Native workshopStacy Goh
611 views104 slides
Metaprogramming JavaScript by
Metaprogramming  JavaScriptMetaprogramming  JavaScript
Metaprogramming JavaScriptdanwrong
43.6K views94 slides

More Related Content

What's hot

Wicket Introduction by
Wicket IntroductionWicket Introduction
Wicket IntroductionEyal Golan
3.5K views35 slides
React js basics by
React js basicsReact js basics
React js basicsMaulik Shah
592 views32 slides
Polaris presentation ioc - code conference by
Polaris presentation   ioc - code conferencePolaris presentation   ioc - code conference
Polaris presentation ioc - code conferenceSteven Contos
99 views46 slides
React native by
React nativeReact native
React nativeMohammed El Rafie Tarabay
3.9K views118 slides
Selenium Training in Chennai Demo Part-2 by
Selenium Training in Chennai Demo Part-2 Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2 Thecreating Experts
125 views14 slides
Web Components Everywhere by
Web Components EverywhereWeb Components Everywhere
Web Components EverywhereIlia Idakiev
1.3K views74 slides

What's hot(20)

Wicket Introduction by Eyal Golan
Wicket IntroductionWicket Introduction
Wicket Introduction
Eyal Golan3.5K views
Polaris presentation ioc - code conference by Steven Contos
Polaris presentation   ioc - code conferencePolaris presentation   ioc - code conference
Polaris presentation ioc - code conference
Steven Contos99 views
Web Components Everywhere by Ilia Idakiev
Web Components EverywhereWeb Components Everywhere
Web Components Everywhere
Ilia Idakiev1.3K views
HTML5 & CSS3 refresher for mobile apps by Ivano Malavolta
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile apps
Ivano Malavolta1.4K views
Javascript Best Practices and Intro to Titanium by Techday7
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
Techday71K views
How to Build ToDo App with Vue 3 + TypeScript by Katy Slemon
How to Build ToDo App with Vue 3 + TypeScriptHow to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScript
Katy Slemon407 views
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox by Kobkrit Viriyayudhakorn
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
Client-side JavaScript by Lilia Sfaxi
Client-side JavaScriptClient-side JavaScript
Client-side JavaScript
Lilia Sfaxi4.7K views
Apache Wicket Web Framework by Luther Baker
Apache Wicket Web FrameworkApache Wicket Web Framework
Apache Wicket Web Framework
Luther Baker3.3K views
Web Performance Tips by Ravi Raj
Web Performance TipsWeb Performance Tips
Web Performance Tips
Ravi Raj639 views
Decoupling with Domain Events by Steven Smith
Decoupling with Domain EventsDecoupling with Domain Events
Decoupling with Domain Events
Steven Smith2.5K views
DJango by Sunil OS
DJangoDJango
DJango
Sunil OS124.5K views

Similar to Make Mobile Apps Quickly

Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014 by
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Gil Irizarry
778 views75 slides
Mobile Hybrid Development with WordPress by
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressDanilo Ercoli
2.2K views23 slides
GeneralMobile Hybrid Development with WordPress by
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGGDBologna
1.3K views23 slides
tut0000021-hevery by
tut0000021-heverytut0000021-hevery
tut0000021-heverytutorialsruby
261 views11 slides
tut0000021-hevery by
tut0000021-heverytut0000021-hevery
tut0000021-heverytutorialsruby
192 views11 slides
Cross Platform Mobile App Development by
Cross Platform Mobile App Development Cross Platform Mobile App Development
Cross Platform Mobile App Development Jakir Hossain
1.7K views16 slides

Similar to Make Mobile Apps Quickly(20)

Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014 by Gil Irizarry
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Gil Irizarry778 views
Mobile Hybrid Development with WordPress by Danilo Ercoli
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
Danilo Ercoli2.2K views
GeneralMobile Hybrid Development with WordPress by GGDBologna
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPress
GGDBologna1.3K views
Cross Platform Mobile App Development by Jakir Hossain
Cross Platform Mobile App Development Cross Platform Mobile App Development
Cross Platform Mobile App Development
Jakir Hossain1.7K views
Android Application Development Using Java by amaankhan
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
amaankhan27.7K views
Upstate CSCI 450 jQuery by DanWooster1
Upstate CSCI 450 jQueryUpstate CSCI 450 jQuery
Upstate CSCI 450 jQuery
DanWooster160 views
iOS Application Security by Egor Tolstoy
iOS Application SecurityiOS Application Security
iOS Application Security
Egor Tolstoy5.8K views
Projects In JavaScript And JQuery | Eduonix by Rakhi Lambha
Projects In JavaScript And JQuery | EduonixProjects In JavaScript And JQuery | Eduonix
Projects In JavaScript And JQuery | Eduonix
Rakhi Lambha216 views
Desktop apps with node webkit by Paul Jensen
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
Paul Jensen33.3K views
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1 by Rich Helton
LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
Rich Helton1.5K views
Lesson learned from 3 years with hybrid apps by Patrik Malmquist
Lesson learned from 3 years with hybrid appsLesson learned from 3 years with hybrid apps
Lesson learned from 3 years with hybrid apps
Patrik Malmquist1.1K views
jQuery - Chapter 1 - Introduction by WebStackAcademy
 jQuery - Chapter 1 - Introduction jQuery - Chapter 1 - Introduction
jQuery - Chapter 1 - Introduction
WebStackAcademy682 views
Introduction to android sessions new by Joe Jacob
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
Joe Jacob2K views
Introduction to Android Development and Security by Kelwin Yang
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
Kelwin Yang11.6K views
Android dev o_auth by lzongren
Android dev o_authAndroid dev o_auth
Android dev o_auth
lzongren625 views

More from Gil Irizarry

A Rose By Any Other Name.pdf by
A Rose By Any Other Name.pdfA Rose By Any Other Name.pdf
A Rose By Any Other Name.pdfGil Irizarry
47 views26 slides
[Apple-organization] and [oranges-fruit] - How to evaluate NLP tools - Basis ... by
[Apple-organization] and [oranges-fruit] - How to evaluate NLP tools - Basis ...[Apple-organization] and [oranges-fruit] - How to evaluate NLP tools - Basis ...
[Apple-organization] and [oranges-fruit] - How to evaluate NLP tools - Basis ...Gil Irizarry
172 views30 slides
[Apple|organization] and [oranges|fruit]: How to evaluate NLP tools for entit... by
[Apple|organization] and [oranges|fruit]: How to evaluate NLP tools for entit...[Apple|organization] and [oranges|fruit]: How to evaluate NLP tools for entit...
[Apple|organization] and [oranges|fruit]: How to evaluate NLP tools for entit...Gil Irizarry
146 views28 slides
Ai for Good: Bad Guys, Messy Data, & NLP by
Ai for Good: Bad Guys, Messy Data, & NLPAi for Good: Bad Guys, Messy Data, & NLP
Ai for Good: Bad Guys, Messy Data, & NLPGil Irizarry
127 views24 slides
DevSecOps Orchestration of Text Analytics with Containers by
DevSecOps Orchestration of Text Analytics with ContainersDevSecOps Orchestration of Text Analytics with Containers
DevSecOps Orchestration of Text Analytics with ContainersGil Irizarry
378 views15 slides
Towards Identity Resolution: The Challenge of Name Matching by
Towards Identity Resolution: The Challenge of Name MatchingTowards Identity Resolution: The Challenge of Name Matching
Towards Identity Resolution: The Challenge of Name MatchingGil Irizarry
154 views22 slides

More from Gil Irizarry(16)

A Rose By Any Other Name.pdf by Gil Irizarry
A Rose By Any Other Name.pdfA Rose By Any Other Name.pdf
A Rose By Any Other Name.pdf
Gil Irizarry47 views
[Apple-organization] and [oranges-fruit] - How to evaluate NLP tools - Basis ... by Gil Irizarry
[Apple-organization] and [oranges-fruit] - How to evaluate NLP tools - Basis ...[Apple-organization] and [oranges-fruit] - How to evaluate NLP tools - Basis ...
[Apple-organization] and [oranges-fruit] - How to evaluate NLP tools - Basis ...
Gil Irizarry172 views
[Apple|organization] and [oranges|fruit]: How to evaluate NLP tools for entit... by Gil Irizarry
[Apple|organization] and [oranges|fruit]: How to evaluate NLP tools for entit...[Apple|organization] and [oranges|fruit]: How to evaluate NLP tools for entit...
[Apple|organization] and [oranges|fruit]: How to evaluate NLP tools for entit...
Gil Irizarry146 views
Ai for Good: Bad Guys, Messy Data, & NLP by Gil Irizarry
Ai for Good: Bad Guys, Messy Data, & NLPAi for Good: Bad Guys, Messy Data, & NLP
Ai for Good: Bad Guys, Messy Data, & NLP
Gil Irizarry127 views
DevSecOps Orchestration of Text Analytics with Containers by Gil Irizarry
DevSecOps Orchestration of Text Analytics with ContainersDevSecOps Orchestration of Text Analytics with Containers
DevSecOps Orchestration of Text Analytics with Containers
Gil Irizarry378 views
Towards Identity Resolution: The Challenge of Name Matching by Gil Irizarry
Towards Identity Resolution: The Challenge of Name MatchingTowards Identity Resolution: The Challenge of Name Matching
Towards Identity Resolution: The Challenge of Name Matching
Gil Irizarry154 views
RapidMiner - Don’t Forget to Pack Text Analytics on Your Data Exploration Jou... by Gil Irizarry
RapidMiner - Don’t Forget to Pack Text Analytics on Your Data Exploration Jou...RapidMiner - Don’t Forget to Pack Text Analytics on Your Data Exploration Jou...
RapidMiner - Don’t Forget to Pack Text Analytics on Your Data Exploration Jou...
Gil Irizarry478 views
Beginning Native Android Apps by Gil Irizarry
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
Gil Irizarry681 views
From Silos to DevOps: Our Story by Gil Irizarry
From Silos to DevOps:  Our StoryFrom Silos to DevOps:  Our Story
From Silos to DevOps: Our Story
Gil Irizarry859 views
Building The Agile Enterprise - LSSC '12 by Gil Irizarry
Building The Agile Enterprise - LSSC '12Building The Agile Enterprise - LSSC '12
Building The Agile Enterprise - LSSC '12
Gil Irizarry718 views
Agile The Kanban Way - Central MA PMI 2011 by Gil Irizarry
Agile The Kanban Way - Central MA PMI 2011Agile The Kanban Way - Central MA PMI 2011
Agile The Kanban Way - Central MA PMI 2011
Gil Irizarry842 views
Transitioning to Kanban: Theory and Practice - Project Summit Boston 2011 by Gil Irizarry
Transitioning to Kanban: Theory and Practice - Project Summit Boston 2011Transitioning to Kanban: Theory and Practice - Project Summit Boston 2011
Transitioning to Kanban: Theory and Practice - Project Summit Boston 2011
Gil Irizarry838 views
Transitioning to Kanban - Aug 11 by Gil Irizarry
Transitioning to Kanban - Aug 11Transitioning to Kanban - Aug 11
Transitioning to Kanban - Aug 11
Gil Irizarry582 views
Transitioning to Kanban by Gil Irizarry
Transitioning to KanbanTransitioning to Kanban
Transitioning to Kanban
Gil Irizarry1.3K views
Beyond Scrum of Scrums by Gil Irizarry
Beyond Scrum of ScrumsBeyond Scrum of Scrums
Beyond Scrum of Scrums
Gil Irizarry2.3K views

Recently uploaded

20231123_Camunda Meetup Vienna.pdf by
20231123_Camunda Meetup Vienna.pdf20231123_Camunda Meetup Vienna.pdf
20231123_Camunda Meetup Vienna.pdfPhactum Softwareentwicklung GmbH
23 views73 slides
Future of Learning - Yap Aye Wee.pdf by
Future of Learning - Yap Aye Wee.pdfFuture of Learning - Yap Aye Wee.pdf
Future of Learning - Yap Aye Wee.pdfNUS-ISS
38 views11 slides
Web Dev - 1 PPT.pdf by
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdfgdsczhcet
52 views45 slides
The Research Portal of Catalonia: Growing more (information) & more (services) by
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
66 views25 slides
Special_edition_innovator_2023.pdf by
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdfWillDavies22
14 views6 slides
RADIUS-Omnichannel Interaction System by
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction SystemRADIUS
14 views21 slides

Recently uploaded(20)

Future of Learning - Yap Aye Wee.pdf by NUS-ISS
Future of Learning - Yap Aye Wee.pdfFuture of Learning - Yap Aye Wee.pdf
Future of Learning - Yap Aye Wee.pdf
NUS-ISS38 views
Web Dev - 1 PPT.pdf by gdsczhcet
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet52 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2214 views
RADIUS-Omnichannel Interaction System by RADIUS
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction System
RADIUS14 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software91 views
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor... by Vadym Kazulkin
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
Vadym Kazulkin70 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman25 views
AI: mind, matter, meaning, metaphors, being, becoming, life values by Twain Liu 刘秋艳
AI: mind, matter, meaning, metaphors, being, becoming, life valuesAI: mind, matter, meaning, metaphors, being, becoming, life values
AI: mind, matter, meaning, metaphors, being, becoming, life values
Understanding GenAI/LLM and What is Google Offering - Felix Goh by NUS-ISS
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix Goh
NUS-ISS39 views
Data-centric AI and the convergence of data and model engineering: opportunit... by Paolo Missier
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...
Paolo Missier29 views
Spesifikasi Lengkap ASUS Vivobook Go 14 by Dot Semarang
Spesifikasi Lengkap ASUS Vivobook Go 14Spesifikasi Lengkap ASUS Vivobook Go 14
Spesifikasi Lengkap ASUS Vivobook Go 14
Dot Semarang35 views
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze by NUS-ISS
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng TszeDigital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
NUS-ISS19 views

Make Mobile Apps Quickly

  • 1. Make Mobile Apps Quickly Gil Irizarry Conoa
  • 2. About Me • Launched VC News Daily app on iOS and Android. Over 1200 downloads so far. • Owner and lead engineer at Conoa, a graphics and mobile software firm • gil@conoa.com • http://www.slideshare.net/conoagil/
  • 3. About Me • All examples and sample code in this presentation can be found at: – http://conoa.com/hidden/example.zip
  • 4. Why? • There are nearly 2 million mobile apps available today. (http://www.pureoxygenmobile.com/how-many-apps-in-each-app-store/ ) • 1.5 years ago, there were 15K new mobile apps released each week. (http://www.nytimes.com/2011/12/12/technology/one-million-apps-and-counting.html ) • For many, interacting with software means interacting with mobile devices (or at least devices that run mobile software).
  • 5. What we will do • We will learn how to build lightweight mobile apps quickly, using open source tools. • The apps will be cross-platform. • However, we must actually pick a platform on which to build and test the apps. • For this presentation, we will work in Android since the tools are free and easily available. We will do this on Windows.
  • 6. What we will do • (Mostly) everything presented today in the Android environment will apply to iOS, or has an equivalent in that environment. • So, let‟s get started…
  • 7. First, we must download Eclipse • Suggest using Eclipse Classic. Why? Because the larger Eclipse is geared towards J2EE development, which we won‟t need. • Eclipse Classic 4.2.2 (http://www.eclipse.org/downloads/packages/eclipse-classic-422/junosr2)
  • 8. Complete environment • Android has a complete development environment available in a single download. However, where‟s the fun in that?  • It‟s good to understand how the components are connected together.
  • 9. Download the Android SDK • Download and install the Android SDK. The Android SDK requires that the Java Development Kit (JDK) be installed. Do that before installing the Android SDK. • It is a good idea to install the Android SDK into the folder where Eclipse is located.
  • 10. Install the ADT plug-in for Eclipse • This plug-in tells Eclipse where the Android SDK is located. • From the Android developer site: Start Eclipse, then select Help > Install New Software. Click Add, in the top-right corner. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location: https://dl-ssl.google.com/android/eclipse/
  • 11. Configure the ADT plug-in • Open Eclipse and select the Window menu. • Open the Android SDK and AVD manager. • Install all available components.
  • 12. We’re nearly there! • We still need to define a virtual device so we can run our apps on the desktop. To do this, we must create an AVD, Android Virtual Device.
  • 13. Create an Android Virtual Device • Again open the Android SDK and AVD Manager. • Select Virtual Devices then select New. • Create an AVD for Android 2.2 – API Level 8. Call it AVD2.2. Selecting an early version of Android ensures the your app will run on as many devices as possible. You have to decide whether to use new Android features or support the widest set of devices.
  • 14. OK, let’s create our first project! • In Eclipse, select New then select Project (not Java Project). • In the Select A Wizard dialog, select Android Application Project. • You should see a window like this:
  • 16. Example 0 – Hello World! • Name your project Example0 • Have the package name be com.siggraph2013.example0 • Select Android 2.2 as the minimum and target SDKs. • Accept all the defaults in the subsequent screens. • After the project is created, select Run
  • 17. Example 0 – Hello World! • You have created a native Android app. • Your project should run in the Android 2.2 emulator • Take a moment to explore the emulator. It features some basic apps and a full web browser • Press Ctrl-F12. This simulates a person rotating the device and allows you to see your app in both landscape and portrait modes.
  • 18. PhoneGap • PhoneGap is a free product, now owned by Adobe, that allows cross-platform mobile development. It supports iOS, Android, Blackberry OS, Windows Phone, and more. • It allows development in HTML, allowing the use of HTML5, CSS3, Javascript and more.
  • 19. HTML5 • <!DOCTYPE html> signifies an HTML5 file. Note the difference from HTML4 and XHTML. • If you don‟t already, follow the XHTML standard when coding in HTML5. Close your tags! <br />, not <br>
  • 20. HTML5 • HTML5 adds: – formatting tags: header, footer, nav, etc. – local storage – geolocation – canvas element – video and audio tags
  • 21. CSS3 • Cascading Style Sheets. • Codifies what had been loosely defined.
  • 22. Example 1 – Hello World in PhoneGap • Select the Example1 project in the Package Explorer in Eclipse. • Select Run from the top menu bar • Once the emulator starts and is finished installing the app, you should see something like this:
  • 23. Example 1 – Hello World in PhoneGap
  • 24. Example 1 – Hello World in PhoneGap • Find Example1/assets/www/index.html • Note that it is a standard html file. Make some changes to it and select Run in the top menu bar to see the effect of your changes • The styles are in Example1/assets/www/styles.css. Try changing those also.
  • 25. JavaScript • Scripting language that originally was used in web browser but, with node.js, is now used on servers as well. • Allows a website to have increased interactivity and dynamic content.
  • 26. jQuery • The combination of HTML5, CSS3 and Javascript is quite powerful, but the introduction of frameworks allows some great results with less effort. • jQuery is a JavaScript library that simplifies a lot of JavaScript coding. It features: – easier traversal of the DOM – built-in Ajax functions – effects and animations – plug-in architecture
  • 27. Example 2 – Let’s get some data • Select the Example2 project in the Package Explorer in Eclipse. • Select Run from the top menu bar • Once the emulator starts and is finished installing the app, you should see something like this:
  • 28. Example 2 – Let’s get some data
  • 29. Wait, what happened? • Does your emulator match the previous slide? Probably not. What happened? • When you create a new Android project with default setting, internet access for the app is not automatically set. • AndroidManifest.xml is an inventory of what access an app requires. • Remove the comment tag from <uses-permission android:name="android.permission.INTERNET" /> and rebuild.
  • 30. Example 2 – Under the hood • This example brings together quite a few components. • We want to read the Google News RSS feed. • One way to do that is to use YQL (Yahoo Query Language). YQL will convert RSS to JSON (JavaScript Object Notation) via a SQL-like interface. Simply need to use the RSS URL with the YQL query and pass this to Yahoo.
  • 31. Example 2 – Under the hood • $.getJSON(newsqueryUrl, function (yqlObject) {} ); • $ refers to the jQuery object. getJSON is a function in the object. It will call the URL in the first argument and pass the result back to the anonymous function in second. • This is an example of Ajax (not AJAX!). The anonymous function will be called asynchronously.
  • 32. Example 2 – Under the hood • $(paragraphID).text(yqlObject.query.results.item[headline Count].title); • This is another jQuery statement, which says to change the text associated with the tag that has the specified id. • Compare this to: – var tag = document.getElementById(“headline"); – tag.innerHTML = “some headline text”;
  • 33. Example 3 – Let’s interact • Select the Example3 project in the Package Explorer in Eclipse. • Select Run from the top menu bar • Once the emulator starts and is finished installing the app, you should see something like this:
  • 34. Example 3 – Let’s interact
  • 35. Example 3 – Let’s interact • var newsterm = $("#newsterm").val(); • Here we use jQuery to get the value of the input field, then use it to construct the URL of the RSS feed. • Try entering different terms for news searches.
  • 36. Example 4 – Who wants a job? • Of course, we can use the previous example to connect to any RSS feed. Example 4 connects to the LA film jobs feed from Craigslist. • Select Example 4 from the Package Explorer and run it.
  • 37. Example 4 – jQuery Mobile
  • 38. Example 4 – local storage • This example uses a new feature of HTML5: local storage. • With local storage, data is stored on the client. Persistence rules vary between clients but storage should persist no less than the current session. • Local storage is insecure. • HTML5 also supports SQL Lite databases on the client.
  • 39. Example 4 – local storage • Local storage is a key-value pair. • Set: localStorage.setItem(thisTitle, yqlObject.query.results.ite m[jobCount].title[0]); • Get: titleText = localStorage.getItem(thisTitle);
  • 40. Example 4 – jQuery Mobile • jQuery Mobile is a JavaScript library that emulates the iPhone look and feel, among others, in a cross-platform manner. • Helps to make an HTML page or app feel „mobile‟. • Offers different styles and customizations.
  • 41. Example 4 – jQuery Mobile • With jQuery Mobile, “pages” are <div> tags with a single page. • Navigate between pages by “calling” the id of the appropriate <div>. • A single html file can contain multiple pages.
  • 42. Example 4 – jQuery Mobile <div data-role="page" id="menu"> <div data-role="header" data-theme="b"> </div> <div data-role="content"> </div> </div> <div data-role="page" id="jobinfo"> <div data-role="header" data-theme="b"> </div> <div data-role="content"> </div> </div>
  • 43. Example 5 – Get some phone data • Let‟s use PhoneGap to access some data from the device. In this example, we‟ll access the device‟s contact list. Normally, accessing this information would involve writing platform-specific code on Android or iOS. • With PhoneGap, this looks like the HTML DOM: • navigator.contacts.find(fields, onSuccess, onError, options );
  • 44. Example 5 – Get some phone data
  • 45. Example 5 – Get some phone data • For this project, notice that we have to include cordova.js in addition to cordova.jar. • If you don‟t see contact information show up in your app, it‟s because you don‟t have contacts stored in the emulator. Go to the main menu, add some contacts, then run the example again.
  • 46. PhoneGap APIs • PhoneGap abstracts the details of accessing device information. It offers a cross-platform API that is compatible with HTML and JavaScript. • Through the PhoneGap APIs, you can access: – Geolocation – Contacts – Camera – Accelerometer – Compass – And more…
  • 47. Example 6 – Simple Map App • We can take advantage of JavaScript APIs now that we have a framework for using them. • For example, Google Maps offers a JavaScript API. We can use it to create a basic map application. • https://developers.google.com/maps/documentation/javas cript/
  • 48. Example 6 – Simple Map App
  • 49. Example 7 – Device Access • We saw how to access contacts. We can access information from the hardware too. • For example, battery events can be abstracted as JavaScript events. – window.addEventListener("batterycritical", onBatteryCritical, false ); – window.addEventListener("batterystatus", onBatteryChange, false ); – window.addEventListener("batterylow", onBatteryLow, false);
  • 50. Example 7 – Device Access • How do we test this? • We log into the emulator (!) • Set hardware properties via remote shell and see the events get fired. – telnet localhost 5554 for the Android emulator
  • 51. Example 7 – Device Access
  • 52. I want to run this on my phone! • A project gets built into an .apk file. • To run the file on an actual device, export the .apk file by selecting File, then Export… • Select Export Android Application. • To complete the export, you must digitally sign the application.
  • 53. I want to do all of this on iOS! • The phonegap-based applications will run on iOS in much the same way they do on Android. No re-coding needed. • Join the iOS developer program. • Download XCode. • Create phonegap project for XCode. • Copy your html and image files to your XCode project.
  • 54. Graphics! • Come to the Graphics on the Go workshop to see how to draw on a canvas.