Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python on Rails?

Would it be possible to translate the Ruby on Rails code base to Python?

I think many people like Python more than Ruby, but find Ruby on Rails features better (as a whole) than the ones in Python web frameworks.

So that, would it be possible? Or does Ruby on Rails utilize language-specific features that would be difficult to translate to Python?

like image 733
Juanjo Conti Avatar asked Nov 25 '09 01:11

Juanjo Conti


People also ask

Is Python better than Ruby on Rails?

Python is generally better for educational use or for people who want to build quick programs rather than work as developers, while Ruby is better for commercial web applications. There are more specific differences when comparing Ruby versus Python, and they have in common that there are many ways to learn both.

Can you use Ruby and Python together?

Using Ruby with Python - a powerful combination If you want to build a web app that looks great, delights users, and handles Big Data or uses Machine Learning, joining the forces of Python and Ruby is a very good idea.

Is Ruby easier than Python?

Yes, certain super functional-style code is far easier to write in Ruby than in Python, but Python, despite its drive for simplicity, can be used in ways rather similar to Ruby. Ruby, however, tends to be more expressive, and strikes a bit closer to functional languages like Lisp or Scheme than Python.

Why is Ruby slower than Python?

Because Ruby 1.8 was not really designed with performance in mind, while Python was more optimized.


4 Answers

This is a great blog post. Rails developers chose a framework, and coding in Ruby is the afterthought.

Python developers chose the language for the language, not the framework. On the other hand, that made a lot lower bar to entry for frameworks.

like image 171
Dean J Avatar answered Oct 04 '22 06:10

Dean J


Many of the methodology used in Rails has been translated into Django. Have you tried it?

http://www.djangoproject.com/

like image 21
Josh Delsman Avatar answered Oct 04 '22 04:10

Josh Delsman


I think one of the things that people like about RoR is the domain-specific language (DSL) style of programming. This is something that Ruby is much better at than Python.

like image 14
Ned Batchelder Avatar answered Oct 04 '22 04:10

Ned Batchelder


I know that Rails does not necessarily = MVC per se, but I think a lot of what makes Rails productive is that it enforces (well, strongly encourages) MVC development, so you might find something similar if you look for Python MVC, such as this previous post here on Stack: What's a good lightweight Python MVC framework?

There are lots of Python MVC frameworks out there, but I keep hearing a lot about Django (http://www.djangoproject.com/) so that should definitely be on your list of things to check out IMO.

like image 1
Chirael Avatar answered Oct 04 '22 04:10

Chirael