SlideShare una empresa de Scribd logo
1 de 56
Descargar para leer sin conexión
ZEND_TOOL IN ZF 1.8
By Ralph Schindler




                      Copyright © 2007, Zend Technologies Inc.
Overview

 •  Overview
     The Problem
     The Solution
     Obtaining Zend_Tool
 •  Basic Usage
     Zend_Tool usage OTB (out the box)
     Zend_CodeGenerator & Zend_Reflection
 •  Advanced Usage
     Extending Zend_Tool




                                             Overview   | Jul-1-09 | 2
OVERVIEW


“
    What’s this thing all
    about?




                            Overview   | Jul-1-09 | 3
Overview

 •  The Problem – all the buzzwords
      RAD – Rapid Application Development
      Code Generation
        •  The generation of code during “development time” that will run
           during “production time”
        •  Development time code generation is ALWAYS better than
           runtime introspection
      Scaffolding
        •  Templates
        •  Meta programming
        •  CRUD




                                                                Overview   | Jul-1-09 | 4
Overview

 •  In a nutshell:
      “Zend_Tool is both RAD tools as well as a framework for
       exposing your own set of tooling needs to the Zend_Tool user
       interface.”
 •  Main Classes & APIs:
      Zend_Tool_Framework
      Zend_Tool_Project
 •  Supporting Classes & APIs:
      Zend_CodeGenerator
      Zend_Reflection




                                                         Overview   | Jul-1-09 | 5
Overview

 •  Download and go
 •  SVN
      Create a link to the proper runner (zf.sh/zf.bat)
        •  Preferably in the system path
      Add Zend Framework library to global include_path
 •  Zend Server
 •  Pear Channel (http://pear.zfcampus.org/)




                                                           Overview   | Jul-1-09 | 6
Overview

 •  How it works
      Zend_Tool_Framework looks for providers, by default, on the
       include_path
      Zend_Tool_Project is consumed by Zend_Tool_Framework
       •  This allows Zend_Tool_Project to be only concerned with
          “project” problems
       •  This also allows Zend_Tool_Framework to focus on the problem
          of knowing which requests are good, and knowing how to
          dispatch said request
      Zend_Tool_Framework provides a client to the user
      That client in 1.8 is the command line client




                                                            Overview   | Jul-1-09 | 7
BASIC USAGE


“
    So, how do I use this
    thing?




                            Basic Usage   | Jul-1-09 | 8
Basic Usage




              Basic Usage   | Jul-1-09 | 9
Basic Usage




              Basic Usage   | Jul-1-09 | 10
Basic Usage




              Basic Usage   | Jul-1-09 | 11
Basic Usage




              Basic Usage   | Jul-1-09 | 12
Basic Usage




              Basic Usage   | Jul-1-09 | 13
Basic Usage




              Basic Usage   | Jul-1-09 | 14
Basic Usage




              Basic Usage   | Jul-1-09 | 15
Basic Usage




              Basic Usage   | Jul-1-09 | 16
Basic Usage




              Basic Usage   | Jul-1-09 | 17
Basic Usage




              Basic Usage   | Jul-1-09 | 18
ADVANCED USAGE


“
    So, how do I extend this
    thing?




                               Advanced Usage   | Jul-1-09 | 19
Advanced Usage

 •  Zend_Tool_Framework Architecture
     Registry
       •  A container for all of the Zend_Tool_Framework sub componets
     Providers
       •  The built in providers
     Loaders
       •  The component responsible for finding providers & manifests
     Manifest
       •  A dictionary of metadata to be used by clients and providers
     Client
       •  The subcomponent responsible for presenting the toolchain to
          the user as well as building and dispatching requests



                                                           Advanced Usage   | Jul-1-09 | 20
Advanced Usage

 •  Zend_Tool_Project Architecture
      Project Profile
        •  The description of the project in terms as a tree structure of
           resources
      Resource
        •  A resources is a node in the “project profile tree”
        •  Can be a single node, or a parent of a collection of nodes
        •  Is further described by the “context” associated with it.
      Providers
        •  Set of providers responsible for project based capabilities
      Context
        •  An object that describes the role of any given resources.



                                                              Advanced Usage   | Jul-1-09 | 21
Advanced Usage

 •  Zend_Reflection
      Extends the API of PHP’s Reflection class to handle some
       missing functionality
       •  Docblock introspection (ability to get tags and descriptions)
       •  File introspection




                                                             Advanced Usage   | Jul-1-09 | 22
Advanced Usage

 •  Zend_CodeGenerator
     Purpose is to generate OO code with an OO interface
     API very similar to Reflection API, but the purpose is exactly
      the opposite
     generate() method produces Zend/PEAR standard compliant
      object oriented code
     Target use case: Assisting RAD and facilitating iterative
      development




                                                       Advanced Usage   | Jul-1-09 | 23
Advanced Usage

 •  Iterative Development
      Use Zend_Tool to generate file & class
      Modify file with external tool
        •  Example: use studio to fill in the body of an Action Controllers
           action
      Use Zend_Tool to modify file & class
        •  Example: adding an action to an already generated and modifed
           Action Controller




                                                              Advanced Usage   | Jul-1-09 | 24
Advanced Usage

 •  Next slides are old demonstration
 •  API still applicable, substitute Zend for ZendL




                                             Advanced Usage   | Jul-1-09 | 25
Advanced Usage

 •  Zend_CodeGenerator / Reflection example




                                        Advanced Usage   | Jul-1-09 | 26
Advanced Usage

 •  Zend_CodeGenerator / Reflection example




                                        Advanced Usage   | Jul-1-09 | 27
Advanced Usage

 •  Zend_CodeGenerator / Reflection example




                                        Advanced Usage   | Jul-1-09 | 28
Advanced Usage

 •  Zend_CodeGenerator / Reflection example




                                        Advanced Usage   | Jul-1-09 | 29
Advanced Usage

 •  Lets explore a simple problem: Db Table & Model
   Generation
      Start with a schema
      Generate Db Table Files
      Generate Model Files




                                          Advanced Usage   | Jul-1-09 | 30
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 31
Advanced Usage

 •  Files needed to facilitate this endeavor
 •  (These are in the include_path)




                                               Advanced Usage   | Jul-1-09 | 32
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 33
Advanced Usage

 •  Start with the simpler Abstract & ModelProvider




                                           Advanced Usage   | Jul-1-09 | 34
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 35
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 36
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 37
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 38
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 39
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 40
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 41
Advanced Usage

 •  The more complex DbTable provider & generator
 •  This will include some Zend_Application
   integration




                                        Advanced Usage   | Jul-1-09 | 42
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 43
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 44
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 45
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 46
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 47
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 48
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 49
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 50
Advanced Usage




                 Advanced Usage   | Jul-1-09 | 51
WRAPPING IT UP


“
    What’s next? Wha’ts on
    the horizon?




                             Advanced Usage   | Jul-1-09 | 52
Wrapping It Up

  •  Most immediately
      Code and slides published to my blog
       •  http://ralphschindler.com
      End of week a tutorial on DevZone
       •  Same code, only heavily documented to demonstrate what is
          going on
       •  Some additional functionality inside the code
           •  Iterative examples




                                                      Name of this section   | Jul-1-09 | 53
Wrapping It Up

  •  Whats to come in 1.9?
       A setup script
       Better include_path management
       New Providers!
         •  Model provider
         •  DbTable provides
       Custom profiles
  •  Whats on the TODO list?
       Importing of existing project (resource auto-detection)
       Web based client
       Zend Studio client


                                                       Name of this section   | Jul-1-09 | 54
Wrapping It Up

  •  Questions?




                  Name of this section   | Jul-1-09 | 55
THANK YOU!
Ralph Schindler
ralph.schindler@zend.com
http://framework.zend.com/




                                                                      | 56
                                                        Name of thisJul-1-09
                                                                 | section
                             Copyright © 2007, Zend Technologies Inc.

Más contenido relacionado

Similar a Zend_Tool In ZF 1.8 Webinar

Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Diego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Kaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Kaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Kaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Kaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Diego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Diego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Diego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Diego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Diego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
Diego Delon
 
Zend Framework 2, What's new, Confoo 2011
Zend Framework 2, What's new, Confoo 2011Zend Framework 2, What's new, Confoo 2011
Zend Framework 2, What's new, Confoo 2011
Bachkoutou Toutou
 
Building software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinBuilding software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard Thulin
Rikard Thulin
 

Similar a Zend_Tool In ZF 1.8 Webinar (20)

Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Extending ZF & Extending With ZF
Extending ZF & Extending With ZFExtending ZF & Extending With ZF
Extending ZF & Extending With ZF
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
"X" Driven-Development Methodologies
"X" Driven-Development Methodologies"X" Driven-Development Methodologies
"X" Driven-Development Methodologies
 
Zend_Tool: Practical use and Extending
Zend_Tool: Practical use and ExtendingZend_Tool: Practical use and Extending
Zend_Tool: Practical use and Extending
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
Extending Zend_Tool
Extending Zend_ToolExtending Zend_Tool
Extending Zend_Tool
 
Adf-fusion-architecture_manage-modular-approach_4581
Adf-fusion-architecture_manage-modular-approach_4581Adf-fusion-architecture_manage-modular-approach_4581
Adf-fusion-architecture_manage-modular-approach_4581
 
Zend Framework 2, What's new, Confoo 2011
Zend Framework 2, What's new, Confoo 2011Zend Framework 2, What's new, Confoo 2011
Zend Framework 2, What's new, Confoo 2011
 
0. About this course
0. About this course0. About this course
0. About this course
 
Building software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinBuilding software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard Thulin
 

Más de Ralph Schindler (6)

Zend Di in ZF 2.0
Zend Di in ZF 2.0Zend Di in ZF 2.0
Zend Di in ZF 2.0
 
484 Days of PHP 5.3
484 Days of PHP 5.3484 Days of PHP 5.3
484 Days of PHP 5.3
 
What's New in ZF 1.10
What's New in ZF 1.10What's New in ZF 1.10
What's New in ZF 1.10
 
Software Engineering In PHP
Software Engineering In PHPSoftware Engineering In PHP
Software Engineering In PHP
 
Zend_Layout & Zend_View Enhancements
Zend_Layout & Zend_View EnhancementsZend_Layout & Zend_View Enhancements
Zend_Layout & Zend_View Enhancements
 
Zend_Tool: Rapid Application Development with Zend Framework
Zend_Tool: Rapid Application Development with Zend FrameworkZend_Tool: Rapid Application Development with Zend Framework
Zend_Tool: Rapid Application Development with Zend Framework
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Zend_Tool In ZF 1.8 Webinar

  • 1. ZEND_TOOL IN ZF 1.8 By Ralph Schindler Copyright © 2007, Zend Technologies Inc.
  • 2. Overview •  Overview   The Problem   The Solution   Obtaining Zend_Tool •  Basic Usage   Zend_Tool usage OTB (out the box)   Zend_CodeGenerator & Zend_Reflection •  Advanced Usage   Extending Zend_Tool Overview | Jul-1-09 | 2
  • 3. OVERVIEW “ What’s this thing all about? Overview | Jul-1-09 | 3
  • 4. Overview •  The Problem – all the buzzwords   RAD – Rapid Application Development   Code Generation •  The generation of code during “development time” that will run during “production time” •  Development time code generation is ALWAYS better than runtime introspection   Scaffolding •  Templates •  Meta programming •  CRUD Overview | Jul-1-09 | 4
  • 5. Overview •  In a nutshell:   “Zend_Tool is both RAD tools as well as a framework for exposing your own set of tooling needs to the Zend_Tool user interface.” •  Main Classes & APIs:   Zend_Tool_Framework   Zend_Tool_Project •  Supporting Classes & APIs:   Zend_CodeGenerator   Zend_Reflection Overview | Jul-1-09 | 5
  • 6. Overview •  Download and go •  SVN   Create a link to the proper runner (zf.sh/zf.bat) •  Preferably in the system path   Add Zend Framework library to global include_path •  Zend Server •  Pear Channel (http://pear.zfcampus.org/) Overview | Jul-1-09 | 6
  • 7. Overview •  How it works   Zend_Tool_Framework looks for providers, by default, on the include_path   Zend_Tool_Project is consumed by Zend_Tool_Framework •  This allows Zend_Tool_Project to be only concerned with “project” problems •  This also allows Zend_Tool_Framework to focus on the problem of knowing which requests are good, and knowing how to dispatch said request   Zend_Tool_Framework provides a client to the user   That client in 1.8 is the command line client Overview | Jul-1-09 | 7
  • 8. BASIC USAGE “ So, how do I use this thing? Basic Usage | Jul-1-09 | 8
  • 9. Basic Usage Basic Usage | Jul-1-09 | 9
  • 10. Basic Usage Basic Usage | Jul-1-09 | 10
  • 11. Basic Usage Basic Usage | Jul-1-09 | 11
  • 12. Basic Usage Basic Usage | Jul-1-09 | 12
  • 13. Basic Usage Basic Usage | Jul-1-09 | 13
  • 14. Basic Usage Basic Usage | Jul-1-09 | 14
  • 15. Basic Usage Basic Usage | Jul-1-09 | 15
  • 16. Basic Usage Basic Usage | Jul-1-09 | 16
  • 17. Basic Usage Basic Usage | Jul-1-09 | 17
  • 18. Basic Usage Basic Usage | Jul-1-09 | 18
  • 19. ADVANCED USAGE “ So, how do I extend this thing? Advanced Usage | Jul-1-09 | 19
  • 20. Advanced Usage •  Zend_Tool_Framework Architecture   Registry •  A container for all of the Zend_Tool_Framework sub componets   Providers •  The built in providers   Loaders •  The component responsible for finding providers & manifests   Manifest •  A dictionary of metadata to be used by clients and providers   Client •  The subcomponent responsible for presenting the toolchain to the user as well as building and dispatching requests Advanced Usage | Jul-1-09 | 20
  • 21. Advanced Usage •  Zend_Tool_Project Architecture   Project Profile •  The description of the project in terms as a tree structure of resources   Resource •  A resources is a node in the “project profile tree” •  Can be a single node, or a parent of a collection of nodes •  Is further described by the “context” associated with it.   Providers •  Set of providers responsible for project based capabilities   Context •  An object that describes the role of any given resources. Advanced Usage | Jul-1-09 | 21
  • 22. Advanced Usage •  Zend_Reflection   Extends the API of PHP’s Reflection class to handle some missing functionality •  Docblock introspection (ability to get tags and descriptions) •  File introspection Advanced Usage | Jul-1-09 | 22
  • 23. Advanced Usage •  Zend_CodeGenerator   Purpose is to generate OO code with an OO interface   API very similar to Reflection API, but the purpose is exactly the opposite   generate() method produces Zend/PEAR standard compliant object oriented code   Target use case: Assisting RAD and facilitating iterative development Advanced Usage | Jul-1-09 | 23
  • 24. Advanced Usage •  Iterative Development   Use Zend_Tool to generate file & class   Modify file with external tool •  Example: use studio to fill in the body of an Action Controllers action   Use Zend_Tool to modify file & class •  Example: adding an action to an already generated and modifed Action Controller Advanced Usage | Jul-1-09 | 24
  • 25. Advanced Usage •  Next slides are old demonstration •  API still applicable, substitute Zend for ZendL Advanced Usage | Jul-1-09 | 25
  • 26. Advanced Usage •  Zend_CodeGenerator / Reflection example Advanced Usage | Jul-1-09 | 26
  • 27. Advanced Usage •  Zend_CodeGenerator / Reflection example Advanced Usage | Jul-1-09 | 27
  • 28. Advanced Usage •  Zend_CodeGenerator / Reflection example Advanced Usage | Jul-1-09 | 28
  • 29. Advanced Usage •  Zend_CodeGenerator / Reflection example Advanced Usage | Jul-1-09 | 29
  • 30. Advanced Usage •  Lets explore a simple problem: Db Table & Model Generation   Start with a schema   Generate Db Table Files   Generate Model Files Advanced Usage | Jul-1-09 | 30
  • 31. Advanced Usage Advanced Usage | Jul-1-09 | 31
  • 32. Advanced Usage •  Files needed to facilitate this endeavor •  (These are in the include_path) Advanced Usage | Jul-1-09 | 32
  • 33. Advanced Usage Advanced Usage | Jul-1-09 | 33
  • 34. Advanced Usage •  Start with the simpler Abstract & ModelProvider Advanced Usage | Jul-1-09 | 34
  • 35. Advanced Usage Advanced Usage | Jul-1-09 | 35
  • 36. Advanced Usage Advanced Usage | Jul-1-09 | 36
  • 37. Advanced Usage Advanced Usage | Jul-1-09 | 37
  • 38. Advanced Usage Advanced Usage | Jul-1-09 | 38
  • 39. Advanced Usage Advanced Usage | Jul-1-09 | 39
  • 40. Advanced Usage Advanced Usage | Jul-1-09 | 40
  • 41. Advanced Usage Advanced Usage | Jul-1-09 | 41
  • 42. Advanced Usage •  The more complex DbTable provider & generator •  This will include some Zend_Application integration Advanced Usage | Jul-1-09 | 42
  • 43. Advanced Usage Advanced Usage | Jul-1-09 | 43
  • 44. Advanced Usage Advanced Usage | Jul-1-09 | 44
  • 45. Advanced Usage Advanced Usage | Jul-1-09 | 45
  • 46. Advanced Usage Advanced Usage | Jul-1-09 | 46
  • 47. Advanced Usage Advanced Usage | Jul-1-09 | 47
  • 48. Advanced Usage Advanced Usage | Jul-1-09 | 48
  • 49. Advanced Usage Advanced Usage | Jul-1-09 | 49
  • 50. Advanced Usage Advanced Usage | Jul-1-09 | 50
  • 51. Advanced Usage Advanced Usage | Jul-1-09 | 51
  • 52. WRAPPING IT UP “ What’s next? Wha’ts on the horizon? Advanced Usage | Jul-1-09 | 52
  • 53. Wrapping It Up •  Most immediately   Code and slides published to my blog •  http://ralphschindler.com   End of week a tutorial on DevZone •  Same code, only heavily documented to demonstrate what is going on •  Some additional functionality inside the code •  Iterative examples Name of this section | Jul-1-09 | 53
  • 54. Wrapping It Up •  Whats to come in 1.9?   A setup script   Better include_path management   New Providers! •  Model provider •  DbTable provides   Custom profiles •  Whats on the TODO list?   Importing of existing project (resource auto-detection)   Web based client   Zend Studio client Name of this section | Jul-1-09 | 54
  • 55. Wrapping It Up •  Questions? Name of this section | Jul-1-09 | 55
  • 56. THANK YOU! Ralph Schindler ralph.schindler@zend.com http://framework.zend.com/ | 56 Name of thisJul-1-09 | section Copyright © 2007, Zend Technologies Inc.