This forum consists of only people that work for TechWyse and contribute to the WyseLabs community. We invite all of you to read many of the helpful things that we find in our daily lives! That is why we have built this section after all!
Programming for Search Engines 101. An area for avid PHP and .NET developers to chat about Programming techniques and how to make better use of search engines.
Moderator: Moderators
by vinu » Fri Apr 11, 2014 6:43 am
For Testable & Maintainable Codes in PHP
1. Keep code DRY (Don't Repeat Yourself)
2. Implement Dependency Injection
3. Add Interfaces
4. Use Containers
5. Do Unit test with PHPUnit
/**
* SiteController class file.
* @author Winu Sebastian
*/
interface ISite {
public function setClass();
}
class SiteController extends Controller implements ISite{
public function init(){
$this->setClass();//to initialize all objects
}
more..
-
vinu
-
Return to Programming
Who is online
Users browsing this forum: No registered users and 8 guests