Developing for Ubraa Garrizaldy Santos November 10 2007
Who Am I Garrizaldy Santos Software Developer PHP'ing since 4.10 Developer for Wingcast Inc. Open Source Contributor
Outline Bootstrapping Ubraa   Test-Driven Development We'll do something called Test-Driven Learning and introduce you to PHPUnit, the xUnit testing framework for PHP, while we discuss Object Oriented Programming Good Design Refactoring
Outline Coding Standard Documentation Version Control Deployment Practices More Testing! Q&A, Interactive Session
Ubraa Introduction: Bootstrapping Ubraa Ubraa needs an Application class. In which our bootstrap file index.php will be using. The class should initialize and sets resources that are needed. The class should run the application.
Ubraa Introduction: Requirements Write a class named Ubraa_Application that has two methods. initialize() is called if the class is instantiated. run() is called at the very end of the bootstrap file and send the response.
Ubraa Introduction: Design A bootstrapper has to take care of the consistent needs of every page of a web application. Receives all dynamic requests for an application Applies a template for application behavior that we can later extend. It will allow us to later customize the functionality for each unique application.
Ubraa The First Test <?php require_once   'Ubraa_Application.php' ; class  testUbraa_Application  extends  PHPUnit_Framework_TestCase { }
Ubraa The First Test <?php require_once 'Ubraa_Application.php'; class testUbraa_Application extends PHPUnit_Framework_TestCase {      public function  testApplication()     {          $app  =  new  Ubraa_Application(); }
Ubraa The First Test <?php class  Ubraa_Application { }
Ubraa The First Test <?php require_once 'Ubraa_Application.php'; class testUbraa_Application extends PHPUnit_Framework_TestCase {     public function testApplication()     {         $app = new Ubraa_Application();          $this ->assertType( 'Ubraa_Application' ,  $app ); }
Ubraa The First Test garrizaldy@desktop:/var/www/ubraa/tests/Ubraa$ phpunit  Ubraa_AllTests AllTests.php PHPUnit 3.1.9 by Sebastian Bergmann. . Time: 0 seconds OK (1 test) garrizaldy@desktop:/var/www/ubraa/tests/Ubraa$
Ubraa Related Links Zend Framework - http://framework.zend.com/ PHPUnit - http://www.phpunit.de/ SimpleTest - http://simpletest.org/ Automatic testing of MVC applications created with Zend Framework | Alex @ Net More TDD: Zend_Application
Thank you! Garrizaldy Santos [email_address]

Developing For Ubraa

  • 1.
    Developing for UbraaGarrizaldy Santos November 10 2007
  • 2.
    Who Am IGarrizaldy Santos Software Developer PHP'ing since 4.10 Developer for Wingcast Inc. Open Source Contributor
  • 3.
    Outline Bootstrapping Ubraa  Test-Driven Development We'll do something called Test-Driven Learning and introduce you to PHPUnit, the xUnit testing framework for PHP, while we discuss Object Oriented Programming Good Design Refactoring
  • 4.
    Outline Coding StandardDocumentation Version Control Deployment Practices More Testing! Q&A, Interactive Session
  • 5.
    Ubraa Introduction: BootstrappingUbraa Ubraa needs an Application class. In which our bootstrap file index.php will be using. The class should initialize and sets resources that are needed. The class should run the application.
  • 6.
    Ubraa Introduction: RequirementsWrite a class named Ubraa_Application that has two methods. initialize() is called if the class is instantiated. run() is called at the very end of the bootstrap file and send the response.
  • 7.
    Ubraa Introduction: DesignA bootstrapper has to take care of the consistent needs of every page of a web application. Receives all dynamic requests for an application Applies a template for application behavior that we can later extend. It will allow us to later customize the functionality for each unique application.
  • 8.
    Ubraa The FirstTest <?php require_once 'Ubraa_Application.php' ; class testUbraa_Application extends PHPUnit_Framework_TestCase { }
  • 9.
    Ubraa The FirstTest <?php require_once 'Ubraa_Application.php'; class testUbraa_Application extends PHPUnit_Framework_TestCase {     public function testApplication()     {         $app = new Ubraa_Application(); }
  • 10.
    Ubraa The FirstTest <?php class Ubraa_Application { }
  • 11.
    Ubraa The FirstTest <?php require_once 'Ubraa_Application.php'; class testUbraa_Application extends PHPUnit_Framework_TestCase {     public function testApplication()     {         $app = new Ubraa_Application();         $this ->assertType( 'Ubraa_Application' , $app ); }
  • 12.
    Ubraa The FirstTest garrizaldy@desktop:/var/www/ubraa/tests/Ubraa$ phpunit  Ubraa_AllTests AllTests.php PHPUnit 3.1.9 by Sebastian Bergmann. . Time: 0 seconds OK (1 test) garrizaldy@desktop:/var/www/ubraa/tests/Ubraa$
  • 13.
    Ubraa Related LinksZend Framework - http://framework.zend.com/ PHPUnit - http://www.phpunit.de/ SimpleTest - http://simpletest.org/ Automatic testing of MVC applications created with Zend Framework | Alex @ Net More TDD: Zend_Application
  • 14.
    Thank you! GarrizaldySantos [email_address]