Now! … with CakePHP
I’ve spent the bulk of the day getting CakePHP up and running on the www-side of the amodernfable.com domain. Why? Because I wanted to use a framework to handle things like integrating a database-driven portfolio with some static content and learn more PHP (and the Cake framework, which I’ve heard nothing but great things about) in the process.
The CakePHP installation here on Dreamhost was a snap. No real configuration necessary other than setting up my database config file to point to the right spot. I was expecting worse (I know I’ve seen some nasty stuff happen when I tried to get Ruby on Rails up and running before, but this was simple and easy).
Overall thoughts on the framework (from a couple hours’ use): if you’re used to Rails, you’ll know how things work or where they go right off the bat (there are some differences that will catch you, such as default layouts being enforced right off the bat, and I like the RoR approach better that way). Setting up routing was a bit easier than my last Rails attempt. Documentation is easy to find with the right Google search. My object oriented PHP is a bit on the slim side, but, when you’ve programmed enough, PHP is a quick learn; hopefully, the controllers and models will give me more experience there.
It’s nice to have a framework in place to speed things up. Also, I’ve built in Cushy CMS support right into my views, which should make it a snap to update things. I really dig Cushy for doing one thing (managing small blocks of content) very well. Let’s see how well it plays with Cake. (And, there’s two plugs in a single post!)
April 17th, 2008 at 10:54 pm
Welcome
It’s a nice Framework. I hope you’re running the 1.2 beta. The 1.1 is far inferior.
Good luck.
April 18th, 2008 at 7:35 am
Hey Baz,
I am indeed running the 1.2 beta. I ran through the change logs between 1.1 and 1.2, and you’re right: a lot of good stuff went into 1.2 that made me say “cool!” or “yeah, I loved that in Rails.”
I’m looking forward to digging a bit deeper and messing around with Models as soon as I get a chance. Plus, I want to see how easy user authentication and stuff like that is over here compared with Rails or writing it yourself.
April 18th, 2008 at 10:47 am
Auth is OK in CakePHP. I’ve got some nice articles on how to set it up with some downloadable code samples (sorry for the shameless plug).
Maybe we should work together. Since your going from Rails -> CakePHP and I’m exploring in the opposite direction.
One thing about CakePHP that I LOVE is the bake feature. It’s user interactive, examines your models, asks questions about associations, builds your controllers, and views (based on said associations).
As far as I can figure, Rails had the scaffold generator that did something similar, then in 2.0 they said “screw you lazy dudes”? That’s quite a disappointment for me. Baking in Cake was by far the quickest way to learn the framework.
If you have any Rails tips, I’d be interested.