My talk on CakePHP went pretty well, though it did come to my attention after talking to a few folks afterwards that there were those in the room who need more help getting a start in server-side coding rather than getting a primer on a great framework for PHP. There is a wide range of people who come to Refresh Pittsburgh — designers and developers who have passions for front-end hacking like HTML, CSS and JavaScript. My talk didn’t focus on getting the attention of those folks, so if I made you yawn I apologize!

I’ll refrain from posting my (admittedly lacking) Keynote presentation, because there are simply better resources out there for learning and understanding CakePHP and the concepts behind it. Currently, Tempdocs is a great place to start. Skip to the bottom of this post for a more comprehensive list.

For people looking to brush up on some basic PHP and MySQL before diving into Cake, here’s some great articles I’ve found:

PHP and MySQL

Before you start, you’ll need to get PHP and MySQL working on your computer. I highly recommend these all-in-one packages: MAMP (Mac) or XAMPP (Windows). These packages come with Apache, PHP, MySQL, and some common tools like phpMyAdmin, a web-based MySQL administration tool.

Cakeblog

Cakeblog is my (very bare and incomplete) blog application written in PHP using Cake. I used it to reference actual code in the talk. It’s open-source, so I encourage everyone to download it, modify it, and customize it for yourself. Sometimes you just need an excuse to get started.

Here’s some basic instructions to get you off the ground:

  1. First you need to get PHP and MySQL working on your computer. Again, I highly recommend MAMP (Mac) or XAMPP (Windows) for all-in-one solutions.
  2. Get Subversion (SVN).
    • For Mac OS X, download Martin Ott’s install package and run it. If you want a GUI interface for working with SVN, I recommend svnX.
    • For Windows, I recommend TortoiseSVN, which integrates with Windows pretty nicely.
  3. Download your own copy of Cakeblog at Google Code using SVN. After you’re done, you should see folders called “app”, “cake”, “docs” and “vendors” along with files called “.htaccess” and “index.php”. This is the basic folder structure.
  4. Point your MAMP, XAMPP or home-baked web server to the folder you downloaded Cakeblog to. Restart the web server. Now if you go to “http://localhost” in your web browser. You should see some errors. This is because we don’t have a database yet!
  5. Now, open up phpMyAdmin (should be “http://localhost/phpMyAdmin” or “http://localhost/phpmyadmin”), log in (root/root I think is the default username/password for MAMP. YMMV.), and create a database called “blog” on the main screen when you log in. (For added brownie points, select “utf8_general_ci” as the collation for the database.)
  6. Make sure you’re now currently viewing the new empty “blog” database. Click the “Import” tab. Browse for the SQL file called “blog.sql” in the “app/config/sql” folder and select it. Once you have, click “Go” at the bottom of the Import screen. Everything should import successfully.
  7. Check out “http://localhost” in your web browser again. You should see the main front-end screen with a few blog posts. You got it working!
  8. To log-in to the administrative back-end, go to “http://localhost/admin” or click the “admin” link in the top-right-hand corner and use “test” for the username and “test” for the password (both without quotes). Now you should be logged in.

Let me know if you have any questions by leaving a comment on this post!

CakePHP Resources

Here’s some links I’ve used to understand the concepts behind CakePHP.

Summary

I’m confident once you start realizing the potential of using CakePHP as a platform for your PHP web applications, you won’t look back. Take some of the resources I’ve provided and run with them. You may be surprised how much you learn.

Coffee: Caffe Intermezzo

I was very pleasantly surprised when I went to check out new neighborhood hotspot Caffe Intermezzo, located in a cozy little spot on Smallman Street in Pittsburgh right off its intersection at 21st Street.

Luke welcomed me in, and after ordering a cappuccino I was presented with the many in-house offerings of such a drink. After explaining to me the ratios of espresso to milk in their different sizes, I knew I was dealing with someone who had done their homework. After discovering they buy from Intelligentsia and serve up the famous Black Cat, I was hooked. Luke and I talked coffee geekery while I thoroughly enjoyed two cappuccinos. Great people, great place. I’m hooked.

I Suck at This

It’s safe to say I’ve been slacking when it comes to blogging. I’ve been so busy designing and developing for everybody else I’ve neglected my own publishing.

Oh well.

If you’re lucky enough to run your own company or are involved in a startup that encourages regular blogging, sure you can set aside some time during a given week to blog about what you’ve been up to. (Read: Get Naked and Rule the World.) As I’ve discovered though, there is a place and a time for secrecy in business, especially when working in the corporate sector. I’ve met a ton of very smart people who are working on seemingly very interesting projects, but the response I get is always the same: “I’d tell you about it, but I’m sworn to secrecy.” Sorry to say I’m in the same boat.

What the Hell Happened?

Hello out there in blog land. I know I’ve been ignoring you lately, but there are very good reasons why and I promise I’ll make it up to you. I wouldn’t leave you hanging.

Continue reading ‘What the Hell Happened?’ »

You Know You’re a Blogger When…

(Updated Aug 3.)

  1. On the way to an event you’re already thinking of the name of the post you’ll write later.
  2. You write ritualistic “I’m still alive” posts.
  3. You look at Technorati every day to see if anyone has linked to your blog
  4. You are a Mint convert and check your stats every 15 minutes

What else? :)