MVP框架介绍及优缺点分析
浏览:1259 次

1、 MVP框架简介
MVP框架由三部分组成:模型提供数据,视图负责显示,演示者负责逻辑处理。MVC框架与MVC框架有一些相似之处。MVC框架已经演变成MVP框架。其中,绘制UI元素并与用户交互;模型负责存储、检索和操作数据;演示者作为视图和模型之间的中间链接,处理与用户交互的业务逻辑。
2、 MVP框架的优势
1.模型和视图完全分离。我们可以修改视图而不影响模型;
2.在MVP中,活动代码不太繁琐;


MVP框架由三部分组成:模型提供数据,视图负责显示,演示者负责逻辑处理。MVC框架与MVC框架有一些相似之处。MVC框架已经演变成MVP框架。其中,绘制UI元素并与用户交互;模型负责存储、检索和操作数据;演示者作为视图和模型之间的中间链接,处理与用户交互的业务逻辑。

Template: main
Session:
Session type: db
[unisoft__unisoft] Array ( [permission] => [passport] => [human_valid] => )
Loaded Class:
Zend_Db: /web/unisoft/web.system/Zend/Db.php
Zend_Db_Adapter_Abstract: /web/unisoft/web.system/Zend/Db/Adapter/Abstract.php
Zend_Db_Adapter_Mysqli: /web/unisoft/web.system/Zend/Db/Adapter/Mysqli.php
Zend_Db_Profiler: /web/unisoft/web.system/Zend/Db/Profiler.php
Zend_Db_Statement_Interface: /web/unisoft/web.system/Zend/Db/Statement/Interface.php
Zend_Db_Statement: /web/unisoft/web.system/Zend/Db/Statement.php
Zend_Db_Statement_Mysqli: /web/unisoft/web.system/Zend/Db/Statement/Mysqli.php
Zend_Registry: /web/unisoft/web.system/Zend/Registry.php
Zend_Db_Table_Abstract: /web/unisoft/web.system/Zend/Db/Table/Abstract.php
Zend_Session_Abstract: /web/unisoft/web.system/Zend/Session/Abstract.php
Zend_Session: /web/unisoft/web.system/Zend/Session.php
Zend_Session_SaveHandler_Interface: /web/unisoft/web.system/Zend/Session/SaveHandler/Interface.php
Zend_Session_SaveHandler_DbTable: /web/unisoft/web.system/Zend/Session/SaveHandler/DbTable.php
Zend_Exception: /web/unisoft/web.system/Zend/Exception.php
Zend_Session_Exception: /web/unisoft/web.system/Zend/Session/Exception.php
Zend_Db_Select: /web/unisoft/web.system/Zend/Db/Select.php
Zend_Db_Table_Select: /web/unisoft/web.system/Zend/Db/Table/Select.php
Zend_Db_Expr: /web/unisoft/web.system/Zend/Db/Expr.php
Zend_Db_Table_Rowset_Abstract: /web/unisoft/web.system/Zend/Db/Table/Rowset/Abstract.php
Zend_Db_Table_Rowset: /web/unisoft/web.system/Zend/Db/Table/Rowset.php
Zend_Db_Table_Row_Abstract: /web/unisoft/web.system/Zend/Db/Table/Row/Abstract.php
Zend_Db_Table_Row: /web/unisoft/web.system/Zend/Db/Table/Row.php
HTTP: /web/unisoft/web.system/class/cls_http.inc.php
Zend_Session_Namespace: /web/unisoft/web.system/Zend/Session/Namespace.php
system_setting_class: /web/unisoft/web.core/system/setting.php
Zend_Cache: /web/unisoft/web.system/Zend/Cache.php
Zend_Cache_Backend: /web/unisoft/web.system/Zend/Cache/Backend.php
Zend_Cache_Backend_Interface: /web/unisoft/web.system/Zend/Cache/Backend/Interface.php
Zend_Cache_Backend_ExtendedInterface: /web/unisoft/web.system/Zend/Cache/Backend/ExtendedInterface.php
site_ip_class: /web/unisoft/web.core/site/ip.php
Zend_Validate_Interface: /web/unisoft/web.system/Zend/Validate/Interface.php
Zend_Validate: /web/unisoft/web.system/Zend/Validate.php
Zend_Loader: /web/unisoft/web.system/Zend/Loader.php
Zend_Validate_Abstract: /web/unisoft/web.system/Zend/Validate/Abstract.php
TPL: /web/unisoft/web.system/class/cls_template.inc.php
Savant3_Error: /web/unisoft/web.system/Savant3/Error.php
package_main_class: /web/unisoft/web.core/package/main.php
iot_hardware_main_class: /web/unisoft/web.core/iot/hardware/main.php
iot_hardware_category_class: /web/unisoft/web.core/iot/hardware/category.php
site_service_main_class: /web/unisoft/web.core/site/service/main.php
site_article_main_class: /web/unisoft/web.core/site/article/main.php
site_article_extra_class: /web/unisoft/web.core/site/article/extra.php
site_keyword_exclude_class: /web/unisoft/web.core/site/keyword/exclude.php
system_content_class: /web/unisoft/web.core/system/content.php
site_article_attachment_class: /web/unisoft/web.core/site/article/attachment.php
site_article_category_class: /web/unisoft/web.core/site/article/category.php
Database [main master]
[ Log time: 1788235497.4043 ] [ Expend time: 0.0064268112182617 ] Connect DB
Cache
[ Log time: 1788235497.4225 ] Backend:
[ Log time: 1788235497.4235 ] [ Expend time: 0.000971 ] Get Cache: settings_ef8c7cef1f80fbad45b9ee480e92d03c, result type: array
[ Log time: 1788235497.424 ] [ Expend time: 0.000355 ] Get Cache: crond, result type: boolean
[ Log time: 1788235497.4409 ] [ Expend time: 0.001214 ] Get Cache: model_7ec70ee0360b8a929eb442cbc38dfd27, result type: array
[ Log time: 1788235497.4466 ] [ Expend time: 0.004381 ] Get Cache: model_eebc36c56f6ebd5dc315368f04ea4f0d, result type: array
[ Log time: 1788235497.448 ] [ Expend time: 0.000614 ] Get Cache: model_87644abf3b1d496cbf4b1667422d7d51, result type: array
[ Log time: 1788235497.4504 ] [ Expend time: 0.000906 ] Get Cache: site_service_list_7e49c82f3098f580fb5928807f5e466d, result type: array
[ Log time: 1788235497.4616 ] [ Expend time: 0.002137 ] Get Cache: site_keyword_exclude_b2c64c08a5048d87cc4904022274c118, result type: array
[ Log time: 1788235497.4749 ] [ Expend time: 0.002656 ] Get Cache: site_keyword_exclude_b2c64c08a5048d87cc4904022274c118, result type: array
[ Log time: 1788235497.4836 ] [ Expend time: 0.002864 ] Get Cache: site_keyword_exclude_b2c64c08a5048d87cc4904022274c118, result type: array
[ Log time: 1788235497.5004 ] [ Expend time: 0.002373 ] Get Cache: site_keyword_exclude_b2c64c08a5048d87cc4904022274c118, result type: array
[ Log time: 1788235497.5191 ] [ Expend time: 0.000454 ] Get Cache: c0a8e531d2d438c47ed066bbe895cbf5, result type: boolean
[ Log time: 1788235497.5239 ] [ Expend time: 0.001415 ] Save Cache: c0a8e531d2d438c47ed066bbe895cbf5, result type: integer
Database [core master]
[ Log time: 1788235497.4286 ] [ Expend time: 0.0016560554504395 ] Connect DB
[ Log time: 1788235497.4296 ] [ Expend time: 0.00078105926513672 ] SELECT `z_ip`.* FROM `z_ip` WHERE (ip = '216.73.217' AND visit_time = 1788235440) LIMIT 1
[ Log time: 1788235497.4315 ] [ Expend time: 0.0017859935760498 ] UPDATE z_ip SET visit_count = visit_count + 1 WHERE ip = '216.73.217' and visit_time = 1788235440
[ Log time: 1788235497.4327 ] [ Expend time: 0.0011289119720459 ] DELETE FROM z_ip WHERE visit_count < 120 and visit_time <= 1788235260
[ Log time: 1788235497.4345 ] [ Expend time: 0.0014870166778564 ] SELECT SUM(visit_count) AS `n0` FROM `z_ip` WHERE ((ip = '216.73.217') AND is_delete = 0)
[ Log time: 1788235497.4548 ] [ Expend time: 0.0018470287322998 ] SELECT `z_article`.* FROM `z_article` WHERE (no = 'ca4e002a7d66495f') LIMIT 1
[ Log time: 1788235497.4587 ] [ Expend time: 0.0026559829711914 ] SELECT `z_article_extra`.* FROM `z_article_extra` WHERE (is_delete = 0 AND article_id IN(927))
[ Log time: 1788235497.4807 ] [ Expend time: 0.00096702575683594 ] SELECT `z_article_extra`.* FROM `z_article_extra` WHERE (article_id = 927) LIMIT 1
[ Log time: 1788235497.4949 ] [ Expend time: 0.0017149448394775 ] SELECT `z_article_attachment`.* FROM `z_article_attachment` WHERE (article_id = 927 AND is_delete = 0) ORDER BY `id` DESC
[ Log time: 1788235497.4977 ] [ Expend time: 0.0025022029876709 ] SELECT `z_article`.* FROM `z_article` WHERE (is_delete = 0 AND category_id = 34 AND is_enable = 1) ORDER BY `id` DESC LIMIT 5
[ Log time: 1788235497.5225 ] [ Expend time: 0.0033230781555176 ] UPDATE z_article SET view_count = view_count + 1 WHERE id = 927
[ Log time: 1788235497.5259 ] [ Expend time: 0.00096988677978516 ] SELECT `z_article_category`.* FROM `z_article_category` WHERE (id = 34) LIMIT 1
Escape time: 0.14706802368164, 0 queries, PHP Memory usage: 5577.8359375 KB, Server time: 2026-09-01 12:04:57