Possible Duplicate:
Biggest advantage to usin开发者_JAVA技巧g ASP.Net MVC vs web forms
I'm soon gonna develop a reporting solution. Would be glad if some one let me know , which is the best way to go. Web forms or MVC?
I've written a reporting application using ASP.NET MVC. It works very well for that, but so does web forms.
I think this is a very subjective question that will depend greatly on your skills, experiences, and preferences.
It is more important that you are able to create the application using the technology. I can tell you to use one or the other, but it is really more of your preference than anything else.
I do a lot of unit testing, and I like to have a lot of control over the code being executed, so I choose MVC usually. If you'd rather plug in some easy-to-use controls then web forms is the way to go. There are plenty of packages out there specifically written for reporting; free and commercial.
Are you familiar with both MVC and Web Forms?
I really wish I'd started web development with MVC. WebForms just hides too much away from you, and you can get very lazy if you get used to ViewState
and ControlState
.
When you write code knowing the web is stateless you write much better code, so I'd go straight to MVC. MVC makes you think about what you're writing and what you're displaying and it's just so much cleaner than WebForms.
I started with ASP.Net WebForms and it was very easy to get into because I'd been development for years with WinForms. WebForms is practically WinForms for the web as that's what Microsoft were aiming for in order to make the transition easier for their existing WinForm developers.
I really wish I'd just been thrown in at the deep end when I moved to Web Development, because nowadays I feel behind the times because my MVC ability is still growing. I start all new projects with MVC now and I detest returning to legacy WebForms applications.
this is a highly subjective area where there are 3 sides - those who want MVC, those who want webforms and those who are fence sitters.
in my opinion it is best to do some reasearch into the benefits of both the technologies and then also the drawbacks as well
try this link for some initial debates on the subject
http://blog.gadodia.net/choosing-between-webforms-and-mvc/
From what I have see people work with the one or the other and rare with both.
So its difficult to say what is better because both sides think that the side that they work is the better one.
I work for example with Web forms, and have create everything I need fast and easy with out any special limits. I have never go with MVC so I do not understand the other side nether can compare it with the WebForms. Also working all this years with WebForms I have learn too many trick on WebForms that I am wondering how to convert them on MVC.
So my point is, that if you are good, both sides are good. The one is a blond women, and the other is a brunet woman. Select one and married :)
I would base your decision on how much granular control you want to have over the elements of your application and whether or not you wish to make use of the MVC design pattern i.e. if you have several developers working on this project and you wish to follow a convention. There are many drag and drop controls (GridView, DetailsView) bundled with Web Forms that are great for creating report based web apps quickly that don't exist with the MVC Framework. Using MVC will likely increase the development time of your project.
Lack of ViewState is not a reason to pick MVC over Web Forms. If you understand ViewState it is possible to create an app with Web Forms that has little or no ViewState. A simple Google/Bing search will help you find out how to disable and/or reduce ViewState.
I like to use MVC for greater control over HTML (especially for heavy AJAX websites) and for the design pattern convention.
If you haven't yet heard of it, I also recommend taking a look at "Crystal Reports".
better go with MVC
is a good option now a days
精彩评论