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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.