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

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Kürzlich hochgeladen (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Evolving Mobile Architectures - Developer Version