使用CI加载视图与直接访问页面有什么区别?解决方案

WBOY
Release: 2016-06-13 11:52:41
Original
895 people have browsed it

使用CI加载视图与直接访问页面有什么区别?
直接在页面里用AJAX与服务器交互就可以啊,加载视图有什么优势/弊端?
------解决方案--------------------
没有本质的区别。
load view.实际上是页面渲染的部分,也就是MVC中的V。
相比直接访问页面,这种方式的好处是分层,便于维护和扩展。
------解决方案--------------------
不同的实现需求吧
CI加载视图多半是整个页面的加载
ajax是异步请求服务返回页面实现局部页面的动态更新

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!