@CoGaNic and I have done the Birthday Greetings kata.
This kata is a simple refactoring exercise by Matteo Vaccari that is meant to teach something about dependency inversion and dependency injection. You can download the kata initial code from here.
We refactored it to decouple the domain objects from the file system and email sending code using the ports and adapters architecture as the exercise suggested. You can see the refactoring result on GitHub.
We think there's still room for improvement in the adapters code, but we are satisfied with how we manage to eliminate the initial coupling between domain objects and the infrastructure classes used to read files and send emails. Now the domain objects don't know anything about them.
All in all, it's been a great exercise. We've thought about dependency inversion and dependency injection (this great article by Brett L. Suchert helped us a lot: DIP in the wild) and clarified many doubts we had about the ports and adapters architecture, also known as, hexagonal architecture.
PS: Some time ago I posted some useful links about the ports and adapters architecture.
----------------------------
Update:
I revisited the kata some time after this post, recorded a screencast to document the refactoring process and wrote a new post about it.
Check it here.
Record of experiments, readings, links, videos and other things that I find on the long road.
Registro de experimentos, lecturas, links, vídeos y otras cosas que voy encontrando en el largo camino.
Sunday, May 26, 2013
Tuesday, May 21, 2013
Articles and Posts read
Inspiring
Joan Amat, 87 años: "Mira qué puedes hacer y hazlo"
“Mozart sería un apasionado del bien común”
Interesting
El creador de Captcha se lanza a la enseñanza de idiomas con Duolingo
Learning and software craftsmanship
MVC, CRUD and TDD
Ethics for code reviewers
The abuse of refactoring
Don't Be Distracted by Superior Technology
The Pocket Calculator Kata
Startups and TDD
The Pragmatics of TDD
SOLID Code for SOLID Reasons
Visual Order and Working Order
Debate: Refactorización de tests
C++
C++ Code Smells
C++11 compiler support shootout: Visual Studio, GCC, Clang, Intel
JavaScript
Headless Functional Testing with Selenium and PhantomJS
Python
Python Koans
Entrepreneurship and Management
Why Five Days in the Office Is Too Many
Spain and Europe
El precio de hacer justicia
La irritación de las clases medias
Joan Amat, 87 años: "Mira qué puedes hacer y hazlo"
“Mozart sería un apasionado del bien común”
Interesting
El creador de Captcha se lanza a la enseñanza de idiomas con Duolingo
Learning and software craftsmanship
MVC, CRUD and TDD
Ethics for code reviewers
The abuse of refactoring
Don't Be Distracted by Superior Technology
The Pocket Calculator Kata
Startups and TDD
The Pragmatics of TDD
SOLID Code for SOLID Reasons
Visual Order and Working Order
Debate: Refactorización de tests
C++
C++ Code Smells
C++11 compiler support shootout: Visual Studio, GCC, Clang, Intel
JavaScript
Headless Functional Testing with Selenium and PhantomJS
Python
Python Koans
Entrepreneurship and Management
Why Five Days in the Office Is Too Many
Spain and Europe
El precio de hacer justicia
La irritación de las clases medias
Tuesday, May 7, 2013
Interesting Talk: "Clean Architecture"
I've just watched this interesting talk by Robert Martin about software architecture:
He explains how to protect your business or domain objects from details like the framework, the user interface or the persistence infrastructure, so that domain objects become again the center of your system.
He also talks about how good architectures help to defer tool decisions until late in the development.
He explains how to protect your business or domain objects from details like the framework, the user interface or the persistence infrastructure, so that domain objects become again the center of your system.
He also talks about how good architectures help to defer tool decisions until late in the development.
Interesting Talk: "The Insufficiency of Good Design"
I've just watched this interesting talk by Sarah Mei about the importance of team communication patterns in software development:
Monday, May 6, 2013
Interesting Talk: "What is OO really?"
I've just watched this interesting talk by Robert Martin that busts some myths about OO:
Some of its contents appear in this other talk, but using a slightly different perspective. There are also some different examples and anecdotes.
Some of its contents appear in this other talk, but using a slightly different perspective. There are also some different examples and anecdotes.
Saturday, May 4, 2013
Some resources for learning about user stories
These are some of the interesting resources that we've been using to learn about user stories in the Valencia Agile Development Course:
- User Stories for Agile Requirements by Mike Cohn
- Agile Levante: Historias de usuario. Parte 1
- Agile Levante: Historias de usuario. Parte 2.
- Telling Stories and User Role Modeling
- User Story Examples and Counterexamples
- Spikes
Subscribe to:
Posts (Atom)