Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.22 KB

07-05-01-Abstraction-Layers.md

File metadata and controls

30 lines (24 loc) · 1.22 KB
isChild title anchor
true
Abstraction Layers
databases_abstraction_layers

Abstraction Layers {#databases_abstraction_layers_title}

Many frameworks provide their own abstraction layer which may or may not sit on top of PDO. These will often emulate features for one database system that is missing from another by wrapping your queries in PHP methods, giving you actual database abstraction instead of just the connection abstraction that PDO provides. This will of course add a little overhead, but if you are building a portable application that needs to work with MySQL, PostgreSQL and SQLite then a little overhead will be worth it the sake of code cleanliness.

Some abstraction layers have been built using the PSR-0 or PSR-4 namespace standards so can be installed in any application you like: