zen of coding

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 »

User Auth with CakePHP 2.1 – part 3

As promised in the previous part we’ll take a look at the admin section. If you remember, we’ve setup our users so that when they create an account, they are inactive by default and cannot login into the app. app/Controller/AppController.php [cc lang=”php”] $this->Auth->authenticate = array( ‘all’ => array ( ‘scope’[…]

Read More »

User Auth with CakePHP 2.1 – part 2

CakePHP 2.1 Now that we’ve completed our basic setup for Auth, let’s take a look at the User.php model… [cc lang=”php”] class User extends AppModel { public $validate = array( ‘username’ => array( array( ‘rule’ => ‘notEmpty’, ‘message’ => ‘Username cannot be empty’ ), array( ‘rule’ => ‘isUnique’, ‘message’ =>[…]

Read More »

User Auth with CakePHP 2.1 – part 1

CakePHP 2.1 The example application in the CakePHP book does a very good job of covering setup and implementation of a basic Auth system. Let’s continue building on that and cover a few other things, by adding a couple of more features and looking at some of the other things[…]

Read More »

“Error: Database connection “Mysql” is missing, or could not be created”. CakePHP 2.0 — cake bake trouble

CakePHP 2.0 Nothing like coming back from a hiatus with a WTF? post. My favorite “cake bake” started failing with the message in the subject; as well it seems that I am not the only one who had suffered from the problem… (just give it a quick check on google).[…]

Read More »
%d bloggers like this: