简体   繁体   中英

Learning Ruby on Rails in terms of Flask

I'm very experienced with Flask and have built a couple things in it. I'm just learning Rails, and since I know Flask the best, I keep on trying to tie everything I learn back to it. Would anyone mind explaining ROR in terms of Flask? Obviously Flask isn't an MVC, but I have used it with SQLAlchemy, so I've been thinking of my Model as that.

Learning Rails in terms of Flask is like trying to fit a large truck inside a small sports car. Rails is a large framework full of powerful features and Flask is a micro framework with limited features designed to build simple sites fast. You are best off learning Rails on its own and then comparing the few features Flask has from Rails.

If you are finding Rails to be too much to learn at once, perhaps try Sinatra first. It's a Ruby micro-framework from which Flask was cloned. Those two will have a lot in common. After mastering Sinatra, Rails is a relatively easy step.

Flask is small with few dependencies, you decide a lot of things, Rails is big and opinionated, Rails is Omakase .

You may think of Rails in Flask terms as long as you've used Flask like a classic MVC, but I'd recommend starting with a fresh mind.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM