Published: Friday, December 28th, 2007
One of the nice things about CakePHP is that it includes ready to use CSS compression. Granted, compressed CSS can be buggy at times, but for the most part it works just fine.
I've always wondered why no one has included something like this for Javascript, since that's usually the bigger culprit when we're talking about document size. I've tried using Minify in the past. However, it took a lot to get it working right. And I really hate hacking stuff just to work with CakePHP. That, coupled with the fact that I'm a lazy bastard, meant that I gave up the Minify train rather quickly.
Mark Story To The Rescue - JSMIN Javascript Helper
At the time, I hadn't heard about the JSMIN library, which does pretty much the same thing the Minify does, but without the CSS. Luckily, Mr. Story had some vision after his Christmas festivities and cake up with a JSMin Helper for CakePHP. This helper works by Minifying the chosen Javascript. This involves stripping unnecessary characters (line breaks, comments, spaces, etc) from the .JS file.
It also includes functionality to cache the resulting files. What more can you ask for?
Usage:
Share This
Published: Friday, November 30th, 2007

Before I start let me say that CakePHP is great. I love it to death. Currently, I'm coding a semester long class project for a friend. I'm trying to illustrate just how much faster it is to create a web application using CakePHP than anything else the other students are using.
The Project
The project consists of computerizing some department of the local university. What she's chosen is to computerize the Audio Visual Department. Specifically the process of submitting equipment requests to the department so they can take the equipment to different classes.
The Competition
The other students are using things like C#, Visual Basic, and other high level programming languages. With all these things, you need to design an interface (and everything else for that matter) from scratch.
You're also on your own when it comes to controls and binding them to the database fields. Not to mention, you need to do all the database relationships by yourself. The other problem is that the project is a multi-user application by definition. That means a central database. This is generally more difficult to implement on a desktop application. The project, to me, just screams Web App!
Share This
Published: Wednesday, November 28th, 2007
Poll results for What Do You Look for in a PHP Framework are in:

Most of you prefer a framework that is Quick and Easy. Hey, I'm totally with you guys on that. When deciding on a web development framework, it has to be easy. It's no fun if it takes hours to learn and saves you minutes. For me, CakePHP definitely fits this bill. The bake routines save me so much time during initial development.
Next on the list was a Less Code Needed and a Small Learning Curve. Again, that would definitely fit high on my list. I'm sorry, I'm just lazy that way.
That last result on the list is interesting, but expected. Not many people needed the framework to have a Small Footprint. With the type of processing that is required nowadays, sometimes the lite/light version doesn't cut it. With that said, we also have a lot more processing power to push those heavy frameworks along. In my opinion, it's less important that a back end framework be light as apposed to a JavaScript framework. The back end is handled strictly by the server, so the user doesn't take the hit. With a JavaScript framework the user needs to download the entire thing. In this day and age it has become more cost effective to through some more CPU at the problem while saving weeks (or even months) in development time.
Share This
Published: Friday, November 23rd, 2007

Now i doubt it has crossed anyone's mind to use CakePHP to create a custom content management system (CMS). Even though you're not designing a full blown CMS, sometimes it's nice to give novice users a way to create HTML content for a website or web application. The simplest way to do this is to integrate a WYSIWYG (What You See Is What You Get) editor.
When it comes to WYSIWYG editors, they are a dime a dozen. There is of course the world famous TinyMCE. There is already an article in the bakery on how to use TinyMCE with CakePHP. There's htmlArea and even openWYSIWYG.
Although I generally love TinyMCE, for my last project I needed to give the user the option to upload images. FCKeditor is the only editor that offers this functionality for free. Some say that it's bloated, but you can always trim it down to only what you need. Actually the new (October 10th, 2007) version is pretty snazzy. They've done away with the font tag and just made it a lot cleaner.
Share This
Published: Wednesday, November 21st, 2007

Patty Cake, Patty Cake, Baker's Man
One of the things that sold me on CakePHP is the bake routine. This is basically code generation for the lazy types like myself. It was good in CakePHP version 1.1, now it's just awesome. The only way they can make it better is to implement a web version, but that's another story.
What Baking Does
In CakePHP we refer to the automatic code generation as baking (get it now?). An entire application can be baked from nothing more than a few tables in a database. CakePHP uses some skeleton templates, which you can of course customize to your needs, to generate your Models, Views and Controllers. The controllers and views come with the standard CRUD (create, read, update, and delete) functions and can also contain admin functions.
Currently, we run the Bake routine from the command line. I'm hoping sooner or later this can change, but with a lot of hosts allowing shell access to your account, this isn't a priority with the developers.
Share This
Published: Friday, November 16th, 2007
The Problem
I've had this problem for a while, but it's become more of a problem since I started working heavily with CakePHP.
Here is my WAMP folder structure: D:\wamp\www\cake\[various app]
Under this folder, I would have baked all the different applications that I'm working on at the time (app1, app2, app3, etc). So I could have my DocumentRoot set to my cake folder and access the different apps in my browser by:
- http://localhost/app1/
- http://localhost/app2/
- http://localhost/app3/
That's a perfectly fine idea, except that 95% of the time, when I deploy an application for a client it's going to be installed on their root directory of that domain name. Even on my server, all my applications (CakePHP and otherwise) have their own domain or sub domain.
If we keep everything to relative paths and stress using CakePHP's $html->url() function, then everything should be fine. But sometimes I'm lazy and I want to do a quick href=/ and not have to try to figure out how many levels I've gone. Also, I want to confidence to upload my entire folder to the clients server and only have to change database configurations.
Share This
Published: Tuesday, November 6th, 2007

Today I popped onto the CakePHP Bakery looking for the obAuth Component. To my surprise, I got a blank page.
Seems like there's a database issue. Here's hoping that it's not down for too long.
Update (11/20/07):
Most of the stuff is back up on the bakery. The rating is still a small issue, but all the code and tutorials are up and running.
Bake On!
Popularity: 19%
Share This
Published: Monday, November 5th, 2007
First of let me state that this post is very bias towards CakePHP. Truth be told, I haven't even installed or used Ruby on Rails. The closest I've come is looking at various code snippets I've found around. With that said, you may want to stop reading now.
These arguments are not based on hard facts, since I haven't done much research on the matter. A lot of them come from a post at Clickable Bliss discussing the PHP vs. Ruby On Rails Issue.
-
Steep Learning Curve - Laziness
One thing I really hate is learning stuff. It is especially bothersome when you're trying to crank out a project or web application in a limited amount of time.
With CakePHP I'm required to learn about the MVC style of development as well as CakePHP conventions.
With Ruby on Rails, I would have to learn MVC, Ruby on Rails conventions and I would have to start from scratch with the Ruby programming language as well.
Popularity: 43%
Share This