开发者

Rails Alternative to The Django admin panel / CRUD View Generator?

开发者 https://www.devze.com 2023-01-27 23:40 出处:网络
I am currently trying to decide between Rails and Django.. At the moment the I\'m finding ruby much more elegant so my only reason for considering Django is the admin panel..

I am currently trying to decide between Rails and Django..

At the moment the I'm finding ruby much more elegant so my only reason for considering Django is the admin panel..

I have no experience of either but i have t开发者_如何学Co develop an application fast to meet a deadline.

Is there a way in rails to generate a (close to production ready) set of views for all of your CRUD actions based on your model like the admin panel in django? (ie it would look at your model and see that you have a person that belongs to a group and generate a dropdown for that grouop on the create person view)?

If not which is the quickest way (without manually writing) to get a first draft of all the CRUD views?

Thanks,

Daniel


interesting tool http://activeadmin.info/


You might want to take a look at the RailsAdmin gem.


Answer in several parts:

  1. for something similar to Django admin, it all depends on what you plan to do with it. If you want to build your site around it, scaffolding is good. However, even if you chose Django, don't build your site around admin. It is not meant for this (it is possible, but after you'll have very little flexibility), it is just made for being an admin interface.

  2. This being said, if you need to work fast, and have no knowledge in Python nor in Ruby, I would go for Python - Django. Rails can be awfully productive, but the learning curve is much steeper than Django's. And Ruby's syntax is very fancy, but Python's is neater in my opinion (I know some will disagree on this!)


Here are some popular choices of admin interface gems for Rails.

  • typus (live demo)
  • admin_data (live demo)

More choices at The Ruby Toolbox. ActiveScaffold is the most popular according to Ruby Toolbox, but it seems like it's not compatible with Rails 3.0.


I really enjoyed using https://github.com/pilu/web-app-theme. Simple, ready to use, can spit out both erb and haml.


Rails has a scaffold generator, which is neat to quickly sketch things out, but it has little by way of an Admin generator that's as nice as the one Django provides. That being said, it is quite easy to do most of those things fairly quickly with Rails. Take a look at the Rails tutorial. I have found it to be the fastest way to learn rails at the moment really. And the link I have included for the scaffold generator should get you using the code generation tool in rails.


administrate_me is a good choice, it definitely has the 'feel' of the Django admin.

0

精彩评论

暂无评论...
验证码 换一张
取 消