locked
Main difference between regular webapplication, mvc3 and mvc4. RRS feed

  • Question

  • User-611381049 posted

    Currently i managed to finish developing my web-application by using the regular web application file in VS2012. Soon after finish my 

    webapp, i began to realize the existence of MVC. I briefly read it through but i don't really get what it means. Hence, i would like to ask what

    is the MAIN difference with some advantage and disadvantage among the 3. It seems like MVC is much better. But if so, is it possible for me

    to directly import my webapp codes to MVC? or how do i transfer from one to another?

    Monday, July 1, 2013 10:50 AM

Answers

  • User281315223 posted

    I've used this similar list of advantages previously, but I'll bring it up again here to help you out : 

    Each of these technologies have their own advantages and disadvantages and this can highly depend on which of them you are more familar with (familarity with a specific technology will always allow you to develop applications and projects much quicker).  Both are completely capable of accomplishing the same thing, but use different design patterns to get it done.

    That being said, this is a heavily discussed topic that you can find scattered all over the net, but here are a few of the major advantages of  both of them (I am coupling MVC3 and MVC4 together since MVC4 is basically MVC3 with several additional features and functions) : 

    Advantages of Web Forms

    • ViewState - A ViewState that allows you to persist objects and values throughout your application.
    • Rapid Application Development - Very little learning curve, user-friendly and easy to get an application up and running quickly.
    • Controls and Toolbox - A huge Toolbox with basically any major Control that you would need for developing applications.
    • Maturity - Web Forms have been around over 10 years so there are alot of communities and resources available and many bugs and issues have been addressed.
    • Code Generation - Web Forms makes it quite a bit easier to not worry about wiring up different events and methods as much of this can be handled automatically.
    • Familarity - Developers coming from a Windows Forms background will find themselves very familar with Web Forms and can easily jump into development.

    Advantages of MVC (both MVC3 and MVC4)

    • Seperation of Concerns - The MVC Paradigm of Model-View-Controller allows you to more easily seperate all of your concerns within your application. This can lead to improved scalability within applications.
    • Testing - MVC is designed and built for Testing-Driven Development and allows for applications to be very easily tested to help secure against error and unexpected behavior
    • Integration with Client-Side Tools - The MVC pattern easily allows client-side tools such as jQuery to be seamlessly integrated. This can allow you to create very rich user interfaces for your applications.
    • Statelessness - Although one of the main advantages of Web Forms, this allows you to adhere to a more stateless format consistant with the rest of the web.
    • Control and Flexibility MVC allows developers to have complete control over their applications as the developer doesn't rely on Controls to automatically generate the appropriate HTML, which after switching to MVC can often be seen as "bloated". The developer will write their own HTML instead of having it generated for them.
    • Search Engine Optimization - The use of RESTful URLs within MVC makes it more friendly for being accessed through search engines.

    I was a pure WebForms Developer when I first began my professional career and I loved how easy it was to quickly throw together applications, however after making the switch to MVC I would cringe at the thought of having to go back. Web Forms can be a great platform to learn and develop on, but if you really want to have complete control regarding what is going on within your application than I don't really think Web Forms can compete with MVC.

    Ultimately though, there is no "best" or "right" answer and it is up to you to decide which of the technologies is right for the task at hand.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 1, 2013 5:06 PM

All replies

  • User197322208 posted

    MVC4 is adding some features to MVC3( bundling, mobile).

    But MVC over webforms - for me is testability. But take some tutorials from http://www.asp.net/mvc and see yourself

    Monday, July 1, 2013 3:18 PM
  • User281315223 posted

    I've used this similar list of advantages previously, but I'll bring it up again here to help you out : 

    Each of these technologies have their own advantages and disadvantages and this can highly depend on which of them you are more familar with (familarity with a specific technology will always allow you to develop applications and projects much quicker).  Both are completely capable of accomplishing the same thing, but use different design patterns to get it done.

    That being said, this is a heavily discussed topic that you can find scattered all over the net, but here are a few of the major advantages of  both of them (I am coupling MVC3 and MVC4 together since MVC4 is basically MVC3 with several additional features and functions) : 

    Advantages of Web Forms

    • ViewState - A ViewState that allows you to persist objects and values throughout your application.
    • Rapid Application Development - Very little learning curve, user-friendly and easy to get an application up and running quickly.
    • Controls and Toolbox - A huge Toolbox with basically any major Control that you would need for developing applications.
    • Maturity - Web Forms have been around over 10 years so there are alot of communities and resources available and many bugs and issues have been addressed.
    • Code Generation - Web Forms makes it quite a bit easier to not worry about wiring up different events and methods as much of this can be handled automatically.
    • Familarity - Developers coming from a Windows Forms background will find themselves very familar with Web Forms and can easily jump into development.

    Advantages of MVC (both MVC3 and MVC4)

    • Seperation of Concerns - The MVC Paradigm of Model-View-Controller allows you to more easily seperate all of your concerns within your application. This can lead to improved scalability within applications.
    • Testing - MVC is designed and built for Testing-Driven Development and allows for applications to be very easily tested to help secure against error and unexpected behavior
    • Integration with Client-Side Tools - The MVC pattern easily allows client-side tools such as jQuery to be seamlessly integrated. This can allow you to create very rich user interfaces for your applications.
    • Statelessness - Although one of the main advantages of Web Forms, this allows you to adhere to a more stateless format consistant with the rest of the web.
    • Control and Flexibility MVC allows developers to have complete control over their applications as the developer doesn't rely on Controls to automatically generate the appropriate HTML, which after switching to MVC can often be seen as "bloated". The developer will write their own HTML instead of having it generated for them.
    • Search Engine Optimization - The use of RESTful URLs within MVC makes it more friendly for being accessed through search engines.

    I was a pure WebForms Developer when I first began my professional career and I loved how easy it was to quickly throw together applications, however after making the switch to MVC I would cringe at the thought of having to go back. Web Forms can be a great platform to learn and develop on, but if you really want to have complete control regarding what is going on within your application than I don't really think Web Forms can compete with MVC.

    Ultimately though, there is no "best" or "right" answer and it is up to you to decide which of the technologies is right for the task at hand.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 1, 2013 5:06 PM
  • User-611381049 posted

    To add on, is it possible to "import" my regular web-app file as a MVC4 file?

    Monday, July 1, 2013 8:57 PM
  • User281315223 posted

    Do you mean using your ASPX Web Forms (from tradtional Web Applications) into MVC projects?

    Yes, this is completely possible. You'll typically just need to add the appropriate routing within your MVC application so that it knows when to use an ASPX page and how to properly route to them. (Related Article on Mixing ASPX and MVC Applications)

    Tuesday, July 2, 2013 12:23 AM