Working with domains locally

1

Most beginners use "http://localhost/…/app/ for their project when they develop locally. This can have several possible downsides if not carefully avoided. Especially with (hardcoded) paths in css, js, images or any other browser url related issue. So the better way…

Cakephp Console on Linux systems

1

You could hard-wire the Cake path into the environment. With multiple cake core versions on a single system, sometimes it is better not to do that, though. So I just follow the following guidelines: Only add the PHP path to…

Unit-Testing in CakePHP

0

Warning: Some information my be deprecated! This is still from 1.3 and SimpleTest. CakePHP now uses PHPUnit in 2.x – please see the updated article here. Some tips you might not have read about yet Since the cookbook is quite…

All new CakePHP Tips and Tricks

1

This is supposed to be a list of useful tricks gathered over many months. First Templates, then Bake, then Adjustments The usual workflow for a new project should be Create your custom templates Bake your crud actions using this very…

Working with models

0

Since there is so much to talk about it here, I will cut right to the chase. We all know about "Fat Models, Slim Controllers". So basically, as much as possible of the code should be in the model. For…

Web Development Snippets

3

A couple of useful snippets for web developing. The list will grow over the years. Jumping to anchors with JS If we want to jump to an anchor dynamically (using javascript): /* dont use this!!! */ //location.href = location.href +…

PHP

Useful PHP coding tips

3

I hope the following tips help some of the newer php coders and prevent errors I either had to face or did myself. Don’t use private attributes/methods without a good reason There are some libs or classes that use private…