tags:

views:

17

answers:

1

For larger apps, where do you guys typically place your CustomModelBinders? Are they grouped with your controllers, your view, standalone in a seperate library? Just curious since ours does much of the heavy lifting (knows about form collections and calls repository models).

+1  A: 

I put them in with controllers. But then again, I don't have many, and they're lightweight. I certainly would not put them with views; they bind to controller args and within controller actions. So either with the controllers or by themselves makes sense, but not with views. A separate assembly would be overkill unless you need to share with other web apps.

Craig Stuntz
Just curious, why not the views. Wouldn't the ViewModel theoretically be the interface of a view?
RailRhoad
The view model is related to the view, sure. But the view doesn't need any knowledge of the model binder to do its work. The controller, on the other hand, cannot work without it.
Craig Stuntz