Tag Info

New answers tagged

1

I would think if your domain objects on the command side are always in a valid state, you shouldn't need to worry that the queries return invalid results. What would you do, anyway, if you discovered an invalidity on the read-side, anyway? Tell the read repository to re-enter the values? ;-) If the read side were to have checking, it would think it would ...


0

A constructor shouldn't have any side-effects. Anything more than private field initialization should be viewed as a side-effect. A constructor with side-effects breaks the Single-Responsibilty-Principle (SRP) and runs contrary to the spirit of object-oriented-programming (OOP). A constructor should be light and should never fail. For instance, I always ...


1

I don't think it is a wise idea to have View and Presenter being coupled so tight. Based on either the Passive Screen or Supervising Presenter the presenter and the view are separated by an interface that is implemented by the view. The presenter calls the interface. Here is an example of a supervising presenter. PRESENTER this class has no dependency on ...


1

One consideration that often limits solutions is the network round trip. The client is supposed to validate the user data without sending a message over the network. In other words, when the user hits the submit button, the client is supposed to validate the data locally. First, let's assume that we do not have this limitation. We could communicate with ...


0

If your validation is done at a database level you're working through layers of code to get there. That's expensive, why pass down data only to find out it's wrong? You may be opening long running pointless transactions impacting every user of the application. Not only that but SQL validation is far less flexible than what you can do in JS/C# or any of the ...


2

If there is a client application, you don't normally do any data validation in the database unless it would cause the database to throw an error e.g. NULL when a value was expected. If there are a range of valid values however, it isn't uncommon to store these in the database and then make them available to the client application. This is sometimes known ...



Top 50 recent answers are included