Ok, now that you know what SOLID's all about, I want to point out that off the top of his head, Uncle Bob listed the principles in order of importance:
- Single Responsibility Principle
- Dependency Inversion Principle
- Open Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
I'd like to learn exactly why these principles are ordered this way, but, the podcast didn't really focus on this perspective.
3 comments:
SDOLI --
SRP because it's probabaly at the root of everything. All the principles may eventually boil down to SRP. (or DRY).
DIP because it's the primary mechanism for achieving all the others. SRP, OCP, LSP, ISP all make use of DIP in one way or another.
OCP because it's the proximate goal. It describes the traits we want our software to have at nearly every level.
LSP because its influence is stronly associated with certain langauges. The dependency problems caused by LSP in C++ don't occurr in Ruby for example. Other problems do though.
ISP because it is almost entirely related to static languages. The dependency problems related to fat classes so common in Java and C#, are non-existent in lanuages like python and ruby.
Cool, I thought I was the only one that thinks SDOLI was the better order. Especially for explaining purposes.
http://blog.fohjin.com/blog/2009/2/26/Software_Development_is_not_a_Jenga_game
Cool summary Bob.
-Mark
Thanks a lot Uncle Bob. I really appreciate the time you took to answer that.
Post a Comment