具有完整 jQuery 集成的 PHP 框架?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/842886/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PHP Framework with full jQuery integration?
提问by coma
i'm tired of reinventing the wheel on PHP and loving jQuery to death so which framework fits my needs?
我已经厌倦了在 PHP 上重新发明轮子和爱死 jQuery,那么哪个框架适合我的需求?
采纳答案by whichdan
http://www.symfony-project.org/plugins/sfJqueryReloadedPlugin
http://www.symfony-project.org/plugins/sfJqueryReloadedPlugin
http://bakery.cakephp.org/articles/view/jquery-helper
http://bakery.cakephp.org/articles/view/jquery-helper
http://framework.zend.com/manual/en/zendx.jquery.html
回答by Romans Malinovskis
Agile Toolkitis a PHP UI framework, which comes with Object-Oriented User Interface. Pure HTML is produced when objects are rendered recursively. jQuery and jQuery UI widgets are used to enhancethe output and implement AJAX. Here is a simple code snippet:
Agile Toolkit是一个PHP UI 框架,带有面向对象的用户界面。当对象以递归方式呈现时,就会生成纯 HTML。jQuery 和 jQuery UI 小部件用于增强输出和实现 AJAX。这是一个简单的代码片段:
class page_users extends Page {
function page_index(){
$crud=$this->add('CRUD');
$crud->setModel('User',null,array('id','email','name','status'));
if($crud->grid){
$crud->grid->addColumn('expander','more','More...');
}
}
function page_more(){
$tt=$this->add('Tabs');
$tabs=$this->add('Tabs');
$tab=$tt->addTab('BasicInfo');
$tab->add('MVCForm')->setModel('User')->loadData($_GET['id']);
$tabs->addTabURL('../password','Password');
$tabs->addTabURL('../activity','Activity');
$tabs->addTabURL('../engage','Engage');
}
}
Interface is based on jQuery UI CSS Framework and therefore can be themed using Themeroller. Interaction with HTML, JS or AJAX is handled by Agile Toolkit but can be enhanced or replaced by developer. Above code alonewill produce this:
界面基于 jQuery UI CSS 框架,因此可以使用 Themeroller 进行主题化。与 HTML、JS 或 AJAX 的交互由 Agile Toolkit 处理,但可由开发人员增强或替换。单独上面的代码会产生这个:


The object structure is well-designed and can be used in major web projects. Agile Toolkit is available under OpenSource license.
对象结构设计良好,可用于各大网络项目。Agile Toolkit 在 OpenSource 许可下可用。
See also: atk4
另见:atk4
I'm one of the authorsof this wonderful toolkit.
我是这个很棒的工具包的作者之一。
回答by Alex Weinstein
回答by Brice Le Blevennec
The Yii framework is written around jQuery and include Zii, a jQuery UI based interface generator. It's blazingly fast and very complete.
Yii 框架是围绕 jQuery 编写的,包括 Zii,一个基于 jQuery UI 的界面生成器。它非常快而且非常完整。
回答by Vaibhav Kaushal
QCubed. I use QCubed. All JQuery UI and Controls can be created with PHP. Plus, making things go from full page reload to ajax or even Javascript is a piece of cake. Its simply lovely.
QCubed。我使用 QCubed。所有 JQuery UI 和控件都可以用 PHP 创建。另外,让事情从整页重新加载到 ajax 甚至 Javascript 都是小菜一碟。它只是可爱。
May be other frameworks exist and do great work but QCubed was simply too irresistible to me. Look into its 'codegen' feature. :)
可能存在其他框架并且做得很好,但 QCubed 对我来说实在是太不可抗拒了。查看它的“代码生成”功能。:)
回答by J. Dalton
回答by pst
Silverstripe the CMS has an included MVC framework called Sapphire, tight integration with the CMS and also JQuery out of the box.
Silverstripe CMS 包含一个名为 Sapphire 的 MVC 框架,与 CMS 和 JQuery 紧密集成,开箱即用。
回答by Kristian Lunde
Drupal also use jQuery. Depending on what kind of development you do, you may find drupal to be a nice tool, it is not just a framework but also a full grown CMS, which enables you to do really rapid development. You might however feel more in control with a framework such as the Zend framework, cakePHP or codeIgniter. www.drupal.org
Drupal 也使用 jQuery。根据您进行的开发类型,您可能会发现 drupal 是一个不错的工具,它不仅是一个框架,而且还是一个成熟的 CMS,它使您能够进行真正的快速开发。但是,您可能会觉得使用 Zend 框架、cakePHP 或 codeIgniter 等框架更有控制力。 www.drupal.org
回答by Waqar
I feel that Drupal is strong and good if we can simply use the contrib modules as is, and have to do less theme work. When it comes to Larger projects, Drupal means much work and less control, and for small tasks it often involves time consumption to disable the too many things it has. The other thing is that Drupal isn't that user friendly for non-technical users. I personally like Drupal alot, but when I think of the time it sometimes take to do small small things, and the lack of control we have on it (although its quite flexible but it increases time in order to do lot of form alterations for example to achieve something), I wish there is another easy way out.
我觉得如果我们可以简单地按原样使用 contrib 模块,并且不必做更少的主题工作,那么 Drupal 是强大和优秀的。当涉及到较大的项目时,Drupal 意味着更多的工作和更少的控制,而对于小任务,它通常需要花费时间来禁用它拥有的太多东西。另一件事是 Drupal 对非技术用户来说不是那么友好。我个人非常喜欢 Drupal,但是当我想到有时做一些小事需要时间,以及我们对它缺乏控制时(虽然它非常灵活,但它增加了时间以进行大量的形式更改,例如实现某事),我希望有另一种简单的方法。
Specially when it comes to theming of drupal, by using Views extensively we just reduce the time of development but theming work increases at the same time, and when we change the views, means modifications to theme for that view(s) as well. Although it is a good CMS and powerful, robust, secured, etc, but is focused more on Developer-friendliness rather than User Friendly and Designer Friendly, etc.
特别是在drupal的主题化方面,通过广泛使用视图,我们只会减少开发时间,但同时主题化工作也会增加,当我们更改视图时,也意味着对该视图的主题进行修改。虽然它是一个很好的 CMS 并且功能强大、健壮、安全等,但更侧重于开发人员的友好性,而不是用户友好和设计人员友好等。
I just read some stuff about Yii framework and am starting to like it, although it doesn't have so many contrib modules as Drupal does which is advantage of Drupal. I also love the way we have control in Code Igniter.
我刚刚读了一些关于 Yii 框架的东西,并且开始喜欢它,尽管它没有像 Drupal 那样多的 contrib 模块,这是 Drupal 的优势。我也喜欢我们在 Code Igniter 中的控制方式。
I think there should be some way to stop re-inventing the wheels in PHP, some framework that has lot of components and libraries to use from, so developers can just focus on Business rules rather then trying to figuring out how to hide labels on a form in some CMS. Anyone knows of such solution out there? Help would be appreciated.
我认为应该有一些方法来停止在 PHP 中重新发明轮子,一些框架有很多组件和库可供使用,所以开发人员可以只关注业务规则,而不是试图弄清楚如何隐藏标签上的标签在某些 CMS 中形成。有人知道那里有这样的解决方案吗?帮助将不胜感激。
P.S: I do not mean to say that Drupal isn't good, as I have been using it for several projects and still do, it's just that I'm looking for a faster approach in development and easier approach in theming that the design and development community can adopt.
PS:我并不是说 Drupal 不好,因为我已经在几个项目中使用它并且仍然如此,只是我正在寻找一种更快的开发方法和更简单的主题方法,设计和开发社区可以采用。

