What is an MVC framework and why is it necessary/useful?

前端 未结 9 775
自闭症患者
自闭症患者 2021-02-02 03:01

I know that an MVC framework allows you to separate business logic, data base access and presentation, but why do we need a framework to do this.

Can\'t we just keep ou

相关标签:
9条回答
  • 2021-02-02 03:37

    Perhaps this is just a linguistic thing. I've seen "frameworks" referring to themselves as a DSL -- Domain Specific Language.

    And you don't need a framework But here's something to consider: You already know for a web app you're going to want to do a few common things... route URLs, render pages, etc. Why re-write it all? For other problem domains you'll have generic things to do as well.

    0 讨论(0)
  • 2021-02-02 03:38

    Hai Friends There are somemany types of architecture frame work has been there,firstly i know 2tier and 3 tier frame work ,the 3 tier and mvc ,entity framework are same but in different name's,so study a good background in any one architecture there fore if you went to any multinational companies ,you can easly score/highlight to your carrer.

    Model View Controller or MVC as it is popularly called, is a software design
    pattern for developing web applications. A Model View Controller pattern is made 
    up of the following three parts:
    
    **Model** - The lowest level of the pattern which is responsible for maintaining data.
    
    **View** - This is responsible for displaying all or a portion of the data to the user.
    
    **Controller** - Software Code that controls the interactions between the Model and View
    
    0 讨论(0)
  • 2021-02-02 03:43

    An MVC framework is a framework written to split up the the business logic, database access and presentation.

    This is very useful in most web applications, and now lately into software/desktop applications.

    This is due to the fact that following the MVC model, your code will be much clearer, cleaner and you keep your application DRY (Do not Repeat Yourself).

    You can write your own classes and separate them into Model, View and Control. But again, you will need a framework to help you in accomplishing certain tasks. Like a List control in ASP.NET, or PHP framework being able to help you translate text between languages and so on. (Oh why reinvent the wheel?!)

    0 讨论(0)
提交回复
热议问题