blob: d3d5e805ba07e8aebc5259064dfdbd2fda186fc0 [file] [log] [blame]
adminb0dd10f2006-08-25 17:25:49 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html>
3<head>
4
5<title>Code Igniter User Guide</title>
6
7<style type='text/css' media='all'>@import url('../userguide.css');</style>
8<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
9
admin17a890d2006-09-27 20:42:42 +000010<script type="text/javascript" src="../nav/nav.js"></script>
admin2296fc32006-09-27 21:07:02 +000011<script type="text/javascript" src="../nav/prototype.lite.js"></script>
admin17a890d2006-09-27 20:42:42 +000012<script type="text/javascript" src="../nav/moo.fx.js"></script>
adminb0dd10f2006-08-25 17:25:49 +000013<script type="text/javascript">
14window.onload = function() {
admine334c472006-10-21 19:44:22 +000015 myHeight = new fx.Height('nav', {duration: 400});
adminb0dd10f2006-08-25 17:25:49 +000016 myHeight.hide();
17}
18</script>
19
20<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
21<meta http-equiv='expires' content='-1' />
22<meta http-equiv= 'pragma' content='no-cache' />
23<meta name='robots' content='all' />
24<meta name='author' content='Rick Ellis' />
25<meta name='description' content='Code Igniter User Guide' />
26
27</head>
28<body>
29
30<!-- START NAVIGATION -->
31<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
32<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
33<div id="masthead">
34<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
35<tr>
Rick Ellis257651d2006-11-23 18:40:13 +000036<td><h1>Code Igniter User Guide Version 1.5.1</h1></td>
adminc0d5d522006-10-30 19:40:35 +000037<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
adminb0dd10f2006-08-25 17:25:49 +000038</tr>
39</table>
40</div>
41<!-- END NAVIGATION -->
42
43
44<!-- START BREADCRUMB -->
45<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
46<tr>
47<td id="breadcrumb">
48<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
49<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
50What is Code Igniter?
51</td>
52<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
53</tr>
54</table>
55<!-- END BREADCRUMB -->
56
57<br clear="all" />
58
59
60<!-- START CONTENT -->
61<div id="content">
62
63<h1>Code Igniter at a Glance</h1>
64
65
66<h2>Code Igniter is an Application Framework</h2>
67
admine334c472006-10-21 19:44:22 +000068<p>Code Igniter is a toolkit for people who build web application using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code
adminb0dd10f2006-08-25 17:25:49 +000069from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and
admine334c472006-10-21 19:44:22 +000070logical structure to access these libraries. Code Igniter lets you creatively focus on your project by
adminb0dd10f2006-08-25 17:25:49 +000071minimizing the amount of code needed for a given task.</p>
72
73<h2>Code Igniter is Free</h2>
74<p>Code Igniter is licensed under an Apache/BSD-style open source license so you can use it however you please.
75For more information please read the <a href="../license.html">license agreement</a>.</p>
76
77
78<h2>Code Igniter Runs on PHP 4</h2>
admine334c472006-10-21 19:44:22 +000079<p>Code Igniter is written to be compatible with PHP 4. Although we would have loved to take advantage of the better object handling
80in PHP 5 since it would have simplified some things we had to find creative solutions for (looking your way, multiple inheritance),
81at the time of this writing PHP 5 is not in widespread use, which means we would be alienating most of our
adminb0dd10f2006-08-25 17:25:49 +000082potential audience. Major OS vendors like RedHat have yet to support PHP 5, and they are unlikely to do so until 2007, so
83we felt that it did not serve the best interests of the PHP community to write Code Igniter in PHP 5.</p>
84
85<p>Note: Code Igniter will run on PHP 5. It simply does not take advantage of any native features that are only available in that version.</p>
86
87<h2>Code Igniter is Light Weight</h2>
88<p>Truly light weight. The core system requires only a few very small libraries. This is in stark contrast to many frameworks that require significantly more resources.
89Additional libraries are loaded dynamically upon request, based on your needs for a given process, so the base system
90is very lean and quite fast.
91</p>
92
admin25f6fca2006-09-23 01:23:14 +000093<h2>Code Igniter is Fast</h2>
admindede2732006-10-28 19:02:43 +000094<p>Really fast. We challenge you to find a framework that has better performance then Code Igniter.</p>
admin25f6fca2006-09-23 01:23:14 +000095
96
adminb0dd10f2006-08-25 17:25:49 +000097<h2>Code Igniter Uses M-V-C</h2>
98<p>Code Igniter uses the Model-View-Controller approach, which allows great separation between logic and presentation.
99This is particularly good for projects in which designers are working with your template files, as the code these file contain will be minimized. We describe MVC in more detail on its own page.</p>
100
101<h2>Code Igniter Generates Clean URLs</h2>
admine334c472006-10-21 19:44:22 +0000102<p>The URLs generated by Code Igniter are clean and search-engine friendly. Rather than using the standard "query string"
adminb0dd10f2006-08-25 17:25:49 +0000103approach to URLs that is synonymous with dynamic systems, Code Igniter uses a segment-based approach:</p>
104
105<code>www.your-site.com/<var>news</var>/<dfn>article</dfn>/<samp>345</samp></code>
106
107<p>Note: By default the index.php file is included in the URL but it can be removed using a simple .htaccess file.</p>
108
109<h2>Code Igniter Packs a Punch</h2>
admindede2732006-10-28 19:02:43 +0000110<p>Code Igniter comes with full-range of libraries that enable the most commonly needed web development tasks,
111like accessing a database, sending email, validating form data, maintaining sessions, manipulating images, working with XML-RPC data and
112much more.</p>
adminb0dd10f2006-08-25 17:25:49 +0000113
114<h2>Code Igniter is Extensible</h2>
admindede2732006-10-28 19:02:43 +0000115<p>The system can be easily extended through the use of plugins and helper libraries, or through class extensions or system hooks.</p>
116
adminb0dd10f2006-08-25 17:25:49 +0000117
118<h2>Code Igniter Does Not Require a Template Engine</h2>
admin25f6fca2006-09-23 01:23:14 +0000119<p>Although Code Igniter <em>does</em> come with a simple template parser that can be optionally used, it does not force you to use one.
120
admine334c472006-10-21 19:44:22 +0000121Template engines simply can not match the performance of native PHP, and the syntax that must be learned to use a template
adminb0dd10f2006-08-25 17:25:49 +0000122engine is usually only marginally easier than learning the basics of PHP. Consider this block of PHP code:</p>
123
124<code>&lt;ul><br />
125<br />
126&lt;?php foreach ($addressbook as $name):?><br />
127<br />
128&lt;li>&lt;?=$name?>&lt;/li><br />
129<br />
130&lt;?php endforeach; ?><br />
131<br />
132&lt;/ul></code>
133
134<p>Contrast this with the pseudo-code used by a template engine:</p>
135
136<code>&lt;ul><br />
137<br />
admine334c472006-10-21 19:44:22 +0000138{foreach from=$addressbook item="name"}<br />
adminb0dd10f2006-08-25 17:25:49 +0000139<br />
140&lt;li>{$name}&lt;/li><br />
141<br />
142{/foreach}<br />
143<br />
144&lt;/ul></code>
145
admine334c472006-10-21 19:44:22 +0000146<p>Yes, the template engine example is a bit cleaner, but it comes at the price of performance, as the pseudo-code must be converted
adminb0dd10f2006-08-25 17:25:49 +0000147back into PHP to run. Since one of our goals is <em>maximum performance</em>, we opted to not require the use of a template engine.</p>
148
adminb0dd10f2006-08-25 17:25:49 +0000149
150<h2>Code Igniter is Thoroughly Documented</h2>
151<p>Programmers love to code and hate to write documentation. We're no different, of course, but
admine334c472006-10-21 19:44:22 +0000152since documentation is <strong>as important</strong> as the code itself,
adminb0dd10f2006-08-25 17:25:49 +0000153we are committed to doing it. Our source code is extremely clean and well commented as well.</p>
154
155
admindede2732006-10-28 19:02:43 +0000156<h2>Code Igniter has a Friendly Community of Users</h2>
157
158<p>Our growing community of users can be seen actively participating in our <a href="http://www.codeigniter.com/forums/">Community Forums</a>.</p>
159
160
adminb0dd10f2006-08-25 17:25:49 +0000161</div>
162<!-- END CONTENT -->
163
164
165<div id="footer">
166<p>
167Previous Topic:&nbsp;&nbsp;<a href="../installation/upgrading.html">Upgrading from an Older Version</a>
168&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
169<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
170<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
171Next Topic:&nbsp;&nbsp;<a href="features.html">Code Igniter Features</a>
172<p>
173
174<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
175</div>
176
177</body>
178</html>