88 Comments
- holovaty, on 10/12/2007, -0/+15The main difference is that Django is a nicely integrated full-stack package, whereas TurboGears is a collection of already-existing disparate pieces. This gives Django all sorts of subtle advantages such as the fact that all the documentation is in one place, the various levels of the stack are conveniently integrated (but not tightly coupled), and it just works better as a nice, clean, integrated system.
Beyond that, though, in my opinion the TurboGears pieces aren't really up to snuff -- I can't stand the CherryPy API (Global objects? What?! Not differentiating between GET and POST? What?!), and I strongly dislike XML templating systems such as Kid (which is also quite *slower* than Django's text-based template system). Granted, template systems are an intimately personal preference, so you should use any template system you can and see which you prefer; it's easy to use any template system with Django, as long as it's written in Python.
Plus Django comes with *many* conveniences -- the automatic admin interface must be seen to be believed. It's Django's crown jewel and has probably saved me *months* of man hours reinventing admin interfaces.
As a final note, Django has been used on high-traffic sites for almost three years. It's damn fast, and it comes with a fantastic caching system. It's been quite effective in my using it at washingtonpost.com, where the servers' loads are almost perpetually at 0.01.
(Note that TurboGears fans like to say "It's nice to reuse existing pieces because of loose coupling." Well, Django is just as loosely coupled -- and I daresay it's even *more* loosely coupled than TurboGears. For example, it's stupidly easy to use another template system with Django: You just use it. In TurboGears I believe you have to write a template-system adapter.)
Full disclaimer: I'm a Django developer. - tehrit, on 10/12/2007, -0/+10Django is one of the best frameworks I've ever worked with; a solid ORM, little-to-no 'magic' that makes it hard to puzzle out what's going on and a good template language (e.g. it's not XML).
Further, it manages to be incredibly powerful without getting in the way. - leftwing, on 10/12/2007, -2/+11@JonGretar "I tried to like Python. I really did. I just didn't accept that whitespace thing."
Hmm, I'm sorry, but this just doesn't ring true to me. How much python did you write, trying ever so hard to accept "that whitespace thing"? I would guess very little to none, because when you actually program in python, the significant whitespace simply isn't an issue. You just indent as you normally would with any other language, and it works.
Sorry if it seems like I'm picking on you, but I get tired of this dismissal of a great language for such silly reasons. If you don't like python, it doesn't fit your brain, you like something else, then that's perfectly fine. It can't be everything for everyone. But to dismiss it because of "that whitespace thing" is really just silly. - inactive, on 10/12/2007, -1/+9Thanks for the link. I really love IBM's developer site. They seem to cover a wide variety of topics with enough depth to really pique one's interest.
- infradead, on 10/12/2007, -0/+8Django totally rocks, and I'm saying that as someone who hadn't programmed either Django or Python until about four weeks ago. I'm creating some new web-based apps for work, and also (I hope) about to pick up some freelance work based on pitching Django to the client. It's ridiculously easy to use, and suitable for non-hardcore programmers. Good tutorials available at http://www.djangoproject.com/.
- ubernostrum, on 10/12/2007, -0/+7And another view of your review:
http://groups.google.com/group/django-developers/browse_frm/thread/eeb67f26e799f6f9 - sbrown123, on 10/12/2007, -3/+9@Bishoco - Oh, what the heck did you invest in RoR? You buy a bunch of books? Have a T-shirt that says "I Love Rails"? Where is you sense of adventure? You took the leap to Rails so why not jump that bridge a few more times?
- jdunck, on 10/12/2007, -0/+6I'm not an expert on the other frameworks, but I think you'll find Django has no smoke and nearly no mirrors. ;-)
- ubernostrum, on 10/12/2007, -0/+6HardBap, they're both MVC Python frameworks; the biggest difference is that Django started out several years ago as an in-house project, at a time when there weren't solid freely-available components which could be rolled into a framework, so the various parts of it were all written from scratch.
TurboGears, on the other hand, is of much more recent origin and is really more of a "glue" tying together several popular independent projects -- Kid, SQLObject, etc.
Both have strengths and weaknesses; probably your best bet is to read the available documentation for each and check out the mailing lists and IRC channels if you have specific questions. - DeadWisdom, on 10/12/2007, -1/+6PHP is like grunting and hand signals to Django's eloquent prose.
- JonGretar, on 10/12/2007, -0/+5@Bishoco:
I understand that you are invested in RoR. But try to invest yourself in Ruby instead. I have found myself doing stuff that RoR was maybe too much of a framework to do. Not gonna go into examples but it's totally worth checking out Nitro as well (http://www.nitroproject.org). If you focus on knowing Ruby instead of just RoR you will find that Nitro is a good tool for some jobs since you can make a small single file app in that. - Phoenyx, on 10/12/2007, -0/+5Adrian Holovaty (of Django) and David Heinemeier Hansson (RoR) talk about their respective platforms:
http://www.djangoproject.com/snakesandrubies/ - JonGretar, on 10/12/2007, -0/+5@Mooseknuckle:
RoR only has one configuration. Where the database is. I think the same story is for Django.
Remember that RoR and Django are just little addons to a full programming language. You still do everything in Ruby or in Python. Someone has just made a few shortcuts for the most common things. - JonGretar, on 10/12/2007, -0/+4@everbright:
no no no no.... Django and RoR are frameworks. Drupal is a finished system that has some plugin capabilities and so on. You don't compare them together because RoR and Django are used to create things like Drupal. Comparing them would be like comparing a hammer to a house. - Irimi, on 10/12/2007, -0/+4Do anyone have a frame of reference to compare this to CherryPy?
- asmodai, on 10/12/2007, -2/+6Make sure to check the latest Django documentation. __str__ is preferred over __repr__ nowadays.
Other than that a wonderful article. - asdren, on 10/12/2007, -0/+3Adrian, aren't you _the_ Django developer ;)
- asdren, on 10/12/2007, -0/+3http://oodt.jpl.nasa.gov/better-web-app.mov caution - huge - 380 MB
this video has been posted at least twice here on Digg
it compares Rails, Django and Zope (and JSP/Servlets)
though it really isn't a fair comparison since Rails and Django are frameworks while Zope is more like a CMS/Portal. However Zope seems pretty awesome if you need a portal site. - HardBap, on 10/12/2007, -1/+4How does Django compare to TurboGears?
- Mooseknuckle, on 10/12/2007, -0/+3I'll have to agree ... I solid home-grown web-app architecture is worth the solid investment. And I use the term home-grown loosely. I work in what is probably the least popular modern web-app development environment (LAMPerl), and we have done wonders using perl's built-in modules like:
Class::DBI
App::Dispatch
Apache::Request
CGI::FormBuilder
Template-Toolkit
Class::Accessor
etc ...
I dont want all those zany config files to fuss with. I did JBoss for about 2 years, and really got sick of the configuration, and waiting for the "hot-deployable" infrastructure that we were promised for so long to manifest. I'm glad to be away from all of that wysiwyg webapp bull. - Sferrero, on 10/12/2007, -0/+3Django, TurboGears, RoR... They all seem really good, It's going to be hard to decide. What does everyone think of the three?
- Sferrero, on 10/12/2007, -2/+5Gosh, I'm so torn between this and Ruby on Rails!!!
- Bishoco, on 10/12/2007, -0/+3@sbrown123 I've invested a lot of time and effort into building a web application using Ruby on Rails. I have a very small ROR app running right now and I have a much larger one about 75% done.
But, I don't mean say I'm unhappy with Rails. For me, it's been as easy and as fun as people hype it up to be. It's just I don't have the time or thee energy to learn a new framework. - dasil003, on 10/12/2007, -1/+4I prefer Ruby to Python, but I'm torn because Python is so much more mature with unicode support and more libraries. The momentum behind RoR is the tie breaker for me. I'm going to master Rails inside and out so that I can make a more informed opinion later. I'd hate to spend a few days with a bunch of different frameworks and make snap judgements based on superficial understanding. Better to identify the promising frameworks and spend the time to really master them before making a definitive decision. How many people are experts in both Rails and Django? Not enough I think.
- Bishoco, on 10/12/2007, -2/+5I'm way too invested in Ruby on Rails at this point.
- Herolint, on 10/12/2007, -0/+3I completely agree. I've created a few sites for our intranet using Django and have loved every moment of it. Thanks Django people!
- jcroft, on 10/12/2007, -0/+3Adrian is one of MANY Django developers (it's open source, after all). He's one of two lead developers. He's also one of two Django creators. But it's not really accurate to say he's THE Django developer, no.
- codahale, on 10/12/2007, -0/+3See, this is a marketing problem with web frameworks. There's no "just add water" part of Rails; Rails (and Django) just makes life easier by combining all the stuff you *should* have been doing but never really got around to (unit tests, MVC separation, humane URLs, etc.). You still have to make a web application, you just don't need to write an ORM, a templating system, a URL mapper, etc. etc. before you can get to that. It's the difference between having to build a kitchen before making a cake and just showing up with some flour, sugar, and eggs.
I'm about to go live with a Rails app which doesn't do a bit of CRUD (well, it Reads, yeah) and it's been a blast. I've got 100% C0 coverage with my unit tests (thanks to rcov), a *really* nice deployment system (thanks to Capistrano), and when I felt hindered by the framework... I wrote a plugin, and changed its behavior. I (heart) dynamic languages. - foobario, on 10/12/2007, -0/+3I started using RoR a few weeks ago, with only PHP and Visual Basic for prior experience, if you can call it that. The intro videos are a little misleading, because they show how easy it is to develop a CRUD blog and imply that everything is that easy... it only stays that easy if all you want is a CRUD blog.
But I read a book and worked through some tutorials and talked with folks on IRC, and now I'm rewriting all of my old PHP stuff in RoR. The ORM and presentational stuff in RoR has reduced my code size by a factor of 20. For business logic it's still perhaps a factor of 5, and it's a lot cleaner. Weird database stuff that doesn't have some established RoR voodoo (or that I don't know how to do in RoR yet) just gets copied right across with minor tweaks.
I haven't noticed much in the way of smoke and mirrors... usually it's just my vision that is cloudy. YMMV.
I looked at Django as well, and only chose RoR because Ruby appealed to me more than Python. This is obviously pretty subjective, and not indicative of the relative worth of the two languages. I think that (in programming or anything else) the value of a tool has a lot to do with how comfortable the user is using that tool... use whatever tool makes you work well. - altjeringa, on 10/12/2007, -0/+3Django is a full stack in and of itself, everything in Django is written by the Django developers. The ORDBM, the templating system, the engine.
Turbo Gears is an engine which binds together other Python Modules, SQLObject, Kid, and CherryPy being the most notable.
The are both pretty nice. Django doesn't have any built in JSON support. TurboGears feels more "hands off the code."
Also might be worth looking at http://www.webwareforpython.org/ if you are interested in python frameworks. - inactive, on 10/12/2007, -0/+2Django is great for both basic stuff and large projects. You can use as much or as little of it as you like, and the option of, say, writing your own SQL queries manually is always there if you want it. Even quick-'n-dirty custom pages are a cinch when you need them. But the database abstraction and data model/view/template separation makes it very flexible and maintainable for the future. It isn't really so much of a framework; there's only a very few files generated and you can easily do it your own way if you want.
- uptown, on 10/12/2007, -0/+2How's django & python compare to what's out there for use with PHP?
- jdunck, on 10/12/2007, -1/+3Depends what you need to do. Rails is all about convenience for building app-y stuff. Django is more CMS and content-y. They're both good. What's easy to you?
- Z_Man, on 10/12/2007, -3/+5heh. how odd? i actually started using django a couple days ago.... works really nicely
- ubernostrum, on 10/12/2007, -0/+2Check out ljworld.com. Django-powered. Ditto a number of features at the Washington Post and quite a few other news/media sites of varying market size.
Smoke and mirrors this ain't ;)
More reading: http://code.djangoproject.com/wiki/DjangoPoweredSites - ubernostrum, on 10/12/2007, -0/+2Yes, Ilias, I do pray you'll forgive us for thinking that a useful, working product is more important to have than an org chart.
- trutwin, on 10/12/2007, -0/+2My $0.02 on django and why I like it over RoR and others:
1.) django plays nice with Apache in a virtual hosting environment. The developers actually RECOMMEND running with mod_python. I tried (really I did, maybe I'm just a moron) to install RoR in my virtual hosting enviornment on a test site and it was an experiment in pain. Weird unofficial documentation, crazy mod_rewrite cruft, etc. In the end just a bunch of Internal Server Errors. I don't want to run RoR on port 8080, I just want to plug it into my existing system. Even zope is easier. Maybe it's gotten better over the last few months... FYI - There is also an internal dev web server in django if you don't want to integrate with apache.
2.) django uses python - my preference but I just don't care for Ruby for whatever reason.
3.) django doesn't include the kitchen sink. For example, it does not have native AJAX support, but so what, it's so simple to add it in. It does what it advertises and nothing more.
4.) django's built in admin interface is a piece of cake and great when you have an already built custom web app and want to provide a client a quick, easy, but elegant interface to add data to the backend with very little coding effort. django's db introspection tools could be improved, but it does a decent job.
5.) django's documentation is great - no flash demo but easy to follow tutorials and then in-depth references. The dev community is also very helpful and quick to respond.
One thing I don't care for is that you are recommended to pull the latest source from the SVN trunk: http://www.djangoproject.com/documentation/install/ - I'd prefer to have updated tarballs when things are deemed release-worthy.
A great project - the only framework I've tried and actually used. - ubernostrum, on 10/12/2007, -0/+2codahale, I think that's the best description of the advantages of a good framework that I've ever seen. I may have to start quoting you ;)
- Bogtha, on 10/12/2007, -0/+2> Oh, what the heck did you invest in RoR? You buy a bunch of books? Have a T-shirt that says "I Love Rails"?
You've got to be kidding. How about when you've got significant amounts of code built around RoR? There's more to programming than buying t-shirts.
Maybe when you're in university or you're a hobbyist, you can jump to new languages on a whim, but do that when you need to actually be productive, and you end up with a spaghetti mess of all kinds of different systems all trying to work together, or you end up trapped in constant rewrites and never get anything done. - ericmoritz, on 10/12/2007, -0/+2That's Jango the 'D' is silient :) Named after Django Reinhardt the Jazz Guitarist (Adrian is a Jazz nut have you heard his Mario 2 rendition? I think that was dugg a while back)
- ericmoritz, on 10/12/2007, -0/+1I'd have to say that the automatic admin in an added bonus to an already awesome framework. I think the reason why django has been associated with CMS is because that's what the majority of the Django sites out there do. I'm sure there's nothing stopping you from building an ecommerce site or anything else for that matter in Django. I bet the automatic admin would still work in on an ecommerce app.
- inactive, on 10/10/2007, -0/+1*pick
- jcroft, on 10/12/2007, -0/+1"Ermmm...get a plugin for the feeds"
I didn't say you could do this stuff in Rails -- I said it's not built-in.
"use scaffolding for the 'admin interface'"
If you are seriously comparing scaffolding to Django's admin interface, you clearly have not used it. Django's admin interface is a beautiful, polished, FINISHED front-end to your app that is ready to be USED to end-users. Scaffolding is a start in the right direction that you're supposed to replace/enhance with your own code. The two have almost nothing in common. Scaffolding is much more like Django's CRUD generic views than it is like Django's admin interface.
"and scrap the template language -- Rails doesn't need it. eRb lets you embed Ruby into HTML a la PHP"
Which is about the worst possible thing I can imagine for designers. You expect your designers to know Ruby? Or Python? Or even PHP? And giving designers access to a full programming language in the presentation layer? Talk about a breaking of your MVC setup waiting to happen! Template languages are great for designers, which is who they're aimed at.
And yes, I know there's Liquid for Rails (which is a port of Django's template language, by the way), and it's great. But, it's still not built-in, which was my point.
The point that you clearly missed was that while both frameworks are great for content-heavy sites, Django has more of the tools you might want BUILT-IN.
Django's built in comments app is another example of this that I forgot to mention, by the way. - ericmoritz, on 10/12/2007, -0/+1A buddy of mine built http://www.gmapme.com in Django with is a "App-y" kinda site. Chicagocrime.com is an App-y kinda site. That is if I'm understanding the definition of "App-y" correctly.
- jcroft, on 10/12/2007, -0/+1"I just meant to highlight the sweetspot for the two."
Makes sense. Having never actually used Rails for a project (I've played around with a bit is all), I don't know from experience. But, I'm sure you're right. :)
Unfortunately, it's not a situation where most of us can "use the right tool for the job" on a given project. Most of us aren't going to learn Rails and Django both and use one when we're doing something app-y and one when we're doing something content-y. Most of us are going to pick one or the other. I think the primary deciding factor is going to be whether you prefer Ruby or Python. It's probably fair to say that secondary deciding factor may be if you spend all your time doing one type of site (app-y or content-y), then one might be more appropriate than the other.
Like I said, you're probably right about the sweet spot. I just think Django sometimes gets the "it's for content, Rails is for apps" thing thrown at it as a criticism, but I don't think it's a fair or accurate one at all. - Kam3k, on 10/12/2007, -0/+1I could see myself using Django over Rails for certain projects having spent a few hours playing with it. But I'd be interested to know if the benefits of the automatic admin system disappear when you need a CMS with more advanced and possibly unique requirements. At what point do you end up having to just write the admin system for scratch or is it flexible enough that you should never need to?
For example if you needed content versioning and roll back, some kind of specialised rolls and permissions or any other kind of business logic in the admin system that goes beyond the crud screens that the beginner tutorials show you how to set up and customise. - inactive, on 10/10/2007, -0/+1ROR FTW!
- inactive, on 10/10/2007, -0/+1http://www.pownce.com
- jcroft, on 10/12/2007, -0/+1asdren-
That is an AWESOME presentation on how frameworks can be benficial. However, its not a very accurate description of Django -- the guy (Sean Kelly) that does the presentation gets a LOT of things wrong about Django, AND it's way out of date.
Still, if your question is "how will a framework help me?," it's a pretty good presentation. It's NOT a good comparison of the different frameworks, though, because he clearly doesn't know what he's talking about (at least where it comes to Django). - ericmoritz, on 10/12/2007, -0/+1ubernostrum: Don't forget my site :) http://www.naplesnews.com it's on Django too How's it going btw :) Represent #django on freenode!
We just released this http://www.napesnews.com/affordable_housing/database/ in Django (Corperate IT gonna hate me for posting that to digg) -
Show 51 - 88 of 88 discussions



What is Digg?