views:

1862

answers:

15

I know a bunch of people that are really enjoying the improvements that ASP.NET MVC 2 made over the first release. I have just started to migrate our MVC 1 project over and so far areas has totally cleaned up the subfolder mess we had in our large scale application. As I dive deeper into all the improvements and changes that were made I still keep thinking to myself man it would be nice if they had x in this release. For instance, I would love it if they had some sort of dependency injection built in instead of having to use third party solutions.

My real question is now that ASP.NET MVC 2 is out in the wild, what features do want/wish the team had implemented and hope they will implement for ASP.NET MVC 3?

EDIT

Looks like dependency injection is built in for the first preview release of ASP.NET MVC 3! I like the features added so far. ASP.NET 3 preview one is out!

+6  A: 

I really wish they'd add the following:

  1. Spark-style conditionals and loops using html tag attributes.
  2. Updated: Visible project property to toggle compile-time validation of views.
  3. Something to verify/validate that my routes are correct.
  4. Membership provider solution that uses int instead of Guid for identification and allows mapping profile fields to a custom table rather than the generic but slow default.
  5. Lambda-based helpers to avoid magic strings (currently in MvcFutures)
  6. T4MVC template to auto-generate strongly typed helpers
  7. Project wizards or templates to get a template that is already setup for IoC and similar concerns, preferably with a selection dialog to choose which framework to use for IoC, unit testing, etc.
  8. Additional attributes (both filters and validation).

Hmmm, that's all I can think of right now :)

Morten Mertner
1. You can substitute the Spark view engine for some of your views, and it will run side-by-side with your conventional ASP.NET MVC view engine views.
Robert Harvey
2. If you do this, you give up a certain degree of flexibility (the capability of changing views on the fly while the application is still running). Are your views really so complicated they require compile-time validation?
Robert Harvey
7. That would be very nice.
Robert Harvey
For #2 you can compile your views now, you just have to edit the project file: http://stackoverflow.com/questions/383192/compile-views-in-asp-net-mvc
Steven Lyons
You can already have your views be compiled: http://devermind.com/aspnet/aspnet-mvc-tip-turn-on-compile-time-view-checking/
amurra
1: didn't know that, thanks. 2: no, they're usually quite simple, but it takes quite some time to fire up the browser, so I'd prefer to increase the compile time and have as few errors left as possible. Not everybody will want this though.
Morten Mertner
Thanks guys, will take a look.
Morten Mertner
I like #5. I hate magic string. That's doesn't take advantage of compile-time validation. Where this is in the MvcFutures ? Any link or blog-link entry ?
Melursus
If you get the sources then it's included. Not sure about the binary downloads. Get the source here: http://aspnet.codeplex.com/releases/view/41742
Morten Mertner
+4  A: 

Tooling (T4 templates) to create Moq objects for unit testing would be very cool. Testing for certain objects in the framework is unnecessarily complicated, and having the ability to code-gen some of this would be very beneficial.

Robert Harvey
+1 from me on this.
Morten Mertner
++ "unnecessarily complicated"
redsquare
+10  A: 

I think MVC 3 will not be too dramatic with it's improvements, but more steady and gradual.

The ASP.NET MVC 3 Roadmap has a snapshot of what the team are apparently looking at implementing in the next release and some of the points are very interesting.

I think my favourites from that list would probably be:

  • More AJAX Helpers: This'll bring the framework more in line with the Webforms world which has all these helpers already and to some degree, acts as a barrier to some people taking up the platform.
  • More Dependency Injection stuff - for those that want it, this is great. :)
  • Improved Caching support is the big win for me. Having that built right into the framework would be a great benefit and could result in some nice performance savings.
  • Additional ValidationAttributes wouldn't go a miss either. While the facility is great to add them, a good library of the common ones, such as Email and PropertiesMustMatch and so on.
Amadiere
+4  A: 

I would like:

Tooling

  • An alternative listing view using ajax e.g. using jqGrid (implementing sorting, pagination, search)
  • Enhancements to CRUD Pages detect entities relationships for entity framework classes, and to use another set of components based in fields type e.g. just as Dynamic Data does : )
SDReyes
+1 for better CRUD tooling.
FreshCode
+3  A: 

As ASP.net MVC 3 will be .net 4 only, I'd like to see some stuff around asynchronous controllers and all the other new async/multithreading functions that .net 4 brings.

Michael Stum
+1  A: 

I'd like helpers that automatically scaffold index views. Maybe something like IndexDisplay(), IndexDisplayFor(), and IndexDisplayForModel().

DanM
+2  A: 

I'd like to see built-in support for things like IronRuby

Jaco Pretorius
+1 for Ruby support :)
ashes999
+1  A: 

I'd like templating to auto-generate buddy classes on any given model.

Chao
+4  A: 

I would like the complete removal of all magic strings.

mxmissile
+1  A: 

MEF support would be nice.

fkode87
A: 

more controls and helpers would be really nice, especially an (ajax) grid.

Rookian
I hate word 'control', it just reminds me of stuff like viewstate, postback and things I do at work now :(
Jarek
A: 

I would like to see areas assembly support (I mean many assemblies with different areas) + dynamic loading, something like plugins.

Edit: And we have preview 1 today: http://weblogs.asp.net/scottgu/archive/2010/07/27/introducing-asp-net-mvc-3-preview-1.aspx

Anybody happy ? :>

Jarek
+1  A: 

i also use simplicity feature like most of thing without helper such as html-helper i thing that development in asp.net MVC 3 is better way to learn MVC 3 in future.

steven spielberg
A: 

Asp.net MVC 3 Preview 1 was just announced as well at http://weblogs.asp.net/scottgu/archive/2010/07/27/introducing-asp-net-mvc-3-preview-1.aspx

KallDrexx
A: 

The two things I'd like to see most are straightforward dependency injection in views, filters, etc., and (I know this is supposedly on the way with the Razor view engine) is to be able to test my views in isolation from the ASP.Net pipeline (perhaps including doctype validation and/or some type of JavaScript compiling/validation).

Here are a few other ideas:

  • It would be nice to be able to package up a UI component (views, templates, view models, etc.) for reuse across multiple projects. I'm guessing this is currently possible somehow, but I just don't need it badly enough to figure it out myself.
  • The idea of controllerless actions intrigues me, particularly from a SRP standpoint.
  • Better support for the Post-Redirect-Get (P/R/G) pattern... it just seems like there should be intrinsic support for this very important pattern.
jrnail23