-
Notifications
You must be signed in to change notification settings - Fork 17
Real World Benefits
qertoip edited this page Feb 26, 2012
·
1 revision
Use Case Driven Architecture AKA Entity-Control-Boundary Pattern
- solves models obesity problem
- there is now obvious place to put (hundreds?!) of your User model methods:
- the User use cases
- there is now obvious place to put (hundreds?!) of your User model methods:
- much faster functional and unit tests
- isolation from ActiveRecord allows you to plug memory-based persistence backend
- enjoy true TDD without hacky workarounds
- easier to upgrade frameworks
- ActiveRecord 3.2 has different API than ActiveRecord 2.3
- thanks to isolation you have to change code only in one place - the adapter
- easier to remove frameworks
- remember searchlogic?
- [Lament 1] (https://github.com/binarylogic/searchlogic/issues/155) "Please help me in searchlogic for rails 3.1.1. my whole application using searchlogic. I dont know what i do now its not working with Rails 3.1.1. can you people help us its work for rails 3.1.1 and above..."
- [Lament 2] (https://github.com/binarylogic/searchlogic/issues/153) "when rails 3.1 compatibility?!"
- remember searchlogic?
- easier to plug frontends other than DHTML, i.e.: * functional tests * rake tasks * API (services) * CLI (command line interface) * GUI (fat) * Voice UI? * Thoughts UI?
- easier to migrate to the other relational database * MySQL <-> PostgreSQL <-> Oracle
- easier to migrate to a completely different database paradigm * Relational <-> Document-oriented <-> Object-oriented <-> Flat-files <-> ActiveResource? <-> ruby-git?? <-> and what not
- easier to swap MVC framework * since controllers are thinner than ever and use cases are encapsulated in, well, UseCases, it's easier to swap between MVC frameworks like ActionPack and Sinatra