Jump to content

flexible and testable PHP designs


nderevj

Recommended Posts

Hi folks, this is my first post to phpfreaks so I wanted to start with a discussion regarding flexible and testable PHP designs, something I'm struggling with.

 

I'm trying to design a couple of components for a PHP project that I'm working on. It relies on the Zend Framework and is covered by PHPUnit tests. I have two sub-systems: video storage manager and user account manager. I need help with the design of these managers. They need to be developed in a way that allows me to swap out the backend (what actually does the video storing / user handling) with minimal changes to systems that depend on these managers. Since I'm using the Zend Framework these managers will be used in various controllers. I'm using PHPUnit to test the controllers (as outlined in the Zend Framework's Documentation- Zend_Test_PHPUnit) and it is possible that the managers' backend will be provided by 3rd party classes (or wrappers around 3rd party classes). So the design must allow the backend to be easily mocked.

 

I'm interested in hearing some of the various approaches for designing the video storage and user account managers and their backend classes / wrappers.

- Nick

Link to comment
https://forums.phpfreaks.com/topic/223450-flexible-and-testable-php-designs/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.