SlideShare una empresa de Scribd logo
1 de 26
Saul Diaz
@sefford
sefford@gmail.com
IN KOR WE TRUST
The Basics of the Experiment
Learn, learn, learn!
Get rid of non-UI logic on UI
Avoid memory leaking
Centralized cache & readiness
The Domain
/** Created by sefford on 9/06/13. */
public abstract class MovieitBaseRequest<T> extends Request<T> {
public MovieitBaseRequest(int method, String url, HashMap<String, String> parameters, BusManager bus, boolean hasToCache) { /* … */ }
public MovieitBaseRequest(int method, String url, BusManager bus, boolean hasToCache){ /* … */ }
private static String generateParametersString(HashMap<String, String> parameters) { /* … */ }
private static Map<String, String> initializeHeaders() { /* … */ }
@Override public Map<String, String> getHeaders() throws AuthFailureError { /* … */ }
@Override protected Response<T> parseNetworkResponse(NetworkResponse response) { return processResponse(response.getBody()); }
@Override protected void deliverResponse(T response) { bus.post(response); }
@Override public void deliverError(VolleyError error) { bus.post(error); }
public T processResponse(String json) {
T content = processJSon(json);
content = postProcess(content);
if (hasToCache) {
saveToCache(content);
}
return content;
}
protected abstract T processJSon(String json);
protected T postProcess(T content) { /* … */ }
protected abstract void saveToCache(T object);
}
Retrieval
Postprocess
Save to cache
Notify
Fetch the data (network, disk, system...)
Chance to operate through the data (sort, filter, sync…)
Persist the data on cache (d’oh)
Notify sucessful or failure completion
Provider
Strategy
Cache
Request
Driver
Bus
Domain
Presentation
Data
Executor
Interactor
Repository
Delegate
Driver
Bus
Domain
Presentation
Data
public abstract class Interactor<R extends ResponseInterface, E extends ErrorInterface>
implements Runnable, InteractorNotification<R, E> {
// Postable interface allows us to hide callbacks, but we use a bus
protected Interactor(Postable postable, Loggable log, InteractorIdentification delegate) {
this.postable = postable;
this.log = log;
this.delegate = delegate;
}
@Override
public void notifySuccess(R content) {
postable.post(content);
}
}
public class StandardNetworkInteractor<R extends ResponseInterface, E extends ErrorInterface>
extends NetworkInteractor<R, E> {
// NetworkInteractor defines the way to notify an error
@Override
public void run() {
try {
final R content = ((NetworkDelegate<R, E>) delegate).retrieveNetworkResponse();
final R processedContent = ((NetworkDelegate<R, E>) delegate).postProcess(content);
((NetworkDelegate<R, E>) delegate).saveToCache(processedContent);
notifySuccess(processedContent);
} catch (Exception x) {
// Pokemon exception, but the delegate handles the correct response
notifyError(((NetworkDelegate<R, E>) delegate).composeErrorResponse(x));
}
}
}
public interface NetworkDelegate<R extends ResponseInterface, E extends ErrorInterface>
extends InteractorIdentification {
R retrieveNetworkResponse() throws Exception;
R postProcess(R content);
void saveToCache(R object);
E composeErrorResponse(Exception error);
}
“All Aperture technologies remain operational up to 4.000ºK.”
The Data
Repository<K , V>
BaseRepo<K , V>
ImplementsCurrent Repo Level Next Repo Level
Chain of Responsibility
+
Decorator
CRUD Interface
Hierarchial multi-level Repositories (BaseRepository)
Java Map Repositories
Android LRU Repositories (Android)
DiskLRUCache Repositories
Realm Repositories (Android)
ADA Framework Repositories
“All Aperture technologies remain operational up to 4.000ºK.”
The Presentation
Layout files
Application
Activities
Fragments
Views
Int1 Int2
Int
N
Int3 ...
Bus
Repositories
Model &
Data
Presentation
Android UI Lifecycle
Facade
Presenter Presenter
Outside our happy world
Cushioning & Coordination
Handles view state
Fragment
HoloFacade LollipopFacadeHoloTabletsFacade
FragmentFacadeInterface
HoloPresenter1 HoloPresenter2 TabPresenter
LolliPresenter
1
LolliPresenter
2
HoloPresenter 1 & LolliPresenter 1 implement PresenterInterface1, same with 2
HoloTabletsFacade likely to be composed of a HoloFacade
MainActivity
Flow
Control
Intent
Dispatching
Routing
Push
Services
AnalyticsNFC
ActionBar
Control
Menu
Control
StatusBar
Control
Session
Mgmt
Logging ...
Final thoughts
Independent of Frameworks
Testable
Independent of UI
Independent of Database
Independent of Outside World
Q & A ?
Repo: http://github.com/Sefford/kor
Gradle: compile 'com.sefford:kor-common:2.0'
compile 'com.sefford:kor-retrofit:1.1'
compile 'com.sefford:kor-android:1.0.2@aar'
Sample (WIP, Untested, Undocumented >_<U): https://github.com/Sefford/Kor-Sample
Forks & PRs are welcome <3
Thanks for playing!

Más contenido relacionado

La actualidad más candente

Come on, PHP 5.4!
Come on, PHP 5.4!Come on, PHP 5.4!
Come on, PHP 5.4!paulgao
 
Adodb Pdo Presentation
Adodb Pdo PresentationAdodb Pdo Presentation
Adodb Pdo PresentationTom Rogers
 
Non blocking io with netty
Non blocking io with nettyNon blocking io with netty
Non blocking io with nettyZauber
 
groovy databases
groovy databasesgroovy databases
groovy databasesPaul King
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniquesjoaopmaia
 
#5 (Remote Method Invocation)
#5 (Remote Method Invocation)#5 (Remote Method Invocation)
#5 (Remote Method Invocation)Ghadeer AlHasan
 
Refactoring Jdbc Programming
Refactoring Jdbc ProgrammingRefactoring Jdbc Programming
Refactoring Jdbc Programmingchanwook Park
 
concurrency with GPars
concurrency with GParsconcurrency with GPars
concurrency with GParsPaul King
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniquesjoaopmaia
 
Python mu Java mı?
Python mu Java mı?Python mu Java mı?
Python mu Java mı?aerkanc
 
Building node.js applications with Database Jones
Building node.js applications with Database JonesBuilding node.js applications with Database Jones
Building node.js applications with Database JonesJohn David Duncan
 
Inheritance compiler support
Inheritance compiler supportInheritance compiler support
Inheritance compiler supportSyed Zaid Irshad
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/ProxyPeter Eisentraut
 
Data Processing Inside PostgreSQL
Data Processing Inside PostgreSQLData Processing Inside PostgreSQL
Data Processing Inside PostgreSQLEDB
 

La actualidad más candente (20)

Come on, PHP 5.4!
Come on, PHP 5.4!Come on, PHP 5.4!
Come on, PHP 5.4!
 
Adodb Pdo Presentation
Adodb Pdo PresentationAdodb Pdo Presentation
Adodb Pdo Presentation
 
Non blocking io with netty
Non blocking io with nettyNon blocking io with netty
Non blocking io with netty
 
groovy databases
groovy databasesgroovy databases
groovy databases
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniques
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniques
 
Nantes Jug - Java 7
Nantes Jug - Java 7Nantes Jug - Java 7
Nantes Jug - Java 7
 
#5 (Remote Method Invocation)
#5 (Remote Method Invocation)#5 (Remote Method Invocation)
#5 (Remote Method Invocation)
 
Refactoring Jdbc Programming
Refactoring Jdbc ProgrammingRefactoring Jdbc Programming
Refactoring Jdbc Programming
 
concurrency with GPars
concurrency with GParsconcurrency with GPars
concurrency with GPars
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniques
 
Pemrograman Jaringan
Pemrograman JaringanPemrograman Jaringan
Pemrograman Jaringan
 
PostgreSQL and PL/Java
PostgreSQL and PL/JavaPostgreSQL and PL/Java
PostgreSQL and PL/Java
 
Pragmatic sbt
Pragmatic sbtPragmatic sbt
Pragmatic sbt
 
Python mu Java mı?
Python mu Java mı?Python mu Java mı?
Python mu Java mı?
 
Building node.js applications with Database Jones
Building node.js applications with Database JonesBuilding node.js applications with Database Jones
Building node.js applications with Database Jones
 
Inheritance compiler support
Inheritance compiler supportInheritance compiler support
Inheritance compiler support
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/Proxy
 
Data Processing Inside PostgreSQL
Data Processing Inside PostgreSQLData Processing Inside PostgreSQL
Data Processing Inside PostgreSQL
 
Apache Beam de A à Z
 Apache Beam de A à Z Apache Beam de A à Z
Apache Beam de A à Z
 

Destacado

BOM Team Prosperity
BOM Team ProsperityBOM Team Prosperity
BOM Team ProsperityKetty Masim
 
Migraña, franciscanos y rockefelerianos final
Migraña, franciscanos y rockefelerianos finalMigraña, franciscanos y rockefelerianos final
Migraña, franciscanos y rockefelerianos finalJuan Richar Villacorta
 
Yidev201406.pub
Yidev201406.pubYidev201406.pub
Yidev201406.pubitoz itoz
 
Aasl learning standards
Aasl learning standardsAasl learning standards
Aasl learning standardsspcall
 
Digital Natives with a Cause newsletter - Changing Face Of Citizen Action
Digital Natives with a Cause newsletter - Changing Face Of Citizen ActionDigital Natives with a Cause newsletter - Changing Face Of Citizen Action
Digital Natives with a Cause newsletter - Changing Face Of Citizen ActionNilofar Ansher
 
Media kit buzzworks new
Media kit buzzworks  newMedia kit buzzworks  new
Media kit buzzworks newIrwan Setiawan
 
álbum de fotografías -25 años-
álbum de fotografías -25 años-álbum de fotografías -25 años-
álbum de fotografías -25 años-gustavo145
 
Dawn lifestyle expo 2011
Dawn lifestyle expo 2011Dawn lifestyle expo 2011
Dawn lifestyle expo 2011Zarak Khawaja
 
สนใจ ไม่ได้แปลว่าได้ใจ
สนใจ ไม่ได้แปลว่าได้ใจสนใจ ไม่ได้แปลว่าได้ใจ
สนใจ ไม่ได้แปลว่าได้ใจnudeJEH
 
Presentatie Astorium
Presentatie AstoriumPresentatie Astorium
Presentatie AstoriumMustafa Cevik
 
Open im vol16_lt_masuda_mieruka
Open im vol16_lt_masuda_mierukaOpen im vol16_lt_masuda_mieruka
Open im vol16_lt_masuda_mierukaNTTDATA INTRAMART
 

Destacado (20)

BOM Team Prosperity
BOM Team ProsperityBOM Team Prosperity
BOM Team Prosperity
 
Material in 30 minutes
Material in 30 minutesMaterial in 30 minutes
Material in 30 minutes
 
Migraña, franciscanos y rockefelerianos final
Migraña, franciscanos y rockefelerianos finalMigraña, franciscanos y rockefelerianos final
Migraña, franciscanos y rockefelerianos final
 
Bars in goa
Bars in goaBars in goa
Bars in goa
 
Final 3
Final 3Final 3
Final 3
 
Facebook
FacebookFacebook
Facebook
 
Yidev201406.pub
Yidev201406.pubYidev201406.pub
Yidev201406.pub
 
Michal@gala
Michal@galaMichal@gala
Michal@gala
 
Aasl learning standards
Aasl learning standardsAasl learning standards
Aasl learning standards
 
Digital Natives with a Cause newsletter - Changing Face Of Citizen Action
Digital Natives with a Cause newsletter - Changing Face Of Citizen ActionDigital Natives with a Cause newsletter - Changing Face Of Citizen Action
Digital Natives with a Cause newsletter - Changing Face Of Citizen Action
 
Media kit buzzworks new
Media kit buzzworks  newMedia kit buzzworks  new
Media kit buzzworks new
 
álbum de fotografías -25 años-
álbum de fotografías -25 años-álbum de fotografías -25 años-
álbum de fotografías -25 años-
 
Mirsis Autocontrol İç Kontrol Yönetimi
Mirsis Autocontrol İç Kontrol YönetimiMirsis Autocontrol İç Kontrol Yönetimi
Mirsis Autocontrol İç Kontrol Yönetimi
 
XTR
XTRXTR
XTR
 
Dawn lifestyle expo 2011
Dawn lifestyle expo 2011Dawn lifestyle expo 2011
Dawn lifestyle expo 2011
 
Teste
TesteTeste
Teste
 
Yourprezi
YourpreziYourprezi
Yourprezi
 
สนใจ ไม่ได้แปลว่าได้ใจ
สนใจ ไม่ได้แปลว่าได้ใจสนใจ ไม่ได้แปลว่าได้ใจ
สนใจ ไม่ได้แปลว่าได้ใจ
 
Presentatie Astorium
Presentatie AstoriumPresentatie Astorium
Presentatie Astorium
 
Open im vol16_lt_masuda_mieruka
Open im vol16_lt_masuda_mierukaOpen im vol16_lt_masuda_mieruka
Open im vol16_lt_masuda_mieruka
 

Similar a In kor we Trust

REST made simple with Java
REST made simple with JavaREST made simple with Java
REST made simple with Javaelliando dias
 
Jersey framework
Jersey frameworkJersey framework
Jersey frameworkknight1128
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 
RMI Java Programming Lab Manual 2019
RMI Java Programming Lab Manual 2019RMI Java Programming Lab Manual 2019
RMI Java Programming Lab Manual 2019Gebreigziabher Ab
 
Job Managment Portlet
Job Managment PortletJob Managment Portlet
Job Managment Portletriround
 
망고100 보드로 놀아보자 19
망고100 보드로 놀아보자 19망고100 보드로 놀아보자 19
망고100 보드로 놀아보자 19종인 전
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorialjbarciauskas
 
Speed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsSpeed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsYakov Fain
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasyJBug Italy
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqelajobandesther
 
Unsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST APIUnsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST APIMikhail Egorov
 
Need help on creating code using cart. The output has to show multip.pdf
Need help on creating code using cart. The output has to show multip.pdfNeed help on creating code using cart. The output has to show multip.pdf
Need help on creating code using cart. The output has to show multip.pdfmeerobertsonheyde608
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on AndroidTomáš Kypta
 

Similar a In kor we Trust (20)

REST made simple with Java
REST made simple with JavaREST made simple with Java
REST made simple with Java
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
Ejb3 Dan Hinojosa
Ejb3 Dan HinojosaEjb3 Dan Hinojosa
Ejb3 Dan Hinojosa
 
RMI Java Programming Lab Manual 2019
RMI Java Programming Lab Manual 2019RMI Java Programming Lab Manual 2019
RMI Java Programming Lab Manual 2019
 
Job Managment Portlet
Job Managment PortletJob Managment Portlet
Job Managment Portlet
 
Jersey Guice AOP
Jersey Guice AOPJersey Guice AOP
Jersey Guice AOP
 
REST made simple with Java
REST made simple with JavaREST made simple with Java
REST made simple with Java
 
망고100 보드로 놀아보자 19
망고100 보드로 놀아보자 19망고100 보드로 놀아보자 19
망고100 보드로 놀아보자 19
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorial
 
Speed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsSpeed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSockets
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
 
Oredev 2009 JAX-RS
Oredev 2009 JAX-RSOredev 2009 JAX-RS
Oredev 2009 JAX-RS
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqela
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
My java file
My java fileMy java file
My java file
 
Unsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST APIUnsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST API
 
Need help on creating code using cart. The output has to show multip.pdf
Need help on creating code using cart. The output has to show multip.pdfNeed help on creating code using cart. The output has to show multip.pdf
Need help on creating code using cart. The output has to show multip.pdf
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
 
JavaExamples
JavaExamplesJavaExamples
JavaExamples
 

Último

%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationShrmpro
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 

Último (20)

%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 

In kor we Trust

Notas del editor

  1. Kor originally was relying on Volley for modelling the “Request” objects. Part of this inheritance is maintained throught “Success/Failure” Notifications. Note the ProcessResponse element
  2. Kor divides the request in four basic steps: Retrieval, Postprocess,Save and Notify.
  3. The problem with Volley back then was the coupling to the framework, and specifically the boilerplate Volley Request needed to handle.
  4. One of the problems we found with the original Volley Request was that sometimes, persisting everything on disk took longer than anticipated, and the UX was performing issues. So what we did was to extract the steps into a Strategy-like class that handled the general flow and leave the Request itself to fill the gaps through delegation.
  5. Eventually after reading a little more of Clean Architecture we used a little more correct naming. We can interchange Delegates with different Strategies, to micromanage better output responses with minimal boilerplate and adapt to requirements change. We have Interactors that priorize fast notification over saving to cache, or cyclically request stuff. The Executor (aka Provider) class is the one who executes Interactors. The implementation of this class is not part of Kor, as it is intended to be managed per app. What we do to abstract on the presentation layer is to hide the creation of the interactors with a Factory class. This factory produces composite interactors (Network/Cache or both) and the Executor has the information of the status (network speed, status of the composite) and execute or hold the necessary ones until it is available. So we just ask for instance, “Execute the Get User Interactor”
  6. The Repository we use is very powerful, as we rely continously on the Repository interface. We provide a BaseRepository implementation which is basically a two level cache. By using this interface we cover 90% of our needs. The different parts of the Repos are intended to work together or independently and we can switch fast one for other.
  7. During our experimentation with several ways to improve cacheing we have implemented several flavors of Repository, which seamlessly integrates with our current setup.
  8. There was a point where we found a limitation on our current architecture, in particular with the Presentation layer. We had tested most of our logic classes. We had a lot of presentation logic scattered on our Fragments, and was too complex to test.
  9. Jorge saw Banes’ Philm app which used MVP and we had the idea to modularize even further the UI components. What we came with was to add an intermediate layer to get rid of the Android framework. This class is the only dependency of each of the Fragments, and adapts its interface to the necessities of the Fragment itself. It usually goes on a Bind - Release lifecycle.
  10. Using Scoped Injection and Composition we reduce boilerplate code and dynamically load the necessary components. We target API Levels, Screen configuration or even behavior states. We have detected several configurations we run from time to time The same Facade can configure different Presenter sets [Example: Same Screen for Holo & Lollipop] The Facade needs to be composed to extend its behavior [PlanDetail + PlanDetailInvitation] Composition of Facades by a Bigger Facade [Moving Purchase Flow to a single screen]
  11. For handling the Application Architecture we use a single activity. This allows us to let this activity provide several “App-wide” services which are not particular of any screen and live through the full existence of the UI. Each of these aspects of the application is centralized to its own controller and requests can be sent to the particular element that handles it [Example: Clicking on a button can request the ActionBar to enter “Search” mode] As every of these controllers, again use interfaces atop them, we can configure them as we wish [Examples: StatusBar for api 15, 19, 20 or NFC Controller]