After many years of saying “I really should take a look at CakePHP”, I’m finally doing something useful in it. And it’s marvelous.
What’s fascinating to me about shiny new technology like this (new to me, that is) is that I’m almost always reluctant to get started, and I’m almost always thrust into it by a co-worker who says that it’s the way to go, and starts doing stuff in it. This was the case with Apache, Perl, mod_perl, POE, PHP, AJAX, and now Cake.
Also, as usual, I am incapable of learning anything in it until I’m doing an actual useful project in it. I can’t just work through the tutorial, or make up a project. It has to be something that’s important to me, and is at least a little interesting.
And, as usual, my reaction here is, why the heck didn’t I jump into this years ago. Can you imagine the time and pain it would have saved me?
For those of you who don’t know, CakePHP is an MVC framework. Which is to say, it’s just like Ruby on Rails, or Catalyst, or any of a dozen other frameworks out there.
And for those of you who aren’t geeks, when we say “framework” it means “someone else did the boring work for me so that I can focus on the interesting part of the project.”
As it turns out, with most web applications, 90% of the work is doing the stuff that you’ve already done before on every other web application that you’ve ever written. Database connections, getting data, creating data, updating data, deleting data, asking the user if they’re sure they want to delete the data, etc, etc, etc. Very boring. Cake (and other frameworks) do that stuff for you, so that you can focus on the actual business logic of the application – that is, the things that make this web app different from the last 28 that you’ve already written.