Which is more recommendable for the micro-framework Python Flask and Ruby Sinatra?

Source: Internet
Author: User
When it comes to micro-frames, Python flask and Ruby Sinatra are undoubtedly the hottest two, and would like to hear the comments and recommendations of friends who have contacted them. From my current understanding, although python in the domestic development seems better than Ruby, but in foreign web development convenience, Ruby Rails/sinatra basically occupy the dominant position, from Google out of the data can be knows.

Reply content:

The question is hard to answer, and the main difference between Sinatra vs flask is actually the difference between Ruby and Python. Of course flask is heavier than Sinatra, the community is more perfect, the document is more, and the extensibility is stronger. Sinatra itself if you want to apply to more than medium-sized projects, you have to do a lot of boilerplate, of course, you can also use based on Sinatra and integrated a lot of padrino.

For this micro-framework, most of their design philosophy is very similar, the difference is mainly the difference between the essence of language. Of course, to develop a little bit of the size of things, it is necessary to introduce a large number of third party libraries, especially the ORM. Python's ORM is primarily SQL Alchemy, while Ruby uses more ActiveRecord and Datamapper.

Finally, I do not agree with "the convenience of web development abroad, Ruby's Rails/sinatra basically occupy a dominant position". The Ruby/rails community is creative in the web and has many good ideas, while the Python community is relatively quiet. But for output, Python is no weaker than Ruby. Jeff Atwood wrote an article about "Ruby is not cool anymore", so you see the Ruby community seems very "active", in fact because the ruby/rails popular late, so there are many gaps to fill, There are also many new wheels that have been created because of language features--python has long since passed through this era. After the "Being cool" era, will usher in "Get shit done" era. This problem and Python VS. Ruby is no different ...

The question is why VS, well-trained engineers don't have 30 minutes to write something under these two frames. Spend a weekend with the frame of node also play together, like what naturally have to judge. Web Programming the most time is the template and db, templates are similar to each other, DB ORM Library, Python only the best Django do, but can not be used independently, Sinatra may use ActiveRecord. So, do not consider the cost of learning, work with Sinatra better 1-I used Sinatra three years, said it is simple, actually just use it simple. It's not easy to learn, to understand, to optimize,

2-Substantive, Sinatra is rack, ROR is also rack, like different Linux distributions.


Documentation and source code Sinatra/sinatra GitHub Python vs Ruby. The point is that the python pits are low
  • Related Article

    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.