SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
EVOLVING MOBILE ARCHITECTURES
Stewart Gleadow
@stewgleadow
stew@rea-group.com
Thursday, 4 July 13
Remember the
early days of
the web?
http://www.icehousedesigns.com/webarchive/images/flshbk_COLLAGE2.gif
Thursday, 4 July 13
What’s Jump-in?›❯
Initial mobile architecture›❯
Evolving Jump-in›❯
Recommendations›❯
Thursday, 4 July 13
What’s Jump-in?›❯
Initial mobile architecture›❯
Evolving Jump-in›❯
Recommendations›❯
Thursday, 4 July 13
77%use another device
in front of the television
Thursday, 4 July 13
Thursday, 4 July 13
Thursday, 4 July 13
Build a small team
that delivers the product end-to-end.
• Design and product
• Front-end and back-end
• Operations
• (plus anything I forgot)
Thursday, 4 July 13
BUILD
MEASURELEARN
Thursday, 4 July 13
What’s Jump-in?›❯
Initial mobile architecture›❯
Evolving Jump-in›❯
Recommendations›❯
Thursday, 4 July 13
How do you build an app that’s
undefined and evolving?
Thursday, 4 July 13
OR
Thursday, 4 July 13
AND
Thursday, 4 July 13
NATIVE HYBRID WEB
Thursday, 4 July 13
Thursday, 4 July 13
WEB / NATIVE
BRIDGE
http://commons.wikimedia.org/wiki/File:Pont_du_Gard_HDR.jpg
Thursday, 4 July 13
Signal from web to native
Thursday, 4 July 13
<body onload="window.location = 'myapp://ready'">
Signal from web to native
Thursday, 4 July 13
<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;
}
...
}
Signal from web to native
Thursday, 4 July 13
Use protocols to formalise the communication
Thursday, 4 July 13
if ([request.URL.scheme isEqualToString:@"myapp"]) {
SEL methodSel = NSSelectorFromString(request.URL.host);
struct objc_method_description nativeMethod =
protocol_getMethodDescription(@protocol(MyNativeMethods),
methodSel, NO, YES);
if (nativeMethod != NULL &&
[self.nativeDelegate respondsToSelector:methodSel] &&
![NSObject instancesRespondToSelector:methodSel]) {
// Turn into an NSInvocation and invoke it
}
return NO;
}
Use protocols to formalise the communication
Thursday, 4 July 13
if ([request.URL.scheme isEqualToString:@"myapp"]) {
SEL methodSel = NSSelectorFromString(request.URL.host);
struct objc_method_description nativeMethod =
protocol_getMethodDescription(@protocol(MyNativeMethods),
methodSel, NO, YES);
if (nativeMethod != NULL &&
[self.nativeDelegate respondsToSelector:methodSel] &&
![NSObject instancesRespondToSelector:methodSel]) {
// Turn into an NSInvocation and invoke it
}
return NO;
}
Use protocols to formalise the communication
Thursday, 4 July 13
if ([request.URL.scheme isEqualToString:@"myapp"]) {
SEL methodSel = NSSelectorFromString(request.URL.host);
struct objc_method_description nativeMethod =
protocol_getMethodDescription(@protocol(MyNativeMethods),
methodSel, NO, YES);
if (nativeMethod != NULL &&
[self.nativeDelegate respondsToSelector:methodSel] &&
![NSObject instancesRespondToSelector:methodSel]) {
// Turn into an NSInvocation and invoke it
}
return NO;
}
Use protocols to formalise the communication
Thursday, 4 July 13
if ([request.URL.scheme isEqualToString:@"myapp"]) {
SEL methodSel = NSSelectorFromString(request.URL.host);
struct objc_method_description nativeMethod =
protocol_getMethodDescription(@protocol(MyNativeMethods),
methodSel, NO, YES);
if (nativeMethod != NULL &&
[self.nativeDelegate respondsToSelector:methodSel] &&
![NSObject instancesRespondToSelector:methodSel]) {
// Turn into an NSInvocation and invoke it
}
return NO;
}
Use protocols to formalise the communication
Thursday, 4 July 13
Running javascript from native code
[webView stringByEvaluatingJavaScriptFromString:@"someFunction()"];
Thursday, 4 July 13
Thursday, 4 July 13
ARCHITECTURE
MEANS YOU CAN
RESPOND TO CHANGE
FLEXIBILE
HAVING A
Thursday, 4 July 13
What’s Jump-in?›❯
Initial mobile architecture›❯
Evolving Jump-in›❯
Recommendations›❯
Thursday, 4 July 13
Thursday, 4 July 13
Thursday, 4 July 13
The app is just the
tip of the iceberg
Thursday, 4 July 13
App Backend
Thursday, 4 July 13
App BackendAPI
Decouple your app from the backend
Thursday, 4 July 13
App BackendAPI
Force logic to the API,
keep the app simple
Thursday, 4 July 13
http://www.flickr.com/photos/jakecaptive/3205277810
Forcing logic to the server
Thursday, 4 July 13
http://www.flickr.com/photos/jakecaptive/3205277810
Forcing logic to the server
What if you could only use NSDictionary
objects for your domain model?
Thursday, 4 July 13
How do we build simpler apps and
smarter backends?
• Principles of REST
• Serving data and style
• Product-aligned teams
Thursday, 4 July 13
Populating web views with GRMoustache
<div class="person">
<span class=”name”>{{name}}</span>
{{#address}}
<div class="address">
{{.}}
</div>
{{/address}}
... and all the other stuff
</div>
Thursday, 4 July 13
Populating web views with GRMoustache
NSDictionary *person = @{
@"name": @"Stew",
@"address": @"Melbourne"
};
GRMustacheTemplate *template = ...;
NSString *renderedContent = [template renderObject:person];
[webView loadHTMLString:renderedContent baseURL:...];
Should be populate templates on the client or the server?
Thursday, 4 July 13
What’s Jump-in?›❯
Initial mobile architecture›❯
Evolving Jump-in›❯
Recommendations›❯
Thursday, 4 July 13
CONCENTRATE ON BUILDING
A SIMPLE APP AND A GREAT API
Thursday, 4 July 13
DON’T LOCK YOURSELF INTO DOING
EVERYTHING NATIVELY
OR
EVERYTHING USING THE WEB
Thursday, 4 July 13
ARCHITECTURE
MEANS YOU CAN
RESPOND TO CHANGE
FLEXIBILE
HAVING A
Thursday, 4 July 13
Thank you
Thursday, 4 July 13
EVOLVING MOBILE ARCHITECTURES
Stewart Gleadow
@stewgleadow
stew@rea-group.com
Thursday, 4 July 13

Weitere ähnliche Inhalte

Mehr von sgleadow

Building mobile teams and getting a product to market
Building mobile teams and getting a product to marketBuilding mobile teams and getting a product to market
Building mobile teams and getting a product to marketsgleadow
 
iOS Unit Testing
iOS Unit TestingiOS Unit Testing
iOS Unit Testingsgleadow
 
iOS app case study
iOS app case studyiOS app case study
iOS app case studysgleadow
 
iOS View Coordinators
iOS View CoordinatorsiOS View Coordinators
iOS View Coordinatorssgleadow
 
Frank iOS Testing
Frank iOS TestingFrank iOS Testing
Frank iOS Testingsgleadow
 
Multithreaded Data Transport
Multithreaded Data TransportMultithreaded Data Transport
Multithreaded Data Transportsgleadow
 
A few design patterns
A few design patternsA few design patterns
A few design patternssgleadow
 
GPU Programming
GPU ProgrammingGPU Programming
GPU Programmingsgleadow
 
Cocoa Design Patterns
Cocoa Design PatternsCocoa Design Patterns
Cocoa Design Patternssgleadow
 
Beginning iPhone Development
Beginning iPhone DevelopmentBeginning iPhone Development
Beginning iPhone Developmentsgleadow
 

Mehr von sgleadow (11)

Building mobile teams and getting a product to market
Building mobile teams and getting a product to marketBuilding mobile teams and getting a product to market
Building mobile teams and getting a product to market
 
iOS Unit Testing
iOS Unit TestingiOS Unit Testing
iOS Unit Testing
 
iOS app case study
iOS app case studyiOS app case study
iOS app case study
 
Agile iOS
Agile iOSAgile iOS
Agile iOS
 
iOS View Coordinators
iOS View CoordinatorsiOS View Coordinators
iOS View Coordinators
 
Frank iOS Testing
Frank iOS TestingFrank iOS Testing
Frank iOS Testing
 
Multithreaded Data Transport
Multithreaded Data TransportMultithreaded Data Transport
Multithreaded Data Transport
 
A few design patterns
A few design patternsA few design patterns
A few design patterns
 
GPU Programming
GPU ProgrammingGPU Programming
GPU Programming
 
Cocoa Design Patterns
Cocoa Design PatternsCocoa Design Patterns
Cocoa Design Patterns
 
Beginning iPhone Development
Beginning iPhone DevelopmentBeginning iPhone Development
Beginning iPhone Development
 

Kürzlich hochgeladen

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Evolving Mobile Architectures - Developer Version