OO Design Principle roundup...
2 posters
Shutdown :: Technical Discussions :: Need Help! :: OOAD
Page 1 of 1
OO Design Principle roundup...
I have listed a set of key design principles here for OO.
Design Principle: A design principle is a basic tool or technique that can be applied to designing and writing code to make that code more maintainable, flexible or extensible.
Principle #1: The Open-Closed Principle(OCP)
Classes should be open for extension but closed for modification.
Design Principle: A design principle is a basic tool or technique that can be applied to designing and writing code to make that code more maintainable, flexible or extensible.
Principle #1: The Open-Closed Principle(OCP)
Classes should be open for extension but closed for modification.
Last edited by lester.noronha on Thu May 22, 2008 12:17 pm; edited 1 time in total
lester.noronha- VIP Member
- Number of posts : 54
Registration date : 2008-04-29
Re: OO Design Principle roundup...
Here come the other principles in OOAD. We will discuss on each of them in detail later.
Principle #2: The Don't Repeat Yourself Principle (DRY)
Avoid duplicate code by abstracting out things that are common and placing those things in a common location.
Principle #3: The Single Responsibility Principle (SRP)
Every object in your system should have a single responsibility, and all the object's services should be focussed on carrying out that single responsibility.
Principle #4: The Liskov Substitution Principle (LSP)
Subtypes must be substitutable for their base types.
Principle #2: The Don't Repeat Yourself Principle (DRY)
Avoid duplicate code by abstracting out things that are common and placing those things in a common location.
Principle #3: The Single Responsibility Principle (SRP)
Every object in your system should have a single responsibility, and all the object's services should be focussed on carrying out that single responsibility.
Principle #4: The Liskov Substitution Principle (LSP)
Subtypes must be substitutable for their base types.
lester.noronha- VIP Member
- Number of posts : 54
Registration date : 2008-04-29
Shutdown :: Technical Discussions :: Need Help! :: OOAD
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|