Search This Blog

Showing posts with label object orientation. Show all posts
Showing posts with label object orientation. Show all posts

6/01/2011

PDO - PHP Data Objects

What is PDO?

PDO (PHP Data Objects) is a PHP module created in the Object Oriented Paradigm, and its goal is to provide a standarized way to PHP connect/comunicate to a Relational Database. It was created in PHP version 5. So, PDO is an interface that defines a set of classes and its method signatures to comunicate with a Database.

Each Database Management System (DBMS) can provide its own driver to PDO. Although PDO provide method signatures, some features can not be supported by some DBMS. So, calling this kind of method may be "useless", depending the driver was used or the DBMS model/version. For example, some engines of MySQL DBMS do not support transactions, so, the method "beginTransation" (that begin a new transation) simply take no effect at this condition.

4/22/2011

How to create an ORM layer

Last post was about the concept of ORM. This post is about what we expect in an ORM layer and some tips of how to implement an ORM layer by yourself.

Object Relational Mapping (ORM)

Well, for my first post about technology, I decided to write about something high level and, suddenly, that is not so known between PHP programmers: ORM. I expect, initially, to show the concept and maybe, in future posts, inspect it with more acuracy.