227
CHAPTER 6 | Tackle Business Complexity in a Microservice with DDD and CQRS Patterns
because if
you have a client application, from a UX perspective, it is best to be proactive and not allow
the user to enter invalid information.
Therefore, in client-side code you typically validate the ViewModels. You could also validate the client
output DTOs or commands before you send them to the services.
The implementation of client-side validation depends on what kind of client
application you are
building. It will be different if you are validating data in a web MVC web application with most of the
code in .NET, a SPA web application with that validation being coded in
JavaScript or TypeScript, or a
mobile app coded with Xamarin and C#.
Dostları ilə paylaş: