Simple command handler in .net

I want to introduce a simple command handler pattern in order to separate commands and queries of your applications, if it’s needed. Sometimes specially in large scale applications you need to have two layers for read and write separated and assign two teams to work on them.

You can use the pattern in this post based on complexity and needs of your application. I recommend that don’t call this CQRS pattern as it’s something completely different and more complex.


Get started and Create an interface with no any member:... Continue

Disadvantages of n-layered architectures

Most of the people use n-layered architectures in their application developement. There are lots of advantage for n-layered architecture but I want to talk about disadvantages. actually it's not a good idea to design a somplex architecture for every problem , you don't need to apply n-layered architecure in every case because it's mostly about making complex things simple whilst a complex architecture can make a system more and more hard to understand rather than making performance problems. Based on this pr... Continue

Domain driven design VS model driven architecture

Domain Driven design(DDDesign) is not the same Model Driven Architecture(MDA). Although The root of both DDDesign and MDA is the same and it is Model Driven Engineering and also both of them aim to solve the problem of converting a 'pure' problem domain model into a full software system. But there are some differences.

Domain Driven Design concentrates on Modeling and solving the Domain problem by Capturing the model from Ubiquitous language. it is about m... Continue

Most common architectures of enterprise applications

"An effective enterprise application should be divided into layers", An Enterprise application should has the flexibility, maintainability, scalability , testability and extensibility. And to achieve this there are some techniques and principles like Separation of concern in layers and components and loose coupling. And if you are developing a web application, in order to make it secure and accessible, you need to distribute the application over multiple physical tiers. To ensure high performance and reliability, the application must be testable. Now I'm going... Continue

Difference between Anemic Domain Model and Rich domain model

There are lots of differences between these to approach. Anemic model is an anti-pattern introduced by martin fowler to encourage developers to duplicate code!  Based on the main idea behind DDD, if you have ubiquitous language then you can have domain model Anemic domain model is the use of a software domain model where the domain objects contain little or no business logic. in a Rich Domain Model behavior is included in the domain object while in Anemic Domain Model behavior is implemented in separate classes.

At some point in the design of the... Continue