PHP

  1. Objects and persistence in databases

    2020-04-27

    There are situations where Object-oriented programming (OOP) isn't the best fit, and I keep coming across more of them. Way back when I was working on our graduation project, I had my first taste of Object-relational mapping (ORM), and I thought it was pretty nifty. However, I've come to realize that ORM is just trying to fix a problem caused by OOP, or how OOP is usually implemented. [...]

  2. A simple class loader for PHP

    2011-06-09

    While playing around with the CodeIgniter library on my LAMP server, I found a need for automatic loading of classes. CodeIgniter is a neat little thing that handles loading of MVC parts, but has no real support for helper or simple data classes. I wanted my models to retrieve data from the database through entity classes by using an ORM library (Doctrine). And like in a typical JPA/Hibernate setup for Java, pass those entity objects to the view. [...]