SlideShare une entreprise Scribd logo
1  sur  45
Télécharger pour lire hors ligne
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

Contenu connexe

Plus de 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
 

Plus de 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
 

Dernier

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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
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
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
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
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
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
 

Dernier (20)

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
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
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
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
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
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
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
 

Evolving Mobile Architectures - Developer Version