I asked this question:
Is ASP.NET MVC destined to replace Webforms?
and a few answers were that if the website were public/Internet to use MVC, but if it were internal to use WebForms. I saw some of the reasons for it but some of them didn't really help me understand why this rational would be so.
I was hoping for comments. Why would I not want to use ASP.NET MVC for everything besides a small one off website? Why would Internet or Intranet matter?
Also, I know one tool doesn't do everything. I do not want to use webforms, not that I think I cannot or that it is somehow "bad." In this question, I am asking specifically about MVC and why it would matter for the location of the website (public or private.)
Thank you.
Asp.Net Web Form has built-in data controls and best for rapid development with powerful data access. Asp.Net MVC is lightweight, provide full control over markup and support many features that allow fast & agile development. Hence it is best for developing an interactive web application with the latest web standards.
The ASP.NET MVC framework offers the following advantages: It makes it easier to manage complexity by dividing an application into the model, the view, and the controller. It does not use view state or server-based forms.
Luckily, the answer is yes. Combining ASP.NET Webforms and ASP.NET MVC in one application is possible—in fact, it is quite easy. The reason for this is that the ASP.NET MVC framework has been built on top of ASP.NET.
If you want to have a faster development cycle than Web Forms might be the best option. If time, money, and energy to develop an application from the scratch is not a constraint then MVC could potentially be the better option.
I think I have an idea as to why that internal vs external distinction came up in your previous question.
Using MVC for external websites affords you the flexibility needed to support more browsers and makes developing web standards compliant sites easier. MVC requires a little bit more work to do some of the same things as Web Forms, but you have more control over what is output to the client.
Using WebForms for internal apps is suggested because you have full control over what browsers are used on your network. Also, internal apps are typically not given the same budgets as external sites. Web Forms allows you to whip together a database grid, paging, sorting, etc in a matter of minutes by dragging and dropping code to an ASPX page. The motivation I believe is purely money and time based.
I however do not think that this line in the sand is a good one to make. I know there are some websites that I have worked on with WebForms that required a lot of hair pulling that simply wouldn't have happened if I used MVC. But I also have some sites that didn't need the level of flexibility, so I used WebForms.
The biggest advantage that I see with ASP.NET MVC is AJAX. It is easier for me to deal with jQuery AJAX requests when using MVC as opposed to WebForms. I am also a control freak, so using MVC satisfies that aspect as well...
The location is not very important, what was being explained was that a typical intranet website has the following properties:
So developing it with MVC can be overkill, instead of slapping together something with WebForms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With