PHP Classes

facade

Recommend this page to a friend!

      PHP Classes blog  >  The Plot to Kill PHP ...  >  All threads  >  facade  >  (Un) Subscribe thread alerts  
Subject:facade
Summary:Good programmers don't care
Messages:1
Author:Brett Dutton
Date:2011-07-15 12:00:29
Update:2011-07-15 15:43:16
 

  1. facade   Reply   Report abuse  
Picture of Brett Dutton Brett Dutton - 2011-07-15 15:43:16
As soon as I started writing PHP I created a facade in front of the mysql functions. I saw it as a disadvantage to have mysql connections, queries, and fetches littered throughout my code. I could write functions (or classes) that would abstract the base database access. When PDO came along and it became stable I replaced by base class with PDO operations. So in my code nothing changed. Everything called the DB class, it was just that my DB class started using PDO instead of mysql.

So the good programmers don't care, they will change the underlying functions/classes to call the non deprecated database access.