views:

726

answers:

3

I currently develop with Django, but want to be ready when a future client inevitably requests a site done in ASP.NET MVC. While most of the structure and flow of ASP.NET MVC is more or less identical to Django and RoR, the one part I'm not sure about is the Apps methodology Django employs to make code reuse easier.

Is there an equivalent to Django apps in ASP.NET MVC? That is, can I create a feature, like tagging, comments, calendar of events, simple blog, etc. and bundle it up, making it portable to other projects with a minimum of glue code required to integrate it? Perhaps some kind of plugin or module system?

+4  A: 

Django doesn't follow the traditional MVC pattern, since they advocate that in the Web world, their MTV is more suitable. In the overall, I prefer Django over Rails because of the django apps. You can do almost the same in RoR with the Rails vendor plugins, but it's not the same.

ASP.NET follows RoR structure, and therefor you don't have the reusable apps. If you check the folder structure in a MVC project, you don't even find the RoR's Plugin folder, so I bet you should do it VisualStudio-Like.

Create a reusable app, as a separated project, include references for that project in your main one, and in your Route file, just redirect to the other project's controllers.

Alcides
Good answer. I saw the ASP.NET MVC folder layouts in some tutorial videos and instantly wondered if I had to clutter them up with overlapping apps. The VS Projects methodology is solid and understood, so I'm satisfied.
Soviut
ASP.NET MVC2 support area which is sort of reusable apps.
Robert Mao
+1  A: 

This might be of interest as well: App Areas

rodbv
+1  A: 

we've tried to do something similar, albeit from a different angle. we use compositional controllers for increased reusability in bistro, and an ndjango as the templating language. what we start to see is controllers become more granular, and as a result less dependent on where they reside - more componentizable.

kolosy