Sunday, February 21, 2010

Why Rails still matters when we already have Grails?

Question ONE: Why ruby when you have groovy? Answer: The right language for the right job.

best Rails books: http://antoniocangiano.com/rails-books/

Venkat Subramaniam 'summary on http://www.coderanch.com/t/531/Ruby/Groovy-vs-Ruby-vs-Java is quite insightful:



Ruby: "If I want to deploy my solutions on the JVM, purely from the point of view of organizational deployment issues and restrictions, or if I want to take advantage of the performance gains I will get by using the JVM, then I prefer the Ruby/JRuby route."



Groovy: "For a Java project, you have to interact heavilywith Java libraries and APIs and frameworks, and at the same time to take advantage of the capabilities and features of a dynamic language, "



Question two: why Rails when you have Grails?



Anwer: learn ideas from different communities. Two communities face similar problems with similar tools. However, two paradigms provide different perspectives and therefore distill different experiences which will enhance to each other.



1) Rails is much mature in the direction of "fast building website" moving into the right direction.



2) for the purpose of learning Grails, rails community provides very insightful book, posts that reveal the strucutre of the MVC framework while Grails community, on the other hand, assumes too much knowledge and background of the learners: hibernate, ant, java, etc. Therefore, the books in grails community focuses on "recipes" aspect. The authors must have deep understanding, but they do not reveal them, assuming every body knows. Rails community, on the other hand, has produced many good books: Art of Grails, Enprise Grails. Advanced Grails. Even books on the languae is much mature and deep.



prefer (assuming it serves my needs that is).



The Art of Rails The Art of Rails (Programmer to Programmer) by Edward Benson




Learning Rails: view centric approach




It started with the view (ruby-embedded html, good for those with experience in web design but little programming experience, those who have some programming experience but are not familiar with the how the model-view-controller paradigm is implemented by Rails. not much rationale explained.


comparing Rails to Lift


http://www.google.com/search?hl=en&source=hp&q=lift+vs+rails&aq=f&aqi=g1g-m1&aql=&oq=


The logic in a MVC framework consists of the web form that creates/finds a model object's params, the processing params in the controller and Active Record, including validations, showing errors and letting users correct them, CRUD processes in the DBMS and all the routing, renders and redirects that show users what's happening. The authors take each subtopic of Active Record, views and controllers, give an short, intuitive summary of why it's important, then give the most common use scenarios, along with common traps or misunderstandings that might arise. Chapter 7, Ajax, tackles a large subject in a very condensed manner(they say as much on p. 228). While the overview is good, it's more like a 30,000 foot view that doesn't quite give you enough confidence to start coding in Prototype and scriptaculous. For that, there's the excellent "Ajax on Rails" Raymond book, as well as a couple others in the pipeline. The rest of the covers testing, sending emails and deployment in, again, a condensed manner. Rails is a fast-moving target, there's a lot of topics that could have been covered here: rspec, test/spec, mocks and stubs, plugins to make fixtures usable, or avoid using fixtures, etc. But it's a great smallish intro to Rails. The appendix intro to Ruby is superfluous. If you already know python, perl or PHP, it might be all you need to get started coding ruby. Otherwise, you'll probably need a more complete intro and reference (Black's "ruby for Rails" is highly recommended). So this is a topic-structured tutorial for Rails, in contrast to Apress' social networking and e-commerce books, which are project-based and present more code with less explanation (and covered more plugins like Ferret, acts_as_taggable, etc) If you ahve the luxury of borrowing a few different intro rails books , i would encourage it. One or the other method of presenting Rails may work better for you. But you can't go wrong with this book.



















list of books









Beginning Rails: activeRecord using ruby console, similar to Foundation 2



Ajax on Rails









Foundation 2: activeRecord instroduction,









Learning Rails: Scaffolding as a way to present the whole picture, Scaffolding and RESTful









Rails Space: social networking and e-commerce books, which are project-based and present more code with less explanation (and covered more plugins like Ferret










Rails Blogs and Podcast