diff options
author | Eric Barnes <eric@ericlbarnes.com> | 2011-11-27 06:30:22 +0100 |
---|---|---|
committer | Eric Barnes <eric@ericlbarnes.com> | 2011-11-27 06:30:22 +0100 |
commit | 7e66dda705743cbfe1d522ddb73e5694006ec42c (patch) | |
tree | c08b63deb28c09ec49d9173280f1ca234debfe50 /user_guide_src/source/overview | |
parent | 7eceb03f083643254c7393c6b5ebe539e344a1ba (diff) | |
parent | e101593561a10632c1d63180436b19f1d7115046 (diff) |
Merge branch 'refs/heads/develop' into feature/unit-tests
Conflicts:
user_guide/helpers/number_helper.html
Diffstat (limited to 'user_guide_src/source/overview')
-rw-r--r-- | user_guide_src/source/overview/appflow.rst | 23 | ||||
-rw-r--r-- | user_guide_src/source/overview/at_a_glance.rst | 114 | ||||
-rw-r--r-- | user_guide_src/source/overview/cheatsheets.rst | 16 | ||||
-rw-r--r-- | user_guide_src/source/overview/features.rst | 46 | ||||
-rw-r--r-- | user_guide_src/source/overview/getting_started.rst | 24 | ||||
-rw-r--r-- | user_guide_src/source/overview/goals.rst | 32 | ||||
-rw-r--r-- | user_guide_src/source/overview/index.rst | 16 | ||||
-rw-r--r-- | user_guide_src/source/overview/mvc.rst | 27 |
8 files changed, 298 insertions, 0 deletions
diff --git a/user_guide_src/source/overview/appflow.rst b/user_guide_src/source/overview/appflow.rst new file mode 100644 index 000000000..bb15130d2 --- /dev/null +++ b/user_guide_src/source/overview/appflow.rst @@ -0,0 +1,23 @@ +###################### +Application Flow Chart +###################### + +The following graphic illustrates how data flows throughout the system: + +|CodeIgniter application flow| + +#. The index.php serves as the front controller, initializing the base + resources needed to run CodeIgniter. +#. The Router examines the HTTP request to determine what should be done + with it. +#. If a cache file exists, it is sent directly to the browser, bypassing + the normal system execution. +#. Security. Before the application controller is loaded, the HTTP + request and any user submitted data is filtered for security. +#. The Controller loads the model, core libraries, helpers, and any + other resources needed to process the specific request. +#. The finalized View is rendered then sent to the web browser to be + seen. If caching is enabled, the view is cached first so that on + subsequent requests it can be served. + +.. |CodeIgniter application flow| image:: ../images/appflowchart.gif diff --git a/user_guide_src/source/overview/at_a_glance.rst b/user_guide_src/source/overview/at_a_glance.rst new file mode 100644 index 000000000..31f0b4dd9 --- /dev/null +++ b/user_guide_src/source/overview/at_a_glance.rst @@ -0,0 +1,114 @@ +####################### +CodeIgniter at a Glance +####################### + +CodeIgniter is an Application Framework +======================================= + +CodeIgniter is a toolkit for people who build web applications using +PHP. Its goal is to enable you to develop projects much faster than you +could if you were writing code from scratch, by providing a rich set of +libraries for commonly needed tasks, as well as a simple interface and +logical structure to access these libraries. CodeIgniter lets you +creatively focus on your project by minimizing the amount of code needed +for a given task. + +CodeIgniter is Free +=================== + +CodeIgniter is licensed under an Apache/BSD-style open source license so +you can use it however you please. For more information please read the +:doc:`license agreement <../license>`. + +CodeIgniter is Light Weight +=========================== + +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. Additional libraries are loaded +dynamically upon request, based on your needs for a given process, so +the base system is very lean and quite fast. + +CodeIgniter is Fast +=================== + +Really fast. We challenge you to find a framework that has better +performance than CodeIgniter. + +CodeIgniter Uses M-V-C +====================== + +CodeIgniter uses the Model-View-Controller approach, which allows great +separation between logic and presentation. This 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. + +CodeIgniter Generates Clean URLs +================================ + +The URLs generated by CodeIgniter are clean and search-engine friendly. +Rather than using the standard "query string" approach to URLs that is +synonymous with dynamic systems, CodeIgniter uses a segment-based +approach:: + + example.com/news/article/345 + +Note: By default the index.php file is included in the URL but it can be +removed using a simple .htaccess file. + +CodeIgniter Packs a Punch +========================= + +CodeIgniter comes with full-range of libraries that enable the most +commonly needed web development tasks, like accessing a database, +sending email, validating form data, maintaining sessions, manipulating +images, working with XML-RPC data and much more. + +CodeIgniter is Extensible +========================= + +The system can be easily extended through the use of your own libraries, +helpers, or through class extensions or system hooks. + +CodeIgniter Does Not Require a Template Engine +============================================== + +Although CodeIgniter *does* come with a simple template parser that can +be optionally used, it does not force you to use one. Template engines +simply can not match the performance of native PHP, and the syntax that +must be learned to use a template engine is usually only marginally +easier than learning the basics of PHP. Consider this block of PHP code:: + + <ul> + <?php foreach ($addressbook as $name):?> + <li><?=$name?></li> + <?php endforeach; ?> + </ul> + +Contrast this with the pseudo-code used by a template engine:: + + <ul> + {foreach from=$addressbook item="name"} + <li>{$name}</li> + {/foreach} + </ul> + +Yes, the template engine example is a bit cleaner, but it comes at the +price of performance, as the pseudo-code must be converted back into PHP +to run. Since one of our goals is *maximum performance*, we opted to not +require the use of a template engine. + +CodeIgniter is Thoroughly Documented +==================================== + +Programmers love to code and hate to write documentation. We're no +different, of course, but since documentation is **as important** as the +code itself, we are committed to doing it. Our source code is extremely +clean and well commented as well. + +CodeIgniter has a Friendly Community of Users +============================================= + +Our growing community of users can be seen actively participating in our +`Community Forums <http://codeigniter.com/forums/>`_. diff --git a/user_guide_src/source/overview/cheatsheets.rst b/user_guide_src/source/overview/cheatsheets.rst new file mode 100644 index 000000000..2e277aa9a --- /dev/null +++ b/user_guide_src/source/overview/cheatsheets.rst @@ -0,0 +1,16 @@ +####################### +CodeIgniter Cheatsheets +####################### + +Library Reference +================= + +`|CodeIgniter Library +Reference| <../images/codeigniter_1.7.1_library_reference.pdf>`_ +Helpers Reference +================= + +`|image1| <../images/codeigniter_1.7.1_helper_reference.pdf>`_ + +.. |CodeIgniter Library Reference| image:: ../images/codeigniter_1.7.1_library_reference.png +.. |image1| image:: ../images/codeigniter_1.7.1_helper_reference.png diff --git a/user_guide_src/source/overview/features.rst b/user_guide_src/source/overview/features.rst new file mode 100644 index 000000000..44db08a94 --- /dev/null +++ b/user_guide_src/source/overview/features.rst @@ -0,0 +1,46 @@ +#################### +CodeIgniter Features +#################### + +Features in and of themselves are a very poor way to judge an +application since they tell you nothing about the user experience, or +how intuitively or intelligently it is designed. Features don't reveal +anything about the quality of the code, or the performance, or the +attention to detail, or security practices. The only way to really judge +an app is to try it and get to know the code. +`Installing <../installation/>`_ CodeIgniter is child's play so we +encourage you to do just that. In the mean time here's a list of +CodeIgniter's main features. + +- Model-View-Controller Based System +- Extremely Light Weight +- Full Featured database classes with support for several platforms. +- Active Record Database Support +- Form and Data Validation +- Security and XSS Filtering +- Session Management +- Email Sending Class. Supports Attachments, HTML/Text email, multiple + protocols (sendmail, SMTP, and Mail) and more. +- Image Manipulation Library (cropping, resizing, rotating, etc.). + Supports GD, ImageMagick, and NetPBM +- File Uploading Class +- FTP Class +- Localization +- Pagination +- Data Encryption +- Benchmarking +- Full Page Caching +- Error Logging +- Application Profiling +- Calendaring Class +- User Agent Class +- Zip Encoding Class +- Template Engine Class +- Trackback Class +- XML-RPC Library +- Unit Testing Class +- Search-engine Friendly URLs +- Flexible URI Routing +- Support for Hooks and Class Extensions +- Large library of "helper" functions + diff --git a/user_guide_src/source/overview/getting_started.rst b/user_guide_src/source/overview/getting_started.rst new file mode 100644 index 000000000..5157d4860 --- /dev/null +++ b/user_guide_src/source/overview/getting_started.rst @@ -0,0 +1,24 @@ +################################ +Getting Started With CodeIgniter +################################ + +Any software application requires some effort to learn. We've done our +best to minimize the learning curve while making the process as +enjoyable as possible. + +The first step is to :doc:`install <../installation/index>` +CodeIgniter, then read all the topics in the **Introduction** section of +the Table of Contents. + +Next, read each of the **General Topics** pages in order. Each topic +builds on the previous one, and includes code examples that you are +encouraged to try. + +Once you understand the basics you'll be ready to explore the **Class +Reference** and **Helper Reference** pages to learn to utilize the +native libraries and helper files. + +Feel free to take advantage of our `Community +Forums <http://codeigniter.com/forums/>`_ if you have questions or +problems, and our `Wiki <http://codeigniter.com/wiki/>`_ to see code +examples posted by other users. diff --git a/user_guide_src/source/overview/goals.rst b/user_guide_src/source/overview/goals.rst new file mode 100644 index 000000000..ac581807f --- /dev/null +++ b/user_guide_src/source/overview/goals.rst @@ -0,0 +1,32 @@ +############################## +Design and Architectural Goals +############################## + +Our goal for CodeIgniter is maximum performance, capability, and +flexibility in the smallest, lightest possible package. + +To meet this goal we are committed to benchmarking, re-factoring, and +simplifying at every step of the development process, rejecting anything +that doesn't further the stated objective. + +From a technical and architectural standpoint, CodeIgniter was created +with the following objectives: + +- **Dynamic Instantiation.** In CodeIgniter, components are loaded and + routines executed only when requested, rather than globally. No + assumptions are made by the system regarding what may be needed + beyond the minimal core resources, so the system is very light-weight + by default. The events, as triggered by the HTTP request, and the + controllers and views you design will determine what is invoked. +- **Loose Coupling.** Coupling is the degree to which components of a + system rely on each other. The less components depend on each other + the more reusable and flexible the system becomes. Our goal was a + very loosely coupled system. +- **Component Singularity.** Singularity is the degree to which + components have a narrowly focused purpose. In CodeIgniter, each + class and its functions are highly autonomous in order to allow + maximum usefulness. + +CodeIgniter is a dynamically instantiated, loosely coupled system with +high component singularity. It strives for simplicity, flexibility, and +high performance in a small footprint package. diff --git a/user_guide_src/source/overview/index.rst b/user_guide_src/source/overview/index.rst new file mode 100644 index 000000000..dc91f78c4 --- /dev/null +++ b/user_guide_src/source/overview/index.rst @@ -0,0 +1,16 @@ +#################### +CodeIgniter Overview +#################### + +The following pages describe the broad concepts behind CodeIgniter: + +.. toctree:: + :titlesonly: + + Getting Started <getting_started> + CodeIgniter at a Glance <at_a_glance> + CodeIgniter Cheatsheets <cheatsheets> + Supported Features <features> + Application Flow Chart <appflow> + Model-View-Controller <mvc> + Architectural Goals <goals>
\ No newline at end of file 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. |