eShopOnWeb Architecture (6/16) – uses private setters and non default constructors to support encapsulation which helps keep the model valid

eShopOnWeb has some really nice examples of encapsulation. The particular example below is the CatalogItem class. Click on the image … Continue reading eShopOnWeb Architecture (6/16) – uses private setters and non default constructors to support encapsulation which helps keep the model valid

eShopOnWeb Architecture (4/16) – uses the MediatR library to keep controllers thin

eShopOnWeb uses Jimmy Bogards MediatR package to keep controllers thin. This package is a simple implementation of the mediator design pattern … Continue reading eShopOnWeb Architecture (4/16) – uses the MediatR library to keep controllers thin

eShopOnWeb Architecture (3/16) – uses custom exceptions to more explicitly express what has gone wrong

In the ApplicationCore project eShopOnWeb defines some custom exceptions… This approach means we can raise strongly typed exceptions rather than … Continue reading eShopOnWeb Architecture (3/16) – uses custom exceptions to more explicitly express what has gone wrong

eShopOnWeb Architecture (2/16) – uses Value Objects to model immutable domain concepts

Value Objects (VO) are a core part of DDD. A Value Object is an immutable type that is distinguishable only … Continue reading eShopOnWeb Architecture (2/16) – uses Value Objects to model immutable domain concepts