When you are about to make the step from developing web apps to making mobile apps, you should consider using a hybrid technology approach.
The use of web technologies to build "native" mobile apps is a journey with a lot of choices to make and questions to answer. This presentation tells you, how we made our decisions and what options we had been looking at.
It also introduces the Lungo-Angular-Bridge we use to bring together the best of Lungo and Angular to make mobile apps that rock.
4. Today: Web apps
● Single page applications
● Communication via API
● "Backend as a service"
● Client side MV*-Frameworks
● Templates rendered on the client
● Data on the wire
6. Pick one
First fundamental question:
HTML / CSS / JS
vs.
Pure JavaScript
7. Pick one
First fundamental decision:
HTML / CSS / JS
vs.
Pure JavaScript
8. A tough choice
● Javascript MV* Libraries / Frameworks
○ Backbone
○ Ember
○ Knockout
○ Angular
● UI Frameworks
○ Lungo
○ Kendo
○ jQTouch
○ jQuery mobile
● Deployment frameworks
○ PhoneGap
○ Sencha
○ Calatrava
○ The M-Project
9. A tough choice
● Javascript MV* Libraries / Frameworks
○ Backbone
○ Ember
○ Knockout
○ Angular
● UI Frameworks
○ Lungo
○ Kendo
○ jQTouch
○ jQuery mobile
● Deployment frameworks
○ PhoneGap
○ Sencha
○ Calatrava
○ The M-Project
10. Problems with picking the right mix
● overlap between the three:
○ multiple frameworks trying to be clever
○ e.g. Calatrava: Deployment & UI
○ e.g. Kendo: MVVM & UI
● finding good combinations:
○ Knockout & Lungo
○ Knockout & Kendo
○ Angular & iUI
○ Angular & Lungo
14. Two choices:
● I want the Lungo routing
○ The Angular-Lungo-Adapter is for you
● I want the Angular routing
○ There is nothing for that
15. Two choices:
● I want the Lungo routing
○ The Angular-Lungo-Adapter is for you
● I want the Angular routing
○ There was nothing for that
Centralway proudly presents...
17. LAB - Lungo Angular Bridge
● Allows to use Lungo fancyness together with
Angular awesomeness
● Use Angular routes but leverage Lungo
transitions
● Comes with a set of examples
● Extends Angular with the lab-view directive
21. Things you may hear
● "But it's soo slooooow"
● "What if you need something native?"
● "How does deployment work?"
● "But it won't look&feel native!"
22. Things you may say
● "But it's soo slooooow"
○ Only in a few cases, e.g. SVG on iPhone 4
● "What if you need something native?"
○ You can do that >> Phonegap Plugins
● "How does deployment work?"
○ Either manually or via App Stores
● "But it won't look&feel native!"
○ This depends solely on the UI Framework
used - e.g. Lungo makes it feel native
24. Round 1: iframes vs. iOS
<iframe src="http://example.com"></iframe>
<a href="http://somesite.com" target="_blank">Open</a>
What will happen?
● Android
○ iframe loads in the page
○ link opens a browser window
● iOS
○ "stay-in-webview=false" (default)
■ iframe opens a new browser window
■ link opens a new browser window
○ "stay-in-webview=true"
■ iframe opens in the page
■ link opens in the page
25. Round 1: iframes vs. iOS
● 4 possible solutions
a. using "access" rule in Config.xml
b. using "InApp-Browser" (window.open)
c. specify target="_self" for iframe
d. using ChildBrowser plugin
26. Round 1: iframe vs. iOS
● 4 possible solutions
a. using "access" rule in Config.xml
b. using "InApp-Browser" (window.open)
c. specify target="_self" for iframe
d. using ChildBrowser plugin
28. Round 2: "HTML5 routing"
$locationProvider.html5Mode(false);
● HTML 5 routing not supported properly
○ weird behaviour
○ non-routing relating things go wrong
○ no error messages / warnings
● Setting to "false" uses "#/..."-style routing instead of
"real" routing ("/...")
29. General conclusions
● PhoneGap plugins <3
○ when it doesn't exist in PhoneGap
○ when it is too slow in HTML / CSS / JS
● Active communities & many resources
● Web is a powerful platform
30. Wrap-up
● Mobile is on the rise
● Web technologies rock!
● Find the right mix of Frameworks for your
needs is hard
● Be aware of potential pitfalls
● Leverage the active communities to work
around problems