CARVIEW |
By Cody Fauser
June 2006
Pages: 56
Series: Short Cut
Format: PDF
ISBN 10: 0-596-52809-4 |
ISBN 13: 9780596528096
(Average of 6 Customer Reviews)
RJS templates are an exciting and powerful new type of template added to Rails 1.1. Unlike conventional Rails templates that generate HTML or XML, RJS templates generate JavaScript code that is executed when it is returned to the browser. This JavaScript generation allows you to perform multiple page updates in-place without a page reload using Ajax. All the JavaScript you need is generated from simple templates written in Ruby. This document helps you get acquainted with how RJS templates fit into the Rails framework and gets you started with a few easy-to-follow examples.
Browse within this PDFFeatured customer reviews
Great book, April 17 2007





Great book, it covers only the topic at hand but it does so quite well in my opinion. I went from knowing nothing about RJS templates to integrating them into my site in a few hours.
I also ran into the table issue with IE (mentioned in previous review). IE seems to require the tbody element, you can add replace elements within a tbody eleemt but not directly within a table.
Mileage may vary, January 01 2007





While a comprehensive introduction to RJS templates for Rails, there is a big assumption that you will understand more material. If you are a newbie to Rails, this is not the resource for you. There is a very directed audience for this short, and "building a Ruby on Rails Website in a hurry" folks should choose some of the alternate introductory guides out there, as this is not one of them. While it does walk you through a beginning site, you will have trouble modifying it and personalizing it. That said, it is an excellent resource for those who have a firm grasp on Ruby on Rails, and are ready to mix AJAX and the RJS templates to make more usable sites. Some of the writing is choppy, but overall the technical coverage of the RJS elements is very in depth.
RJS Templates for Rails, November 25 2006





RJS Templates for Rails
By Cody Fauser
June 2006
Series: Short Cut
Format: PDF
ISBN: 0-596-52809-4
Pages: 56
Description:
RJS templates are an exciting and powerful new type of template added to Rails 1.1. Unlike conventional Rails templates that generate HTML or XML, RJS templates generate JavaScript code that is executed when it is returned to the browser. This JavaScript generation allows you to perform multiple page updates in-place without a page reload using Ajax. All the JavaScript you need is generated from simple templates written in Ruby. This document helps you get acquainted with how RJS templates fit into the Rails framework and gets you started with a few easy-to-follow examples.
Everything is true in the description above. The book ?RJS Templates for Rails? is one way to fill the void of good books on RJS, maybe the only excellent book. It is a first-class way to improve RJS experience of developers from beginners to experts in a hurry. Even experts should consider the price a steal if their collection on Rails 1.1 and RJS Templates is to be thorough.
I really like the gray boxes with encouragement to remember to use or not use things like: ?Don?t use the :update Option with RJS Calls? [page 6]. A number of the learning issues are explained in a series of fine examples, most just a few lines of code. I think it is important to develop code in general using the same thought processes the author uses.
I liked the simple application developed during the book right away: My Thoughts. It should be a helpful and useful starting point for others to develop what they need or want with RJS Templates and Rails 1.1. Another application is an expense tracker.
My experience agreed with almost everything written. I am a member of a user group that has had numerous lectures on Rails in the last year. Most members are developers and deal with trying to create applications with less than adequate documentation. I appreciate the short and sweet code and explanations in this book.
?The Principle of Least Surprise? is interesting. Find it on page 11 if you have not run into this before.
The topics start with an introduction, then Getting Started with a Simple Example, the RJS and Rails, the RJS in Practice, Firebug, Enhancing the Expense Tracker, RJS Reference and an Appendix.
The 56+ pages are clearly written. I like that about this book. No long winded explanations of useless trivia here. Get right to the point and stay there. The code is clear and helps understanding the issues presented by the authors.
The Firebug utility developed by Joe Hewitt is an interesting tool for debugging with a good explanation by the author. This is valuable knowledge worth your time to read and digest as thoroughly as possible.
The book is in .PDF format. I like that feature. You can buy this online through the O?Reilly shopping cart and then download it.
The 56+ pages were easy to read and understand. I read it in one evening. There were a few typos and grammar errors, but not very many. The book is for someone who is a little more than a beginner. More experienced people should look it over to make sure they are up to speed with these authors.
I would give this book 5 out of 5 stars. Since it is such a quick and easy read, you might be missing something unless you check your knowledge against these experts.
Frederick J Eccher Jr November 25, 2006
MBA
M.S. Management of Information Systems
A.B. Psychology
B.A. Biology
President, Board of Directors, Saint Louis Visual Basic Users Group
rick@stlvbug.net
Definitive resource on a powerful new feature of Rails 1.1, September 29 2006





If you have any interest whatsoever in the use of AJAX with Ruby on Rails, this is undoubtedly money very well spent. RJS should without a doubt make previous AJAX mechanisms obsolete due to its ability to manipulate multiple elements on a page.
My only criticism is that I don't think the technique of using a prototype Insertion.Bottom is very useful for tables since this technique will not work properly in IE (as the second demo app did not work for me in IE).
the best (ans only) RJS manual, June 26 2006





It's a must have for every rails developer. There is virtually no RJS documentation available, except the api rdoc and a few blog entries. This book fills the gap. Though I wrapped my head around RJS a week before discovered this book, I found it very usefull.
I give it 5 stars - it is a must have for any rails developer.
Developers, who are building web apps with other languages and frameworks might also make use of this book and port the RJS techniques to their language of choice. This book shows the most painless and innovate way to develop modern AJAX UI's for web applications.
wow, it got me started, June 21 2006





I had been hearing about RJS from laste december, when it finally arrived with rails 1.1, I wanted to try my hands with it.
but there was no single source, who went beyond the basics.
cody fauser has done a excellent job with this book.
step by step approach. not overwhelming you with too much information.
author starts with a simple thought_log , a "to do" style app.
+ve
1) all code can be cut and pasted, and works clean
2) proper explanations
3) advanced features shown and covered(I have not yet seen it on any other blog), eg.
a) debugging RJS, scriptaculous with firebug firefox plugin
b)javascript callbacks for Ajax requests
c) model validations and showing errors with RJS
d) RJS refactoring
e)Ajax Global Responders
-ve
1) small typo's exist,
a) page 25 -> app/views/new.rjs should be app/views/expenses/new.rjs
b) page 31 views/expenses/_form.rhtml should be views/expenses/_new.rhtml as there are no form partial.
2) if sam stephenson had added few notes on design considerations while designing RJS, it would have been another gem for every rails user
I have tested and succeeded with more RJS in last 2 hours than the last few months searching and testing code from blogs.
overall rating, if you are a self learner, a very good buy,
regards
A.Senthil Nayagam
https://senthilnayagam.com
Media reviews
"It looks like (the) potential benefit of this essay is for the price of two burritos and a day of code copying and testing, you can skip five days or 2 weeks of digging for details. If you are building a Ruby on Rails Website in a hurry, this is a very attractive package of information."
-- Lee McKusick, Peninsula Linux Users Group
"RJS Templates for Rails is a really quick read that does a good job of getting you started with using RJS and the JavaScriptGenerator API. It starts with a very simple example program that you can have up and running in a matter of minutes. It continues with a slightly more in-depth example of an application that really uses some of the more interesting aspects of RJS including multi-element page updates with a single request."
-- Geoff Lane, Zorched

"If you are building a Ruby on Rails Website in a hurry, this is a very attractive package of information."
--Lee McKusick, Peninsula Linux Users Group
About O'Reilly | Contact | Jobs | Press Room | How to Advertise | Privacy Policy
|
© 2008, O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.