Ruby on Rails and CakePHP Comparison

Try to read "Agile Web development with ruby on rails" You'll learn it in just two or three days!

I second James' suggestion. There's plenty of online Rails Tutorials (here are the top 12), but get the 2nd edition of "Agile Web Dev with RoR" if you can... it's well worth the money.

The Ruby book 1st edition is online.... http://www.ruby-doc.org/docs/ProgrammingRuby/

Bart

james_027 wrote:

If you're a Ruby newby (like me!) then before digging into Rails I think it would be a good idea to take a look at David Black's outstanding Ruby for Rails:

It's really great for helping you come to grips with Ruby as a language and how you can use it with Rails, the framework. I started reading it about a month ago and now I can actually read and understand what's going on in (some of) the Rails source code. Highly recommended...

hi gmacgregor,

I am also a newby, I'll take a look at your recommendation. Have you try Agile Development with ROR? It is also great even for a ruby newby like me. How do you compare the two books?

james

James,

I don't think order is important, but you need both books and probably more! I went through the Agile book first, and that got you up and running so you felt you too could be successful, but since Ruby was new to me, I could *read* the language but *writing* my own code was only a subset of what I had experienced in the book. So Ruby for Rails filled in a lot of gaps, explained things differently which gave added insight and so on. So now I'm working through Apress' "Beginning Ruby on Rails for E-Commerce" by Hellsten and Laine and it's adding even more to my knowledge.

The next really good book would probably be a dialog between all these authors, talking through their similar projects and exploring the differences in their approaches and uses of the Rails framework and Ruby constructs!

Jim

james_027 wrote:

I am also a newby, I'll take a look at your recommendation. Have you try Agile Development with ROR? It is also great even for a ruby newby like me. How do you compare the two books?

The Agile book throws you right into Rails and gets you going. It's good because you're doing something (building the depot application) and the "magic" of Rails is thoroughly explained. However, I didn't really get some of the basic concepts because I didn't know a thing about Ruby -- which is of course key since it's the language behind the framework!

I highly recommend the "Agile" book, which I've been devouring over the past few days.

I'm only a few days away from finishing 2nd edition myself.

The example they use for discussion is developing an ecommerce site -- and as someone who has PHP-coded from scratch and manages just such a beast (much more elaborate than the example), I can see with every page how Rails would make my job a lot easier, a lot quicker, and a whole lot better to maintain and enhance.

That's what I tell my PHP/Perl-loving peers. "Just read the book.. at the end you'll get a good head start on a nice shopping cart."

I briefly considered CakePHP, mainly because I was concerned about Rails deployment issues: How well does it actually run on a production server?

Same as most PHP apps I suspect.

(We rent a Linux box at a hosting farm.) Do I have to scrap Apache to make it work? (Talk about barriers...)

No. You can proxy through Apache to your mongrel or lighttpd instance.

http://destiney.com/blog/lighttpd-proxied-under-apache-mac-os-x

Happily, the Agile book has an excellent discussion about running Rails using Apache and mod_proxy, which satisfied my concerns. I may still look into Cake for PHP-only jobs, but where I have the option I'm going with Rails.

Cake seems nicely written but last time I gave it a little of my time it felt incomplete.. it didn't have nearly the js integration compared to that of Rails. Anyone can toss 3 folders at you and tell you to split up your logic and code MVC style.

For me I hate writing js. I hate debugging js. I hate helping clients understand why my js doesn't work in their ancient browser on their ancient OS that is full of malware and virii. Half of what I love about Rails is getting all this cool js stuff for free. Writing Ruby that writes js just feels good.

Another PHP thingy I'm sorta watching a bit is the Zend Framework. It's very heavy on the OO-ness, and I'd expect nothing less from Zend, but it has no js integration I could find. Rumor has it IBM is supposed to be committing a bunch of js stuff to the code base soon, but Rails is already here and works great.

PHP is great, and I can easily see myself using it for years to come, but I don't do much with it outside of the office anymore. All my hobbie coding time is spent with Rails.

I have only just started, don't spoil the ending!