designing class diagram to a system

ROG 21 Reputation points
2022-04-25T14:43:59.76+00:00

hey,

I'm working on a software engineering project and there are a few things I'm not certain about, hoping you could help...

it's an MVC based system and I need to design an MVC diagram, class diagram and a few sequence diagrams.

  • what is the connection between MVC and the classes?
    • do I need to include the MVC classes in the class diagram?
    • do I need to include the MVC's 'View' in the sequence diagram as the mediator between the user and the system?

thanks a lot!

edit: added comment below

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,313 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Lan Huang-MSFT 26,516 Reputation points Microsoft Vendor
    2022-04-26T02:52:05.527+00:00

    Hi @ROG ,
    I feel from your question that you don't seem to know much about MVC.
    MVC stands for model-view-controller.https://learn.microsoft.com/en-us/aspnet/mvc

    • M odels: Classes that represent the data of the application and that use validation logic to enforce business rules for that data.
    • V iews: Template files that your application uses to dynamically generate HTML responses.
    • C ontrollers: Classes that handle incoming browser requests, retrieve model data, and then specify view templates that return a response to the browser.

    MVC contains model class and controller class, class diagram should include model class.
    You can learn how the MVC architecture works to better help you design diagrams.

    First, the browser sends a request to the Controller. The controller then interacts with the model to send and receive data. Finally, the view sends its final rendering to the controller, which sends the final data to the user output.

    You can refer to the model for developing a software design document to design.
    https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2012/dd409436(v=vs.110)

    You can refer to the diagram below and change it according to your needs.
    A Generic MVC Sequence Diagram Example
    196358-1.jpg
    MVC UML class diagram
    196380-2.jpg
    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.
    0 comments No comments