June

Setting up TinyMCE with jQuery and CakePHP 1.2

CakePHP uses the Prototype Javascript library for its ajax helper class but I've come to prefer jQuery. Prototype is a fine library too but I've just gotten used to jQuery.

A web application I'm working on needed a ttw html editor so I grabbed TinyMCE and copied in some of the example code and everything seemed to work fine at first glance. Unfortunately TinyMCE has an issue with jQuery's $(document).ready function and it also has an issue with saving via ajax in CakePHP.

There's a helpful page on the Bakery that outlines some issues you'll run into trying to get CakePHP & Prototype working with TinyMCE but it's a little out of date now (I'm using CakePHP 1.2RC1, TinyMCE 3.09 and jQuery 1.2.6 at the moment). I'll go through examples that illustrate how I solved the two problems I ran in to but I'm not going to explain everything you need to do ajax submissions with CakePHP.

CakePHP 1.2RC1 is out

CakePHP is a really nice MVC framework I've been using for a project I'm working on. I've been using one of the 1.2 betas for what seems like forever but I just now saw they've got a Release Candidate out as of a couple days ago. The MVC pattern fits a whole lot of applications or acts as glue for a lot of web apps where the main goals don't fit MVC. I find that CakePHP is fantastic for getting a lot of the monotonous code out of your way so you can focus your efforts on the important stuff. Here's the release note. You can download it from the main page at CakePHP.org. This framework has a few warts and like any young software, it will see API changes that break code. Don't expect it to solve every problem for you but it will give you a huge boost to start-up speed on building new applications. In the long run you have to remember it's a tool for you to build an application, not an application in and of itself. It's time for me to dive in now and start my upgrade, I hear some of the conditions on my find() calls will have to be fixed...

How to not grow creeping charlie

I've always thought growing grass was a terrible idea. As a kid I was pretty practical and I didn't see any benefit to having a green lawn full. I was also pretty well aware of the amount of effort required to maintain the lawn at home growing up since the mower was often my job. I hated mowing it and my parents weren't even really big lawn freaks. We had weeds and dandelions and bare patches. I always marveled at the crazy amount of time and effort our neighbours across the street wasted on keeping their yard green and presentable.

Now I've grown up and I feel pretty much the same way. It might not make my neighbours happy but at least I didn't follow through with my plan to pave it and paint it green. As a child I assumed the problem was that people wanted a large green square in front of their homes and concrete seemed to be a very practical solution to that problem.