3
Archaic
7y

Why can’t my brain grasp ASP MVC?

Comments
  • 2
    Simple stuff.

    1. Request come to server

    2. It's passed to router

    3. It decides which controller and action will handle it

    4. Framework binds the incoming data (Query, JSON, Form...) to the model

    5. Action method runs and returns view/data

    Some stuff is also executed before and after action method, like filters, middlewares... But this is the Flow...

    Also good practice is to put app logic (data access/algo) in separate .dll and maintain Layered architecture. I usually go for 4-5 layers:

    Data.dll <- Entities

    Dal.dll <- Repositories

    Core.dll <- Logic

    MvcProject.dll <- Asp here

    Also some Common.dll for shared stuff.
  • 1
    Patience.. Bro.. Patience
Add Comment