views:

1883

answers:

15
+10  Q: 

Django or RoR

I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly.

I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django?


Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion?


Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.

+8  A: 

If you want a quick stack check out Sinatra.

Django will make more sense faster. It has awesome routing, simple file structure, nice clean syntax, not a lot of WTF moments, and understandable ORM functionality.

Rails you will have to dive into. You will battle activerecord. You will try to wrap your head around the many facets of a rails application.

I like them both. Try them both out. They don't take that long to get a feel for. You should ultimately base your decision on a per-app basis and factor in which language has better modules/extensions/gems for what you need.

max ogden
Good point, it wouldn't hurt to try both.
NathanD
+18  A: 

I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong).

If you think you'll need libraries like NumPy or SciPy, probably best to stick with python/django. I've struggled to find ruby equivalents.

However, the RoR community seems to be much bigger

Bigger is of course not going to be better. I've had great experiences with the django community in terms of support, and the pluggable app ecosystem is maturing quite quickly.

I would also add that I find the django documentation to be very easy to follow.

ozan
+7  A: 

Since your stated preference is Python, I wouldn't hesitate to recommend Django. The documentation available for Django is top-notch, and the community is very helpful. Browse the django-users archives or hang out in IRC for a while and you'll get a good sense of the support available.

Dave K
+4  A: 

funny... I'm in the same boat, though perhaps I've been looking around for a bit longer.

I came in from MS-land (C# too) and I went with Django, but only after I tinkered around with Google's AppEngine, which re-introduced me to Python. Django is well organized, internally consistent (as far as I could tell), and well supported with a vibrant community. Python is well organized, internally consistent (as far as I can tell), and extremely well supported with an amazing community.

Anyhow, there's more to rapid Python web development than Django. You might want to search for: python wsgi framework. Pylons and TurboGears offer enormous flexibility and focus on "best of breed" components, web2py appears to have a very cool DAL/ORM that I'm itching to dig into, and web.py and werkzeug (amongst others) are minimalistic and don't try to dictate how you should build your app. And if you're sticking with Django, definitely check out the Pinax project - it might help kickstart your development efforts.

c.batt
Posted before reading your edit.I'm not sure what Python libraries are available for financials, but I do know that Pinax is an excellent example of a community site built using Django. Pinax also serves to demonstrate how a Django site can be organized for maximum reusability.
c.batt
Python libraries: I was looking at both NumPy and also the Python wrapper for TA-lib
NathanD
Sorry, I wish I could comment on those packages but scientific and financial computing isn't something I've dealt with. However, I'd be surprised if there are any Python specific shortcomings in either library. I've had good luck with Python libs; quality is usually pretty high.
c.batt
+1  A: 

i'm another C#/.net guy with the same itch to tinker. Django is appealing. Though the development is easy and fun, i've heard some stories about deployment and configuration headaches with both Rails and Django (mostly rails). It's not like just throwing an asp.net app at IIS or PHP at Apache. For those things you can set it and forget it. I'd be curious to get c.batt's comments on his/her experince with deploying django.

Lately I've been looking at Grails. It uses Groovy which is ruby like. It's very easy to develop in and you can build apps as fast as Rails but you get access to the Java platform via the JVM which could come in handy. There's a ton of open source java components you could drop into your Grails app, plenty of the types of components you'd be looking for. It's really not like building a java app. So far it does feel like Rails. Good luck.

johnW
A: 

I'm curious. If you are a C# programmer, why have you ruled out Microsoft's MVC?

You have two different needs expressed in your question:

1) Want to try something new 2) Want to build community finance site quickly.

I understand the desire to look at RoR or Django for need 1, but for need 2 I'd expect you would be more productive more quickly with MVC.

Please note I am not saying that EVERYONE would be more productive more quickly nor am I saying that Microsoft's MVP is inherently more productive, just that someone who is currently a C# programmer would be able to come up to speed more quickly on something that uses C#...

jeffa00
+4  A: 

I just finished building a small social networking site with Django for a client. I was new to Python and new to Django, but it was one of the most enjoyable development experiences I've had in a while (even with the headaches of being new to a language and framework). And it only took two weeks.

If you're building this for yourself then I would try both Rails and Django (or one of the other frameworks that c.batt mentioned) to see what feels the most comfortable. I ended up choosing Django/Python because I liked the language. It felt clean and efficient, and you can't argue with the speed at which you can get a bare-bones site up and running.

As mentioned previously, Pinax is great. If anything you get a solid base to build on top of. I found that I had to extend parts of it to get exactly what I wanted, and a couple of sections I decided to code from scratch because the changes would get "hacky" to match what I needed. Other parts, however, are perfect. The private messaging was used out of the box, just with some new templates to match the site.

Alex Jillard
can you send me a link to the social networking site you built in TWO WEEKS? ...that is impressive
Tony
+1  A: 

Since you're a seasoned .NET programmer, you really should look at ASP.NET and MVC before turning to Rails and Django, at least if your goal is to get up-and-running quickly. It's always easier to leverage something that you already know in-depth.

I was in a similar situation recently -- I had a project that I wanted to push out on Windows and Unix, and so rather than leveraging what I know well (Ruby/Rails), I jumped ship and gave Groovy on Grails a go. It was a really rewarding experience, and I'm really glad I did a few small projects in Grails, but in the end I had a tiny fraction of the productivity I did in the environment where I had a few years' experience, even after months of hacking away on Grails.

So, pick up Django, Rails, Lift, or whatever you feel like doing -- it will help expand your mind, and give you different ways to look at solving problems. But if you want to get going quickly, use what you know (.NET) on a platform designed for you (MVC).

Don Werve
+5  A: 

I like Django better because it's less magic, with Rails i feel they pushed the convention over configuration principle too far, so i prefer the more explicit nature of Django.

L. De Leo
Rails is not magic. All source code is available to you.
railsninja
Yeah right, so you would know what goes wrong with Linux all the time if it was that easy
L. De Leo
+1  A: 

You are at a point where you cant make a bad choice!

My personal preference is django, but I know for a fact rails is good too.

I think the best answer is what the BFDLs of django themselves say:

Try both, use whichever you like.

Lakshman Prasad
A: 

Although I've never tried it personally beyond playing around, you might also want to check out ASP.NET with IronPython. Here's a blog post that details it.

Ryan Ginstrom
It's an interesting idea and IronPython now is very close to compatibility with regular Python. I saw a blog post a few months back that they have Django running on IronPython with SQL Server with just a few minor tweaks. I think I might be interested in using IronPython with an ASP.NET MVC site.
NathanD
A: 

I agree with the people who say: try both and use what you like best.

I think Rails will be an interesting experience because of the convention over configuration and forced MVC architecture. Also, I am not sure what people's experience with Django is on StackOverflow, but all of my Rails questions get answered very quickly.

Also keep in mind that you can call a python service to do some statistical calculations if necessary.

Here is an article written by a guy who went from .NET/C# to Rails to Django/Python, and then back to Rails. Might be worth a quick read.

http://blog.carlmercier.com/2007/01/30/why-i-moved-from-ruby-on-rails-to-pythondjango-and-back/

Tony
Good article, but it's over 2 years old now - a very long time. All platforms have improved immeasurably since then. Ruby is v1.9 (much faster), Rails and Merb are converging, Django is on v1.1 with many new features (as well a competitors). Heck, ASP.NET has MVC now, and it's good too.
c.batt
A: 

You express a preference for Python so I'd go with Django - it's a fine framework. My personal preference is for the alternative, but I'm not you and both options are good.

This is mostly a duplicate of http://stackoverflow.com/questions/91846/rails-or-django-or-something-else, btw

Mike Woodhouse
A: 

Your question must be : Python or Ruby ;)

mitkok
A: 

Like others suggest, trying both is one good way, but really, to me, I would base it more on which language you prefer to use. Sure, if it's a web app, you'll do a lot with the framework, but "every" line of code you write will be in that language. Since both frameworks are strong, it's really more a matter of what language you'll be happiest writing code in, day in and day out.

I personally use Rails and love it, but have many friends using Django. When we discuss things, time and again, it boils down more to language than framework. The languages are fairly different, and you'll typically find one you prefer a lot more than the other, at least in my opinion. I had originally thought Python sounded great, learned it, wrote a few things with it, etc., but it just never "clicked" for me. When I first saw Ruby many years ago it seemed a bit odd, but when I revisited it via Rails, it just felt so natural. When I write code in Ruby I feel like I'm pretty much writing English - if I can think of how I think the code should be written, I can pretty much type that and it works. It just fits my brain better.

Community wise, you'll get a lot of different opinions. I don't think being "too big" means it's bad, nor do I think the Ruby community is by any means "too big", especially compared to say the Java community. Ruby and Rails have certainly gone mainstream to some degree, and for those of us who've worked with it for several years, it seems mainstream, but in the grand scheme of things it's actually still fairly small.

Anyway, good luck, and enjoy looking into them and finding what will delight you to work with.

chrisrbailey