I am starting a new web project where using MVC framework seems appropriate.

My background is mostly with .Net / ASP.NET, so using ASP.NET MVC looks like the easiest way. I read that django is very powerful and easy to use, but I only have little experience with python.

Can anyone with experience in both frameworks tell me their perspective regarding how the two frameworks stand out?

share|improve this question
So, which one did you choose? – kzh Nov 1 '09 at 22:03
1  
For this project I am using ASP.NET MVC and it turned out ok. Besides that, I am using a lot of python (not django) for mini projects, scripts etc to build up my skills so I could use django for my next big project. – zvikara Nov 2 '09 at 4:42

closed as not constructive by tereško, Rikesh, hakre, vascowhite, RaYell Mar 15 at 9:47

As it currently stands, this question is not a good fit for our Q&A; format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

10 Answers

up vote 20 down vote accepted

Both Django and ASP.NET MVC allow you to create MVC applications, however those frameworks differs in many places.

Django is more mature and there are a lot of available components you can use. There is ORM so using database is very easy. Testing is simple and community is very responsive.

ASP.NET MVC and ASP.NET are completely different things. ASP.NET MVC is in a very first stage of development, it is not even in beta.

Although it is now just preview 5 this framework is quite good. However there are a lot of unsolved issues, for example it is not stated how you can reuse parts of applications. In Django there are plugins, in KohanaPHP there are modules.

Unit tests in ASP.NET MVC are very easy and you can use NUnit. From .NET 3.5 there is ORM for .NET framework called LinQ, which is very different to ORM in Django.

I think that Django is great, very mature and well designed. ASP.NET MVC is very young project and not all features available in Django you can find there.

If I were in your place I would check plugins for Django and see how they can simplify my project, if not much, I would choose ASP.NET MVC because I'm better ASP.NET programmer.

share|improve this answer
1  
Linq itself is not an ORM, to be precise, but indeed you have Linq To Sql and Linq To Entities available with ASP.NET MVC – aaimnr Jul 1 '09 at 9:59
15  
It is worth noting that while this may have been true in Sep '08, ASP.NET MVC has matured significantly since then. – pate Dec 14 '10 at 12:15
1  
Entity Framework is an ORM. nHibernate is another, subsonic is another... – bbqchickenrobot May 11 '11 at 15:37
And one more important thing: Unit testing in Django is (by far) much easier than doing the same in ASP.NET MVC3 – Oscar Mederos May 25 '12 at 8:35

I use Django and ASP.NET quite a lot (but not ASP.NET MVC) -- for me the decision comes down to how I plan to host the final site and what other parts of the framework I need.

If you don't know python, but do know .NET, it will be quite a drag to learn it all for this project if you want to make quick progress -- you will simultaneously need to learn a language, a web framework and the rest of the framework -- with ASP.NET MVC, you only need to learn the new framework. For Django, you also need to learn how to deploy, host and keep the site running (which means learning Apache and tools for dealing with it).

If you want to learn python, then I highly recommend using it with Django -- that's how I learned python.

share|improve this answer
2  
I agree, the decision is how you want to host the site. I am very familiar with asp.net and know C# extremely well. However, I have a number of web apps I want to work on and using asp.net with mssql is just too expensive. So, I've decided to use django. Learning apache and python has been great. – rksprst Nov 8 '08 at 20:50

I have a very little experience in ASP.NET, but I am active Django developer. To start working with django, you don't have to be experienced Python programmer. If you are generally oriented in web development, you will find yourself working with django in no time. Personally, I find ASP.NET much less new-user friendly and generally more complicated and harder to start using it without any knowledge.

Open some Python tutorials, use django book - it is a best start you can get.

share|improve this answer
Traditional ASP.net is often more difficult to get started with, but ASP.net MVC is a very different beast. I find the MVC model to be very elegant, and the ASP.net version is very good. – Eric Haskins Sep 19 '08 at 0:02
2  
Stay away from djangobook.com for now. It is extremely out of date. Instead, look at docs.djangoproject.com. – Ryan Duffield Sep 19 '08 at 4:52

I wholeheartedly agree with Lou Franco (but don't have the Reputation to leave a comment).

If you have the choice to do either I might go with django. I recently finished my first ASP.NET app and it was not a fun experience. However, I'm still naive as to django's ability to scale for larger applications.

For what it's worth, I think Python is just more enjoyable to code.

share|improve this answer

Django is eccellent and I do love python, but what really keeps getting me away from it is its ORM.

The fact that basically it is designed to create your DB and not to adapt to it cn lead to serious problems if you are not starting an application from scratch. Plus, still they haven't solved a major issue, that is keeping your model synched with the DB and dropping - modifying fields, altering tables etc can be a pain. Those are essential steps in easrly stages of delepements, expecially if you are just "experimenting" and you don't have detailed specifics.

I'm finding working with Linq + Entity models easy, fast and funny, on the other side.

share|improve this answer
2  
Django has solved the sync issue with South, the standard de facto for migration on Django: south.readthedocs.org/en/latest/about.html – chirale Oct 14 '12 at 12:58

I'm actually using ASP.NET MVC 3 for work (experienced C# programmer) and Django for my freelance projects. ASP.NET MVC3 is great, but in terms of ease, speed of development, community and overall performance, Microsoft platform is powerful but well - light years behind Django and I can't see it will change during next few years. Working with C#/MVC3 development team I wouldn't switch my freelance Python/Django platform to MS, no way :)

share|improve this answer

Disclaimer: I'm a professional ASP.NET developer with 5 years of commercial experience and I'm the head of development (ASP.NET 4) in gaming industry.

Python/Django wins hands down, no doubts, full stop, end of story :) First 3 years I had some doubts, now I don't have any. It sounds very radical, but that's my thoughts.

share|improve this answer

If you know .net, use ASP.net MVC. If you know Python use Django.

The only possible issue is that ASP.net MVC is still in beta, so you run the risk of finding bugs, but I think this site proves it is an effective and functional framework.

share|improve this answer

Have checked out MonoRail from the Castle Project? It's one of the first MVC implementations for ASP.NET that provides a very nice set of features.

As for ASP.NET MVC, right now it's in a pretty good state to do development with. I'm currently using it for a couple production websites (and yes, even stackoverflow is built with it) and had minor issues (mostly upgrading between previews).

share|improve this answer

ASP .Net allows -- but doesn't require -- MVC design. A design pattern like MVC is easy to slip away from.

First, MVC requires a proper object-oriented Model. Something that VB isn't very good at. Often, the first short-cut is to use a relational model and SQL queries and leave it at that. In an OO world, class methods that are part of the model are sometimes put into stored procedures in the database, other times their part of ASP pages, and some model-level features wind up in separate VB modules.

Python is OO. Django separates the model completely as stand-alone Python modules. You can easily be absolutely sure you have all the right method functions in your model. You never need to resort to stored procedures.

Second, MVC requires a clear distinction between View (as in HTML) and Control (as in the the application processing and navigation.) Sadly, ASP allows you to put anything in an ASP page; too many people start to put everything into their ASP code. Eventually, there's no real distinction between View and Control.

Django separates View and Control. The web site's view (or presentation) is via templates. The rest of the control is "view functions".

The worst case scenario is an ASP site where the essential processing is scattered randomly through ASP pages, VB modules, stored procedures.

The fundamental Django model is URL maps to a view function. The view function returns a template with some values to be displayed in the template. Two very simple things that lead to very clean separation between model, view and control.

Some people complain that Python's template language is "brain dead". Partly this is just their frustration at the absolute separation between presentation via templates and processing in view functions. You are absolutely forbidden from doing anything that even smells like processing in a template -- just present the data in HTML.

Good design work can be done in ASP -- you just have to impose the discipline on your own. I find it easier to do good MVC-oriented design in Django because the framework encourages and supports it.

share|improve this answer
Keep in mind that they are specifically addressing ASP.net MVC, which, while still using the ASP.net view engine, allows you to do MVC in ASP.net as easily as any other framework. – Eric Haskins Sep 18 '08 at 23:59
The question is one of "allows" vs. "encourages". I'm not 100% convinced that that ASP .Net framework is strict enough. – S.Lott Sep 19 '08 at 15:19
1  
umm... ASP.NET is not the same as ASP.NET MVC. The MVC framework addresses a lot of the issues that you talk about. – Adhip Gupta Oct 13 '08 at 21:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.