Posts

Showing posts from April, 2021

Design patterns - Gang of Four (GOF) - Creational design patterns

We can categorize the GOF patterns as follows:  • Creative: Helpful in creating objects  • Structural: Helpful in dealing with the composition of objects  • Behavioral: Helpful in defining the interactions between objects and distributing responsibility Creational design patterns Abstract factory: This pattern is used to create objects

Software Development Design principles - Keep it simple, stupid (KISS)

 With KISS , a system should be designed as simply as possible, avoiding complicated designs, algorithms, new untried technologies, and so on. You should focus on leveraging the right OOP concepts and reusing proven patterns and principles. Include new or non-simple things only if it is necessary and adds value to the implementation.  When you keep it simple, you will be able to do the following better: • Avoid mistakes while designing/developing  • Keep the train running (there is always a team whose job is to maintain the system, although they are not the team that developed the system in the first place)  • Read and understand your system and code (your system and code need to be understandable to people new to it or people using it far in the future)  • Do better and less error-prone change management

Software Development Design principles - Don't repeat yourself (DRY)

Image
 With DRY , a system should be designed in such a way that the implementation of a feature or a pattern should not be repeated in multiple places. This would result in maintenance overhead as a change in requirements would result in modification being needed at multiple places. If you fail to make a necessary update in one place by mistake, the behavior of the system will become inconsistent. Rather, the feature should be wrapped into a package and should be reused in all places. In the case of a database, you should look at using data normalization to reduce redundancy This strategy helps in reducing redundancy and promoting reuse. This principle helps an organization's culture as well, encouraging more collaboration.