in the last months I gave a lot of ZF2 beginner training courses in
Germany. Then I also attended the PHP Summit in Berlin a couple of weeks
ago and had an insight in other frameworks like Symfony 2 and TYPO3 Flow.
My big impression on both of these events was that ZF2 is in need of a
proper and solid tool to setup projects. Just the basic configuration
stuff is very time consuming for beginners and we need a tool to help
them to get a basic project skeleton up and running.
ZFTool is great for the start but really lacks a lot of features. So a
couple of weeks ago I started to create some pull requests and got a
little lost in the Git stuff. As well I saw that the PRs of ZFTool don't
seem to be accepted in a while. Since I wanted to spend my time on
programming and not on waiting or fixing my Git mee, I forked ZFTool and
started working on it. And here is the current result:
This post has NOT been accepted by the mailing list yet.
One thing I think may be relevant is how detailed or "bare" one may want their code generation done.
Currently I use Zend Studio for my code generation, and it is hit or miss. i.e. sometimes it generates namespaces that are just wrong. Official ZFTool is quite terse in a sense that it generates a controller or a module and the code inside of it is very basic. I may want the tool to generate things for me in one go.
In particular, as an example, adding a basic single form to your application, should be a trivial task. Currently it is not. For one form, I may as well add things like:
* config/module.config.php changes such as routes, and factory pointers
That is five individual actions that can and should be done in one line.
It will be good to generate some basic form code inside as well, like an example, i.e. a form with a single string field, and submit button, for example. User can always delete code they don't need, but they can easily extend and edit code that is already there, without having to type their own all the time. 99%(*) of forms are the same in structure.
Not everyone may be interested in full-on verbosity of code structure and actual code inside of the php files, but I think having a "--verbose" option to generate the much needed monstrosity behind common ZF2, structures, such as forms, will help me greatly.
I did not look at how ZFTool is implemented, but I think this can be done without much pain, especially it is done via using templates of code that you use, name, and generate for a particular naming structure.