5 ms·
It boils down to Python vs Ruby. Overall, both frameworks are pretty similar and you can build a modern web application in both. Personally i think RoR is the
by sparkling 10y ago
It boils down to Python vs Ruby. Overall, both frameworks are pretty similar and you can build a modern web application in both.
Personally i think RoR is the slightly better framework (better defaults, easy test/dev/production setup, sane asset handling), but i prefer Python over Ruby, so i end up using Django.
- scrollaway 10y agoAs someone who hasn't used RoR, can you talk about the difference in asset handling?
- debaserab2 10y agoRails uses an asset pipeline package called sprockets. You throw everything in a special directory and it wraps it all up and packages it nicely for you. This also gives you SASS and coffee compilation by default. Sprockets handles minification and cache invalidation for you. If you don't mind the opinionated approach to your javascript and stylesheets, it works fine. If you just need to sprinkle in some javascript on top of your site, it's fantastic. If you intend for your app to be javascript heavy, a lot of people rip out sprockets altogether and fallback to webpack to handle asset compilation (and I believe the newer Rails version is integrating webpack to play nicer with the rest of the framework) I can speak from personal experience that Sprockets is a PITA if you want to use npm.
- steveklabnik 10y ago> (and I believe the newer Rails version is integrating webpack to play nicer with the rest of the framework) Yup http://weblog.rubyonrails.org/2017/2/23/Rails-5-1-beta1/ http://weblog.rubyonrails.org/2017/2/23/Rails-5-1-beta1/
- TkTech 10y agoThis is the same in Python, with a bunch of different options. A common one is webassets[1] which has simple integrations for django. [1]: https://webassets.readthedocs.io/en/latest/ https://webassets.readthedocs.io/en/latest/
- helb 10y agoIt's also possible to use Webpack with Django easily. With working hot module reload and everything. https://github.com/owais/django-webpack-loader https://github.com/owais/django-webpack-loader
- utku_karatas2 10y agoFor a similar experience in Django, one should better start with https://github.com/pydanny/cookiecutter-django https://github.com/pydanny/cookiecutter-django instead of the default generated project.
- drewrv 10y agoDoes Rails have anything like the django admin?
- triangleman 10y agoNo idea if this is comparable: https://activeadmin.info/ https://activeadmin.info/ Edit: What a long strange trip it's been. According to my old bookmarks, wycats developed a rails admin module about 10 years ago (code not available today). I discovered that he also worked on Merb, sort of a fork of Rails, and then after helping to merge that back into Rails, he helped sferik port MerbAdmin to RailsAdmin, which exists today! https://github.com/sferik/rails_admin https://github.com/sferik/rails_admin I will definitely have to try Rails 5 and see what's up, it looks like I missed a lot over the years.
- copperx 10y agoJust a heads up: Admin gems are only suitable for projects that are simple and stay simple. If you want to do something that's not provided by your admin gem, you'll be fighting it. I have gone through that arduous path myself multiple times, only to end up rewriting everything from scratch. I would love to know if Django's Admin fares better in this regard. More: http://rubyjunky.com/get-rid-of-your-admin-gem.html http://rubyjunky.com/get-rid-of-your-admin-gem.html
- Daishiman 10y agoI've used the Django admin in pretty much every production project I've touched. It's the bees' knees. There's some customization overhead that becomes higher than doing your own thing is you really want to make your own admin views, but at that point nobody's stopping you from making dashboards from scratch.
- bigmanwalter 10y agoI came to a similar conclusion in Django. I now build my own admin interfaces.
- nik736 10y ago