CI (CodeIgniter) framework entry

What is CI framework: CdoeIgniter for PHP developers a set of Web applications toolkit. His aim is to be able to make you scratch more rapid completion of the project, which provides a rich set of class libraries to meet our daily needs, and provides a simple interface and logical structure to invoke these libraries. CodeIgniter by minimizing the amount of code you need to make you put more energy into the creative development of the project.
Advantage:

  • CodeIgniter is free, by the MIT open source license authorized to use any.
  • Lightweight, our core system requires only some very small libraries, and frameworks that it requires a lot of resources to the contrary. Moreover, the libraries are loaded dynamically upon request, what just what you need to load, so the core of the system is a very brisk systems.
  • Fast, it is difficult to find a faster than CodeIgniter framework.
  • Using the MVC architecture, using CodeIgniter model - View - Controller architecture, it will be very discrete logic and presentation layers. Especially for those who use the template file for the project is better able to reduce the amount of code template file.
  • Generate clean URL, the resulting URL is very clean, but also search engine friendly. Unlike standard "query string" approach, CodeIgniter uses a segment-based approach (the default URL is included in the index.php file, but can be removed by changing the .htaccess file).
  • Powerful, has a comprehensive library to meet the needs of most Web development tasks, such as: access to the database, send messages, form data validation, session management, image processing, data processing and other XML-RPC.
  • Scalable, the system can be very simple to expand through your own libraries and auxiliary functions can also be extended through the class system or hooks to achieve.
  • Template engine is not required, although comes with a very simple template parser optional, but it does not force you to use a template. Template engine performance and native PHP code can not be compared to another using a template engine also need to learn a new syntax, and the use of native PHP code only needs to master the basic syntax of PHP.
  • It has a comprehensive document
  • It has a friendly user community

Application Process:

  • index.php file as a front-end controller, basic resources required to initialize operation CodeIgniter;
  • Router checks the HTTP request, to determine how to handle the request;
  • If the cache file exists, the output directly to the browser, do not go below the normal system processes;
  • Before loading the application controller, an HTTP request and any user-submitted data security checks;
  • Loading the controller model, the core library, a helper, and all other resources required to process the request;
  • The final step, trying to render and sent to the browser, if the cache is turned on, the view will first cached for subsequent requests.

Model - View - Controller

  • CodeIgniter MVC design pattern based development, MVC is a method to separate logical application layer and presentation layer is used. In practice, because of this separation so your page contains only a small PHP script.
  • Model: represents your data structures. In general, the model class will contain methods to help you make CRUD on the database.
  • View: to show information to the user. A view is usually a page, but in CodeIgniter, the view may be part of a page, he can also be an RSS page, or other types of pages.
  • Controller: the model, view, and any other resources required to process HTTP requests to intermediaries, and generates a web page.
  • CodeIgniter MVC on the use of very loose, because the model is not required. If you do not use this layer model, maintenance model or think a lot of complicated than you think, then you can ignore it, but only to create your application using the controllers and views. CodeIgniter lets you directly call your existing script, you can even develop core classes for the system, in short, CodeIgniter allows you to feel you are the most comfortable way for development.

Design and Architecture goal
CodeIgniter's goal is to minimize bantamweight development package to get the maximum efficiency, functionality and flexibility. To achieve this goal, every step of the development process we are committed to benchmarking, restructuring and streamlining, refused to join anything that does not help to achieve this goal. From a technical and architectural standpoint, CodeIgniter created in accordance with the following objectives:

  • Dynamically instantiated: In the CodeIgniter, and the import function module are only performed when requested, rather than global. In addition to core resources, the system does not require any additional resources, so the system default is very lightweight. HTTP request triggered event and the controllers and views you design will determine what resources are needed to load.
  • Loose coupling: coupling means in dependence among the components of a system. The lower the dependence between components, reusability and flexibility of the system, the better. Our goal is to build a loosely coupled system.
  • Component specificity: specificity refers to the degree to focus on a goal assembly. In CodeIgniter, each of the classes and methods are highly independent, and thus can be reused to the maximum extent.
Published 62 original articles · won praise 68 · views 50000 +

Guess you like

Origin blog.csdn.net/magic_world_wow/article/details/104648086