Archive for the 'Ruby' Category

Book Review: Programming Ruby

The Pragmatic Programmers’ Guide

This is the famous ‘PickAxe’ book that Ruby nerds talk about. A very well written book that is concise and to the point.

A COUPLE OF COMMENTS:

This is one of those books that reads very well. I had a hard time putting it down even though the coverage was deep - you’ll learn a lot about Ruby and maybe more about programming in general.

I never give the TOC of a book (that you can easily look up,) but I should mention 2 major divisions:

  1. Part 1 is a tutorial that leads you through the core Ruby language.
  2. Part 2 goes into the Ruby environment - the tools that you have available with Ruby. There’s a lot and they work well.

There is much more (advance Ruby concepts, Ruby reference) but I will leave that for you to look into.

FINAL COMMENTS:

What can I say … if you are using Ruby or you want to learn Ruby, you need to get this book.

Book Review: Beyond Java

A small book that takes a critical look at Java and other languages (Ruby, PHP, ) at a moment in time.

I say ‘at a moment in time’ because this book will lose relevance very quickly - even more quickly than the typical nerd book.

In a nutshell:

  • You get a brief history lesson on languages and their problems.
  • You get a perspective of the problems that Java developers face.
  • You get perspective on the subject from interviews with several big-wig names in the field.
  • You get an overview of Ruby and Rails.

My complaints:

  • The author likes to introduce his chapters with kayaking stories that are suppose to reflect what he is about to talk about … I would just skip those parts because I am not into kayaking.
  • Question of accuracy: he mentions (page 174) that PHP does not have enough structure. This is a silly statement given that there are SEVERAL PHP frameworks out there that provide the exact same structure as Rails - some even copy Rails.

Conclusion:

I liked the book and it was a worthwhile read. It has a few problems but it does open your eyes to things.

That said, the title of the book should have been: ‘Beyond Java and why I love Ruby’.

Book Review: Ruby For Rails

Ruby For Rails connects the dots between Ruby and Rails.

In a nutshell:

This book looks at how Rails uses Ruby, and in so doing, you learn a heck of a lot about Ruby programming.

Ruby For Rails goes into detail about basic Ruby, enough so that I think someone new to Ruby, could learn enough about the language to be able to build web applications. But, the book is not a comprehensive Ruby reference - there are things that are not talked about.

The thing I really liked about the book, is the way the author introduces a concept and then shows you how Ruby or Rails implements that concept in a practical application.

For example:

You are introduced to a Ruby construct called a ‘module’*.

  • You learn what a module is.
  • Why Ruby has modules.
  • How Rails uses modules and why.

I am glad to have this book and think anyone interested in learning Ruby and /or Rails, should get it.

-

* Ruby modules are programmatic constructs that are like classes (they have methods and constants,) but they are not directly instantiated like a true class.

Instead, modules are created to be inserted into to classes or objects to give the host class or object the extra functionality. Often modules are referred to as ‘mix-ins’ because modules are mixed in to classes.

PHP vs. Ruby

With all the buzz about Ruby these days (because of the web application framework ‘Ruby on Rails’) Zend (the people who manage PHP) are feeling the pressure.

Nerd Note: a ‘web application framework’ makes creating databased driven websites much easier because the framework takes care of a lot of the ‘dirty’ work that you would normally have to build yourself.

As far as Zend is concerned, PHP is not getting its’ fair share of attention even though PHP is:

  • Much more available than Ruby - in terms of hosting.
  • PHP is a widely used and a proven language with big sites like Yahoo, Digg and Flickr using it.
  • PHP is easy to use and easy to learn.

As I mentioned above, Ruby’s recent rise has been largely due to the web application framework ‘Ruby on Rails’. So in response to this, Zend has developed their own framework called: Zend Framework.

Along with the Zend Framework, comes a nifty new web site. From the press release:

Future of Web Application Design Is Here and Looking Good

Varien, a web design and development firm, has redesigned the Web site for Zend Technologies’ PHP framework. Varien completed the redesign as part of an effort to reposition PHP as the cleanest and most simple programming language.

Los Angeles, CA—April 20, 2006—Varien has completed redesigning the Zend Technologies’ new PHP Framework Web site in an effort to make the Framework more accessible. The Framework is a powerful new tool for Web developers, providing a simple, standardized way to create powerful web applications using PHP.

The redesign was part of a broader effort to reposition PHP, which included designing a new logo for the Framework. By repositioning PHP Zend hopes to make the Framework and PHP more appealing to current Web developers and less intimidating to those looking to get into Web development.

“Here you have PHP, a programming language that runs Flickr, Wikipedia, Digg, and even Yahoo, and yet Ruby has become synonymous with the new Web,” said Ben Blumenfeld, the Design Director at Varien. “Hopefully this redesign makes Web designers and entrepreneurs take another look at PHP. With Zend’s Framework, PHP is now simpler, faster and more powerful than it has ever been.”

PHP usage has grown tremendously since PHP4 was released in 2000. However, PHP has recently lost some of its mindshare to the heavily touted Ruby on Rails, despite a huge gap in actual usage. (TIOBE programming community index)

The Zend Framework aims to provide a high-quality, commercial-friendly and open-source based solution for programming in PHP. Zend is excited about the Framework’s usability and knows the site redesign will help developers get the most out of the new technology.

“The coolness fact is also important in initially attracting Web developers and is complementary to the technology. The new look of our Web site enables us to build a more appealing perception of the Zend Framework,” said Andi Gutmans, the vice president of technology at Zend.

The Framework can be found at framework.zend.com. The redesign allows users to download the framework from the front page and highlights projects created using PHP in a section on the front page.

-

WILL RUBY CONTINUE TO EAT AWAY AT PHP’S MIND SHARE?

This is the $64 000 question. But we have to consider one point: Ruby has capability that is widely used in Rails that PHP simply does not have; so can a PHP framework be as effective as Rails?

Nerd-minds want to know!

Stefan Mischook

GoDaddy.com Supports Ruby

I have had two major problems with Ruby and Ruby on Rails:

  1. Hard to find Ruby/Rails hosting.
  2. Not too many clients looking for Ruby programmers.

One thing has changed:

A major hosting company (GoDaddy.com,) has stepped up and now supports Ruby on Rails hosting - there goes my first argument against learning Ruby!

Quote from GoDaddy:

Our customers are finding Ruby on Rails to be incredibly valuable in shaping their online presence,” said Bob Parsons, GoDaddy.com CEO and Founder. “We are pleased to be able to offer support for a framework that increases the utility of the sites we host.

With GoDaddy.com jumping in, this will force/influence other hosting companies to adopt Ruby and as such, I believe over the next year, Ruby hosting will become more and more common.

BUT EVERYTHING IS NOT PERFECT WITH RUBY… YET.

Even though it looks as though the hosting thing is resolving itself, we still have the issue of the number of Ruby gigs/jobs floating around … not that many yet.

There is still so much PHP out there (hosting, frameworks, products) that I think for next few years, PHP will continue to dominate with regards to small to medium size projects.

That said, I think that Ruby will be a player for a few reasons … most important, is the strong acceptance of Ruby (and Rails) by the Java community.

Another problem with Ruby and Rails, is the stability of the fastcgi plug-in that works with Apache 2.x.

Basically, there are still some lingering issues with how Ruby ‘talks’ to Apache. This is major, but there are many high profile, high traffic websites that seem to be running fine anyway … ?

CONCLUSION

Despite the aforementioned issues with Ruby and Rails, I am actually involved with putting together a major project with Rails … I know, I know, I’m a bit of a hypocrite!

My reasons?

  1. Ruby and Rails are compelling - there’s some good stuff in there that should make the project much easier to build.
  2. I wanted to explore Ruby and Rails with a real project - I’m just a ‘Curious George’ I suppose …

I plan to come back to you and give you my impressions as to how easy (and useful) it would be for web designers (not programmers) to learn at Ruby vs. say PHP.

Stefan