SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
35.
Don’t lock yourself into doing
everything natively or
everything using the web
and
or
36.
Sharing between platforms
Shared logic using Javascript
Shared presentation using HTML/CSS
37.
User Interface Client Logic
iPhone Objective C Objective C
Mobile Web
HTML / CSS Javascript
38.
User Interface Client Logic
Calatrava
Objective C Objective C
HTML / CSS Javascript
A bridge between native and web
39.
Calatrava
Technology choice per feature
More an approach than a framework
Will soon be open source
http://en.wikipedia.org/wiki/Puente_del_Alamillo
40.
Populating web views from templates: GRMoustache
<div class="person">
<span class=”name”>{{name}}</span>
{{#address}}
<div class="address">
{{.}}
</div>
{{/address}}
... and all the other stuff
</div>
41.
Populating web views from templates: GRMoustache
NSDictionary *person = @{ @"name": @"Stew", @"address": @"Melbourne" };
GRMustacheTemplate *template = ...;
NSString *renderedContent = [template renderObject:person];
[webView loadHTMLString:renderedContent baseURL:...];
Should we populate templates on the
client or server?
42.
Signal when the UIWebView has loaded
<body onload="window.location = 'myapp://ready'">
- (BOOL)webView:(UIWebView *)webView
shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType
{
if ([request.URL.scheme isEqualToString:@"myapp"] &&
[request.URL.host isEqualToString:@"ready"])
{
// We're done, you can display the content now
return NO;
}
...
}
43.
Implementing javascript logic
Inside a UIWebView
Use JavaScriptCore directly?
[webView stringByEvaluatingJavaScriptFromString:@"document.body.innerHTML"];
44.
User Interface Client Logic
Calatrava
Objective C Objective C
HTML / CSS Javascript
So were is this kind of architecture well suited?
45.
›❯ Apps for multiple mobile platforms
›❯ Evolving hybrid architectures
›❯ Mobile backend systems
›❯ Testing hybrid applications
46.
Apps are just the
tip of the iceberg
Call Centre Retail
Legacy Thing Message Hub
Database Mainframe
Some expensive and proprietary system
49.
How do we build simpler apps
and smarter backends?
App API Backend
Principles of REST
Serving data and style
Product-aligned teams
50.
Forcing logic to the server
What if you could only use NSDictionary
objects for your domain model?
http://www.flickr.com/photos/jakecaptive/3205277810
51.
›❯ Apps for multiple mobile platforms
›❯ Evolving hybrid architectures
›❯ Mobile backend systems
›❯ Testing hybrid applications
55.
Frank (PublicAutomation) UI
Zucchini
Kiwi RSpec Integration
Kiwi Jasmine Unit
56.
business-level platform-specific
requirements mapping UI client logic
e.g.
Frank
e.g.
Business-level Shared business
Native-
specs logic
Driver
e.g.
Web-
Driver
Testing