PHP支持MVP模式吗? [英] Does PHP supports MVP pattern?

查看:138
本文介绍了PHP支持MVP模式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多例子解释了使用ASP.NET的MVP模式,但没有发现使用PHP。

There are lot of examples explaining MVP pattern using ASP.NET but not found anything using PHP.

我是PHP程序员,想知道我在哪里可以获得MVP模式PHP示例?

I am PHP programmer and want to know where can I get MVP pattern PHP examples?

推荐答案

MVP和MVC都是实际上意味着用于GUI应用程序。大多数PHP框架使用MVC作为流行语 。实际实现与哑模型(仅数据库),非活动视图(=模板)和编排控制器实际上匹配MVP已经。无论如何,功能性控制器通常用作演示者,将模型中的数据铲除到视图中。 (在正确的MVC中,模型和视图交互更多,实际上是活动组件)。

MVP and MVC both are actually meant for GUI apps. Most PHP frameworks use "MVC" more as buzzword. The actual implementation with dumb models (just database), non-active views (= templates) and orchestrating controllers actually matches MVP already. And functionality-wise controllers often function as presenters anyway, shoveling data from models into views. (In proper MVC the model and view interact more, with the view actually being the active component).

但无论如何,有一些框架实际上意识到较新的术语和模式。

But anyway, there are a few frameworks which are actually aware of the newer terminology and pattern.

  • http://www.lionframework.org/ said so, but I haven't actually looked at that
  • Nette framework I think
  • http://code.google.com/p/mvp-php/
  • and Opendelight resembles Model-Pipe-ViewController
  • Or have a look at http://matrix.include-once.org/framework/ - those that aren't listed with UnshapedMVC or PassiveMVC are worth checking out.

这篇关于PHP支持MVP模式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆