which features you would like to have in Ruby on Rails, or maybe which features you find incomplete or bugy?
It's honestly a pretty full-featured framework. After using it professionally for two years, I have never come across anything Rails couldn't handle. In fact, quite the contrary, I'm constantly finding more and more amazing features I wasn't previously aware of.
Plus with the concepts of gems and plugins, the sky is the limit.
The more you use it, the more you'll love it.
Some things are easier done in pure SQL than ActiveRecord, and some are just impossible without SQL. This breaks the abstraction somewhat.
Since the creation of Engines, modularity & reusability made a huge leap which is great.
I'm wondering whether we'll need another abstraction layer for rich js interfaces. To be a more constructive, I'd personally appreciate to organize my js file the same way I organize my helpers.
#RocketR remark is totally right, as well as tybro0103 conclusion :)
Related
I was looking for information comparing Ember.js and Backbone.js for use with a Ruby on Rails backend. Does anyone have experience working with both of these client side frameworks and would be willing provide some insight around them?
Both are great, and you can't make a bad choice imho.
There is a good thread on this subject on Quora, with an answer from one on the Ember.js author, Yehuda Katz: http://www.quora.com/What-are-the-key-differences-between-Ember-js-formerly-SproutCore-2-0-and-Backbone-js
A quote from the thread (Austin Bales)
A lot of the differences between the two come down to this: SC2/Ember have made a few decisions in advance about the tools and workflows you'll use. Backbone has very few opinions on matters of templating, rendering, hierarchy, and KVO/Binding – in Backbone there's almost always "More Than One Way To Do It" and almost never a predefined way. In contrast, Ember provides a little more infrastructure and default options out of the box.
The fact that Ember.js is opinionated is probably a good thing in the long run I'd say. It's kind of the same philosophy as rails where they often make choices for you.
I actually have to make this choice at work as well. I tried working a little bit with both, and I have to say, I feel more confortable with Backbone, but it's really not a well informed opinion ;)
ps: check this out: http://addyosmani.github.com/todomvc/
It's a todo app implemented with all the popular frameworks. It could help you compare the two.
edit: Since I wrote this answer, I've been trying to learn Ember, and I'm really liking it. Here is an AWESOME blog about ember, everything is very well explained, clear, in depth: http://darthdeus.github.com/.
Ideally, you would master both, as I feel that they have different use cases now.
Gordon Hempton has written a nice article about JS frameworks here: http://codebrief.com/2012/01/the-top-10-javascript-mvc-frameworks-reviewed/
I'm trying to come up with things that Ruby (or Rails) either doesn't handle well, or things that are way too hard to do in Ruby.
So far I'm having a tough time, but I figured some people on here MUST have know some things that Ruby or Rails don't handle too well.
Anyone?
Ruby is a language. Rails is a framework. Many of the things Rails isn't good at, such as anything not relating to a web framework, Ruby handles with ease.
The other question of what Ruby as a language is not good at is simple. Anything extremely performance intensive is probably better written in C. Ruby won't run natively on most smart phone devices so mobile apps are out. Ruby is not designed for embedded devices, so powering the next space shuttle launch is also a no go. Furthermore the lack of a maternal instinct make Ruby a bad choice to watch young infants.
There is nothing, it's simply perfect. ;-)
Ok, some downsides:
Ruby has questionable parallelism and threading support. See for more details: http://www.igvita.com/2008/11/13/concurrency-is-a-myth-in-ruby/
Windows support isn't up to par since most Ruby developers simple don't care (like me)
The stuff you'll most commonly hear about scaling issues is a myth. Unless you're making a second twitter perhaps.
There's very little you flat-out couldn't do in Ruby, but there's a few things you wouldn't want to do, mainly involving highly numerical computation. For most of those you could easily write a binding to a C-based API (or some other more performant library.) Image processing, for example, is something that would be dog slow for any non-trivial example in pure Ruby, but you can use RMagick to do it, which is a binding to the much-faster ImageMagick library.
Just about any other use for Ruby is fair game. I've written GUI apps with it, a lot of system services and more one-off scripts than I could count.
Well, it's a framework, so it optimizes for the most common cases. If your app requires unordinary and bizarre things (eg huge performance requirements, needs to use non-Ruby libraries), then Rails might not be suitable.
It seems to me that whenever a company hits these cases (usually performance rather than functionality or integration with other systems) they have to write their own stuff - Google has Big Table, Facebook has their own webserver, etc.
If you're in this position, you're most likely rolling in money and spending some of it to rewrite your code isn't going to be an issue.
However, Rails is great for most normal apps! I don't think it has any gaps that might cause pitfalls in normal cases.
I've put some of my free time on reading/learning about cakephp but now I'm wondering if will not be better to switch completely to ruby on rails.
Can you give me the good and the bad of those tools, when is about web-development?
many thx
Why switch? Since you've got a head start on CakePHP, take a little break.
Learn some Ruby on Rails for a while, then switch back to CakePHP when the mood strikes you.
That way, in the end, you'll end up knowing two languages/frameworks rather than just one. It's always better to get as much exposure as possible. Each has its benefits and downsides, but why not learn enough to make the decision yourself?
Neither is better than the other. While one may be more suited to particular applications than the other, they are certainly both good frameworks.
PHP is said to be faster, Ruby is objectively a better designed language. These probably make more of a difference than the framework itself - you can always modify the libraries or write your own classes to make the framework do what you want it to.
My advice is to stick with what you know if you are happy with it - learning a new framework is a long process. If you have issues with Cake or you're keen to try something different, Rails is definitely worthwhile.
I recently read a good article from a developer with a CakePHP base who just completed a large Ruby on Rails project.
http://www.jimmycuadra.com/blog/10-from-cake-to-rails
He details where Rails is stronger than Cake but also the other way around. Another blog here compares Ruby and PHP.
http://developingwithstyle.com/articles/2009/06/09/10-reasons-why-ruby-is-better-than-php-reason-5.html
personally i would choose cakephp at this moment. php and mysql are very common on most web hosting packages, even free ones. it is based on php and there is a huge amount of resources to learn and get help from. you can reuse many already written classes.
regarding the speed of cakephp, there are ways how to speed up cakephp in the production environment through the ways you code and caching.
I would choose ruby on rails because
ruby is fun to write
there is a great community
there are more high quality resources like www.railscasts.com and teachmetocode.com
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!
Try merb, merb-slices, and datamapper is probably the closest you can get in ruby.
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
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.
Duplicate: Django or Ruby-On-Rails?
I have been reading on Ruby on Rails, and it seems like on some threads, some users like Django a lot too?
Can someone who have used both give some insight about using them, such as
ease of use
productivity
fun factor
deployment issues
or any other framework you'd highly recommend?
Both are excellent frameworks. Though, I've found Rails to be more suited for the agile developer. For the most part, you'll run some generators to get the files you need as placeholders for your code. Things will work right away, and you just build up from these conventions. It's really flexible and has a large community, lots of innovation and interesting practices are being put into Rails. It's development cycle seems faster paced than Django.
After only touching the surface with Django, it has some interesting differences. As far as I know, you don't get the schema migrations like Rails has out of the box. But you get an extremely simple CRUD mechanism for your models with the extensible admin interface, which is great for testing/managing content. The entire project is documented really well, from the Django Book to the vast amount of information on docs.djangoproject.com.
I personally prefer the Rails way of doing things. But honestly, you need to try them both to see what works for you, and since we're talking about two very good, yet totally different frameworks, it's a tough decision to make either way. So, if you already know Ruby or Python well enough, start with what you know and just go from there. Once you understand how one works, you'll be able to evaluate the smaller differences yourself. Hope that helps.