Viet
Viet

Reputation: 18404

Code generation tool/framework for PHP

As far as I know, many PHP frameworks use syntactic sugar to provide illusion of real functions. Some provide scaffolding/skeleton generation, which is limited. Syntactic sugar is slow and IDE/editors do not provide intellisense for Syntactic sugar functions/methods and member data. I'm wondering if there any tool/framework to generate PHP code based on some popular frameworks and built around a relational schema? Thanks in advance.

Upvotes: 1

Views: 2020

Answers (6)

Rohit
Rohit

Reputation: 11

Have a look at Cygnite Framework's Crud generator. It is very simple and easy to use. The New Cool Kid build on Symfony2 console component, I found interesting, made my job simple and fast.

Cygnite CLI generates controller, model, views, layout, form component, required field validation, pagination etc. with a simple command.

php cygnite generate:crud controller_name table_name database_name

You may alter the code based on your need.

Have a look, may help someone.

Generate CRUD application within 2 minute

Cygnite Framework Code Generator

Upvotes: 1

Jan
Jan

Reputation: 400

Try Zend Framework.

Zend Framework (ZF) is an open source, object-oriented web application framework implemented in PHP 5 and licensed under the New BSD License.

Upvotes: 2

AntonioCS
AntonioCS

Reputation: 8496

I think Symfony has something that you might find interesting.

Upvotes: 5

Brian Lacy
Brian Lacy

Reputation: 19098

Zend_CodeGenerator

For posterity, I thought I would mention the rather impressive solution I just found to this problem.

Zend_CodeGenerator was added to Zend Framework as of, I believe, version 1.8, and I'm very impressed with it so far. Like most ZF components, it works just fine as a standalone tool; you needn't implement the rest of the framework in your project.

So far it seems easy to use and quite powerful.

Upvotes: 1

erenon
erenon

Reputation: 19118

Zend_Framework has code generator called Zend_Tool, tough it's still unstable.

Upvotes: 1

Viet
Viet

Reputation: 18404

I found QCodo http://www.qcodo.com/wiki/article/background/metaprogramming which satisfies requirements. Thank you very much for participating. You all earned my vote.

Upvotes: 1

Related Questions