Which of the following is more recommended?

Source: Internet
Author: User
Speaking of the micro-framework, PythonFlask and RubySinatra are undoubtedly the two most popular ones. I would like to hear comments and recommendations from friends who have been in touch with them. As I know, although Python seems to be better developed than Ruby in China, it is easy to develop Web applications in foreign countries. Ruby's RailsSinatra is basically dominant, you can know a little about the information from Google. Speaking of micro-frameworks, Python Flask and Ruby Sinatra are undoubtedly the two most popular ones. I would like to hear comments and suggestions from friends who have been familiar with them. As I have learned, although Python seems to be better developed than Ruby in China, it is easy to develop Web in foreign countries, and Ruby Rails/Sinatra is basically dominant, you can know a little about the information from Google. Reply: It is difficult to answer this question. The main difference between Sinatra and Flask is actually the difference between Ruby and Python. Of course, Flask is more important than Sinatra, the community is more complete, more documents are provided, and the scalability is stronger. If Sinatra is to be applied to medium-sized or higher projects, you need to do a lot of boilerplates on your own. Of course, you can also use Padrino Based on Sinatra and integrate many things.

For this micro framework, most of their design philosophy is very similar, the difference is mainly the essential difference of language. Of course, to develop something of a slightly larger size, we need to introduce a large number of third party libraries, especially ORM. Python ORM is mainly SQL Alchemy, while Ruby uses ActiveRecord and DataMapper for many tasks.

Finally, I do not agree that "Web development in foreign countries is convenient and Ruby Rails/Sinatra is basically dominant. The Ruby/Rails community is very creative in Web, with many nice idea, while the Python community is relatively quiet. But for the output, Python is not weaker than Ruby. Jeff Atwood wrote an article about "Ruby is not cool anymore", so you can see that the Ruby community seems to be "active" Because Ruby/Rails is quite popular, so there are a lot of gaps to fill, and there are also many new wheels created due to language features-Python has long passed through this era. After the "being cool" era, we will usher in the "get shit done" era. This problem is no different from Python VS. Ruby...

The problem is, Why VS? It takes less than 30 minutes for well-trained engineers to write something in these two frameworks. I spent a weekend playing with the node framework. Naturally, I like to know what I like. The most time-consuming web programming is the template and DB, which are similar to each other. In the database's orm library, only django is the best in python, but it cannot be used independently. ActiveRecord can be used by Sinatra. Therefore, without considering the learning cost, it is better to use Sinatra for work. I have been using Sinatra for three years. It is simple to say, but it is actually easy to use. It's hard to learn, understand it, and optimize it,

2-in essence, Sinatra is Rack and RoR is Rack, just like different linux releases.


Documentation and source code sinatra/sinatra · GitHub Python vs ruby

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.