Zend_Tool In ZF 1.8 Webinar

50 %
50 %
Information about Zend_Tool In ZF 1.8 Webinar
Technology

Published on July 1, 2009

Author: ralphschindler

Source: slideshare.net

Description

These slides were presented on 6/30/06 in a webinar for zend.com. The recorded webinar can be seen from the zend.com site.

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.

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

ZEND TOOL IN ZF 1

Advanced Usage • Zend_Tool_Framework Architecture Registry • A container for all of the Zend_Tool_Framework sub componets Providers • The built in ...
Read more

ZEND FRAMEWORK 1

Zend_Tool -Overview • In a nutshell: “Zend_Toolis both RAD tools as well as a framework for exposing your own set of tooling needs to the Zend_Tooluser
Read more

ZEND FRAMEWORK 1 - Ralph Schindler

Zend_Tool - 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 ...
Read more

Verwendung von Zend_Tool auf der Kommandozeile - Zend_Tool ...

Verwendung von Zend_Tool auf der Kommandozeile. Das CLI, ... ist der nächste Schritt das zf Kommendo auf dem System zu erstellen. Der ...
Read more

Zend_Tool and ZF 1.8 - Zend Developer Zone

Zend Developer Zone. Search. Search. Skip to content. ... Zend_Tool and ZF 1.8. By now, you are sure to have heard the news, Zend Framework 1.8 has landed.
Read more

Zend Framework Tool (ZFTool) — Zend Framework 2 2.4.8 ...

Zend Framework Tool (ZFTool) ... zf.php (Zend Tool) ... The zf.php should be installed into the vendor/ZFTool directory ...
Read more

Zf | LinkedIn

View 29720 Zf posts, presentations, experts, and more. Get the professional knowledge you need on LinkedIn. LinkedIn Home What is LinkedIn? Join Today
Read more

Zend Framework

... zend.com… Resource/Recorded Webinars/ IBM i Webinars. MVC basics ... •create model class with Zend_Tool •zf create dbtable Custfile CUSTFILE
Read more