6 ms·
Python has a roughly equivalent MVC web framework called Django. Ruby and Python as languages are not radically different in kind, but their respective develop
by knowtheory 14y ago
Python has a roughly equivalent MVC web framework called Django.
Ruby and Python as languages are not radically different in kind, but their respective developer communities have had different focuses, and as a consequence the library of tools are not identical.
Ruby on Rails became popular because people were dissatisfied with the way that web development was being done, and DHH is very good at marketing/propaganda. Ruby on Rails has had a substantive effect on the way that web development is done, and there have been numerous attempts in other languages (that didn't already have a framework like Django) to recreate the things that Ruby programmers enjoy with Rails (CakePHP and Grails come to mind immediately).
- bryanh 14y agoThis is spot on. To elaborate a bit, Rails tended to have a lot more generated code (the fabled "magic") that really sped up development of your standard CRUD apps. As far as I can tell, this was fairly novel in web development. Django didn't really have a focus on that, you spent a little (lot?) more time configuring. It's better now though. Of course, at the complete opposite of the spectrum, you have very minimalist stuff like Flask (Python) or Sinatra (Ruby) which is doesn't include a lot of bells and whistles. You'll have to import your own ORM, templating, etc...
- camus 14y agoRuby has nothing to do with Python. Python is strongely typed and compiled into bytecode, just like java. It is just not the bloated and verbose language java is , which allows fast and pragmatic development.
- mercurial 14y ago> Python is strongely typed Like Ruby. > and compiled into bytecode Like JRuby. Python and Ruby are comparable languages. They are both high-level dynamic languages, with the same sort of tradeoffs (eg, you can do more with less characters than in most statically typed languages, at the expense of safety and performance). There are however significant differences in terms of philosophy, ecosystem and community between the two.
- camus 14y agoExcept you dont need a JVM to get performances in python. Using a JVM destroys any perspective of cheap and easy deveployement. If i have to use a JVM , i'd certainly not use JRuby when i can get scala.
- Xylakant 14y ago> Using a JVM destroys any perspective of cheap and easy deveployement. I doubt that. The fact that jruby is close to bug-by-bug compatibility means that for most projects you can go and develop on mri or rubinius for fast development and use jenkins/travis/... to run your testsuite against jruby. You can then do integration tests as well as staging on jruby to catch anything your testsuite didn't catch. I've seen more than one large project take that course of action and do just fine. Deployment on jruby isn't any harder than deployment on any other ruby. It's still "puma start" or whichever server you chose. You can however package your app in a war use a standard servlet container such as tomcat or jetty to deploy, but that's strictly optional.
- irahul 14y ago> Except you dont need a JVM to get performances in python. Python's performance is only slightly ahead of Ruby's. Both Python and Ruby are a bad match for CPU intensive tasks(provided we are talking pure python/ruby and not native extensions). Network and IO in general is salvaged by using evented io(or some high level evented framework).
- mercurial 14y agoExactly. You have the same sort of solutions for squeezing additional performance out of Python and Ruby: - using evented framework (network/IO bottleneck) - using native code (CPU bottleneck) - using a different implementation (Python has an edge here with PyPy, as long as your dependencies run on it)
- blacksmythe 14y agoBecause numerical processing is a major use case, Python has a number of techniques to easily speed up critical sections of code (numpy, cython, pypy). I am not aware of comparable features in Ruby.
- mgkimsal 14y agoI'll throw out another factor: When Rails was introduced, there were no other substantive Ruby web frameworks - Ruby itself was relatively obscure compared to every other web-capable tech. As such, it (Rails) had no competition in the framework space. PHP, Java, Python and other languages all had competing web frameworks to choose from.