Author Archives: Md. Mojammel Haque

Md. Mojammel Haque

About Md. Mojammel Haque

CSM, CSPO, CSD, CSP-SM, CSP-PO ( Certification Profile Link- Currently working as Lead Team (Application Architecture) at Raven Systems Ltd. Passion for software development especially agile practices such as TDD with in depth knowledge of Object Oriented Programming, SOLID Principles, Gang of Four Design Patterns, Some Enterprise Application Architectural Patterns. Over 8 years of software development experience ASP.NET. Has the ability to understand and transform complex business requirements into software ensuring applications are delivered on time. Also experience in non Microsoft .NET technologies such as Dapper.Net, Git, Structure Map & Angular, Bootstrap, HTML-5, CSS-3 etc.

Unit of Work

  According to Martin Fowler “Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.” Unit of work is one of the most used patterns defined in Patterns of Enterprise Application Architecture (PoEAA). It maintains a list of business objects in memory… Read More »

Repository Pattern

In Martin Fowler’s Patterns of Enterprise Application Architecture (PoEAA) defined Repository pattern as follows: “Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects.”  We can explain it as follows: The repository mediates between the data source layer and the business layers of the application. It queries the data… Read More »

Singleton Pattern

According to Gang of Four Ensure a class only has one instance, and provide a global point of access to it. According to Wikipedia The singleton pattern is a design pattern that restricts the instantiation of a class to one object. So we can explain singleton pattern as follows: A singleton is a class. That class should have only one instance in… Read More »

Factory Method Pattern

According to Gang of Four: Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.  According to Wikipedia “The factory method pattern uses factory methods to deal with creating objects without specifying the exact class of object that will be created. This is done… Read More »

Service Locator Pattern

According to Wikipedia “The service locator pattern is a design pattern used in software development to encapsulate the processes involved in obtaining a service with a strong abstraction layer. This pattern uses a central registry known as the “service locator”, which on request returns the information necessary to perform a certain task.” We can simplify the definition as follows: »   … Read More »

Dependency Injection – Interface Injection

What is Interface Injection? »    Also known as Method injection. »    In this case Dependency declared inside the dependent class in the form of interface. »    So any class that implements that interface can be substituted into dependent class. »    Dependency is injected as the parameter of method. »    Useful where the whole class does… Read More »

Dependency Injection – Setter Injection

What is Setter Injection? »    Also known as Property Injection. »    We pass dependencies through setter property. »    In this case there is no need of constructor for passing dependencies »    Just need property of dependency class. »    Used when a class has optional dependencies, »    Also used where the implementations may need to be… Read More »

Dependency Injection- Constructor Injection

What is Constructor Injection? »    Provably most common Dependency Injection (DI) »    Pass dependencies to the dependent class through its constructor. »    In this case dependent class doesn’t contain any default constructor. So in order to initialize the dependent class we have to pass concrete implementation of interface. »    Injected component can be used anywhere… Read More »

Dependency Injection (DI)

According to Wikipedia “Dependency injection is a software design pattern that implements Inversion of Control (IoC) and allows a program design to follow the dependency inversion principle (DIP).”  »    Dependency Injection (DI) is a design pattern that demonstrates how to create loosely coupled classes. »    It implements Inversion of Control (IoC) in our program i.e. Dependency Injection (DI) supply the dependencies… Read More »

Dependency Inversion Principle

According to Uncle Bob Martin: A. “High-level modules should not depend on low-level modules. Both should depend on abstractions.” B. “Abstractions should not depend on details. Details should depend on abstractions.” So we can easily explain it as follows: »    The Dependency Inversion principle (DIP) decouples lower level objects from higher level objects. »    To… Read More »