Finally completed one more batch on design pattern. It was a very smooth trainings. People were all experienced.
When someone want to learn design patterns then most important thing is they should know “Why they are learning design pattern”? We started our training by understanding answer for this question. We must learn design pattern because
- We want to make our coding better
- We want to cross the interview
Technically it all started with an initial understanding on definition of Design Pattern – Reusable solutions for commonly occurring problems in software development.
It was a great interactive session, participants were great excited and we had a detail discussion on,
- Pillars on Object oriented programming
- Advantage of OOP over procedural programming
- Many Object oriented principles like
- DRY – Don’t repeat yourself
- KISS – Keep it simple and stupid
- DAMP – Descriptive and meaningful phrases.
- PINC – Program to interface not concrete classes
- FCOI – Favour Composition over inheritance
Discussion continued with a project using best practices in industry. We understood the problems in the code currently we have and how we can make it better by introducing reusable solutions called Design patterns. At the end we had following patterns in the project.
- Repository Pattern – Decouple Domain from Database Logic
- Simple factory Pattern – Take object creating out
- Strategy Pattern – Get an ability to switch logic (algorithms)
- Null Pattern – Avoid Null check and Null error and make code more systematic
- Decorator Pattern – Add new responsibilities at run time
- Adapter Pattern – Make two incompatible interfaces compatible
- Observable pattern – Get notification when object state changes
- Prototype Pattern – Create a clone of existing project
- Dependency Injection and IOC – Inject dependencies at runtime from outside
- Façade Pattern – Provide a simplified interface to a set of set of interfaces
- Template Pattern
- Singleton Pattern
- Lazy Loading
These are the more patterns we looked into
- Factory method
- Abstract Facrory
- Unit Of Work
Most importantly in this training we learned “how to learn and remember design patterns more efficiently and easily”
Here is the last minute pic with attendees.
I hope everybody got the benefit from this training. I wish all the best to each and participant. Thanks and keep learning.
Next we have is MVC 5 with Angular project training in 2 days coming weekend on 12th and 13 Sept 2015.