Computing Reviews

Beginning Rails :from novice to professional
Cloves J., Hardy J., Apress,Berkeley, CA,2007. 361 pp.Type:Book
Date Reviewed: 12/07/07

The current generation of Web applications, such as Weblogs, social networking sites, wikis, and Web services (often dubbed as Web 2.0), facilitates collaboration and sharing among users. Several frameworks exist that provide the complete infrastructure needed for the development and deployment of such applications. This book on Rails, a Web application development framework based on the Ruby language, is both timely and accessible to beginners.

Chapter 1 sets the context for Rails. This includes: a list of requirements for a Web application development framework; a statement of the principles underlying the Rails framework, convention over configuration (CoC) and don’t repeat yourself (DRY), which make it easy to develop and maintain Web applications; and a discussion of the model-view-controller (MVC) design pattern, which is the software architecture of all applications developed on Rails. Chapter 2 presents the instructions for the installation of Rails on Windows XP, Mac OS X 10.4, and Linux. Chapter 3 walks through the construction of a basic application, and the support in Rails for the generation of scaffolding for easy testing.

Chapters 4 through 6 walk through key components of the Rails framework. These are the Active Record, Action View, and Action Controller components that correspond to the model, view, and controller roles of the MVC pattern. This book is geared toward getting novices to start writing applications right away, rather than serving as a reference for the Rails framework, so it is important to get one’s hands dirty with the example code. A Web-based event management system is developed and extended in these chapters, and it should be easy for a beginner to modify and customize the code for his or her own needs. While the Ruby language syntax covered in Appendix A is sufficient to follow along with the example code, I think a basic understanding of object-oriented programming (which is not covered in this book) is a prerequisite for understanding the Rails framework. Appendix B is a crash course in databases and structured query language (SQL), which is sufficient for understanding Active Records, the interface to databases in Rails.

Chapter 7 covers what may be the most interesting topic to a Web application developer: the support for Ajax available in Rails. This is facilitated by Prototype and script.aculo.us, two JavaScript libraries that are bundled with Rails; examples of using Ajax helpers from both libraries are provided. Ruby JavaScript (RJS) templates, for managing complex Ajax interactions easily, are also introduced. Chapter 8 covers the Action Mailer library, which can be used by the developer to easily add support for sending and receiving email in a Web application.

Chapter 9 covers the support for unit, functional, and integration testing in the Rails framework. This chapter misses the opportunity to introduce rudimentary benchmarking of applications (for example, via information in the log files) to the novice programmer. Chapter 10 explains how to write plug-ins, and how to extend the functionality of Rails using plug-ins found on the Internet. Chapter 11 presents some ways of deploying Rails-based applications on the Internet.

While most topics of interest to a novice Web application programmer are covered in the book, I think a brief introduction to the topic of Web services (in particular, the support for RESTful Web services in Rails) would make the book more complete. That minor criticism aside, the book is well written and easy to follow. The code example, a Web application, is well thought out and spans several chapters, while its functionality is improved incrementally. However, for this very reason, I think that the book is not accessible to the professional programmer who wants to jump in and understand a particular feature in Rails—despite having a comprehensive index. That said, I think this is an excellent book for a novice in both Web applications and the Rails framework. At the end of the book, readers will have developed a fairly sophisticated Web application while learning about Rails.

Reviewer:  Suma Adabala Review #: CR135005 (0810-0937)

Reproduction in whole or in part without permission is prohibited.   Copyright 2024 ComputingReviews.com™
Terms of Use
| Privacy Policy