Archive for April, 2009

PHP Tips and Tricks

php

After years use PHP, there is always a time where I find myself look back to PHP documentation.

PHP has many functions, if you’re new to PHP, you won’t note some of useful function to remember.

There are also some of technique that you couldn’t learn by just looking PHP documentation.

For a beginner, who just learning basic PHP programming, I have collect some of tips and trick to help you upgrade your skill.

Continue reading »

Linux Commands You Need to Know as Web Developer

As web developer, somewhere along the line, you’ll meet unix or linux shell. For those who never use unix/linux before, it could be frustate to deal with shell command.

For a simple thing as list files in current directory to extract zip files. So here a quick list commands you probably need for your next journey. In my opinion, it won’t hurt you to learn some of linux shell commands. Take a quick look, and maybe you have familiar with some of them.
Continue reading »

CodeIgniter Tutorial – ORM with DataMapper

datamappertutorial

If you familiar with CodeIgniter, then you have realized by now that you can’t have relationship manager.

Yes, CodeIgniter doesn’t have built-in ORM. But there are several projects such as IgnitedRecord and DataMapper that will help you manage relationship between your models.

In this tutorial, I will introduce you to DataMapper.

From DataMapper Website

DataMapper is an Object Relational Mapper written in PHP for CodeIgniter. It is designed to map your Database tables into easy to work with objects, fully aware of the relationships between each other.

Features

  • Everything is an object!
  • Easy to setup, easy to use.
  • Custom Validation on object properties.
  • Lazy Loading (related objects are only loaded upon access).
  • Relations and their integrity are automatically managed for you.
  • One to One, One to Many, and Many to Many relations fully supported.\
  • Select data in the style of Active Record (with or without Method Chaining).

Ok let’s start our journey.

Continue reading »