1.1.1.MVC Architectural

1.Model

  • Application data and behavior in terms of its problem domain, and independent of the UI

  • Example

    • movie, customer, rental , transaction -> can use to different application

2. View

  • The HTML markup that we display to the user

3. Controller

  • Responsible for handling an HTTP request

  • Example:

    • 當一個request: /movies/delete/1進來時, 將會由MoviesController.Delete(int id)來處理

4. Router

  • Selects the right controller to handle a request

  • Example:

    • vidly.com/movies -> router -> MoviesController

Last updated