12-step program to get addicted to CakePHP

Yep, this one works in reverse of the other “popular, so-many-steps” programs.

Step 1. – Unlearn your old habits

Whether or not you have great habits, familiarity with many other frameworks, or no experience at all… it will still be of great benefit to open your mind and just try and learn the cake-way. You might disagree, you might dislike, but if you want to harness the power of CakePHP, drop your prior knowledge for just a second and try to understand why things are done the way they have been. After that, you might agree or like or even start getting a little addicted to the new paradigms and new opportunities that will become available to you as a developer.

“It’s a lot easier to create a masterpiece on a blank canvas, than it is to paint over someone else’s mess.”

Step 2. – Help out with the docs

Time and time again I’ve heard that CakePHP documentation “sucks”. Personally, I think it couldn’t be further from the truth (but let’s stay on topic). The new manual (AKA “The Book” or “Cookbook” http://book.cakephp.org) has become better than ever. Most importantly, it is a community-driven effort. Any part of the book can be edited and you are very welcome to improve the documentation in any way. Whether fixing a spelling mistake, providing a code sample or clarifying something in the explanation, everything counts and everything is important to your ultimate addiction to the framework. In other words, if you find something lacking you have the power to make it better.

Step 3. – Join the mailing list (google group)

CakePHP has a pretty large, active and helpful community: http://groups.google.com/group/cake-php. Join it, post any questions if you get stuck or try to give advice to someone else. By participating, you are not only helping out others (which is a good feeling, if nothing else), but also get to learn a little from reading and possibly solving other people’s dilemmas.

Step 4. – Jump onto the friendly IRC channel

To top things off CakePHP has a great, active IRC channel, which is excellent if you need some real-time support. Not only is the channel friendly and helpful, but it can also be quite entertaining at times and certainly can be used as a great learning tool to further increase your addiction.

Step 5. – Start coding, already

All the reading and preparation should not be discouraged, but the most important part is to just sit down and start coding. Even if you simply follow the blog tutorial. Even, if you are not sure if the approach you are taking is the best one. Code is constantly evolving and refactoring is just a natural part of a developer’s life. The sooner you get started the sooner you’ll be addicted. Of course it goes without saying, that nothing good will come out of your baking, unless you really get your hands in the dough.

Step 6. – Become best friends with the API

At the time of this writing CakePHP has acquired a brand-new API (only a few days old), thanks to Mark Story and other contributors. Yes, there are a few glitches still, but it is an indispensable tool for any developer. It might be a little overwhelming at first, but you really need to take it easy and learn to love it. The API is the ultimate answer to many of your cake-baking questions. Though the road to understanding might be a little rocky at first, the eventual habit will be hard to kick.

Step 7. – Fall in love with test cases

Is there anything better than the CakePHP API for a developer?
Indeed, there are test cases. The core test cases (which is what I’m referring to), cover about ~90% of the framework code. They show you every little detail about how to use this or that method in CakePHP and after a rough time with Step 6, will give you a great boost in moving up the scale of addictiveness.

Step 8. – Submit an article to the Bakery

So now you’re almost there… you’ve probably hit a rough bottom once or twice, but got back out on top. This would be a prefect time to share your experience with the community.
Have you built in an awesome app that needs to be seen by the world? … share a case study.
Got a sweet, little helper that we could all benefit from? … write about it in an article.
Figured out a function to make your life just a little easier? … submit a code snippet.
The bakery is the ultimate hub for sharing your knowledge with others and learning a thing or two in the process while getting exposure… and further twisting your already addicted mind.

Step 9. – Follow the time-line

At this point you must have the latest and the greatest. Following CakePHP time-line is educational… and important, if you wish to stay on top of the world. http://code.cakephp.org/timeline gives you a perfect overview of what is happening on daily basis in the sad life of cake bakers. You’ll notice that there are almost daily code commits to the core, countless tickets being answered and closed due to a variety of “fun” reasons. But, more importantly, you see that this thing is alive and kicking.
It’s comforting to know that when you’ve gone through all the tough and rough steps, so far, you are not alone out there. Cake devs are working hard and tireless to ease your pains.

Step 10. – Write a test case and submit a patch

Can I imagine that you are a true cake-addict by now? Well, say what you wish, but nothing is perfect. If you see something you dislike or have a brilliant idea to optimize something in the core, then be a friend and submit a ticket with a patch and a test case. But, please, be sure to do it right! … “This thing is not working!” is not a helpful ticket to anyone.
Take your time, sit back, and think about how to get the patch and test case working so that your next great idea will be quickly addressed and implemented. After all, nobody likes to wait for the next dose of addiction.

Step 11. – Contribute

It doesn’t matter if you are a cake guru, an OOP master, or a PHP evangelist. Contribution to the project can come in many ways, shapes and forms. As mentioned before…. a little help with the docs, with related projects, with a clever Model Behavior, with a nice code snippet (a damn post on a blog, if all else fails)… is still a useful contribution. Everyone working on this and many related projects is a volunteer. Respect that, and become one as well. It will be a habit that’s hard to kick and in the long run it may actually (and surprisingly) play a very positive role in your own life.

Step 12. – Start dissing other frameworks

Yes, I’m joking around. Regardless of how far you get along in your life as a cakeaholic, it is always important to realize that no single tool is always right for any job. There are many great frameworks out there made by some nice and kind people to enhance your life as a developer. Obviously, I will encourage you to scream: “Cake is the BEST!” at every opportunity, but be respectful to those others, who are less fortunate.

P.S. New! This simple 12-step plan is provided completely free of charge, but you are welcome to send me two easy payments of $9.95 and one complicated payment of $12.35….

Related Posts