模板和框架概念的理解

smarty模板引擎:实现输入与处理分离,M与V,没有c。

MVC模型:M模型,处理具体问题的方法;V视图;C控制器,联系m 和v。实现输入 处理 输出 强制分开,由控制器根据输入信息,调用模型,处理后调用V显示。
1 便于前端与后台的同步开发,只关注各自的部分,oop ,低耦合,高内聚,便于测试。2 易维护,可读性强,3 代码可重用
缺点:对于小的项目,代码过去臃肿。

常用的框架:thinkphp和CI。单入口的基于mvc的框架。
首先调用单入口文件index.php,引入框架文件,完成初始化和启动应用程序,在系统文件中通过解析url找到控制器中的方法,进行处理。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
using System; using System Collections; using System Configuration; using System Data; using System Linq; using System Web; using System Web Security; using System Web UI; using System Web UI HtmlControls; using System Web UI WebControls; using System Web UI WebControls WebParts; using System Xml Linq; using Common; using Dao BL; using System Collections Generic; using Dao EntityModel; using Yangqi Dao BL; namespace Yangqi { public partial class yangqi mov : basePage { protected override void SetScreenID { this ScreenID ""; } protected override void SetBody { this Body myBody; } protected override void SubPageLoad object sender EventArgs e { if this IsPostBack { M MENU BL menubl new M MENU BL ; } 查询数据 GetData ; 翻页 SetPageBtn ; } 翻页 private void SetPageBtn { throw new NotImplementedException ; } 查询数据 private void GetData { DataTable result new DataTable ; int pageFist Int32 Parse txtFist Text ; int pageCount Int32 Parse txtCount Text ; int pageRowCount Int32 Parse txtRowCount Text ; int pageSize 10; M NEWS BL newsBl new M NEWS BL ; pageCount pageRowCount + pageSize 1 pageSize; } 添加视频 protected void add newMove object sender EventArgs e { Server Transfer " yangqi mov aspx" ; } 首页 protected void but fist object sender EventArgs e { this txtFist Text "1"; GetData ; SetPageBtn ; } } }">using System; using System Collections; using System Configuration; using System Data; using System Linq; using System Web; using System Web Security; using System Web UI; using System Web UI HtmlControls; using System Web UI WebControls; using System Web UI WebControls WebParts; using System Xml Li [更多]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值