- OCP: Classes should be open for extension, but closed for modification. (to avoid new requirements breaking old tested code)
- DRY: Don't repeat yourself, avoid duplicate code by abstracting out things that are common and placing them in a single location. (to avoid having to fix the same thing in different places, or solving the same problema again, and again and again... I believe this is releated to YAGNI balances OAOO.... i guess I could say that YAGNI balances DRY, and therefore DRY equals OAOO)
- SRP: Single responsability principle, every object in your system should hava a single responsibility, and all the object's services shoul be focused on carry in out that single responsability. (to avoid Big Ball of Mud, a huge object that does everything, that is hard to extend, hart to understand, and lots of stupid little object that do nothing, mmmm, this reminds me of a pricinciple I read about a long time ago about balancing the intelligence between your objects)
- LSP: Subclasses should be suitable for their base clases (to avoid confusing code, on which you believe you can use a member of class hierarchy, and after trying you realize thet the result is not the expected one)
This blog will be about... Software Engineering... Object Oriented Analysis... Database Development, etc
I believe that imagination is stronger than knowledge -- myth is more potent than history -- dreams are more powerful than facts -- hope always triumphs over experience -- laughter is the cure for grief -- love is stronger than death.
Friday, February 23, 2007
OO Principles
Hi! Today I am reading the book Head First Object-Oriented Analysis and Design, I specially liked the OO Principles, I have already read about them in c2, but I really like the way they are summarized in this book:
Subscribe to:
Post Comments (Atom)
Requirements Analysis: Negative Space
A while ago, I was part of a team working on a crucial project. We were confident, relying heavily on our detailed plans and clear-cut requi...
-
In Java, first we had servlets , and each one of them answered to request made to a particular url ( or an url matching a particular express...
-
Today I was thinking about the way I build UIs ( List then Edit ) and the way most people I know build UIs ( Edit then List ) and the relati...
-
That seems like a very simple question: "When will feature "X" be finished?", specially if do not have a lot of experie...
No comments:
Post a Comment