CakePHP fun

In which a law student re-learns how to code:

  1. Cue the AITGOC mix: Prince, David Bowie, Cure.
  2. Decide I want to install CakePHP via a Subversion checkout. (30 min)
  3. Realize I need to install Subversion first. (1 min)
  4. Struggle, then re-learn how to compile from source and install Subversion into a 1&1 shared hosting UNIX account. (20 min)
  5. Wrestle with .htaccess files despite the heads-up. (45 minutes)
  6. (Wow, is my entire system’s security reliant on mod_rewrite?)
  7. (Wow, why is it impossible to do nested lists in wordpress wysiwyg editors?)
  8. (Nothing portends success like combining two unknown, nascent development frameworks.)
  9. Success! See the default index page.
  10. Set up database–1 (20 min)
  11. Make new custom controller (5 min)– er… Research where to put custom controllers (30 min)
  12. Take a quick 5 minute break to re-learn ‘find’ and ‘grep’ in order properly hunt down this elusive app_controller.php I’m supposed to override. (45 min)
  13. Cut and paste code from demo. (2 min)
  14. Update demo code for CakePHP 1.2 (as opposed to version 1.1). (15 min)

By the end of day 1: CakePHP installed, connected to database, created a custom controller, installed facebook libs, connected to facebook api, created custom view that outputs all your facebook friends.

My first impressions: all the magic of the framework honestly makes me nervous. I love coding style guides more than the next guy. But binding class names, database names, and filenames to a coding convention, and dynamically doing it at run-time? Hairy affair. Maybe this is the solution for development teams and their bosses that are unable to stick to a coding convention?

  1. aw fuck, table names are plural?? []

3 Comments

  • Marc Grabanski Says:

    Don’t be scared of the coding conventions. The cake core team has have fought each other on the best way to do things. Chances are that any naming and structural conventions that are in CakePHP had way more thought put into them than you (or most others) have done themselves. It does take a while to learn them, but WOW, does it ever help. The more you get used to them the faster things go. The conventions might slow you down at first, but now I can go 10x faster than I could before. Glad you are giving CakePHP a try!

  • Matt Huggins Says:

    “Nothing portends success like combining two unknown, nascent development frameworks.”

    I’ll definitely take that as a compliment, thanks! 😉

  • Selfish Crab Says:

    Wow, comments straight from the source. Thanks, everyone, for your comments.

Leave a Reply