summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/overview/mvc.rst
diff options
context:
space:
mode:
authorJoël Cox <joel@joelcox.nl>2011-10-09 18:45:09 +0200
committerJoël Cox <joel@joelcox.nl>2011-10-09 18:45:09 +0200
commit8ffcb2c8c7ef3da54d7e46c29d502533e413c820 (patch)
tree1f94e2e81b4d20f2df827b8a84eeda27032161a1 /user_guide_src/source/overview/mvc.rst
parentf4fb1db458fab52d0493ead52c9ea7e01206eaa7 (diff)
parent6858c0753a7221796d6a5a1d7fea93cc2f9feb2e (diff)
Merged develop branch in tutorial.
Diffstat (limited to 'user_guide_src/source/overview/mvc.rst')
-rw-r--r--user_guide_src/source/overview/mvc.rst27
1 files changed, 27 insertions, 0 deletions
diff --git a/user_guide_src/source/overview/mvc.rst b/user_guide_src/source/overview/mvc.rst
new file mode 100644
index 000000000..996745d65
--- /dev/null
+++ b/user_guide_src/source/overview/mvc.rst
@@ -0,0 +1,27 @@
+#####################
+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.