Drupal 7 - A Rails-like approach for Drupal form and module development

Looking for a Ruby on Rails like approach for Drupal 7 form and module development? If so, I may have just the tool you're looking for.

As you can see in the video below, I show how I can generate Add, Edit, Delete, and List forms for a Drupal 7 project I'm working on in four minutes, or one minute per form. Of course there's a little more work to be done, but the code-generating approach I've taken is exactly what Ruby on Rails and CakePHP did the last time I used them.

CakePHP HTML image links

CakePHP HTML image links FAQ: How do I create HTML image links in CakePHP?

When I first started using CakePHP I had no idea how to create a CakePHP image link, so I thought I'd share what I've learned here, specifically the CakePHP HTML image and HTML link syntax.

Rather than go into any great detail, I'll just share the source code from one of my CakePHP view pages. This is from a typical CakePHP index view page, but I wanted to use images for the Edit and Delete actions instead of plain links. Here's the CakePHP view code I created to get this done:

CakePHP automated web testing with SimpleTest

CakePHP/SimpleTest automated web testing: Can you share an example of some automated CakePHP SimpleTest web tests?

Sure, here's a quick look at how I've created a suite of CakePHP automated web tests using SimpleTest to perform integration testing on a new CakePHP web application.

The recipe for creating automated web tests in CakePHP is fairly simple:

CakePHP web testing - deleting database test data

CakePHP delete database test data FAQ: How can I delete CakePHP test data from my database in automated CakePHP unit and web tests (integration tests)?

I recently created a large set of CakePHP unit tests and CakePHP web tests (essentially integration tests), and as part of thorough testing, I needed to be able to create some user accounts and insert some test data into the database.

A CakePHP SQL UPDATE example

CakePHP SQL UPDATE FAQ: How do I perform a SQL UPDATE with CakePHP?

As I was writing a user registration process for a CakePHP application, I just found myself in a situation where I needed to write a CakePHP SQL UPDATE query. While you don't pay attention to it, you often run a SQL UPDATE query in CakePHP in a typical controller edit() function, but this was the first time I really had to do this manually.

The short answer is that you execute a SQL UPDATE query in CakePHP using the usual model save() method. The way the save method work is like this:

A CakePHP jQuery fade out flash success message

CakePHP flash fade out success messages: If you'd like to show fade out success messages in your CakePHP applications using jQuery, like the ones currently used by applications such as Twitter and Facebook, I thought I'd share the formula I came up with this weekend. While it includes touching a few different files, it's pretty easy, and once you've done the basic setup work you can display CakePHP fade out success messages in all of your web pages, and web applications.

The CakePHP form save, validate, and debug problem

CakePHP form save/validate/debug FAQ: How do I debug problems in the CakePHP form save/validate process?

One problem I've run into with CakePHP is that while the form validation approach works very well 95% of the time, when it fails it can be very hard to debug. Because the form validation process happens when you invoke the save() method, much of this debugging process seems to be out of your control.

CakePHP require, notEmpty, allowEmpty, and form validation

CakePHP require, notEmpty, and allowEmpty FAQ: Help, I'm trying to edit my CakePHP model $validate field to make sure a CakePHP form field is required, but 'require' doesn't seem to be working as expected.

After fighting with a CakePHP form I just got this information beat into my head, so I thought I'd share it here. In short, if you want to make a CakePHP form field required, what you really want to use is the CakePHP notEmpty rule, like this:

Did Drupal account for all new PHP jobs in the last year?

I wish I had more statistics to look at this, but at a preliminary glance, it looks like Drupal has accounted for all new PHP job openings in the last twelve months. I just published a little CakePHP, Drupal, and LAMP PHP jobs survey, and while the good news is that the PHP job market appears to have grown well in the last twelve months, the case can be made -- based on these statistics -- that Drupal accounted for almost all of the new PHP job openings.

CakePHP, Drupal, and LAMP/PHP job market - 2011

CakePHP and Drupal jobs, 2011 - Way back in December, 2009, I first started looking at the PHP job market, specifically CakePHP, Drupal, and LAMP/PHP job openings. I forgot to run the queries again this past December, but I just took a few moments to update them, so ... here is a quick look at the PHP developer job market in January, 2011.