zen of coding

Easy CakePHP logging to FireBug with DebugKit and FirePHP

CakePHP 2.x This is espeically useful when you are working with ajax or just in general you don’t want to dump the data to the screen, which is often hard to read. Using FireBug and FirePHP and CakePHP is pretty nicely detailed here. Presuming all of that is working well,[…]

Read More »

Object mockery and Cake

A few times we already had gone over unit testing… and why it is a good thing to do. If you had been interested in this topic for a while, then I’m sure you’ve come across the concept of “Mock Objects”. But really, what are they? And more importantly how[…]

Read More »

Improved cache and sessions storage with CakePHP and Redis

CakePHP 2.3 + Redis 2.6.7 For the vast majority of applications out there the issue of cache and session store doesn’t really come into play until the application is large enough to where it needs to be scaled to multiple web servers. At that point filesystem (default cache and session[…]

Read More »

Intercepting “add to cart” action in Magento

(Nuts and bolts of Magento? Maybe…) Magento EE 1.11 Once in a while we’d like to intercept Magento’s “add to cart” event and do some fun things with that. Maybe apply a discount or add a specialty product, or as I’ll show in this case, block a user from adding[…]

Read More »

IDE’s are a thing of the past, and ST is here to save the day

I love sublime text. I’ve been an IDE user for years. NetBeans, Eclipse, Komodo, phpStorm, phpED, Aptana… I’m sure a few others. I’ve given them all a fair amount of trial over many years. It seems that because of the nature of what IDE is supposed to be, they are[…]

Read More »

Million dollar site in CakePHP …

Is that possible? Yes, and it has been done. But… — CakePHP is slow. I’ve seen bench-marks on “Hello world” and cake falls behind other frameworks. — What’s your caching strategy? — [crickets] … Cache content CakePHP comes with a built-in view caching mechanism. Granted there is always a question[…]

Read More »

CakePHP + MongoDB, Next Steps

CakePHP 2.2 / MongoDB 2.0.4 Let’s continue building on top of what we’ve done previously. I’d say that the main consideration when it comes to building out your MongoDB is the choice between embedding everything into a single collection vs linking (or manual referencing) to another collection. What does it[…]

Read More »

CakePHP + MongoDB Introduction

CakePHP 2.2/MongoDB 2.0.4 We all know that CakePHP is awesome, and I’m sure you’ve heard that MongoDB is pretty awesome as well. So how do we make these awesome technologies play well together? In an awesomely easy way :) Let’s get things rolling by setting up MongoDB. (Instructions for Ubuntu)[…]

Read More »

Building “the blog tutorial”… the TDD way (part 2 – controller testing)

CakePHP 2.2 We have prepped our app with enough testing, to be ready to move on to write out the rest of the code… There was a good reason why we have started our TDD with the model layer. By encapsulating the business logic into our models we were able[…]

Read More »

Building “the blog tutorial”… the TDD way (part 1 – model testing)

CakePHP 2.2 Part 2 I personally consider Test Driven Development (TDD) as a “must do”, rather than a “nice to have”. Unfortunately as developers we often suffer from tight deadlines, tons of requirements and deliverables and sometimes a simple lack of understanding as to why TDD is so important. Granted,[…]

Read More »
%d bloggers like this: