Feed items

Remember to Google Wave

Google Wave has a lot of potential, and in many ways is already useful despite being in early beta. One problem I’ve seen with many people however is forgetting to check for new waves. Here are a few tools that can help.
Update 3/4/2010: Google has a new Google Wave notification by email feature that you should check out. Other tools are still listed below in case email isn’t your thing.
Google Wave Notification – Firefox add-on
Google Wave Notification – Chrome add-on
Waveboard – Google Wave Client for iPhone and Mac

Peep! Getting things done gets a little easier

Over the last 3 weeks we’ve been working hard in our secret lab. We’ve been pouring in extra time and effort on a tool that will help revolutionize the way people get things done. Although our new application is still a work in progress, we just couldn’t wait any longer to start sharing our creation.
Peep! is the new, friendly way to get things done. With focus on simplicity and speed right from the start. You’ll be able to think more about getting things done and less about your collection tools, inbox, and filing systems.
Get started today at http://trypeep.com.

SmartRedirect Plugin for CakePHP

When adding, editing, or deleting records in a web application, it is common to return the user to where they originated. That is what they typically expect. The SmartRedirect plugin allows just that, without any coding in your models, controllers, or views.
You can grab the plugin using git or by zip from the SmartRedirect Plugin project page on GitHub.
All you need to do is extract the file and drop the smart_redirect folder into your app/plugins directory. After that, add SmartRedirect.AutoReturn to your components list. Something like this:

var $components = array('SmartRedirect.AutoReturn');

Now when you add, edit, or delete records in your application, you’ll be returned to the page you were on before.

Reusing controller views in CakePHP

CakePHP makes it easy to reuse your small blocks of presentation code throughout your application by using Elements. You can read more about them here:
http://book.cakephp.org/view/97/Elements
Sometimes though you want to reuse a regular controller view without moving the code to an element. In fact, if the view code is specific to the controller, it is good practice to keep it in the controller view.
Fortunately this is fairly simple. Just create the view and then reference it like this:

<?php echo $this->element('../projects/menu'); ?>

In the example above, I’m accessing the following file: /views/projects/menu.ctp
As always, the element will have access to all existing view variables (the ones typically passed using $this->set()).

CakePHP: One core, many apps

CakePHP allows you to use one set of core files while maintaining multiple applications. It only takes a few steps, but may not be completely straightforward the first time you try. In my example, I have my workspace in ~/dev. I would setup my project in ~/dev/client_name/project_name. I place my cake core files in separate folders for each version in ~/dev/lib/cakephp.
The basics

Letting multiple CakePHP apps talk

CakePHP is getting really popular, so naturally, there are quite a few sites out there using it. If you’ve been using CakePHP long enough, sooner or later you will want to have 2 or more of those apps talk to each other. Setting CakePHP up to act as a webservice is pretty easy. Teaching the other apps to talk to that webservice takes a little more work. Jesse (over at TechnoGeeks) and I have been working on just that.

Speeding up count queries with counterCache

Today while working in a CakePHP application, I needed to hide some records based on the number of associated records they had. I basically needed to get a count of associated records. Fortunately, CakePHP has a feature called counterCache that makes this really easy. It saves the record count in the database and updates the count any time you do a save or delete. The details can be found here:  http://book.cakephp.org/view/490/counterCache-Cache-your-count
Basically you do the following:

$this->Blog->write(“Hello world”);

A new blog is born. My old blog at RickGuyer.com never really progressed very far. So here I go again. This time with a focus on my career. I love to code, especially in PHP (especially using CakePHP) and I love technology. My life goal (at least one of them) is to bring better information management to the world. I’ll be posting more about that later. And I’ll be posting details about my experiences with PHP or whatever programming language I use. I hope you enjoy.