Ensures a class has only one instance and provide a global point of access to it. Here is an example of lazy and thread-safe implementation of Singleton.
The principles basically are the guidelines for a better software. They are the MAGIC 5, that keeps protecting you while you design the architercture of the application, they are the 5 SOLID ancient golems, if you will. They helps you fight the code smells, due to refactoring. So, let’s check ‘em out:
The repository and unit of work patterns are intended to create an abstraction layer between the data access layer and the business logic layer of an application. Implementing these patterns can help insulate your application from changes in the data store and can facilitate automated unit testing or test-driven development (TDD).