Zend Framework Cli Tool

16 messages Options
Embed this post
Permalink
unknownman

Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
one of the great tool for rails is the its great script directory that you can make big project in a minute
i start writting a cli program like it.
i write a class (it is like dispatcher in MVC model for shell program)
<?php
// zct.php
require_once 'Zend/Console/Getopt.php';
class ZCT {
        protected $options;
        protected $cli;
       
        function __construct($options) {
                $this->cli = new Zend_Console_Getopt($options);
                $this->options = $options;
        }
       
        function execute() {
                $fileName = substr(
                                                   $_SERVER['SCRIPT_FILENAME'],
                                                   strrpos(
                                                      $_SERVER['SCRIPT_FILENAME'],
                                                      DIRECTORY_SEPARATOR
                                                      )+1
                                                   );
                $directory = dirname(__FILE__).DIRECTORY_SEPARATOR;
                require_once $directory.'operator/'.$fileName;
               
                $className = 'Zct_Operator_'.str_replace('.php','',$fileName);
                $obj= new $className($this->cli, $this->options);
                $obj->_prefilter();
                foreach($this->cli->toArray() as $option) {
                        $operate = $option.'Operator';
                        $obj->$operate();
                }
                $obj->_postfilter();
        }
}

every work you want to do have 2 section an script file and a operator class

//script file generate.php
#!/usr/bin/env php
<?php
/**
 * Zend Command Line Tool - Generator
 *
 * This file 's duty is to make new project
 * with zend framework
 *
  * @copyright  2005 Zend Technologies
 * @license    http://www.zend.com/license/3_0.txt   PHP License 3.0
 * @since      File available since Release 1.0.0RC2
 */
$options = array(
                                  'force|f' => 'Overwrite files that already exist',
                                  'help|h' => 'Show this help message and quit',
                                  'version|v'       => 'Show the ZCT version number and quit',
                                  'backtrace|t'      => 'Debugging: show backtraces on errors'
                                );

require_once '../zct.php';  
$base = new Zct($options);
$base->execute();
and the operator class is like this

<?php
class ZCT_Operator_Generate {
        function __construct() {
               
        }
       
        function _prefilter() {
                echo 'this is prefilter'."\n";
        }
       
        function helpOperator() {
                echo 'help content';
        }
       
        function _postfilter() {
                echo 'this is postfilter'."\n";
        }
}
</code>
then if we write in cli ./scripts/generate.php help we will see helpOperator()
I upload files and you can access to theme by this link zct.tar.gz
Nico Edtinger-2

Re: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
Hi unknown man!

[20.06.2007 12:35] unknownman wrote:
> one of the great tool for rails is the its great script directory  
> that you
> can make big project in a minute

There's something like this in lab called Primitus (FKA ZFApp):  
http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/ 
Primitus

But it seems like it needs an update.

nico
unknownman

Re: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
nice work but i think that like this community must be a community for discussion about needed tools

Nico Edtinger-2 wrote:
Hi unknown man!

[20.06.2007 12:35] unknownman wrote:
> one of the great tool for rails is the its great script directory  
> that you
> can make big project in a minute

There's something like this in lab called Primitus (FKA ZFApp):  
http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/ 
Primitus

But it seems like it needs an update.

nico
Andries Seutens

Re: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink

unknownman schreef:

> nice work but i think that like this community must be a community for
> discussion about needed tools
>
>
> Nico Edtinger-2 wrote:
>  
>> Hi unknown man!
>>
>> [20.06.2007 12:35] unknownman wrote:
>>    
>>> one of the great tool for rails is the its great script directory  
>>> that you
>>> can make big project in a minute
>>>      
>> There's something like this in lab called Primitus (FKA ZFApp):  
>> http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/ 
>> Primitus
>>
>> But it seems like it needs an update.
>>
>> nico
>>    
I'm not a fan of these auto code generation tools, remeber the Zend
Framework isn't Symfony ...

I have recently published a small article to get you started on the ZF.
There's a modular and conventional "app" available at:

http://andries.systray.be/blog/2007/06/18/zend-framework-just-get-me-started-okay/

Best,

--
Andries Seutens
http://andries.systray.be


Gecontroleerd op virussen door de JOJO Secure Gateway.
Andi Gutmans

RE: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
In reply to this post by unknownman
I think having some command line tooling is definitely something we are
interested in investigating further. In fact it's one of our todos to
jump start this discussion after 1.0 ships along with some other
pressing issues like good Form support.
We've been heads down on polishing up the release but this will change
once we successfully ship 1.0.
Thanks for the feedback. Please keep watching the list so you can
participate in the proposals/discussions in a few weeks time.

Andi

> -----Original Message-----
> From: unknownman [mailto:[hidden email]]
> Sent: Wednesday, June 20, 2007 3:35 AM
> To: [hidden email]
> Subject: [fw-general] Zend Framework Cli Tool
>
>
> one of the great tool for rails is the its great script
> directory that you can make big project in a minute i start
> writting a cli program like it.
> i write a class (it is like dispatcher in MVC model for shell
> program) <?php // zct.php require_once
> 'Zend/Console/Getopt.php'; class ZCT {
> protected $options;
> protected $cli;
>
> function __construct($options) {
> $this->cli = new Zend_Console_Getopt($options);
> $this->options = $options;
> }
>
> function execute() {
> $fileName = substr(
>  
$_SERVER['SCRIPT_FILENAME'],

>   strrpos(
>  
>    $_SERVER['SCRIPT_FILENAME'],
>  
>    DIRECTORY_SEPARATOR
>     )+1
>   );
> $directory = dirname(__FILE__).DIRECTORY_SEPARATOR;
> require_once $directory.'operator/'.$fileName;
>
> $className =
> 'Zct_Operator_'.str_replace('.php','',$fileName);
> $obj= new $className($this->cli, $this->options);
> $obj->_prefilter();
> foreach($this->cli->toArray() as $option) {
> $operate = $option.'Operator';
> $obj->$operate();
> }
> $obj->_postfilter();
> }
> }
>
> every work you want to do have 2 section an script file and a
> operator class
>
> //script file generate.php
> #!/usr/bin/env php
> <?php
> /**
>  * Zend Command Line Tool - Generator
>  *
>  * This file 's duty is to make new project
>  * with zend framework
>  *
>   * @copyright  2005 Zend Technologies
>  * @license    http://www.zend.com/license/3_0.txt   PHP License 3.0
>  * @since      File available since Release 1.0.0RC2
>  */
> $options = array(
>  'force|f'
> => 'Overwrite files that already exist',
>  'help|h'
> => 'Show this help message and quit',
>  'version|v'      
> => 'Show the ZCT version number and quit',
>  'backtrace|t'      
> => 'Debugging: show backtraces on errors'
> );
>
> require_once '../zct.php';
>  
> $base = new Zct($options);
> $base->execute();
> and the operator class is like this
>
> <?php
> class ZCT_Operator_Generate {
> function __construct() {
>
> }
>
> function _prefilter() {
> echo 'this is prefilter'."\n";
> }
>
> function helpOperator() {
> echo 'help content';
> }
>
> function _postfilter() {
> echo 'this is postfilter'."\n";
> }
> }
> </code>
> then if we write in cli ./scripts/generate.php help we will see
> helpOperator()
> http://www.nabble.com/file/p11210754/zct.tar.gz zct.tar.gz
> --
> View this message in context:
> http://www.nabble.com/Zend-Framework-Cli-Tool-tf3951538s16154.
html#a11210754
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
tfk

Re: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
In reply to this post by Nico Edtinger-2
On 6/20/07, Nico Edtinger <[hidden email]> wrote:

> Hi unknown man!
>
> [20.06.2007 12:35] unknownman wrote:
> > one of the great tool for rails is the its great script directory
> > that you
> > can make big project in a minute
>
> There's something like this in lab called Primitus (FKA ZFApp):
> http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/
> Primitus
>
> But it seems like it needs an update.

Anyone know if PRIMITUS will be continued? I remember asking before
but no one answered or knew. ;-)

Anyway, I see no problems with a cli helper - why not borrow the idea
from Symfony, there is nothing wrong with looking left and right -
instead of tunnel vision. ;-)

Cheers,
Till
Andi Gutmans

RE: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
Primitius is not an official Zend Framework initiative. We provide John
Coggeshall, who also works for Zend, some space to host his project. So
best to ping him to see what he's planning to do with it. I haven't kept
on top of it..
 
The discussion I pointed out would be for at least some official
support. We will stick to our goals of ease-of-use, simplicity and
extensibility so I definitely suggest to learn from others but we will
also want to balance biased with our goals :)

Andi

> -----Original Message-----
> From: till [mailto:[hidden email]]
> Sent: Wednesday, June 20, 2007 10:54 AM
> To: Nico Edtinger
> Cc: unknownman; [hidden email]
> Subject: Re: [fw-general] Zend Framework Cli Tool
>
> On 6/20/07, Nico Edtinger <[hidden email]> wrote:
> > Hi unknown man!
> >
> > [20.06.2007 12:35] unknownman wrote:
> > > one of the great tool for rails is the its great script directory
> > > that you can make big project in a minute
> >
> > There's something like this in lab called Primitus (FKA ZFApp):
> > http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/
> > Primitus
> >
> > But it seems like it needs an update.
>
> Anyone know if PRIMITUS will be continued? I remember asking
> before but no one answered or knew. ;-)
>
> Anyway, I see no problems with a cli helper - why not borrow
> the idea from Symfony, there is nothing wrong with looking
> left and right - instead of tunnel vision. ;-)
>
> Cheers,
> Till
>
John Coggeshall-2

RE: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
For the record I am planning on updating it, although I need to flush
out of number of things in the MVC layer which have changed so it's
going to be a little bit. Once 1.0 is officially released I'll see what
I can do to get some decent code generation going in Primitus.

John

-----Original Message-----
From: Andi Gutmans [mailto:[hidden email]]
Sent: Wednesday, June 20, 2007 2:13 PM
To: till; Nico Edtinger
Cc: unknownman; [hidden email]
Subject: RE: [fw-general] Zend Framework Cli Tool

Primitius is not an official Zend Framework initiative. We provide John
Coggeshall, who also works for Zend, some space to host his project. So
best to ping him to see what he's planning to do with it. I haven't kept
on top of it..
 
The discussion I pointed out would be for at least some official
support. We will stick to our goals of ease-of-use, simplicity and
extensibility so I definitely suggest to learn from others but we will
also want to balance biased with our goals :)

Andi

> -----Original Message-----
> From: till [mailto:[hidden email]]
> Sent: Wednesday, June 20, 2007 10:54 AM
> To: Nico Edtinger
> Cc: unknownman; [hidden email]
> Subject: Re: [fw-general] Zend Framework Cli Tool
>
> On 6/20/07, Nico Edtinger <[hidden email]> wrote:
> > Hi unknown man!
> >
> > [20.06.2007 12:35] unknownman wrote:
> > > one of the great tool for rails is the its great script directory
> > > that you can make big project in a minute
> >
> > There's something like this in lab called Primitus (FKA ZFApp):
> > http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/
> > Primitus
> >
> > But it seems like it needs an update.
>
> Anyone know if PRIMITUS will be continued? I remember asking
> before but no one answered or knew. ;-)
>
> Anyway, I see no problems with a cli helper - why not borrow
> the idea from Symfony, there is nothing wrong with looking
> left and right - instead of tunnel vision. ;-)
>
> Cheers,
> Till
>
unknownman

Re: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
In reply to this post by Andries Seutens
yeah , i believe that ZF isnt symphony but in this shell code i want to use an xml file that generate application schematic,
note that these scripts isnt for generating new project, i want to add some feature like scaffold in rails to it.
Andries Seutens wrote:
unknownman schreef:
> nice work but i think that like this community must be a community for
> discussion about needed tools
>
>
> Nico Edtinger-2 wrote:
>  
>> Hi unknown man!
>>
>> [20.06.2007 12:35] unknownman wrote:
>>    
>>> one of the great tool for rails is the its great script directory  
>>> that you
>>> can make big project in a minute
>>>      
>> There's something like this in lab called Primitus (FKA ZFApp):  
>> http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/ 
>> Primitus
>>
>> But it seems like it needs an update.
>>
>> nico
>>    

I'm not a fan of these auto code generation tools, remeber the Zend
Framework isn't Symfony ...

I have recently published a small article to get you started on the ZF.
There's a modular and conventional "app" available at:

http://andries.systray.be/blog/2007/06/18/zend-framework-just-get-me-started-okay/

Best,

--
Andries Seutens
http://andries.systray.be


Gecontroleerd op virussen door de JOJO Secure Gateway.
Andi Gutmans

RE: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
Btw, if you're already on the topic of XML. One of the things we were
thinking of doing post 1.0 is also adding YAML support to ZF and then
integrating the various components like Zend_Config & Zend_Translate
with it to provide the choice of the various formats to ZF users.
Not sure what format would be most suitable for such a tool but it's
something for you to also consider longer term. Or maybe you just
support Zend_Config and it'll work with whatever back-end there is.

Andi
 

> -----Original Message-----
> From: unknownman [mailto:[hidden email]]
> Sent: Wednesday, June 20, 2007 2:21 PM
> To: [hidden email]
> Subject: Re: [fw-general] Zend Framework Cli Tool
>
>
> yeah , i believe that ZF isnt symphony but in this shell code
> i want to use an xml file that generate application
> schematic, note that these scripts isnt for generating new
> project, i want to add some feature like scaffold in rails to it.
>
> Andries Seutens wrote:
> >
> >
> > unknownman schreef:
> >> nice work but i think that like this community must be a community
> >> for discussion about needed tools
> >>
> >>
> >> Nico Edtinger-2 wrote:
> >>  
> >>> Hi unknown man!
> >>>
> >>> [20.06.2007 12:35] unknownman wrote:
> >>>    
> >>>> one of the great tool for rails is the its great script
> directory
> >>>> that you can make big project in a minute
> >>>>      
> >>> There's something like this in lab called Primitus (FKA ZFApp):  
> >>>
> http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/
> >>> Primitus
> >>>
> >>> But it seems like it needs an update.
> >>>
> >>> nico
> >>>    
> >
> > I'm not a fan of these auto code generation tools, remeber the Zend
> > Framework isn't Symfony ...
> >
> > I have recently published a small article to get you
> started on the ZF.
> > There's a modular and conventional "app" available at:
> >
> >
> http://andries.systray.be/blog/2007/06/18/zend-framework-just-get-me-s
> > tarted-okay/
> >
> > Best,
> >
> > --
> > Andries Seutens
> > http://andries.systray.be
> >
> >
> > Gecontroleerd op virussen door de JOJO Secure Gateway.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Zend-Framework-Cli-Tool-tf3951538s16154.
html#a11222462
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
Pádraic Brady

Re: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
In reply to this post by unknownman
Some javascript/style in this post has been disabled (why?)
I think a little code generation can go a long way. It really does get kind of repetitive having to setup a base application scaffold for each new project unless you sit down and create a standard scaffold which you reuse everywhere.

I put a YAML proposal in the wiki a while back. There's some code attached but its non-functional until I refactor some of the offsetting in the Parser class so the lexer can have its fun.

I think Yaml is an interesting format but it depends on what it's needed for. Supporting a subset of the format is a lot faster than supporting the whole spec (requires far less parsing). The current proposal is for the entire spec (excluding Unicode support for the moment), with an option for an alternative subset for those files which don't need the whole sledgehammer. I believe people only ever need a subset anyway unless doing really complex stuff. It takes just a single class for a subset, but a proper parser to be completely certain of the entire specification details.

Regards,
Paddy
 
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com



----- Original Message ----
From: Andi Gutmans <[hidden email]>
To: unknownman <[hidden email]>; [hidden email]
Sent: Wednesday, June 20, 2007 10:34:33 PM
Subject: RE: [fw-general] Zend Framework Cli Tool

Btw, if you're already on the topic of XML. One of the things we were
thinking of doing post 1.0 is also adding YAML support to ZF and then
integrating the various components like Zend_Config & Zend_Translate
with it to provide the choice of the various formats to ZF users.
Not sure what format would be most suitable for such a tool but it's
something for you to also consider longer term. Or maybe you just
support Zend_Config and it'll work with whatever back-end there is.

Andi


> -----Original Message-----
> From: unknownman [mailto:[hidden email]]
> Sent: Wednesday, June 20, 2007 2:21 PM
> To: [hidden email]
> Subject: Re: [fw-general] Zend Framework Cli Tool
>
>
> yeah , i believe that ZF isnt symphony but in this shell code
> i want to use an xml file that generate application
> schematic, note that these scripts isnt for generating new
> project, i want to add some feature like scaffold in rails to it.
>
> Andries Seutens wrote:
> >
> >
> > unknownman schreef:
> >> nice work but i think that like this community must be a community
> >> for discussion about needed tools
> >>
> >>
> >> Nico Edtinger-2 wrote:
> >>  
> >>> Hi unknown man!
> >>>
> >>> [20.06.2007 12:35] unknownman wrote:
> >>>    
> >>>> one of the great tool for rails is the its great script
> directory
> >>>> that you can make big project in a minute
> >>>>      
> >>> There's something like this in lab called Primitus (FKA ZFApp):  
> >>>
> http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/
> >>> Primitus
> >>>
> >>> But it seems like it needs an update.
> >>>
> >>> nico
> >>>    
> >
> > I'm not a fan of these auto code generation tools, remeber the Zend
> > Framework isn't Symfony ...
> >
> > I have recently published a small article to get you
> started on the ZF.
> > There's a modular and conventional "app" available at:
> >
> >
> http://andries.systray.be/blog/2007/06/18/zend-framework-just-get-me-s
> > tarted-okay/
> >
> > Best,
> >
> > --
> > Andries Seutens
> > http://andries.systray.be
> >
> >
> > Gecontroleerd op virussen door de JOJO Secure Gateway.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Zend-Framework-Cli-Tool-tf3951538s16154.
html#a11222462
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>



Need a vacation? Get great deals to amazing places on Yahoo! Travel.
Andi Gutmans

RE: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
I'll make sure we start this discussion soon after the 1.0 release. I think there's enough interest to move this forward.


From: Pádraic Brady [mailto:[hidden email]]
Sent: Wednesday, June 20, 2007 3:41 PM
To: Andi Gutmans
Cc: Zend Framework General
Subject: Re: [fw-general] Zend Framework Cli Tool

I think a little code generation can go a long way. It really does get kind of repetitive having to setup a base application scaffold for each new project unless you sit down and create a standard scaffold which you reuse everywhere.

I put a YAML proposal in the wiki a while back. There's some code attached but its non-functional until I refactor some of the offsetting in the Parser class so the lexer can have its fun.

I think Yaml is an interesting format but it depends on what it's needed for. Supporting a subset of the format is a lot faster than supporting the whole spec (requires far less parsing). The current proposal is for the entire spec (excluding Unicode support for the moment), with an option for an alternative subset for those files which don't need the whole sledgehammer. I believe people only ever need a subset anyway unless doing really complex stuff. It takes just a single class for a subset, but a proper parser to be completely certain of the entire specification details.

Regards,
Paddy
 
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com



----- Original Message ----
From: Andi Gutmans <[hidden email]>
To: unknownman <[hidden email]>; [hidden email]
Sent: Wednesday, June 20, 2007 10:34:33 PM
Subject: RE: [fw-general] Zend Framework Cli Tool

Btw, if you're already on the topic of XML. One of the things we were
thinking of doing post 1.0 is also adding YAML support to ZF and then
integrating the various components like Zend_Config & Zend_Translate
with it to provide the choice of the various formats to ZF users.
Not sure what format would be most suitable for such a tool but it's
something for you to also consider longer term. Or maybe you just
support Zend_Config and it'll work with whatever back-end there is.

Andi


> -----Original Message-----
> From: unknownman [mailto:[hidden email]]
> Sent: Wednesday, June 20, 2007 2:21 PM
> To: [hidden email]
> Subject: Re: [fw-general] Zend Framework Cli Tool
>
>
> yeah , i believe that ZF isnt symphony but in this shell code
> i want to use an xml file that generate application
> schematic, note that these scripts isnt for generating new
> project, i want to add some feature like scaffold in rails to it.
>
> Andries Seutens wrote:
> >
> >
> > unknownman schreef:
> >> nice work but i think that like this community must be a community
> >> for discussion about needed tools
> >>
> >>
> >> Nico Edtinger-2 wrote:
> >>  
> >>> Hi unknown man!
> >>>
> >>> [20.06.2007 12:35] unknownman wrote:
> >>>    
> >>>> one of the great tool for rails is the its great script
> directory
> >>>> that you can make big project in a minute
> >>>>      
> >>> There's something like this in lab called Primitus (FKA ZFApp):  
> >>>
> http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/
> >>> Primitus
> >>>
> >>> But it seems like it needs an update.
> >>>
> >>> nico
> >>>    
> >
> > I'm not a fan of these auto code generation tools, remeber the Zend
> > Framework isn't Symfony ...
> >
> > I have recently published a small article to get you
> started on the ZF.
> > There's a modular and conventional "app" available at:
> >
> >
> http://andries.systray.be/blog/2007/06/18/zend-framework-just-get-me-s
> > tarted-okay/
> >
> > Best,
> >
> > --
> > Andries Seutens
> > http://andries.systray.be
> >
> >
> > Gecontroleerd op virussen door de JOJO Secure Gateway.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Zend-Framework-Cli-Tool-tf3951538s16154.
html#a11222462
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>



Need a vacation? Get great deals to amazing places on Yahoo! Travel.
unknownman

RE: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
In reply to this post by Andi Gutmans
yeah, if YAML support add to zend config , this is the best feature that we can use to specefiy a big project with any ordonnance.
Andi Gutmans wrote:
Btw, if you're already on the topic of XML. One of the things we were
thinking of doing post 1.0 is also adding YAML support to ZF and then
integrating the various components like Zend_Config & Zend_Translate
with it to provide the choice of the various formats to ZF users.
Not sure what format would be most suitable for such a tool but it's
something for you to also consider longer term. Or maybe you just
support Zend_Config and it'll work with whatever back-end there is.

Andi
 

> -----Original Message-----
> From: unknownman [mailto:ali.masoudi.alavi@gmail.com]
> Sent: Wednesday, June 20, 2007 2:21 PM
> To: fw-general@lists.zend.com
> Subject: Re: [fw-general] Zend Framework Cli Tool
>
>
> yeah , i believe that ZF isnt symphony but in this shell code
> i want to use an xml file that generate application
> schematic, note that these scripts isnt for generating new
> project, i want to add some feature like scaffold in rails to it.
>
> Andries Seutens wrote:
> >
> >
> > unknownman schreef:
> >> nice work but i think that like this community must be a community
> >> for discussion about needed tools
> >>
> >>
> >> Nico Edtinger-2 wrote:
> >>  
> >>> Hi unknown man!
> >>>
> >>> [20.06.2007 12:35] unknownman wrote:
> >>>    
> >>>> one of the great tool for rails is the its great script
> directory
> >>>> that you can make big project in a minute
> >>>>      
> >>> There's something like this in lab called Primitus (FKA ZFApp):  
> >>>
> http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/
> >>> Primitus
> >>>
> >>> But it seems like it needs an update.
> >>>
> >>> nico
> >>>    
> >
> > I'm not a fan of these auto code generation tools, remeber the Zend
> > Framework isn't Symfony ...
> >
> > I have recently published a small article to get you
> started on the ZF.
> > There's a modular and conventional "app" available at:
> >
> >
> http://andries.systray.be/blog/2007/06/18/zend-framework-just-get-me-s
> > tarted-okay/
> >
> > Best,
> >
> > --
> > Andries Seutens
> > http://andries.systray.be
> >
> >
> > Gecontroleerd op virussen door de JOJO Secure Gateway.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Zend-Framework-Cli-Tool-tf3951538s16154.
html#a11222462
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
Shahar Evron

Re: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
In reply to this post by Pádraic Brady
I have some bad experience with the Spyc parser Symfony uses for YAML,
namely having to raise my memory_limit to more than 128mb to get it
working with some YAML files.

I haven't dug into it's code, but thinking that Symfony sometimes uses
it on-line (and not only for CLI), got me kind of scared.

I think that while YAML is nice and easy to read/write (for humans),
there is only that much you can go for your lazy users - and while I
hate writing XML, I see it as a much better option for configuration
files (for now) because PHP has native, super-fast parsing abilities for
it. Writing a parser for YAML or any other format in PHP will have major
performance drawbacks any way you put it.

Unless YAML language and configuration files are translated off-line
into some kind of faster format (XML or even better, PHP code) I won't
use them in production.

Then again, that doesn't mean it shouldn't be an option ;)

Shahar.



On Wed, 2007-06-20 at 15:40 -0700, Pádraic Brady wrote:

> I think a little code generation can go a long way. It really does get
> kind of repetitive having to setup a base application scaffold for
> each new project unless you sit down and create a standard scaffold
> which you reuse everywhere.
>
> I put a YAML proposal in the wiki a while back. There's some code
> attached but its non-functional until I refactor some of the
> offsetting in the Parser class so the lexer can have its fun.
>
> I think Yaml is an interesting format but it depends on what it's
> needed for. Supporting a subset of the format is a lot faster than
> supporting the whole spec (requires far less parsing). The current
> proposal is for the entire spec (excluding Unicode support for the
> moment), with an option for an alternative subset for those files
> which don't need the whole sledgehammer. I believe people only ever
> need a subset anyway unless doing really complex stuff. It takes just
> a single class for a subset, but a proper parser to be completely
> certain of the entire specification details.
>
> Regards,
> Paddy
>  
> Pádraic Brady
> http://blog.astrumfutura.com
> http://www.patternsforphp.com
>
>
> ----- Original Message ----
> From: Andi Gutmans <[hidden email]>
> To: unknownman <[hidden email]>;
> [hidden email]
> Sent: Wednesday, June 20, 2007 10:34:33 PM
> Subject: RE: [fw-general] Zend Framework Cli Tool
>
> Btw, if you're already on the topic of XML. One of the things we were
> thinking of doing post 1.0 is also adding YAML support to ZF and then
> integrating the various components like Zend_Config & Zend_Translate
> with it to provide the choice of the various formats to ZF users.
> Not sure what format would be most suitable for such a tool but it's
> something for you to also consider longer term. Or maybe you just
> support Zend_Config and it'll work with whatever back-end there is.
>
> Andi
>
>
> > -----Original Message-----
> > From: unknownman [mailto:[hidden email]]
> > Sent: Wednesday, June 20, 2007 2:21 PM
> > To: [hidden email]
> > Subject: Re: [fw-general] Zend Framework Cli Tool
> >
> >
> > yeah , i believe that ZF isnt symphony but in this shell code
> > i want to use an xml file that generate application
> > schematic, note that these scripts isnt for generating new
> > project, i want to add some feature like scaffold in rails to it.
> >
> > Andries Seutens wrote:
> > >
> > >
> > > unknownman schreef:
> > >> nice work but i think that like this community must be a
> community
> > >> for discussion about needed tools
> > >>
> > >>
> > >> Nico Edtinger-2 wrote:
> > >>  
> > >>> Hi unknown man!
> > >>>
> > >>> [20.06.2007 12:35] unknownman wrote:
> > >>>    
> > >>>> one of the great tool for rails is the its great script
> > directory
> > >>>> that you can make big project in a minute
> > >>>>      
> > >>> There's something like this in lab called Primitus (FKA
> ZFApp):  
> > >>>
> > http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/
> > >>> Primitus
> > >>>
> > >>> But it seems like it needs an update.
> > >>>
> > >>> nico
> > >>>    
> > >
> > > I'm not a fan of these auto code generation tools, remeber the
> Zend
> > > Framework isn't Symfony ...
> > >
> > > I have recently published a small article to get you
> > started on the ZF.
> > > There's a modular and conventional "app" available at:
> > >
> > >
> >
> http://andries.systray.be/blog/2007/06/18/zend-framework-just-get-me-s
> > > tarted-okay/
> > >
> > > Best,
> > >
> > > --
> > > Andries Seutens
> > > http://andries.systray.be
> > >
> > >
> > > Gecontroleerd op virussen door de JOJO Secure Gateway.
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Zend-Framework-Cli-Tool-tf3951538s16154.
> html#a11222462
> > Sent from the Zend Framework mailing list archive at Nabble.com.
> >
> >
>
>
>
>
>
> ______________________________________________________________________
> Need a vacation? Get great deals to amazing places on Yahoo! Travel.
--
Shahar Evron [hidden email]
Technical Consultant
Zend Technologies

Mobile: +972 54 30 99 446
Office: +972  3 75 39 500 ext. 9546



signature.asc (196 bytes) Download Attachment
Andi Gutmans

RE: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
That's definitely something to keep in mind as it doesn't have a native implementation in PHP. Could be that might end up being the conclusion (i.e. implementing an ext/yaml).

> -----Original Message-----
> From: Shahar Evron
> Sent: Thursday, June 21, 2007 4:58 AM
> To: Pádraic Brady
> Cc: Andi Gutmans; Zend Framework General
> Subject: Re: [fw-general] Zend Framework Cli Tool
>
> I have some bad experience with the Spyc parser Symfony uses
> for YAML, namely having to raise my memory_limit to more than
> 128mb to get it working with some YAML files.
>
> I haven't dug into it's code, but thinking that Symfony
> sometimes uses it on-line (and not only for CLI), got me kind
> of scared.
>
> I think that while YAML is nice and easy to read/write (for
> humans), there is only that much you can go for your lazy
> users - and while I hate writing XML, I see it as a much
> better option for configuration files (for now) because PHP
> has native, super-fast parsing abilities for it. Writing a
> parser for YAML or any other format in PHP will have major
> performance drawbacks any way you put it.
>
> Unless YAML language and configuration files are translated
> off-line into some kind of faster format (XML or even better,
> PHP code) I won't use them in production.
>
> Then again, that doesn't mean it shouldn't be an option ;)
>
> Shahar.
>
>
>
> On Wed, 2007-06-20 at 15:40 -0700, Pádraic Brady wrote:
> > I think a little code generation can go a long way. It
> really does get
> > kind of repetitive having to setup a base application scaffold for
> > each new project unless you sit down and create a standard scaffold
> > which you reuse everywhere.
> >
> > I put a YAML proposal in the wiki a while back. There's some code
> > attached but its non-functional until I refactor some of the
> > offsetting in the Parser class so the lexer can have its fun.
> >
> > I think Yaml is an interesting format but it depends on what it's
> > needed for. Supporting a subset of the format is a lot faster than
> > supporting the whole spec (requires far less parsing). The current
> > proposal is for the entire spec (excluding Unicode support for the
> > moment), with an option for an alternative subset for those files
> > which don't need the whole sledgehammer. I believe people only ever
> > need a subset anyway unless doing really complex stuff. It
> takes just
> > a single class for a subset, but a proper parser to be completely
> > certain of the entire specification details.
> >
> > Regards,
> > Paddy
> >  
> > Pádraic Brady
> > http://blog.astrumfutura.com
> > http://www.patternsforphp.com
> >
> >
> > ----- Original Message ----
> > From: Andi Gutmans <[hidden email]>
> > To: unknownman <[hidden email]>;
> > [hidden email]
> > Sent: Wednesday, June 20, 2007 10:34:33 PM
> > Subject: RE: [fw-general] Zend Framework Cli Tool
> >
> > Btw, if you're already on the topic of XML. One of the
> things we were
> > thinking of doing post 1.0 is also adding YAML support to
> ZF and then
> > integrating the various components like Zend_Config &
> Zend_Translate
> > with it to provide the choice of the various formats to ZF users.
> > Not sure what format would be most suitable for such a tool
> but it's
> > something for you to also consider longer term. Or maybe you just
> > support Zend_Config and it'll work with whatever back-end there is.
> >
> > Andi
> >
> >
> > > -----Original Message-----
> > > From: unknownman [mailto:[hidden email]]
> > > Sent: Wednesday, June 20, 2007 2:21 PM
> > > To: [hidden email]
> > > Subject: Re: [fw-general] Zend Framework Cli Tool
> > >
> > >
> > > yeah , i believe that ZF isnt symphony but in this shell
> code i want
> > > to use an xml file that generate application schematic, note that
> > > these scripts isnt for generating new project, i want to add some
> > > feature like scaffold in rails to it.
> > >
> > > Andries Seutens wrote:
> > > >
> > > >
> > > > unknownman schreef:
> > > >> nice work but i think that like this community must be a
> > community
> > > >> for discussion about needed tools
> > > >>
> > > >>
> > > >> Nico Edtinger-2 wrote:
> > > >>  
> > > >>> Hi unknown man!
> > > >>>
> > > >>> [20.06.2007 12:35] unknownman wrote:
> > > >>>    
> > > >>>> one of the great tool for rails is the its great script
> > > directory
> > > >>>> that you can make big project in a minute
> > > >>>>      
> > > >>> There's something like this in lab called Primitus (FKA
> > ZFApp):  
> > > >>>
> > >
> http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/
> > > >>> Primitus
> > > >>>
> > > >>> But it seems like it needs an update.
> > > >>>
> > > >>> nico
> > > >>>    
> > > >
> > > > I'm not a fan of these auto code generation tools, remeber the
> > Zend
> > > > Framework isn't Symfony ...
> > > >
> > > > I have recently published a small article to get you
> > > started on the ZF.
> > > > There's a modular and conventional "app" available at:
> > > >
> > > >
> > >
> >
> http://andries.systray.be/blog/2007/06/18/zend-framework-just-get-me-s
> > > > tarted-okay/
> > > >
> > > > Best,
> > > >
> > > > --
> > > > Andries Seutens
> > > > http://andries.systray.be
> > > >
> > > >
> > > > Gecontroleerd op virussen door de JOJO Secure Gateway.
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > > http://www.nabble.com/Zend-Framework-Cli-Tool-tf3951538s16154.
> > html#a11222462
> > > Sent from the Zend Framework mailing list archive at Nabble.com.
> > >
> > >
> >
> >
> >
> >
> >
> >
> ______________________________________________________________________
> > Need a vacation? Get great deals to amazing places on
> Yahoo! Travel.
> --
> Shahar Evron [hidden email]
> Technical Consultant
> Zend Technologies
>
> Mobile: +972 54 30 99 446
> Office: +972  3 75 39 500 ext. 9546
>
>
Pádraic Brady

Re: Zend Framework Cli Tool

Reply Threaded More More options
Print post
Permalink
In reply to this post by unknownman
Some javascript/style in this post has been disabled (why?)
There is a PHP extension for YAML called Syck. Can't remember whether the author had managed to put it in PECL or not (I don't think so). If an extension were needed they have done a lot of work in the area already.

P
 
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com



----- Original Message ----
From: Andi Gutmans <[hidden email]>
To: Shahar Evron <[hidden email]>; Pádraic Brady <[hidden email]>
Cc: Zend Framework General <[hidden email]>
Sent: Thursday, June 21, 2007 3:44:06 PM
Subject: RE: [fw-general] Zend Framework Cli Tool

That's definitely something to keep in mind as it doesn't have a native implementation in PHP. Could be that might end up being the conclusion (i.e. implementing an ext/yaml).

> -----Original Message-----
> From: Shahar Evron
> Sent: Thursday, June 21, 2007 4:58 AM
> To: Pádraic Brady
> Cc: Andi Gutmans; Zend Framework General
> Subject: Re: [fw-general] Zend Framework Cli Tool
>
> I have some bad experience with the Spyc parser Symfony uses
> for YAML, namely having to raise my memory_limit to more than
> 128mb to get it working with some YAML files.
>
> I haven't dug into it's code, but thinking that Symfony
> sometimes uses it on-line (and not only for CLI), got me kind
> of scared.
>
> I think that while YAML is nice and easy to read/write (for
> humans), there is only that much you can go for your lazy
> users - and while I hate writing XML, I see it as a much
> better option for configuration files (for now) because PHP
> has native, super-fast parsing abilities for it. Writing a
> parser for YAML or any other format in PHP will have major
> performance drawbacks any way you put it.
>
> Unless YAML language and configuration files are translated
> off-line into some kind of faster format (XML or even better,
> PHP code) I won't use them in production.
>
> Then again, that doesn't mean it shouldn't be an option ;)
>
> Shahar.
>
>
>
> On Wed, 2007-06-20 at 15:40 -0700, Pádraic Brady wrote:
> > I think a little code generation can go a long way. It
> really does get
> > kind of repetitive having to setup a base application scaffold for
> > each new project unless you sit down and create a standard scaffold
> > which you reuse everywhere.
> >
> > I put a YAML proposal in the wiki a while back. There's some code
> > attached but its non-functional until I refactor some of the
> > offsetting in the Parser class so the lexer can have its fun.
> >
> > I think Yaml is an interesting format but it depends on what it's
> > needed for. Supporting a subset of the format is a lot faster than
> > supporting the whole spec (requires far less parsing). The current
> > proposal is for the entire spec (excluding Unicode support for the
> > moment), with an option for an alternative subset for those files
> > which don't need the whole sledgehammer. I believe people only ever
> > need a subset anyway unless doing really complex stuff. It
> takes just
> > a single class for a subset, but a proper parser to be completely
> > certain of the entire specification details.
> >
> > Regards,
> > Paddy
> >  
> > Pádraic Brady
> > http://blog.astrumfutura.com
> > http://www.patternsforphp.com
> >
> >
> > ----- Original Message ----
> > From: Andi Gutmans <[hidden email]>
> > To: unknownman <[hidden email]>;
> > [hidden email]
> > Sent: Wednesday, June 20, 2007 10:34:33 PM
> > Subject: RE: [fw-general] Zend Framework Cli Tool
> >
> > Btw, if you're already on the topic of XML. One of the
> things we were
> > thinking of doing post 1.0 is also adding YAML support to
> ZF and then
> > integrating the various components like Zend_Config &
> Zend_Translate
> > with it to provide the choice of the various formats to ZF users.
> > Not sure what format would be most suitable for such a tool
> but it's
> > something for you to also consider longer term. Or maybe you just
> > support Zend_Config and it'll work with whatever back-end there is.
> >
> > Andi
> >
> >
> > > -----Original Message-----
> > > From: unknownman [mailto:[hidden email]]
> > > Sent: Wednesday, June 20, 2007 2:21 PM
> > > To: [hidden email]
> > > Subject: Re: [fw-general] Zend Framework Cli Tool
> > >
> > >
> > > yeah , i believe that ZF isnt symphony but in this shell
> code i want
> > > to use an xml file that generate application schematic, note that
> > > these scripts isnt for generating new project, i want to add some
> > > feature like scaffold in rails to it.
> > >
> > > Andries Seutens wrote:
> > > >
> > > >
> > > > unknownman schreef:
> > > >> nice work but i think that like this community must be a
> > community
> > > >> for discussion about needed tools
> > > >>
> > > >>
> > > >> Nico Edtinger-2 wrote:
> > > >>  
> > > >>> Hi unknown man!
> > > >>>
> > > >>> [20.06.2007 12:35] unknownman wrote:
> > > >>>    
> > > >>>> one of the great tool for rails is the its great script
> > > directory
> > > >>>> that you can make big project in a minute
> > > >>>>      
> > > >>> There's something like this in lab called Primitus (FKA
> > ZFApp):  
> > > >>>
> > >
> http://framework.zend.com/fisheye/browse/Zend_Framework_Laboratory/
> > > >>> Primitus
> > > >>>
> > > >>> But it seems like it needs an update.
> > > >>>
> > > >>> nico
> > > >>>    
> > > >
> > > > I'm not a fan of these auto code generation tools, remeber the
> > Zend
> > > > Framework isn't Symfony ...
> > > >
> > > > I have recently published a small article to get you
> > > started on the ZF.
> > > > There's a modular and conventional "app" available at:
> > > >
> > > >
> > >
> >
> http://andries.systray.be/blog/2007/06/18/zend-framework-just-get-me-s
> > > > tarted-okay/
> > > >
> > > > Best,
> > > >
> > > > --
> > > > Andries Seutens
> > > > http://andries.systray.be
> > > >
> > > >
> > > > Gecontroleerd op virussen door de JOJO Secure Gateway.
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > > http://www.nabble.com/Zend-Framework-Cli-Tool-tf3951538s16154.
> > html#a11222462
> > > Sent from the Zend Framework mailing list archive at Nabble.com.
> > >
> > >
> >
> >
> >
> >
> >
> >
> ______________________________________________________________________
> > Need a vacation? Get great deals to amazing places on
> Yahoo! Travel.
> --
> Shahar Evron [hidden email]
> Technical Consultant
> Zend Technologies
>
> Mobile: +972 54 30 99 446
> Office: +972  3 75 39 500 ext. 9546
>
>



Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when.