1

Goals:

  • Be able to rapidly develop an application in MVC3
  • Have validation in one place (ie probabaly the model)

where I already have a database

Question: What is your current toolchain of choice for this?

I've spiked out:

MvcScaffolding - http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/

However this needs EF CTP5 if you use a model first strategy

Couldn't figure out how to get Validation (DataAnnotations) easily from the model eg a [Required] field

EF Model First - again DataAnnotations seemed hard. Entity Framework - DataAnnotations

LightSpeed - http://www.mindscapehq.com/ Current ORM of choice.

Community
  • 1
  • 1
Dave Mateer
  • 6,588
  • 15
  • 76
  • 125
  • may want to take a look at S#arp Architecture, particularly the latest 1.9 release - http://blog.sharparchitecture.net/ it supports NHibernate, Fluent NHibernate and NHibernate validation out of the box and also includes T4 templates for generating controllers and models (possibly also Views - can't remember) – Russ Cam Mar 14 '11 at 23:32
  • "Use validators" this doesn't sound like it should be a goal of the system, but rather a means of achieving a goal. Goals of a system are usually driven by some sort of business need. – Brian Ball Mar 14 '11 at 23:51
  • thanks @Brian I've made a change to the text – Dave Mateer Mar 15 '11 at 00:30
  • It would be nice to have them all in one place, but that rarely happens, you tend to have validators at the UI level (type validation, range validation, etc), and, unless you have a really simple domain model, there is also more complex validation that happens on your entity (the entity in state X doesn't support value Y, etc). Unfortunately there is no silver bullet and it often depends on how much and how varied your validation is. The best you can generally hope for is to not duplicate the same validation multiple times. Good luck! – Brian Ball Mar 15 '11 at 03:03

1 Answers1

0

Here's my toolchain:

I also built a sample project structure using those frameworks.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • Awesome stuff Darin - thanks. I've ended up going with LightSpeed (Mindscape) and MVC3 / Razor. LightSpeed validation I am using. @Brian made a good point above that rarely does a scaffolder help in larger projects.. however it has been super useful for me as a starting point. – Dave Mateer Mar 23 '11 at 10:10