Scaffolding for PHP [closed]

旧城冷巷雨未停 提交于 2019-12-20 10:25:28

问题


Is there any thing in PHP to create basic scaffold, like in Rails?

EDIT: I need something to prototype quickly..


回答1:


Some frameworks like Symfony, CakePHP, Akelos, CodeIgniter and others have support for scaffolding.

However if you don't want to use a framework you can try phpScaffold which generates CRUD scaffold pages based on phpMyAdmin table exports...




回答2:


I also wanted some fast prototyping, but I wanted it to generate the code, so it's easy to update it. I made many improvements on phpScaffold (HTML5, nice CSS, many models at once, etc) which are published on http://github.com/tute/phpscaffold.




回答3:


Phreeze makes this simple and easy. http://phreeze.com/




回答4:


QCodo is another great option. And since it uses reflection to do Code Generation instead of reflection at runtime, you'll likely see better performance.




回答5:


First, Rails is a framework. PHP is a language. PHP does not have built-in scaffolding support, just as Ruby--the language Rails is build on--does not. A framework like CakePHP, however, does support scaffolding.

Second, I see that you raised an objection to CakePHP because "you still have to do a bunch of stuff." That's true--with any framework, you're going to have to learn new conventions, configurations etc.




回答6:


CakePHP got plenty of scaffolding options

If you throw Crud + API plugin on top, you basically got everything you need, with tons of nice additions

cakephp-crud: The active successor of the two projects below. Provides both Crud actions, API, Scaffolding, Searches and more

Crud Plugin: https://github.com/nodesagency/Platform-Crud-Plugin

API Plugin: https://github.com/nodesagency/Platform-API-plugin

They all utilize CakePHP events, so its really simple to extend and modify the default behavior




回答7:


For myslef I Use CodeIniter for development, sure they have scaffolding, but only in terms of a "simple scaffolding" which mean you're not gonna use it in live product (i dunno about everyone but i'm only using it as some tools) .

but if you need some like CRUD generator you can use SparkPlug , or Ignition both of them can be used on Codeigniter




回答8:


This was asked quite some time ago, but if it's still relevant check out this nice scaffolding class (check the demo)




回答9:


Yiiframework has a good code scaffolding system called Gii. It's web based. Once you create the tables, you can generate the CRUD classes from within the browser. No command line needed. I like this scaffolding.




回答10:


If you use CakePHP as the web framework it supports scafalding. See this link for more info. http://book.cakephp.org/2.0/en/controllers/scaffolding.html




回答11:


I'm not sure what the SO policy is for dead thread revival but I figured I would add my own two cents in case none of the above solutions were satisfactory. If you're looking for a PHP-based MySQL scaffolding tool, check out AMPLE Scaffolder. The entire package is contained within a single PHP file (less than 200k) that can simply be dropped into a web accessible directory whereupon you have immediate access to local and remote MySQL databases based on the internal database permissions. No schema exporting, configuration files, or other hassles. Plus, there's a whole lot of other capabilities to offer as well. Just thought I'd share it in case you were looking for another option. Feel free to check it out and post feedback if you have any questions.



来源:https://stackoverflow.com/questions/427034/scaffolding-for-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!