Enviar búsqueda
Cargar
Epic Refactorings - Melbourne Cocoaheads June 2011
•
0 recomendaciones
•
570 vistas
Jesse Collis
Seguir
By Jesse Collis and Luke Cunningham. June 2011
Leer menos
Leer más
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 41
Descargar ahora
Descargar para leer sin conexión
Recomendados
React js intro
React js intro
Jessica Le
Backbone And Marionette : Take Over The World
Backbone And Marionette : Take Over The World
harshit040591
Marionette - TorontoJS
Marionette - TorontoJS
matt-briggs
Marionette structure with modules
Marionette structure with modules
matt-briggs
Backbone/Marionette introduction
Backbone/Marionette introduction
matt-briggs
Seminar Konfliktens Anatomi
Seminar Konfliktens Anatomi
marga_dijkman
Preparing for iOS 9 - Melbourne Cocoaheads June 2015
Preparing for iOS 9 - Melbourne Cocoaheads June 2015
Jesse Collis
Pippi Power_Short version
Pippi Power_Short version
marga_dijkman
Recomendados
React js intro
React js intro
Jessica Le
Backbone And Marionette : Take Over The World
Backbone And Marionette : Take Over The World
harshit040591
Marionette - TorontoJS
Marionette - TorontoJS
matt-briggs
Marionette structure with modules
Marionette structure with modules
matt-briggs
Backbone/Marionette introduction
Backbone/Marionette introduction
matt-briggs
Seminar Konfliktens Anatomi
Seminar Konfliktens Anatomi
marga_dijkman
Preparing for iOS 9 - Melbourne Cocoaheads June 2015
Preparing for iOS 9 - Melbourne Cocoaheads June 2015
Jesse Collis
Pippi Power_Short version
Pippi Power_Short version
marga_dijkman
CATiled Layer - Melbourne Cocoheads February 2012
CATiled Layer - Melbourne Cocoheads February 2012
Jesse Collis
Terra malalta
Terra malalta
e3005339
Bedre Samarbeid, Kommunikasjon og Stressmestring i en travel arbeidsdag
Bedre Samarbeid, Kommunikasjon og Stressmestring i en travel arbeidsdag
marga_dijkman
Habitats
Habitats
e3005339
Diffusion meeting Spain
Diffusion meeting Spain
e3005339
LOGO CONTEST
LOGO CONTEST
e3005339
La Primavera
La Primavera
e3005339
A Brief History of Melbourne Cocoaheads - May 2013
A Brief History of Melbourne Cocoaheads - May 2013
Jesse Collis
editorial
editorial
lionred17
Integrating iAds (Melbourne Cocoaheads November 2010)
Integrating iAds (Melbourne Cocoaheads November 2010)
Jesse Collis
Writing Online News Leads
Writing Online News Leads
Bill Edwards
Implementing CATiledLayer
Implementing CATiledLayer
Jesse Collis
Xcode 4 shortcuts (Melbourne Cocoheads April 2011)
Xcode 4 shortcuts (Melbourne Cocoheads April 2011)
Jesse Collis
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UI
Marcin Grzywaczewski
ngSummit 2017: Angular meets Redux
ngSummit 2017: Angular meets Redux
Michał Michalczuk
Welcome to React & Flux !
Welcome to React & Flux !
Ritesh Kumar
All the reasons for choosing react js that you didn't know about - Avi Marcus...
All the reasons for choosing react js that you didn't know about - Avi Marcus...
Codemotion Tel Aviv
IOS Storyboards
IOS Storyboards
Muhammad Nabeel Arif
Intro to AngularJs
Intro to AngularJs
SolTech, Inc.
Why you should consider a microframework for your next web project
Why you should consider a microframework for your next web project
Joaquín Muñoz M.
Design Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-Binder
Simon Massey
Bringing Swift into your Objective-C Projects
Bringing Swift into your Objective-C Projects
René Cacheaux
Más contenido relacionado
Destacado
CATiled Layer - Melbourne Cocoheads February 2012
CATiled Layer - Melbourne Cocoheads February 2012
Jesse Collis
Terra malalta
Terra malalta
e3005339
Bedre Samarbeid, Kommunikasjon og Stressmestring i en travel arbeidsdag
Bedre Samarbeid, Kommunikasjon og Stressmestring i en travel arbeidsdag
marga_dijkman
Habitats
Habitats
e3005339
Diffusion meeting Spain
Diffusion meeting Spain
e3005339
LOGO CONTEST
LOGO CONTEST
e3005339
La Primavera
La Primavera
e3005339
A Brief History of Melbourne Cocoaheads - May 2013
A Brief History of Melbourne Cocoaheads - May 2013
Jesse Collis
editorial
editorial
lionred17
Integrating iAds (Melbourne Cocoaheads November 2010)
Integrating iAds (Melbourne Cocoaheads November 2010)
Jesse Collis
Writing Online News Leads
Writing Online News Leads
Bill Edwards
Implementing CATiledLayer
Implementing CATiledLayer
Jesse Collis
Xcode 4 shortcuts (Melbourne Cocoheads April 2011)
Xcode 4 shortcuts (Melbourne Cocoheads April 2011)
Jesse Collis
Destacado
(13)
CATiled Layer - Melbourne Cocoheads February 2012
CATiled Layer - Melbourne Cocoheads February 2012
Terra malalta
Terra malalta
Bedre Samarbeid, Kommunikasjon og Stressmestring i en travel arbeidsdag
Bedre Samarbeid, Kommunikasjon og Stressmestring i en travel arbeidsdag
Habitats
Habitats
Diffusion meeting Spain
Diffusion meeting Spain
LOGO CONTEST
LOGO CONTEST
La Primavera
La Primavera
A Brief History of Melbourne Cocoaheads - May 2013
A Brief History of Melbourne Cocoaheads - May 2013
editorial
editorial
Integrating iAds (Melbourne Cocoaheads November 2010)
Integrating iAds (Melbourne Cocoaheads November 2010)
Writing Online News Leads
Writing Online News Leads
Implementing CATiledLayer
Implementing CATiledLayer
Xcode 4 shortcuts (Melbourne Cocoheads April 2011)
Xcode 4 shortcuts (Melbourne Cocoheads April 2011)
Similar a Epic Refactorings - Melbourne Cocoaheads June 2011
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UI
Marcin Grzywaczewski
ngSummit 2017: Angular meets Redux
ngSummit 2017: Angular meets Redux
Michał Michalczuk
Welcome to React & Flux !
Welcome to React & Flux !
Ritesh Kumar
All the reasons for choosing react js that you didn't know about - Avi Marcus...
All the reasons for choosing react js that you didn't know about - Avi Marcus...
Codemotion Tel Aviv
IOS Storyboards
IOS Storyboards
Muhammad Nabeel Arif
Intro to AngularJs
Intro to AngularJs
SolTech, Inc.
Why you should consider a microframework for your next web project
Why you should consider a microframework for your next web project
Joaquín Muñoz M.
Design Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-Binder
Simon Massey
Bringing Swift into your Objective-C Projects
Bringing Swift into your Objective-C Projects
René Cacheaux
Reusing your frontend JS on the server with V8/Rhino
Reusing your frontend JS on the server with V8/Rhino
Kenneth Kalmer
Gitter marionette deck
Gitter marionette deck
Mike Bartlett
iOS storyboard
iOS storyboard
MinHyeok Kim
React js
React js
Jai Santhosh
Android how to hellowidget
Android how to hellowidget
Mohammad Ali Raza Siddiqui
Android howto hellowidget
Android howto hellowidget
Hiron Das
iOS UIStoryboard presentation
iOS UIStoryboard presentation
Gerald Kim
jquery summit presentation for large scale javascript applications
jquery summit presentation for large scale javascript applications
DivyanshGupta922023
Introduction of Xcode
Introduction of Xcode
Dhaval Kaneria
Yeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web apps
climboid
CQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architecture
Thomas Jaskula
Similar a Epic Refactorings - Melbourne Cocoaheads June 2011
(20)
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UI
ngSummit 2017: Angular meets Redux
ngSummit 2017: Angular meets Redux
Welcome to React & Flux !
Welcome to React & Flux !
All the reasons for choosing react js that you didn't know about - Avi Marcus...
All the reasons for choosing react js that you didn't know about - Avi Marcus...
IOS Storyboards
IOS Storyboards
Intro to AngularJs
Intro to AngularJs
Why you should consider a microframework for your next web project
Why you should consider a microframework for your next web project
Design Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-Binder
Bringing Swift into your Objective-C Projects
Bringing Swift into your Objective-C Projects
Reusing your frontend JS on the server with V8/Rhino
Reusing your frontend JS on the server with V8/Rhino
Gitter marionette deck
Gitter marionette deck
iOS storyboard
iOS storyboard
React js
React js
Android how to hellowidget
Android how to hellowidget
Android howto hellowidget
Android howto hellowidget
iOS UIStoryboard presentation
iOS UIStoryboard presentation
jquery summit presentation for large scale javascript applications
jquery summit presentation for large scale javascript applications
Introduction of Xcode
Introduction of Xcode
Yeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web apps
CQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architecture
Último
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Sinan KOZAK
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Digital Insurer
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
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
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Último
(20)
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Epic Refactorings - Melbourne Cocoaheads June 2011
1.
epic refactorings and patterns
to make your jesse collis (@sirjec) code awesome luke cunningham (@icaruswings)
2.
firstly, read this
book!
3.
insert a pic
of us reading our books having a ‘lightbulb’ moment we did and it made us better engineers
4.
we do agile...
5.
6.
write the minimum amount
of code to implement the story
7.
12 months later...
8.
1 small card
9.
10.
But that isn’t what
this talk is about
11.
the problem just too
much for one view controller
12.
First Diagram
13.
alright stop! refactor time.
14.
first problem
15.
view controllers need only
worry about standard UIViews and manage the display.
16.
coordination and containment!
17.
ViewCoordinator view lifecycle
18.
@protocol ViewCoordinator <NSObject> -
(UIView *)view; - (void)viewWillAppear; - (void)viewDidAppear; - (void)viewWillDisappear; - (void)viewDidDisappear; - (void)viewDidUnload; - (void)didReceiveMemoryWarning; @end
19.
@interface YourViewController :
UIViewController { id<ViewCoordinator> viewCoordinator_; } ... @end
20.
@implementation YourViewController - (id)initWithNibName...
{ viewCoordinator_ = [[MyViewCoordinator alloc] init]; } - (void)loadView { [super loadView]; [self.view addSubview:[viewCoordinator_ view]]; } - (void)viewWillAppear { [[viewCoordinator_ view] viewWillAppear]; } ... @end
21.
single responsibility a class
should only have one reason to change.
22.
second problem
23.
they’re not simple views
24.
ListCoordinator basic selection callbacks
25.
@protocol ListCoordinator - (void)onSelectListItem:^(id)block; ... @end
26.
@interface YourViewController :
UIViewController { id<ViewCoordinator> viewCoordinator_; id<ViewCoordinator, ListViewCoordinator> listCoordinator_; } ... @end
27.
@implementation YourViewController - (id)initWithNibName...
{ listCoordinator_ = [[MyListCoordinator alloc] init]; [listCoordinator_ onSelectListItem:^(id listing) { [self showListing:listing]; }]; } - (void)showListing:(Listing *)listing;{ ... } ... @end
28.
interface segregation clients should
not be forced to depend on methods they don’t use.
29.
QueryCoordinator after configure/ cancel configure callbacks
30.
SearchBarCoord... and so on...
31.
now our structure is
more like this...
32.
33.
Go to Xcode
34.
under the hood
35.
EventDispatcher
36.
@interface MapCooordinator <ViewCoordinator,
ListCoordinator> { ... } @end
37.
@implementation MapCoordinator ... - (void)onSelectListItem:^(Listing
*)block; { [eventDispatcher_ on:@"select-listing” performWithObject:block]; } - (void)mapView:(... *)mapView didSelectAnnotationView:(... *)view; { Listing *listing = ... find listing ... [eventDispatcher_ fire:@"select-listing" withObject:listing]; } ... @end
38.
there are no special
cases
39.
If you implement patterns
- follow your patterns
40.
Coming in iOS5
41.
thanks, jesse
collis (@sirjec) luke cunningham (@icaruswings)
Descargar ahora