What is the best ASP.NET MVC framework/architecture and why? - asp.net

There are a number of frameworks out there for building ASP.NET MVC applications (e.g. sharp architecture, etc...)? In defining what a framework is, I'm thinking along the line of Ruby on Rails ... a stack of technologies that enable you to build all tiers of your application quickly, efficiently and with both testability and quality in mind.
So, in your humble opinions ... which is the best and why?
In particular I'm looking for an architecture that supports an RIA type front-end that takes full advantage of JQuery and/or ExtJs on the client.

IMHO the ASP.NET MVC framework is the best framework at the moment. The reason? Well, basically it is the only framework I've tried that allows you to depart completely from the WebForms methodology. Please note that I have tried a relatively few number of MVC frameworks and it's not like I'm saying that the ASP.NET MVC framework is perfect or anything.

Related

Confusion on using asp.net or mvc

Ive been confused about ASP.NET MVC.
As some said, MVC is better than ASP.NET. As some said, they are completely the same thing.
And my colleges debate that MVC is just an extension of asp.net, where asp.net is already in the form of MVC.
In fact I am starting web developing from scratch. If someone might help to clear the fog front of me, it would help a lot.
All ASP.NET web frameworks are build on top of Microsoft ASP.NET Framework. The unique feature of Web API is that it can be used with both MVC and WebForms applications to provide truly restful HTTP services.
Regarding the choice of suitable Asp.NET framework: you may get more information from official source - www.asp.net.
General rule of thumb is the architectural design how you want to build your application.
ASP.NET MVC promotes a cleaner separation which makes the developer think more in depth about design and code separation than traditional web forms.
There are endless debates about what is better but true benefits of ASP.NET MVC as
testability
more control over the rendered HTML
separation of concerns. However with MVC there is much more to learn for the developer.
ASP.NET WebForms - will always be around because some see it as a rapid application development tool. Just drag and drop and let ASP.NET handle the posting, state etc
ASP.NET Web API - is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
All in all, each of them has certain business solutions to be considered as required.
References to look for comparison:
ASP.NET MVC vs WebForms: speed and architecture comparison
ASP.NET Roadmap: One ASP.NET – Web Forms, MVC, Web API, and more
ASP.NET is the name of the overall web framework. There are a few different technologies that are built on ASP.NET. Two popular examples of these technologies are WebForms and MVC.
WebForms promotes a programming model that looks a lot more like Windows Forms. It attempts to abstract away the stateless nature of the web, and encourages you to use server-side controls instead of HTML. Because WebForms was the primary way to write web applications on ASP.NET for a long time before MVC came out, you'll often see people talk about "ASP.NET" as the same thing as WebForms. This is part of the reason for your confusion. ASP.NET WebForms is very different from ASP.NET MVC, but they are both built on ASP.NET.
ASP.NET MVC gets away from server-side controls. It eliminates the abstractions, allowing you to have closer control over the actual HTML that gets generated. For developers of modern applications, this is very useful because it makes it much easier to use AJAX and rich client-side javascript.
(Humble Opinion incoming)
ASP.NET (in terms of using Webforms) is programming the web for a WinForms developer. You "bind" events, you have "controls" and everything (sessionstate) is stored in a huge hidden field within the page so it knows where it left off from the previous call. You rely heavily on this information being present which is why everything you do needs to reside in that master form wrapping the entire page.
On the other hand, MVC is bringing C# .NET programming back to the web the way the web was intended. No bloat, no hidden fields, no heavy bindings. It's brings everything back to the classic "i have this form and now I need to process it". Arguably, the real magic is the routing methods and the "automatic binding" of submitted fields to an object. (if fields x, y & z are submitted and your action is looking for FooBar with the properties x, y & z it's automatically converted for you.
ASP.NET is common to both WEB-API and ASP.NET MVC. I assume you wonder about MVC or WEB-API.
MVC is a controller / model based with Views. Although the controllers can be used for AJAX json purposes. MVC is a good way to build a serious Browser based Application. The WEB-API allows you to build simple http server features, not necessarily Browser related. Good for REST style programming. Very flexible and a good alternative to WCF services. The are good tutorials on Both on the official ASP.NET site. START here http://www.asp.net/get-started
choose depends on your project n you. I suggest you to choose MVC because its productivity is very high we r using it since 1 year and found better than webforms.
for more knowledge please visit http://www.asp.net/mvc
The choice depends completely on you, I have been developing MVC application since 2010, its going to be over 2 years now have worked with almost all the versions of MVC both with Razor and aspx view. I have also worked on ASP.Net webform based applications.
With MVC you will not get built in controls, you will have to develop every control you want to use, you will have to rely mostly on html controls, while with web forms you will get advantage of using built in controls, Even getting help from other developers in your surroundings may be easy for webforms as you can easily get a webform developer.
But on the other hand with MVC the maintability is very high. As for as productivity is concerned, its very high once your are accustomed to it, initially it will be low as you will be in learning phase. Don't forget to use Entity Framework.
You may also consider developing your App using WebAPI, if it suits your scenario.

ASP.NET MVC vs Routing

I'm deciding between using ASP.NET MVC, or standard ASP.NET Web Forms with URL routing for my application.
As far as I can tell, ASP.NET Web Forms with routing gives me clean URLs and I'll be able to use ASP.NET as I have been in the past. However, I've heard good things about ASP.NET MVC, which would gives native support for URL routing.
How does the workflow from ASP.NET Web Forms differ from ASP.NET MVC? Are there any major advantages to using MVC as opposed to web forms?
A good place to start is here as it shows strengths and weaknesses. There was also an article real recent in Dr Dobbs, Information Week or one of the other free mags I get that talked about when not to move to MVC. MVC helps enforce good process with technology (at least better than webforms) and is very condusive to SEO friendly URIs.
If I were biting this off, it would be MVC all the way, but I do not know your project, your team's knowledge, etc.
Whether you ultimately decide to go with WebForms or MVC, you should definitely learn MVC either way. Though Microsoft has made it pretty clear that development will continue on WebForms, many (including many here) already consider it outdated. True or not, MVC likely points the way to the future of .NET web development.
Also, having recently finished my first MVC project after spending some time in web and windows forms, I can attest to the learning curve - and parts of it are steep. But in the end the effort pays off. And then you'll have a personal perspective on the ups and downs and differences between the two.
I consider webforms a legacy product, mvc is a better fit for modern webdevelopment. But...there's a learningcurve, especially when you're coming from webforms. So, if time is limited, stick to what you know.

Asp.net MVC VS ASP.net WebForms?

I am starting a new project in VB /.Net Framework 2.0 for a company corporate website with data driven forms. So should I go further with Asp.net MVC or Asp.Net web forms and WHY ??? We are not ready for Ajax now but later.
And also we have DevExpress components.
Actually I see ASP.NET MVC as next generation in that it is an evolution - trying to be a better programming environment, as software development for web apps asks for something more testable.
It is a huge beast. Decide based on features whether you need it. MVC has less documentation and is a lot harder to master thanks to a less RAD approach, but it seems that once you are in, it will be quite a better experience. If you have a web application (like stackoverflow.com) then it may be a good approach.
DevExpress components - have fun... throwing them away. Like most ASP.NET components they will not work or only work very partially. Totally different approach.e
ASP.Net MVC is not "next generation" ASP.Net. It's an alternative approach to design that can be more beneficial depending on the kind of project you're working with. Without more information about the particular type of project you're working on no one can give you any informed recommendations.

How can I implement my own version of a MVC framework in ASP.NET?

I would like to know how I can go about implementing my own version of a MVC framework in ASP.NET? I know there already is Microsoft provided ASP.NET MVC framework, but I want to learn MVC and thought the best way would be to implement my own flavor of a MVC framework on top of ASP.NET. Any thoughts / guidance ?
Also, can anyone point me to a page where I can learn more about how microsoft implemented ASP.NET MVC ? I'm more interested in learning about the under the hood plumbing that goes on to implement the framework on top of asp.net, do they use HttpHandlers / HttpModules ?
Thanks.
You want to learn about a concept by reinventing an existing framework that already does that concept better than you will? That sounds like quite a rabbit hole to venture into.
Why not learn MVC by learning ASP.NET MVC? What's your reasoning for why that's not a valid way to learn the concepts? Learning a proven framework will be a much better approach than what you're considering.
EDIT: One other thing to consider. Knowing how to use ASP.NET MVC (or Rails, or insert-MVC-framework-here) would be a much more useful and marketable skill than the ability to roll your own MVC framework from scratch (even though that might prove more intellectually stimulating).
You can get the source for ASP.NET MVC from here: http://aspnet.codeplex.com/releases/view/41742
MVC is an architectural pattern that is not dependent on ASP.NET or any framework.
I would not advise trying to implement it on top of ASP.NET if you are just looking to learn about the Model View Controller pattern. ASP.NET will impose too many implementation details when you should instead be concentrating on the overall concept such as separation of concerns, single responsibility.
The ASP.NET MVC framework is simply an implementation of the Model View Controller pattern that runs on top of ASP.NET. Like most implementations it contains variations on the basic MVC pattern to better suit web applications and the underlying framework. So trying to re-implement ASP.NET MVC will give you a non-standard understanding of the pattern.
Martin Fowler explains the fundamental ideas of MVC in the book: Patterns of Enterprise Application Architecture.

Is there any good open source ASP.NET application using MVP pattern

I'm trying to upgrade my existing web forms application to upcoming framework and rewriting couple of workflow as per the new business requirements. I want to introduce TDD based development in this project but after some investigation found that ASP.NET MVC will not help me as my web existing application is using lots of Infragistics UltraWebGrid controls for grouping, paging, column moving etc and there is no good alternative grids in ASP.NET MVC world. I also need to support blackberry in this release. So, am planning to use both MVP for desktop client and MVC for blackberry client in same project.
I would like to know if someone has done something similar in their project and links to any good open source asp.net applicaton using MVP pattern. I dont want to use WCSF as it is too heavy weight. I saw their MVPBundle sample application but it lacks use of modern tools like IoC (Unity or StructureMap), Mocking framework etc.
Regards,
Sunil
The latest incarnation of Nerd Dinner has mobile support in an ASP.NET MVC app.
I'm not sure about the JS support on a black-berry but there are quite a few grid/repeater type controls and mechanisms available using either jQuery or the forthcoming ASP.NET AJAX 4 templating controls.

Resources