w模型代表数据结构。

https://www.codeigniter.com/userguide3/overview/mvc.html

http://codeigniter.org.cn/user_guide/overview/mvc.html

Model-View-Controller

CodeIgniter is based on the Model-View-Controller development pattern. MVC is a software approach that separates application logic from presentation. In practice, it permits your web pages to contain minimal scripting since the presentation is separate from the PHP scripting.

  • The Model represents your data structures. Typically your model classes will contain functions that help you retrieve, insert, and update information in your database.
  • The View is the information that is being presented to a user. A View will normally be a web page, but in CodeIgniter, a view can also be a page fragment like a header or footer. It can also be an RSS page, or any other type of “page”.
  • The Controller serves as an intermediary between the Model, the View, and any other resources needed to process the HTTP request and generate a web page.

CodeIgniter has a fairly loose approach to MVC since Models are not required. If you don’t need the added separation, or find that maintaining models requires more complexity than you want, you can ignore them and build your application minimally using Controllers and Views. CodeIgniter also enables you to incorporate your own existing scripts, or even develop core libraries for the system, enabling you to work in a way that makes the most sense to you.

模型-视图-控制器

CodeIgniter 的开发基于 MVC(模型-视图-控制器)设计模式。MVC 是一种 用于将应用程序的逻辑层和表现层分离出来的软件方法。在实践中,由于这种分离 所以你的页面中只包含很少的 PHP 脚本。

  • 模型 代表你的数据结构。通常来说,模型类将包含帮助你对数据库进行增删改查的方法。
  • 视图 是要展现给用户的信息。一个视图通常就是一个网页,但是在 CodeIgniter 中, 一个视图也可以是一部分页面(例如页头、页尾),它也可以是一个 RSS 页面, 或其他任何类型的页面。
  • 控制器 是模型、视图以及其他任何处理 HTTP 请求所必须的资源之间的中介,并生成网页。

CodeIgniter 在 MVC 使用上非常宽松,因为模型不是必需的。如果你不需要使用模型这一层,或是 认为维护模型比你想象中的复杂很多,那么你可以忽略它,而只使用控制器和视图创建你的应用程序。 CodeIgniter 可以让你直接调用你现有的脚本,甚至你也可以为系统开发核心类,总之, CodeIgniter 让你以你感觉最舒适的方式进行开发。

The Model represents your data structures.的更多相关文章

  1. Persistent Data Structures

    原文链接:http://www.codeproject.com/Articles/9680/Persistent-Data-Structures Introduction When you hear ...

  2. CSC 172 (Data Structures and Algorithms)

    Project #3 (STREET MAPPING)CSC 172 (Data Structures and Algorithms), Spring 2019,University of Roche ...

  3. Algorithms & Data structures in C++& GO ( Lock Free Queue)

    https://github.com/xtaci/algorithms //已实现 ( Implemented ): Array shuffle https://github.com/xtaci/al ...

  4. [轉]Linux Data Structures

    Table of Contents, Show Frames, No Frames Chapter 15 Linux Data Structures This appendix lists the m ...

  5. A library of generic data structures

    A library of generic data structures including a list, array, hashtable, deque etc.. https://github. ...

  6. The Swiss Army Knife of Data Structures … in C#

    "I worked up a full implementation as well but I decided that it was too complicated to post in ...

  7. 剪短的python数据结构和算法的书《Data Structures and Algorithms Using Python》

    按书上练习完,就可以知道日常的用处啦 #!/usr/bin/env python # -*- coding: utf-8 -*- # learn <<Problem Solving wit ...

  8. Go Data Structures: Interfaces

    refer:http://research.swtch.com/interfaces Go Data Structures: Interfaces Posted on Tuesday, Decembe ...

  9. Choose Concurrency-Friendly Data Structures

    What is a high-performance data structure? To answer that question, we're used to applying normal co ...

随机推荐

  1. Form表单——例子

    Form Form的验证思路 前端:form表单 后台:创建form类,当请求到来时,先匹配,匹配出正确和错误信息. Django的Form验证实例: 创建project,进行基础配置文件配置 STA ...

  2. jquery flexslider 轮播插件

    去官网下载最新的 https://www.woothemes.com/flexslider/ 引入 css 和 js api $(window).load(function() { $('.flexs ...

  3. python操作word【简单封装】

    #!/usr/bin/env python # -*- coding: utf-8 -*- import win32com.client import os #-------------------- ...

  4. [Linux内核]ctrl-z/fg/bg/nohup/setsid/()与&/disown/screen

    转自:https://my.oschina.net/alphajay/blog/65058 My Tips: Ctrl -z    ->   suspend fg           -> ...

  5. Scala中List(Map1,Map2,Map3 ....) 转成一个Map

    这个问题研究好久...头大,不记得有fold用法了. fold函数:折叠,提供一个输入参数作为初始值,然后大括号中应用自定义fun函数并返回值. list.fold(Map()){(x,y)=> ...

  6. 小贝_redis 高级应用-事务

    redis高级应用-事务 一.redis的事务 二.redis实现事务 三.redis事务问题 一.redis的事务 事务提供了一种"将多个命令打包,然后一次性.按顺序地运行"的机 ...

  7. python中的列表生成式

    列表生成式即List Comprehensions,是Python内置的非常简单却强大的可以用来创建list的生成式. 举个例子,要生成list [1, 2, 3, 4, 5, 6, 7, 8, 9, ...

  8. java为安全起见对Applet有所限制

    Applet消亡的原因: ①java为安全起见对Applet有所限制:Applet不允许访问本地文件信息.敏感信息,不能执行本地指令(比如FORMAT),不能访问初原服务器之外的其他服务器. ① IE ...

  9. java--Struts中请求的过程

    一个请求在Struts2框架中的处理步骤: a) 客户端初始化一个指向Servlet容器的请求: b) 根据Web.xml配置,请求首先经过ActionContextCleanUp过滤器,其为可选过滤 ...

  10. 学习:erlang正则

    一.re:run/3. ①.re:run("321321","2132",[caseless]).     {match,[{1,4}]} %% 返回值是 匹配 ...