- CodeIgniter 1.7
- David Upton Jose Argudo Blanco
- 297字
- 2021-04-01 13:45:30
Summary
The MVC pattern is a widely used and is a very effective way of organizing a complex website. CI uses it to help you sort your own code, but it is also fairly flexible about how it does so.
The crucial thing is to understand what the different type of files are, and how they relate to each other. Then, you can decide whether to write your code in library or model files, or as helpers or plugins.
We've looked at the CI file structure, and seen how you can, if you want, inspect all the CI code, but (thankfully!) you don't have to. We did tinker with one of the original files—the config
file, which holds critical site information in one place to make it easy for us to upgrade or change later.
We've seen the basic object structure of a controller, and used a simple constructor to get some data from our config
file and put it into a class property. We've dynamically passed information from a new controller we wrote, to a new view. So far, the main thing CI has done for us is to encourage us to use a basic structure as we start to define our site. As we go on, it will become clear just how important that structure is.
Also, we looked at the way in which CI's components pass data and control between themselves. It's useful to understand this when you start to write your code.
Lastly, we looked at CI's own URL helper as a good example of a chunk of code, and we wrote our own rudimentary menu
library class. Now continue to Chapter 4, where we will see how CodeIgniter will help us improve the way we work with databases, don't wait!
- Oracle SOA Suite Developer's Guide
- 擁抱開源(第2版)
- SolidWorks 2008機械設計一冊通
- Autodesk Ecotect Analysis 2011綠色建筑分析應用
- Ogre 3D 1.7 Beginner's Guide
- Photoshop網店美工實例教程(第2版 全彩微課版)
- Adobe創意大學Photoshop CS5 產品專家認證標準教材
- The PEAR Installer Manifesto
- 平面設計制作標準教程(微課版 第2版)
- AI繪畫+LoRA模型訓練從新手到高手
- 中文版3ds Max 2014-VRay效果圖制作完全自學教程
- 中文版Photoshop 2023從入門到精通
- Photoshop-CorelDRAW 基礎培訓教程
- Photoshop CC 平面設計
- 中文版Photoshop CS6基礎教程