pnschofield
  • Member for 5 years, 10 months
  • Last seen more than a month ago
Shared domain model between different microservices
6 votes

You can think of them as two separate Bounded Contexts (in Domain-Driven Design parlance). They should not share any data between them, aside from an ID used for correlating the Authentication context'...

View answer
Should I download scripts from a CDN or bundle everything into one script?
3 votes

My advice would be to bundle all of your own scripts together, and load common third party scripts from a CDN. It gives you the best of both worlds - your scripts download quickly, and third party ...

View answer
Do we achieve 100% Persistence Ignorance solution if we're not using ORM's POCO objects to model the Domain?
3 votes

Any ORM worth its salt is not going to pollute your model with persistence concerns such as lazy loading. Typically this will be accomplished using a technique such as a transparent proxy, which has ...

View answer
NServiceBus: What are the advantages of not using retries?
2 votes

Retries in NServiceBus are intended to be a method for handling transient issues such as network failures, reboots, etc. in which case the issue is expected to be resolved fairly quickly, and you ...

View answer
How do I describe the Repository pattern?
2 votes

An implementation of the Repository pattern should appear to be an in-memory collection of objects. You should be able to add, remove and find objects in a Repository. It should not have any database-...

View answer
In an ESB type system, what field name should be used as a "correlation ID"?
1 votes

I like to go with CorrelationID, if only because I learned the concept from NServiceBus. But the best possible name for your team to use is whatever the team is likely to call the concept when ...

View answer
MVVM Inheritance following SOLID principles
Accepted answer
1 votes

I try to follow the maxim "favor composition over inheritance." In other words instead of baking in behavior at compile time, wire it up at runtime. This follows the "Open/Closed Principle" of SOLID, ...

View answer
Handling changes in a event-driven microservice architecture
1 votes

Frameworks like NServiceBus handle this by using event versioning with polymorphic message dispatch. For example, version 1 of Service A might publish an event as IUserRegistered_v1. When Service A ...

View answer
Microservices & Canonical model
1 votes

Microservices is all about tight cohesion and loose coupling. Within a microservice, you have tight cohesion, but between microservices, you have loose coupling and therefore you want to avoid any ...

View answer
How do I apply TDD to read/write functions?
0 votes

If you're using an object relational mapper, there is typically an associated library that can be used to test that your mappings work correctly by creating an aggregate, persisting it, and reloading ...

View answer
DDD CQRS - per-query and per-command authorization
0 votes

I would implement authorization as part of your Authorization BC but deploy it as an action filter into your Ledger system. This way, they can be logically decoupled from each other - your Ledger code ...

View answer
Agreggate functions in a Repository
0 votes

I like @JDT's answer. However, if you decide to just add methods to your repository and you find that the repository is getting bloated over time with too many aggregation methods, you can refactor ...

View answer
Entity Framework and avoiding the Anemic Domain Model
-1 votes

Traditionally, this is solved by using a fetching strategy for each use case that instructs Entity Framework to eager load the necessary associations on the initial query using IQueryable.Include(). ...

View answer