There’s no denying the stir that Ruby on Rails has caused in the web development community. Since its release in 2004, it has gained a rapidly expanding user-base through its lightweight, elegant code, and marked benefits for productivity. It has also raised the profile of Ruby itself, the dynamic, object-oriented scripting language first released in 1995 by Yukihiro “Matz” Matsumoto. Ruby has been hugely popular in its homeland of Japan for a long while, but only began to gain popularity in the West in the last six years.
So not only are users coming new to Rails, but also to Ruby itself. David Black’s Ruby for Rails aims itself squarely at that sizable audience. It is not so much a book about “Ruby specifically for Rails” as one about “Ruby for people who have come to it through Rails”. Whilst many Rails users quickly get their heads around its clean-cut, minimal syntax, the first problem they often run into is Ruby itself. Ruby is a highly idiomatic language, and does not resemble the C-like languages most people are familiar with. Given the ever-increasing popularity of Rails, this book could not have been published at a better time.
The book takes the form not of a reference, but a linear tutorial. The first handful of chapters look, in turn, at the very basics of writing and running Ruby scripts (along with a quick guide to the Ruby command-line interpreter), the very basics of getting a Rails app up and running, and concludes with a look at beginning to use simple Ruby scripting techniques to enhance you application.
The book then takes a marked turn away from Rails, and concentrates on getting down to the nitty-gritty of Ruby itself. These chapters are the real highlight of the book - not for the keywords and methods they teach, but for the way in which they explain Ruby’s core and abstract concepts. Ruby’s real strengths - its highly dynamic nature and complete object orientation - are potentially its most confusing concepts, and yet Black’s methodical, plainly-written approach lays their complexities bare. His explanations of Objects, Classes, Modules, and how inheritance works are probably the best I’ve seen yet for Ruby, and coupled with an excellent chapter solely devoted to scope and self (the default object), get the complex underpinnings of the language out of the way in a very accessible style. (The sample chapter, on the basics of objects and classes, should give you a feel for Black’s clear, authoritative tone).
After that, the book moves on to cover control flow, devoting a good number of pages to the key concept that is code blocks, and then some slightly less complex chapters cover variables, scalars (strings, numbers, and symbols), collections (arrays and hashes) and regular expressions; these share more in common with languages the reader may be more familiar with. Still, just like the very first introductory chapters, they are all worth reading to the end - whilst they may start with common concepts, by the end, every chapter touches on the aspects that make Ruby unique, and explains some of the deeper complexities.
The Ruby language section ends with another fine, complex chapter, looking at Ruby’s capabilities as a dynamic language. In this chapter, as well as getting a handle on some really idiomatic Ruby concepts, the ‘magic’ present in Rails really starts to fall into place. Throughout the language-oriented chapters, Black always refers back to concepts within Rails, often in ActiveRecord, using what has just been learned to explain the more ‘magical’ aspects of Rails.
With the language-focused chapters out of the way, Black returns to the Rails app he began at the very beginning, and enhances it with the Ruby skills we’ve learned throughout the book. It’s here that a great deal falls into place - not just from a greater appreciation of what’s going on under the hood, but also through a new-found appreciation for Ruby idiom, and how best to work with (rather than against) Rails.
If there are faults with the book, they are few. Black consistently gives his example database schemas as SQL. Whilst I have no problem with this personally, it’s becoming more common in the Rails community to list them as database-agnostic Ruby migrations. Also, some of the code examples in the book may seem a little confusing to begin with - one early example features a lambda function, a concept not really explained until a good few hundred page later. And the initial chapter on Rails seems perhaps a little rushed, trying to cover much of the ground that many may have read in Agile Web Development with Rails.
But these are minor gripes. Ruby for Rails is an excellent guide to the Ruby language, especially for anyone coming to it afresh. It’s exactly the book that many in the Rails community have been waiting for, and it’ll improve your pure Ruby skills no-end. Certainly a book that I’ll be returning to many times in the future.
There’s no denying the stir that Ruby on Rails has caused in the web development community. Since its release in 2004, it has gained a rapidly expanding user-base through its lightweight, elegant code, and marked benefits for productivity. It has also raised the profile of Ruby itself, the dynamic, object-oriented scripting language first released in 1995 by Yukihiro “Matz” Matsumoto. Ruby has been hugely popular in its homeland of Japan for a long while, but only began to gain popularity in the West in the last six years.
So not only are users coming new to Rails, but also to Ruby itself. David Black’s Ruby for Rails aims itself squarely at that sizable audience. It is not so much a book about “Ruby specifically for Rails” as one about “Ruby for people who have come to it through Rails”. Whilst many Rails users quickly get their heads around its clean-cut, minimal syntax, the first problem they often run into is Ruby itself. Ruby is a highly idiomatic language, and does not resemble the C-like languages most people are familiar with. Given the ever-increasing popularity of Rails, this book could not have been published at a better time.
The book takes the form not of a reference, but a linear tutorial. The first handful of chapters look, in turn, at the very basics of writing and running Ruby scripts (along with a quick guide to the Ruby command-line interpreter), the very basics of getting a Rails app up and running, and concludes with a look at beginning to use simple Ruby scripting techniques to enhance you application.
The book then takes a marked turn away from Rails, and concentrates on getting down to the nitty-gritty of Ruby itself. These chapters are the real highlight of the book - not for the keywords and methods they teach, but for the way in which they explain Ruby’s core and abstract concepts. Ruby’s real strengths - its highly dynamic nature and complete object orientation - are potentially its most confusing concepts, and yet Black’s methodical, plainly-written approach lays their complexities bare. His explanations of Objects, Classes, Modules, and how inheritance works are probably the best I’ve seen yet for Ruby, and coupled with an excellent chapter solely devoted to scope and self (the default object), get the complex underpinnings of the language out of the way in a very accessible style. (The sample chapter, on the basics of objects and classes, should give you a feel for Black’s clear, authoritative tone).
After that, the book moves on to cover control flow, devoting a good number of pages to the key concept that is code blocks, and then some slightly less complex chapters cover variables, scalars (strings, numbers, and symbols), collections (arrays and hashes) and regular expressions; these share more in common with languages the reader may be more familiar with. Still, just like the very first introductory chapters, they are all worth reading to the end - whilst they may start with common concepts, by the end, every chapter touches on the aspects that make Ruby unique, and explains some of the deeper complexities.
The Ruby language section ends with another fine, complex chapter, looking at Ruby’s capabilities as a dynamic language. In this chapter, as well as getting a handle on some really idiomatic Ruby concepts, the ‘magic’ present in Rails really starts to fall into place. Throughout the language-oriented chapters, Black always refers back to concepts within Rails, often in ActiveRecord, using what has just been learned to explain the more ‘magical’ aspects of Rails.
With the language-focused chapters out of the way, Black returns to the Rails app he began at the very beginning, and enhances it with the Ruby skills we’ve learned throughout the book. It’s here that a great deal falls into place - not just from a greater appreciation of what’s going on under the hood, but also through a new-found appreciation for Ruby idiom, and how best to work with (rather than against) Rails.
If there are faults with the book, they are few. Black consistently gives his example database schemas as SQL. Whilst I have no problem with this personally, it’s becoming more common in the Rails community to list them as database-agnostic Ruby migrations. Also, some of the code examples in the book may seem a little confusing to begin with - one early example features a lambda function, a concept not really explained until a good few hundred page later. And the initial chapter on Rails seems perhaps a little rushed, trying to cover much of the ground that many may have read in Agile Web Development with Rails.
But these are minor gripes. Ruby for Rails is an excellent guide to the Ruby language, especially for anyone coming to it afresh. It’s exactly the book that many in the Rails community have been waiting for, and it’ll improve your pure Ruby skills no-end. Certainly a book that I’ll be returning to many times in the future.
In the interview, we discuss everything from Web Standards support in IE7, to whether or not IE6 will auto-update to IE7. Enjoy!
RC: Hi, my name is Ryan and we are here with Chris Wilson from Microsoft and we’re just gonna ask him a couple of quick questions, and so over to you, Chris.
CW: Thanks, Ryan. So, I’m Chris Wilson and I’m the Group Program Manager for the Internet Explorer team, on the platform and Security side of the Internet Explorer Team.
RC: Okay, so the first question I have for you is, “What new feature are you most excited about in IE7?”
CW: That’s a really hard question for me to answer, obviously, because I’m really close to it and there are a lot of features that I absolutely love. I think that as a user, probably the feature I’m most excited about is our support for RSS and our integrated feed subscriptions, feed reading, the integrated platform that does the sync engine and everything, that gets me really excited. I think as a developer, the best thing really is all the work we’ve done on standards support, all the fixes were done but as a user certainly the RSS platform is pretty exciting.
RC: A quick question about that RSS support, is that going to be similar to what people are used to in Firefox, when you subscribe to a feed in Firefox? Could you tell us just a little bit about what that’s actually going to be like.
CW: Sure. The user experience is actually somewhat similar for feed discovery, y’know, you’re browsing a web page and it has an RSS feed then a little RSS icon lights up, in fact it’s currently the same icon even that Firefox uses. The feed reading experience is kind of similar, the really exciting thing that we’ve done though is that we’ve built a platform not just for Internet Explorer, with RSS feeds, we’ve actually exposed APIs in both Win32 and the .NET frameworks platforms so you can actually write applications that use all of these feeds and they all share this common feed list, common store, common synchronisation engine. Like, I have a screensaver installed on my machine that automatically picks up all of the photos that are in my RSS feeds and uses them as a screensaver, so my contacts post new photos to Flickr, and I automatically get them on my screensaver. It’s pretty cool.
RC: That is so exciting! I mean it’s going to just break it wide open. Wow, cool. The next question I have for you is, tell me a little about your involvement with the Web Standards Project, I know that we at Vitamin are really supportive of what you’re doing and excited about it so I’ll just give you a chance to defend yourself.
CW: The Web Standards project, y’know, I’ve actually worked with them, peripherally at least, for a really long time, I mean, almost since their inception. I’ve talked to Zeldman a lot back in the day and I think lately, for the last year / year and a half, it’s been really exciting because we’ve really managed to build a relationship where the Web Standards Project helps advise us on what web developers and web designers really want and need, and help to prioritise that, and it’s not really necessarily that we don’t care about standards or anything like that, it’s really that we need help in prioritising what’s most important. We had a lot of requests and a lot of them are really very grand requests in both senses of the word. They’re good requests, but they’re huge, and we really need some help to figure out what’s the most important to make people’s lives easier in the web development community, so I think that our relationship with the Web Standards Project has been great to help figure that out, help us to prioritise and help get the message out too that we really do care and we’re trying to do better.
RC: The last question that I have for you is, “Is IE going to auto-update to IE7 and how do you feel about that?”
CW: Is IE going to auto-update to IE7? I think that the first thing really is that we can’t really force it on users. That’s not our goal. We really do like to offer users choice. It is a different user interface, some people will be really jarred by that. I think that we certainly want to encourage everyone out there to, um, I do believe that we will offer it through Windows Update, but it won’t be an automatic silent update, certainly it won’t be like you come in one day and suddenly your computer’s running IE7 rather than IE6. Certainly we have to ask the user if they really want it. As nice as it would be to blast it onto everyone’s system I don’t think that can happen, so.
RC: Alright, well that’s it, so thank you for joining us, I appreciate it.
CW: Great, thank you, Ryan.
Transcribed by Scott Morris
In the interview, we discuss everything from Web Standards support in IE7, to whether or not IE6 will auto-update to IE7. Enjoy!
RC: Hi, my name is Ryan and we are here with Chris Wilson from Microsoft and we’re just gonna ask him a couple of quick questions, and so over to you, Chris.
CW: Thanks, Ryan. So, I’m Chris Wilson and I’m the Group Program Manager for the Internet Explorer team, on the platform and Security side of the Internet Explorer Team.
RC: Okay, so the first question I have for you is, “What new feature are you most excited about in IE7?”
CW: That’s a really hard question for me to answer, obviously, because I’m really close to it and there are a lot of features that I absolutely love. I think that as a user, probably the feature I’m most excited about is our support for RSS and our integrated feed subscriptions, feed reading, the integrated platform that does the sync engine and everything, that gets me really excited. I think as a developer, the best thing really is all the work we’ve done on standards support, all the fixes were done but as a user certainly the RSS platform is pretty exciting.
RC: A quick question about that RSS support, is that going to be similar to what people are used to in Firefox, when you subscribe to a feed in Firefox? Could you tell us just a little bit about what that’s actually going to be like.
CW: Sure. The user experience is actually somewhat similar for feed discovery, y’know, you’re browsing a web page and it has an RSS feed then a little RSS icon lights up, in fact it’s currently the same icon even that Firefox uses. The feed reading experience is kind of similar, the really exciting thing that we’ve done though is that we’ve built a platform not just for Internet Explorer, with RSS feeds, we’ve actually exposed APIs in both Win32 and the .NET frameworks platforms so you can actually write applications that use all of these feeds and they all share this common feed list, common store, common synchronisation engine. Like, I have a screensaver installed on my machine that automatically picks up all of the photos that are in my RSS feeds and uses them as a screensaver, so my contacts post new photos to Flickr, and I automatically get them on my screensaver. It’s pretty cool.
RC: That is so exciting! I mean it’s going to just break it wide open. Wow, cool. The next question I have for you is, tell me a little about your involvement with the Web Standards Project, I know that we at Vitamin are really supportive of what you’re doing and excited about it so I’ll just give you a chance to defend yourself.
CW: The Web Standards project, y’know, I’ve actually worked with them, peripherally at least, for a really long time, I mean, almost since their inception. I’ve talked to Zeldman a lot back in the day and I think lately, for the last year / year and a half, it’s been really exciting because we’ve really managed to build a relationship where the Web Standards Project helps advise us on what web developers and web designers really want and need, and help to prioritise that, and it’s not really necessarily that we don’t care about standards or anything like that, it’s really that we need help in prioritising what’s most important. We had a lot of requests and a lot of them are really very grand requests in both senses of the word. They’re good requests, but they’re huge, and we really need some help to figure out what’s the most important to make people’s lives easier in the web development community, so I think that our relationship with the Web Standards Project has been great to help figure that out, help us to prioritise and help get the message out too that we really do care and we’re trying to do better.
RC: The last question that I have for you is, “Is IE going to auto-update to IE7 and how do you feel about that?”
CW: Is IE going to auto-update to IE7? I think that the first thing really is that we can’t really force it on users. That’s not our goal. We really do like to offer users choice. It is a different user interface, some people will be really jarred by that. I think that we certainly want to encourage everyone out there to, um, I do believe that we will offer it through Windows Update, but it won’t be an automatic silent update, certainly it won’t be like you come in one day and suddenly your computer’s running IE7 rather than IE6. Certainly we have to ask the user if they really want it. As nice as it would be to blast it onto everyone’s system I don’t think that can happen, so.
RC: Alright, well that’s it, so thank you for joining us, I appreciate it.
CW: Great, thank you, Ryan.
Transcribed by Scott Morris
37 queries. 0.995 seconds