SlideShare uma empresa Scribd logo
1 de 45
Baixar para ler offline
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

Mais conteúdo relacionado

Mais 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
 

Mais 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
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 

Último (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

Evolving Mobile Architectures - Developer Version