Django-like framework on Ruby?

喜你入骨 提交于 2020-01-13 11:06:52

问题


Django as a framework is a neat little package. There are very few files (compared to Rails) and it's got a clean structure. The fact that you can plug and unplug apps between different projects is an extremely nifty feature. At the same time, Ruby's hacking ability is unparalleled. It's complete object-orientedness makes it more expressive and fun.

To cut the story short, is there a Django-like or Django inspired framework on Ruby? If not, would be possible for an implementation of Django on Ruby? What would be the challenges?

If one were to create a Django-inspired framework for Ruby, how would it's Domain Specific Language (DSL) nature come into play?

I've spent a good chunk of my past life using Symfony, which is a PHP framework heavily inspired from Rails. When I saw Django, it came as a bout of fresh air. I'm really curious to know what you guys think and have to say on this.

Update: I stumbled on a framework call Ramaze for Ruby. It seems to be a bare-bones MVC framework with pluggable components for the JS framework, ORM layer and the templating engine. So you could use Prototype / Sequel / Sass, or Mootools / ActiveRecord / XSLT, or any other combination of your choice! As a side-note, Merb is an interesting choice too.

Update 2: I'm sticking to PHP for big-ass commercial projects and Django for my personal projects. Reason why I decided to side with Django was the amount of flexibility it offered. That said, I realized that with greater power comes greater responsibility. My advice to others: if you know exactly what you want - go with Django. It's probably easier to define things explicitly in it than in Rails. Merb may have been a good choice too, but I didn't have the time to explore it. Django seemed like a good fit and so I stopped being anal about the language I'm using. Thanks for all the help guys!


回答1:


Try merb, merb-slices, and datamapper is probably the closest you can get in ruby.




回答2:


I think you need to define a little closer what you mean by "Django-like". Depending on your exact definition, any of these might fit the bill:

  • Ruby on Rails
  • Mack
  • Waves
  • Merb
  • Iowa



回答3:


Is having less files really a deciding factor on choosing a framework?

I agree that keeping track of a smaller number of files is easier on the brain, but I would choose a framework on:

  • documentation
  • size of community
  • maturity

before I woried about file count.



来源:https://stackoverflow.com/questions/1353343/django-like-framework-on-ruby

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!