In this tutorial I will show you the power of associations in cakePHP. With associations you can link up your models and get related data when you fetch results from one model.
In this example I’ll show you how to create an association between a User and a Product.
Continue reading CakePHP Basics Tutorial – Part 4
Since OSX 10.7 Apple has decided to hide the ~/Library folder from your users directory. When you are using the iPhone Simulator or other development applications, you spend a fair amount navigating around in the Library. So if you are tired of using command+shift+G all the time, you can easily unhide the Library folder forever and ever, without showing all the hidden files on your system!
Continue reading Unhide the Library folder on (Mountain) Lion
In this tutorial I’ll show you in about 30 minutes how to create a html form with the built-in FormHelper of CakePHP which automatically links up to the database fields to see what kind of input field should be generated. Further on we also check out the built-in validation options and how we can save our submitted form data to the database. And at the end I’ll explain how you can use CakePHP’s Model callback functions to put in our custom code before a CakePHP action.
Continue reading CakePHP Basics Tutorial – Part 2
In this tutorial I’ll show you in about 30 minutes how to do a basic setup of CakePHP and read some data from the database without writing any SQL! This will be an i-don’t-know-how-many-parts tutorial, but I’ll try to add every week a few until the basics are covered!
Continue reading CakePHP Basics Tutorial – Part 1
In this tutorial I’ll show you in 25 minutes how to generate some basic CRUD functionality into your CakePHP website without writing a single line of code! This can be done by using the console which you get for free with CakePHP.
This is a great way to get up’n’running in minutes and start from what CakePHP has generated for you.
Continue reading Generate code with CakePHP’s cake bake command
I’ve just upgraded my servers to PHP 5.4 and got this error when loading a project.
Declaration of MyModelName::beforeSave() should be compatible with Model::beforeSave( $options = array() )
There seems to be a problem when using PHP 5.4 and CakePHP 2.1 which results in this error. Since PHP 5.4
E_STRICT are now combined and with a default CakePHP installation error reporting is set to E_ALL & ~E_DEPRECATED!
Luckily it is really easy to fix!
If you have installed Apple’s new operating system (Mountain Lion), you will notice that you won’t be able to install software which hasn’t been signed by an identified developer or downloaded via the Mac App Store (this is also known as Gatekeeper). They do this to counter the growing amount of malware that is bugging OSX the last couple of months. As the option is turned on by default, you have to find where to shut it off to download unsigned content (especially older apps).
Go to System Preferences < Security & Privacy < Tab ‘General’
You will see ‘Allow applications downloaded from’ greyed out, so first authenticate by clicking on the little padlock at the bottom left of the window.
Select ‘Anywhere’ instead of ‘Mac App Store and identified developers’
You’re done 🙂
This week a new version of iCapital got released in the App Store. It was my guinea pig app to learn myself Objective-C this summer when I broke my foot. It was an excellent learning app, because it covered a lot of new concepts which I had to tackle:
- Core Data
- Migrating data on updates
- Memory management
- Retina support
- Game Center
Now, 8 months later, I took a look at how I left my code behind in my repository and I thought it was a good thing to rewrite the whole app as I now have a much better understanding of the language. Since then I created a new game Boring Meeting OXO, an iPad app (in a private store, but you can take a look how it works here, this was still in a development phase), and a few personal apps. As I feel myself comfortable with the language now, I hope I can release many new apps soon (one is coming pretty soon :-)!
As with every update, I give away some promo codes you can redeem via the App Store. So for the quick readers, here are 10 promo codes:
I hope you have fun with it!
When you are doing (naughty) stuff with the Internet, Charles Web Proxy is probably the most valuable thing a developer could have!
Normally I just use Firebug’s Net panel to see what my request/responses are, but since I’ve discovered Charles it took debugging and inspection to a whole new level. Especially now I can hook it up to inspect the traffic sent to and from my iPhone. Continue reading Debug IOS applications with Charles Web Proxy