Object Oriented Principle:
Single Responsiblity Principle
Open/Closed Principle
Dependancy Principle
Interface Segregation Principle
Single Responsiblity Principle
Open/Closed Principle
Dependancy Principle
Interface Segregation Principle
OO principle is a set of guidelines that ensures OOP concept. Based on the OOP concept, this defines ways to design better way, a better design. The basic OO design principle is SOLID.
A Design pattern provides a general solution to a design problem. Please note “design pattern” can be applied to noon object oriented word too. So A OO design patterns (OODPs) are those which provide a general solution to object oriented design based OO principle. Design patterns are discovered, not invented. There are several ways to define OODPs and most famous one is BSC [Behavioral Structural Creational].
Design Principle = SOLID (i.e. Dependency Inversion Principle)
Design Pattern = Gof (i.e. Abstract Factory Pattern)
Patterns are common solutions to object-oriented programming problems.
Actually patterns based on principles
*Design Principle : * Software design principles represent a set of guidelines that help us to avoid having a bad design. like: Open Close Principle
*Design Pattern : * a Design Pattern is a general reusable solution to a commonly occurring problem within a given context in software design. Like: Singleton
Principles are rules while patterns are their concrete examples
No comments:
Post a Comment