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

查看:1382
本文介绍了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更是<一个href=\"http://programmers.stackexchange.com/questions/2806/is-mvc-just-the-seo-of-php-programming\">buzzword.哑模型(只是数据库),非活动的意见(=模板)和编排控制器的实际执行情况确实匹配了MVP了。和功能明智的控制器往往充当presenters反正,铲从模型数据到观点。 (在适当的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天全站免登陆