Tag Archives: cake

CakePHP Application Development

CakePHP.jpg

As I’ve mentioned before, we’re using CakePHP for our development at work. Cake was the first formal MVC framework that I’d worked with, although at Asbury we had developed an MVC framework in house, almost unbeknownst to us. That is to say, we developed a sane web app framework, and weren’t aware that someone had already given a name to the pattern. Shame on us for not doing our research a little better.

Also, the other half of the web team had started working with RoR before I left, but I didn’t really look at it seriously.

CakePHP is one of many PHP MVC frameworks, and, naturally, there are a variety of opinions as to which one is the best. I can’t claim to have done a careful comparison. How did I choose Cake? I like to hire people smarter than myself, and trust their judgement. This was the recommendation that came up from that team of smarter people. And I certainly have to admit that Cake really works with the way I think, and is very much the effect that we were trying to achieve with our framework at Asbury. We didn’t quite get there, but we were headed very much in the right direction.

The CakePHP book from Packt Publishing was very helpful as an overview of what was possible. It has practical examples of what can be done, and has careful explanation of each step. In conjunction with the amazing online documentation, it provides a solid footing for jumping right in to writing Cake apps the first week.

One place the online docs are sorely lacking is the V part of MVC. The online docs are for programmers, not for designers – or perhaps “written by” is the better thing to say there. Either way, the section about views and layouts is still rather weak, although it’s being worked on. The Packt book is a good supplement to this, although it makes more sense on second reading, after a little hands-on experience with the Views stuff.

In short, recommended. 4-out-of-5-stars. Anupom and Ahsanul have done a good job of giving an introduction to Cake app dev in this book, and I’d recommend this as a desk-side reference as you start developing in Cake.

As to the other frameworks – yes, I’ve heard that there’s others that are better. One thing that is obvious, looking at the various frameworks, is that all of them are crazy active – they are all improving by leaps and bounds, and pretty much every feature comparison I’ve looked at is way out of date, and inundated by comments saying “yeah, that’s how it was 6 weeks ago, but you should take a look now!” So I’m pretty sure that the jury is still out on this, and that there will be still several years to watch these things before one emerges as a clear leader – if, indeed, that ever happens. It hasn’t in any other language (with the exception of Ruby) so I don’t know why we’d expect it with PHP.

Come work for me

I’m looking for a PHP programmer looking for an challenging position in the Lexington area. Our code uses the Cake PHP framework, and we’ve got several projects with a certain amount of shared code between them. Our biggest projects are ClearMyRecord.com and Hard2Hire.com, both of which are about helping people get their lives back together in one way or another.

I’ve got job postings on Monster.com, but I’ve found that finding people by word of mouth and personal contacts is way more effective than any of the job boards, both in finding the people with the skills and finding people who are likely to be a good fit for the team.

Ideally, we’re looking for someone with some OO PHP experience, and some knowledge of, or experience with, MVC methodologies. If you’ve used Cake, that’s great, but it’s certainly not required. And if you have MVC experience in some other language, like Ruby on Rails, or Catalyst, that actually translates pretty easily into what we’re doing, particularly if you’re interested in learning new things, and can convince me that you’re the right person for the job.

If you’re interested, or know someone who is, or want more information about the position, please contact me.

Cake

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.