SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Extending Zend_Tool

By Ralph Schindler - Software Engineer
Who is this guy?
•Ralph Schindler
PHP’er since 1998-ish, 3.0 days
Software Engineer
Zend Framework team since Jan 2008
New Orleans born, currently reside in Austin, TX
•Me on the interwebs:
IRC:
  •Freenode - ralphschindler
  •EFNet - ralphschi / ralphs
ralph.schindler@zend.com
http://twitter.com/ralphschindler
http://ralphschindler.com
http://slideshare.com/ralphschindler

                                                    Me   2
What’s Zend_Tool All About, Again?
A quick review of where Zend_Tool came from, and where its
going.




                                                             3
Why Zend_Tool?
•Rapid application development of ZF projects
•Tooling framework
 Framework for building repeatable tooling tasks
 Lots of Built in Features
 Easily extensible (what this talk is about!)
•B/c build systems only get us so far
•Tools need to fit in human workflows:
 Tool creates project
 Human edits project
 Tool edits project
 Human edits project
 ... so on and so on ...


                                            What’s Zend_Tool All About Again?   4
When Zend_Tool?
•Zend_Tool in ZF 1.8
•Zend_Application in 1.8
•Built in project providers:
 create projects
 create controllers
 create actions
 create views
 create modules
•Zend_Reflection & Zend_CodeGenerator in 1.8




                                   What’s Zend_Tool All About Again?   5
Future Zend_Tool?
•New features in 1.10
New base loader (no more include_path scanning)
Providers
  •Custom project profiles
  •Client storage & configuration values
  •DbAdapter configuration
  •DbTable creation based on database tables
   – Scanning of tables from database to create code
  •Layout enabling and creation
(Web client interface?)




                                                   What’s Zend_Tool All About Again?   6
System Overview
Let’s have a stroll through the Zend_Tool architecture




                                                         7
The Components
•Two main “components”
Zend_Tool_Framework
  •The component responsible for dispatching tooling requests
Zend_Tool_Project
  •The component responsible for exposing the “project specific” tooling
   capabilities
•Auxiliary Components
Zend_Reflection
Zend_CodeGenerator




                                                                 System Overview   8
Zend_Tool_Framework
•Dispatch style framework, designed to abstract enough system
 internals to make extensibility easy
 “Flexibility of the tooling dispatch over speed of tooling dispatch”
•Broken down into logical sub-parts:
 Client
 Client storage & configuration
 Loader
 Provider & Provider Repository
 Manifest, Manifest Repository & Metadata
 System (Built-in) Providers




                                                          System Overview   9
Zend_Tool_Framework_Client
•Responsibilities:
 Request object
 Response object
 Interactivity support
 Setting up the system registry containing all required objects
 The actual dispatch()-ing
•First implementation Zend_Tool_Framework_Client_Console




                                                         System Overview   10
Zend_Tool_Framework Config & Storage
•Zend_Tool_Framework_Client_Storage
•Zend_Tool_Framework_Client_Config
Responsibilities:
  •Allowing clients to specify configuration values for the system and providers to
   use
  •Allowing clients to store artifacts on the filesystem that the system and
   providers can consume
   – Custom profile files
   – Provider specific file formats and metadata




                                                                   System Overview    11
Zend_Tool_Framework_Loader
•Responsibilities:
 Load files provided
 Search for classes defined that implement:
  •Zend_Tool_Framework_Manifest_Interface
  •Zend_Tool_Framework_Provider_Interface
•Original loader
 Zend_Tool_Framework_Loader_IncludePathLoader
•New loader Zend_Tool_Framework_Loader_BasicLoader
 Loads explicitly what it was asked to load




                                                System Overview   12
Zend_Tool_Framework_Provider
•Zend_Tool_Framework_Provider
•Zend_Tool_Framework_Provider_Registry
•Responsibilities:
 An interface for defining via a class, dispatch-able actions and
  “specialties”
  •(Similar to how Action Controllers define actions)
 Registry to maintain instances of all providers available
 Parsing of provider classes for dispatch-able “signatures”




                                                          System Overview   13
Zend_Tool_Framework Manifest & Metadata
•Zend_Tool_Framework_Manifest & Manifest Repository
Responsibilities:
  •Manifest can supply a collection of providers, actions and/or metadata
  •Registry provides a way to search for metadata in the manifest
•Zend_Tool_Framework_Metadata
Responsibilities:
  •Primary use case is to attach “data about data” to instance of a specific client,
   a specific provider, or action
   – ex: alternate names for each provider based on the command line naming scheme,
     OR short names (p for profile)




                                                                    System Overview    14
Zend_Tool_Project
•Problem: How to successfully model all the notions of a
 “project”?
•What is a “project”?
 It is a tree of resources (some filesystem / some not)
 For each resource we need to capturing it’s “nature” or “context”
•2 main elements
 Zend_Tool_Project_Profile which is a tree of
  Zend_Tool_Project_Profile_Resources
 Zend_Tool_Project_Context




                                                           System Overview   15
Zend_Tool_Project Profile & Resources
•Zend_Tool_Project_Profile
Responsibilities:
  •loading, parsing, serializing and storing a profile file
  •Top most node in a “resource tree”
•Zend_Tool_Project_Profile_Resource
Responsibilities:
  •The class most responsible for the “where” question of project modeling
  •The class most responsible for implementing a node in a “resource tree”
  •Extends Resource_Container which is a RecursiveIterator (tree fundamentals)
  •Can create new Resources at specific locations
  •Can find resources by name and attribute sets
  •Each contains a Zend_Tool_Project_Context object



                                                                System Overview   16
Zend_Tool_Project_Context
•Responsibilities
 The class most responsible for the “what” part of project modeling
 Each resource has a context object
  •(This is known as “composition”)
 Example contexts:
  •Controller file
  •View script directory
  •View script file
  •Model file
  •Action method
  •...




                                                        System Overview   17
Building & Extending for Zend_Tool
With so many extension points, where does one start?




                                                       18
Where Should One Start?
•Path of least resistance when learning to extend:
 Implement a provider, and be able to call it
 Implement a manifest for the provider, and be able to call it
 Implement some metadata about provider, and be able to find it
 Add complex functionality to provider:
  •Selective interactivity (prompting the user)
  •Configuration
  •Use files from user storage area
 Implement a new client interface




                                                  Building & Extending For Zend_Tool   19
Ensure Environment Is Setup




                         Building & Extending For Zend_Tool   20
Build A Basic Provider




                         Building & Extending For Zend_Tool   21
Register Provider With Tooling System




                          Building & Extending For Zend_Tool   22
Ensure Provide Is Loaded
•Checking the provider is available in console help (zf --help)




                                       Building & Extending For Zend_Tool   23
Making a Component Out of Providers
•Create a manifest for our provider
•Notice we moved the provider inside the Tool namespace




                                      Building & Extending For Zend_Tool   24
Running Your Basic Provider
•Run the provider




                          Building & Extending For Zend_Tool   25
Creating Metadata
•Implement metadata attached to provider
•(dynamic metadata)




                                   Building & Extending For Zend_Tool   26
Searching For Metadata




                         Building & Extending For Zend_Tool   27
Running our provider




                       SectionName   28
Building & Extending For Zend_Tool
•Zend_Tool_Project extensions typical tasks
Load existing profile
Search for resources
Create resources & contexts
  •Persist attributes
Execute method on resource/contexts, such as create
Store profile after changes




                                         Building & Extending Zend_Tool   29
What to Examine
•Code to examine to learn more
Zend_Tool_Framework
  •Zend_Tool_Framework_Client & Zend_Tool_Framework_Registry
Zend_Tool_Project
  •Zend_Tool_Project_Provider_* (specifically DbAdapter, DbTable)
  •Zend_Tool_Project_Context_* (specifically ControllerFile, ViewScriptFile,
   DbTableFile)
Zend_CodeGenerator_Php
  •This is needed to generate, and regenerate code in most cases




                                                    Building & Extending Zend_Tool   30
Links
•Link to manual & good articles:
 http://framework.zend.com/manual/en/zend.tool.framework.html
 http://framework.zend.com/manual/en/zend.tool.project.html




                                        Building & Extending Zend_Tool   31
Building & Extending for Zend_Tool
•Demo Time!




                            Building & Extending Zend_Tool   32
Thank You!
Questions? Comments?




                       33

Weitere ähnliche Inhalte

Was ist angesagt?

Zend Framework 2 - Basic Components
Zend Framework 2  - Basic ComponentsZend Framework 2  - Basic Components
Zend Framework 2 - Basic ComponentsMateusz Tymek
 
Zend Framework 2 Components
Zend Framework 2 ComponentsZend Framework 2 Components
Zend Framework 2 ComponentsShawn Stratton
 
.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16aminmesbahi
 
Spring - CDI Interop
Spring - CDI InteropSpring - CDI Interop
Spring - CDI InteropRay Ploski
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesMert Çalışkan
 
Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Antonio Peric-Mazar
 
Spring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen HoellerSpring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen HoellerZeroTurnaround
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling ResolutionDEEPAK KHETAWAT
 
How to build customizable multitenant web applications - PHPBNL11
How to build customizable multitenant web applications - PHPBNL11How to build customizable multitenant web applications - PHPBNL11
How to build customizable multitenant web applications - PHPBNL11Stephan Hochdörfer
 
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)James Titcumb
 
Ant - Another Neat Tool
Ant - Another Neat ToolAnt - Another Neat Tool
Ant - Another Neat ToolKanika2885
 
Dependency Injection, Zend Framework and Symfony Container
Dependency Injection, Zend Framework and Symfony ContainerDependency Injection, Zend Framework and Symfony Container
Dependency Injection, Zend Framework and Symfony ContainerDiego Lewin
 

Was ist angesagt? (19)

Hibernate
HibernateHibernate
Hibernate
 
Zend Framework 2
Zend Framework 2Zend Framework 2
Zend Framework 2
 
Java Enterprise Edition
Java Enterprise EditionJava Enterprise Edition
Java Enterprise Edition
 
Zend Framework 2 - Basic Components
Zend Framework 2  - Basic ComponentsZend Framework 2  - Basic Components
Zend Framework 2 - Basic Components
 
Zend Framework 2 Components
Zend Framework 2 ComponentsZend Framework 2 Components
Zend Framework 2 Components
 
.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12
 
Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
 
.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Maven
MavenMaven
Maven
 
Spring - CDI Interop
Spring - CDI InteropSpring - CDI Interop
Spring - CDI Interop
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)
 
Spring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen HoellerSpring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen Hoeller
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling Resolution
 
How to build customizable multitenant web applications - PHPBNL11
How to build customizable multitenant web applications - PHPBNL11How to build customizable multitenant web applications - PHPBNL11
How to build customizable multitenant web applications - PHPBNL11
 
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
 
Ant - Another Neat Tool
Ant - Another Neat ToolAnt - Another Neat Tool
Ant - Another Neat Tool
 
Dependency Injection, Zend Framework and Symfony Container
Dependency Injection, Zend Framework and Symfony ContainerDependency Injection, Zend Framework and Symfony Container
Dependency Injection, Zend Framework and Symfony Container
 

Ähnlich wie Extending Zend_Tool

Zend_Tool: Practical use and Extending
Zend_Tool: Practical use and ExtendingZend_Tool: Practical use and Extending
Zend_Tool: Practical use and ExtendingZendCon
 
Extending ZF & Extending With ZF
Extending ZF & Extending With ZFExtending ZF & Extending With ZF
Extending ZF & Extending With ZFRalph Schindler
 
Writing Services with ZF2
Writing Services with ZF2Writing Services with ZF2
Writing Services with ZF2Mike Willbanks
 
Edp bootstrapping a-software_company
Edp bootstrapping a-software_companyEdp bootstrapping a-software_company
Edp bootstrapping a-software_companyGanesh Kulkarni
 
ZF2: Writing Service Components
ZF2: Writing Service ComponentsZF2: Writing Service Components
ZF2: Writing Service ComponentsMike Willbanks
 
Innovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and FrameworkInnovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and FrameworkSandeep Adwankar
 
Modular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireModular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireJeff Fox
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentKaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentKaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentKaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentKaiuwe
 
MVC with Zend Framework
MVC with Zend FrameworkMVC with Zend Framework
MVC with Zend Frameworkwebholics
 
Zend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applicationsZend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applicationsEtisbew Technology Group
 
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)Masayuki Nii
 
My Very First Zf App Part One
My Very First Zf App   Part OneMy Very First Zf App   Part One
My Very First Zf App Part Oneisaaczfoster
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesVagif Abilov
 
EoinWoods_WhereDidMyArchitectureGoPreservingSoftwareArchitectureInItsImplemen...
EoinWoods_WhereDidMyArchitectureGoPreservingSoftwareArchitectureInItsImplemen...EoinWoods_WhereDidMyArchitectureGoPreservingSoftwareArchitectureInItsImplemen...
EoinWoods_WhereDidMyArchitectureGoPreservingSoftwareArchitectureInItsImplemen...Kostas Mavridis
 
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 2011Bachkoutou Toutou
 

Ähnlich wie Extending Zend_Tool (20)

Zend_Tool: Practical use and Extending
Zend_Tool: Practical use and ExtendingZend_Tool: Practical use and Extending
Zend_Tool: Practical use and Extending
 
Extending ZF & Extending With ZF
Extending ZF & Extending With ZFExtending ZF & Extending With ZF
Extending ZF & Extending With ZF
 
Writing Services with ZF2
Writing Services with ZF2Writing Services with ZF2
Writing Services with ZF2
 
Edp bootstrapping a-software_company
Edp bootstrapping a-software_companyEdp bootstrapping a-software_company
Edp bootstrapping a-software_company
 
ZF2: Writing Service Components
ZF2: Writing Service ComponentsZF2: Writing Service Components
ZF2: Writing Service Components
 
Innovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and FrameworkInnovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and Framework
 
Modular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireModular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter Bonfire
 
Zend Code in ZF 2.0
Zend Code in ZF 2.0Zend Code in ZF 2.0
Zend Code in ZF 2.0
 
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
 
MVC with Zend Framework
MVC with Zend FrameworkMVC with Zend Framework
MVC with Zend Framework
 
Zend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applicationsZend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applications
 
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
 
My Very First Zf App Part One
My Very First Zf App   Part OneMy Very First Zf App   Part One
My Very First Zf App Part One
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class Libraries
 
EoinWoods_WhereDidMyArchitectureGoPreservingSoftwareArchitectureInItsImplemen...
EoinWoods_WhereDidMyArchitectureGoPreservingSoftwareArchitectureInItsImplemen...EoinWoods_WhereDidMyArchitectureGoPreservingSoftwareArchitectureInItsImplemen...
EoinWoods_WhereDidMyArchitectureGoPreservingSoftwareArchitectureInItsImplemen...
 
Velociraptor - SANS Summit 2019
Velociraptor - SANS Summit 2019Velociraptor - SANS Summit 2019
Velociraptor - SANS Summit 2019
 
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
 

Mehr von Ralph Schindler

Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Ralph Schindler
 
Zend_Tool In ZF 1.8 Webinar
Zend_Tool In ZF 1.8 WebinarZend_Tool In ZF 1.8 Webinar
Zend_Tool In ZF 1.8 WebinarRalph Schindler
 
Zend Framework 1.8 Features Webinar
Zend Framework 1.8 Features WebinarZend Framework 1.8 Features Webinar
Zend Framework 1.8 Features WebinarRalph Schindler
 
Software Engineering In PHP
Software Engineering In PHPSoftware Engineering In PHP
Software Engineering In PHPRalph Schindler
 
Zend_Layout & Zend_View Enhancements
Zend_Layout & Zend_View EnhancementsZend_Layout & Zend_View Enhancements
Zend_Layout & Zend_View EnhancementsRalph Schindler
 
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 FrameworkRalph Schindler
 

Mehr von Ralph Schindler (10)

Zend Di in ZF 2.0
Zend Di in ZF 2.0Zend Di in ZF 2.0
Zend Di in ZF 2.0
 
Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2
 
484 Days of PHP 5.3
484 Days of PHP 5.3484 Days of PHP 5.3
484 Days of PHP 5.3
 
Modeling best practices
Modeling best practicesModeling best practices
Modeling best practices
 
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
 
Zend_Tool In ZF 1.8 Webinar
Zend_Tool In ZF 1.8 WebinarZend_Tool In ZF 1.8 Webinar
Zend_Tool In ZF 1.8 Webinar
 
Zend Framework 1.8 Features Webinar
Zend Framework 1.8 Features WebinarZend Framework 1.8 Features Webinar
Zend Framework 1.8 Features Webinar
 
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
 

Kürzlich hochgeladen

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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 productivityPrincipled Technologies
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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...Drew Madelung
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Extending Zend_Tool

  • 1. Extending Zend_Tool By Ralph Schindler - Software Engineer
  • 2. Who is this guy? •Ralph Schindler PHP’er since 1998-ish, 3.0 days Software Engineer Zend Framework team since Jan 2008 New Orleans born, currently reside in Austin, TX •Me on the interwebs: IRC: •Freenode - ralphschindler •EFNet - ralphschi / ralphs ralph.schindler@zend.com http://twitter.com/ralphschindler http://ralphschindler.com http://slideshare.com/ralphschindler Me 2
  • 3. What’s Zend_Tool All About, Again? A quick review of where Zend_Tool came from, and where its going. 3
  • 4. Why Zend_Tool? •Rapid application development of ZF projects •Tooling framework Framework for building repeatable tooling tasks Lots of Built in Features Easily extensible (what this talk is about!) •B/c build systems only get us so far •Tools need to fit in human workflows: Tool creates project Human edits project Tool edits project Human edits project ... so on and so on ... What’s Zend_Tool All About Again? 4
  • 5. When Zend_Tool? •Zend_Tool in ZF 1.8 •Zend_Application in 1.8 •Built in project providers: create projects create controllers create actions create views create modules •Zend_Reflection & Zend_CodeGenerator in 1.8 What’s Zend_Tool All About Again? 5
  • 6. Future Zend_Tool? •New features in 1.10 New base loader (no more include_path scanning) Providers •Custom project profiles •Client storage & configuration values •DbAdapter configuration •DbTable creation based on database tables – Scanning of tables from database to create code •Layout enabling and creation (Web client interface?) What’s Zend_Tool All About Again? 6
  • 7. System Overview Let’s have a stroll through the Zend_Tool architecture 7
  • 8. The Components •Two main “components” Zend_Tool_Framework •The component responsible for dispatching tooling requests Zend_Tool_Project •The component responsible for exposing the “project specific” tooling capabilities •Auxiliary Components Zend_Reflection Zend_CodeGenerator System Overview 8
  • 9. Zend_Tool_Framework •Dispatch style framework, designed to abstract enough system internals to make extensibility easy “Flexibility of the tooling dispatch over speed of tooling dispatch” •Broken down into logical sub-parts: Client Client storage & configuration Loader Provider & Provider Repository Manifest, Manifest Repository & Metadata System (Built-in) Providers System Overview 9
  • 10. Zend_Tool_Framework_Client •Responsibilities: Request object Response object Interactivity support Setting up the system registry containing all required objects The actual dispatch()-ing •First implementation Zend_Tool_Framework_Client_Console System Overview 10
  • 11. Zend_Tool_Framework Config & Storage •Zend_Tool_Framework_Client_Storage •Zend_Tool_Framework_Client_Config Responsibilities: •Allowing clients to specify configuration values for the system and providers to use •Allowing clients to store artifacts on the filesystem that the system and providers can consume – Custom profile files – Provider specific file formats and metadata System Overview 11
  • 12. Zend_Tool_Framework_Loader •Responsibilities: Load files provided Search for classes defined that implement: •Zend_Tool_Framework_Manifest_Interface •Zend_Tool_Framework_Provider_Interface •Original loader Zend_Tool_Framework_Loader_IncludePathLoader •New loader Zend_Tool_Framework_Loader_BasicLoader Loads explicitly what it was asked to load System Overview 12
  • 13. Zend_Tool_Framework_Provider •Zend_Tool_Framework_Provider •Zend_Tool_Framework_Provider_Registry •Responsibilities: An interface for defining via a class, dispatch-able actions and “specialties” •(Similar to how Action Controllers define actions) Registry to maintain instances of all providers available Parsing of provider classes for dispatch-able “signatures” System Overview 13
  • 14. Zend_Tool_Framework Manifest & Metadata •Zend_Tool_Framework_Manifest & Manifest Repository Responsibilities: •Manifest can supply a collection of providers, actions and/or metadata •Registry provides a way to search for metadata in the manifest •Zend_Tool_Framework_Metadata Responsibilities: •Primary use case is to attach “data about data” to instance of a specific client, a specific provider, or action – ex: alternate names for each provider based on the command line naming scheme, OR short names (p for profile) System Overview 14
  • 15. Zend_Tool_Project •Problem: How to successfully model all the notions of a “project”? •What is a “project”? It is a tree of resources (some filesystem / some not) For each resource we need to capturing it’s “nature” or “context” •2 main elements Zend_Tool_Project_Profile which is a tree of Zend_Tool_Project_Profile_Resources Zend_Tool_Project_Context System Overview 15
  • 16. Zend_Tool_Project Profile & Resources •Zend_Tool_Project_Profile Responsibilities: •loading, parsing, serializing and storing a profile file •Top most node in a “resource tree” •Zend_Tool_Project_Profile_Resource Responsibilities: •The class most responsible for the “where” question of project modeling •The class most responsible for implementing a node in a “resource tree” •Extends Resource_Container which is a RecursiveIterator (tree fundamentals) •Can create new Resources at specific locations •Can find resources by name and attribute sets •Each contains a Zend_Tool_Project_Context object System Overview 16
  • 17. Zend_Tool_Project_Context •Responsibilities The class most responsible for the “what” part of project modeling Each resource has a context object •(This is known as “composition”) Example contexts: •Controller file •View script directory •View script file •Model file •Action method •... System Overview 17
  • 18. Building & Extending for Zend_Tool With so many extension points, where does one start? 18
  • 19. Where Should One Start? •Path of least resistance when learning to extend: Implement a provider, and be able to call it Implement a manifest for the provider, and be able to call it Implement some metadata about provider, and be able to find it Add complex functionality to provider: •Selective interactivity (prompting the user) •Configuration •Use files from user storage area Implement a new client interface Building & Extending For Zend_Tool 19
  • 20. Ensure Environment Is Setup Building & Extending For Zend_Tool 20
  • 21. Build A Basic Provider Building & Extending For Zend_Tool 21
  • 22. Register Provider With Tooling System Building & Extending For Zend_Tool 22
  • 23. Ensure Provide Is Loaded •Checking the provider is available in console help (zf --help) Building & Extending For Zend_Tool 23
  • 24. Making a Component Out of Providers •Create a manifest for our provider •Notice we moved the provider inside the Tool namespace Building & Extending For Zend_Tool 24
  • 25. Running Your Basic Provider •Run the provider Building & Extending For Zend_Tool 25
  • 26. Creating Metadata •Implement metadata attached to provider •(dynamic metadata) Building & Extending For Zend_Tool 26
  • 27. Searching For Metadata Building & Extending For Zend_Tool 27
  • 28. Running our provider SectionName 28
  • 29. Building & Extending For Zend_Tool •Zend_Tool_Project extensions typical tasks Load existing profile Search for resources Create resources & contexts •Persist attributes Execute method on resource/contexts, such as create Store profile after changes Building & Extending Zend_Tool 29
  • 30. What to Examine •Code to examine to learn more Zend_Tool_Framework •Zend_Tool_Framework_Client & Zend_Tool_Framework_Registry Zend_Tool_Project •Zend_Tool_Project_Provider_* (specifically DbAdapter, DbTable) •Zend_Tool_Project_Context_* (specifically ControllerFile, ViewScriptFile, DbTableFile) Zend_CodeGenerator_Php •This is needed to generate, and regenerate code in most cases Building & Extending Zend_Tool 30
  • 31. Links •Link to manual & good articles: http://framework.zend.com/manual/en/zend.tool.framework.html http://framework.zend.com/manual/en/zend.tool.project.html Building & Extending Zend_Tool 31
  • 32. Building & Extending for Zend_Tool •Demo Time! Building & Extending Zend_Tool 32