2

In UML class diagram in MVC software design pattern there are model view controller classes and in ASP.NET MVC all views are cshtml not classes my question is how to put views in class diagram ?

asked Apr 24, 2018 at 6:11

1 Answer 1

4

Behind the curtain, the cshtml gets transformed into a class. You could simply add a class node with a <<view>> stereotype and the relevant properties.

Question is, what would be the benefit of adding the view to the diagram? In MVC the views are supposed to be dumb, they should only present data and should be oblivious of any behavior that drives the data. Normally they have a backing view model that encapsulates the data and (any) behavior. You should decouple the view model from the rest of the business logic and add that to the diagram instead of the view.

answered Apr 24, 2018 at 7:34

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.