Saturday, January 27, 2007

Book Review: "Beginning Ruby on Rails"

I've been a big fan and advocate of Dr. Steven Holzner's technical writing ever since penned wrote what, in my humble opinion, is THE authoritative JavaScript reference, New Riders' "Inside JavaScript". So it was with great enthusiasm (perhaps unfairly so) that I purchased "Beginning Ruby on Rails" by Wrox. I expected a lot out of it, which goes against my journalism disciplines of approaching each review objectively and without bias.

First, the positives. The good doctor's redeeming quality as a technical author is his ability to make the complex graspable for an audience – being neither too intimidating for the beginning coder, nor too condescending for the experienced architect. In this light, the book is very well done. Also, many readers with whom I've interacted find the holy grail of Rails writing, "Agile Development with Rails" to be too presumptuous and at times difficult to grok. Holzner addresses this crowd very appropriately, so those new to Rails, or Ruby programming, or web development in general will appreciate this book.

I realize that writing an introductory level book on any web framework is a huge undertaking for any platform. An author has to introduce a programming language, object-oriented tenets, database theory, SQL, operating systems support, web server integration, page handling, etc. – and then get into the actual web development. Add to this the challenge of a framework like Rails evolving at such a pace that a major publication might be outdated by the time it hits the shelves, and you've got a pretty daunting task at hand.

Holzner gives a good introduction into the Rails directory structure, working with databases, command-line syntax for creating Rails apps, working with Rails scaffolding, and provides a very healthy discussion for using Ajax in Rails. There's practical code in the book you can yank and use right away (not dependent on previous chapters), and the book shows how to work with WEBrick. There's a nice little section on unit testing, and cited are examples for setting up Rails on a Windows PC, a Mac, or a Linux box, so the content is available to a wide audience.

But with that said, I found the book to be short in a couple of key areas.

Only a scant amount of information was provided on working with XML and for using ActionController for REST-like URL mapping. And there isn't anything at all presented on the use of RJS templates. And there's likewise a tragic omission of using Rails to author web services, and nothing was presented about apps based on real-world relationships from database tables, only a simple one-to-many example. I also found the book to be incomplete without a firm discussion of a page's life cycle when handled by Rails. And there shockingly wasn't enough mentioned about the critical facet of Rails – its underlying Model-View-Controller architecture.

And what winds up being the book's most code-heavy example – a Rails shopping cart using session data and custom models - is merely regurgitation of the Pragmatic Programmers sample in the "Agile..." book.

The book's appendix is merely the answers to the end-of-chapter questions. I would have liked to see such a section dedicated towards more in-depth info on keeping Rails up to date, working with and authoring custom Ruby gems, examples of various sites currently using Rails, URLs to screencasts and podcasts, and IDEs developers can use instead of hand-coding new applications each and every time out. Since the examples mainly create a new rails app for each demo, I worry that the book may allow the first-time reader to misconstrue Rails development as a lot of work for even the simplest of jobs. Which defeats the whole purpose of Rails to begin with.

So, I'm giving this book 3 stars. It's very well written with a friendly voice and it'll get you into Rails fast. It's a great way to start learning RoR development for any level of developer. I've shared it with a few friends in academic circles and also with non-technical people, and it suits both equally effectively. But even at that, and considering myself an experienced - but not expert - Rails developer, the book is a bit incomplete without several critical discussions.

Saturday, January 13, 2007

Spanish computer ads in Google AdSense

I was surprised this afternoon after uploading several stories to see Spanish-themed graphical banners for USANotebook.com in place of the normative text-based ads Google AdSense streams to my site.

While I normally see a variation of this:


...I noted a couple instances of this (without and without HTML markup displaying the banner):


Anyone else ran into this? I've been running AdSense for almost 3 months and this ie the first time I've seen it be graphical or non-English.

Wednesday, January 10, 2007

KUAM does web-only newscast...and then some

I wrote the other day on KUAM.com how in keeping on the cutting-edge of digital news distribution my station has started producing a web-only afternoon newscast (see a sample here), complementing our existing full-length streaming versions of our nightly newscasts, and the atomic-level individual stories, interviews and guests exhibited in the embedded player on our homepage.

We also started YouTube channels for our live, call-in talkshow program and for the mixed-martial arts events produced by a sister company of ours. Nothing like blanket coverage, baby.

Personalized content - an inspirational tale

Surfing around ESPN's site, I noticed the "MyESPN" service, so I checked it out. They'd mentioned they were working on when I interviewed with one of their developers in 2005, so this intrigued me. Their customized content portal is pretty cool, albeit not overly original.

Google's got one, PageFlakes is a huge hit, and Microsoft's implementation of movable content gadgets, web parts, was the main driver that got me into ASP.NET v.2.0 in the alpha stages of that platform. I'm thinking now that I might develop one of these for content relative to my station's site, seeing as how we've got at least a baker's dozen of content areas that people could use. I'd been messing with Google's XML-based gadgets, but it might serve us well to homegrow a portal, too.

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]