Posts

Showing posts with the label Design Patterns

SOLID Principles for Object-Oriented Designing

Software design principles represent a set of guidelines that helps us to avoid having a bad design. The design principles are associated to Robert Martin who gathered them in "Agile Software Development: Principles, Patterns, and Practices". According to Robert Martin there are 3 important characteristics of a bad design that should be avoided: Rigidity - It is hard to change because every change affects too many other parts of the system. Fragility - When you make a change, unexpected parts of the system break. Immobility - It is hard to reuse in another application because it cannot be disentangled from the current application. Initial Stands for (acronym) Concept S SRP Single responsibility principle a class should have only a single responsibility. O OCP Open/closed principle software entities … should be open for extension, but closed for modification. L LSP Liskov substitution principle objects in a program should be replaceable with insta...

A Recall of Design Patterns

What is a Pattern? A pattern is a reusable solution that can be applied to commonly occurring problems in software. In other words, patterns are as templates for how we solve problems that occurred during software development. Basically, design patterns have three main benefits. 1.       Design patterns helps us in preventing minor issues that can cause major problems in the application development process. Because when code is built on proven patterns, we can afford to spend less time worrying about the structure of our code and more time focusing on the quality of our overall solution. Patterns can encourage us to code in a more structured and organized fashion avoiding the need to refactor it for cleanliness purposes in the future. 2.       Patterns can provide generalized solutions which are documented in a fashion that doesn't require them to be tied to a specific problem. This generalized approach means that rega...