7 ms·
Rails is written in Ruby, and Django in Python. That's by far the biggest (and maybe only) difference.
by jarcoal 14y ago
Rails is written in Ruby, and Django in Python. That's by far the biggest (and maybe only) difference.
- bryanh 14y agoThat certainly is a big distinction, but is not the only difference. An older overview is available here: http://www.vaporbase.com/rails-django http://www.vaporbase.com/rails-django
- jfb 14y agoSure. But, for instance, is Django as tied to the active record pattern as is Rails? And yes, I know you can swap out persistence layers in modern Rails, which is good (because active record is utter bilge), but who does that? &c.
- ncavig 14y agoNo, it's not. But since Rails 3 neither is rails really. Rails is more about the ActiveModel pattern, which has it's own API. Active Record inherits from ActiveModel. You can pick and choose what you want in your persistence classes, or even better, make models/classes that have no persistence layer tie. For instance, if you want to use a class like it was a MySQL table, you could include a few ActiveModel classes which will make things for ActiveSupport helpers work with them. http://api.rubyonrails.org/classes/ActiveModel.html http://api.rubyonrails.org/classes/ActiveModel.html - pick and choose what you want in your classes. This was one of the major changes in Rails 3 EDIT: just to clear it up, by ActiveModel I mean Model. Rails is convention over configuration and adheres to the MVC pattern and philosophy
- jarcoal 14y agoMaybe I misunderstood your question. If you're looking for reasons to pick one over another, then it's whichever language you know best. Web frameworks really only differ in philosophy, and in this case, both are batteries-included, monolithic frameworks. They are practically identical solutions.
- andrewingram 14y agoPhilosophically they're quite different. Every layer follows a different approach: templates, controllers (views in Django), urls, model definition, ORM etc. A lot of this comes from the core philosophies of the languages, whilst Ruby and Python may be closer to each other in philosophy than either are to say Java, they still have substantial differences.