Manual
From Kiwiphp
If you're first time here, Manual for KiwiPHP, It's advised to begin with "Tutorial".
Three parts of the Manual:
- Background, Mostly about software engineering concept in web development, layers, framework and the origin of Kiwi.
- Reference, You can find everyting you need while using KiwiPHP here.
- Tutorial, Hands-on tutorial of KiwiPHP.
If you're first time here, Manual for KiwiPHP, It's advised to begin with "Tutorial", and run Kiwi according to the tutorial. Thus, you will get a exact pointcut so as not to get lost in the manual.
After several hands-on examples, the "Reference" will be the most helpful section, which provides details you may need while developing on KiwiPHP.
If you're a team leader, weighing that whether to use a frame or which to use, wants to see the big picture of KiwiPHP in order to find out that whether it suits your team, the "Background" should be your first section, and then skim over the "Reference".
Contents |
Background
Web Is Software
On Christmas 1990, Berners-Lee invented a WWW browser and a web server, when WEB started off upon it's journey to change the world.
Now, web was already much more than graphic designing or hyperlinks. It has totally become a software engineering product, with programe language, database, develop tool, platform, standard and design partterns.
Classical Web Model
MVC is considerd as the most classical web model, that is design partterns in software engineering.
M, for Model, focuses on database management.
V, for View, is a graphic interface that we displayed.
C, for Controler, includes program logic, data validation and so on. It links M and V to be a whole system.
MVC divides the functions among inputs, outputs and processing and weakened the degree of coupling. Thus, the reusebility and adaptability are strengthened, and it becomes easier to implement management engineering in developping and maintaining. What's more, the cost to maintain the codes and lifecycle is greatly reduced. And the deployment won't ever be the monkey on your back.
Reference
Usage -- go!
KiwiPHP is a PHP framework, and much more than a MVC framework. Kiwi provide support not only for MVC web application and API without HTML outputs, but also for CLI mode and embedding a third party program.
Here is the usage of KiwiPHP, which show you how KiwiPHP provide those supports mentioned hereinbefore.
Source Structure -- go!
KiwiPHP has a high regard for rules. The self-demo displays what source structure is required while developing on KiwiPHP. It makes the deployment easier and more convenient to follow the rules, what's more the codes may be much more readable.
Entrance
Every application runs begin with the entrance file. Client accesses the entrance file, and the file calls the Kiwi Runtime Library, then the request from client is responsed.
A entrance file is commonly as that:
<?php include('C:/kiwiphp/runtime/kiwi.php'); Kiwi::run();
Here are more about the entrance file, which will tell you how to code in entrance file, and which variables and constans is allowed.
MVC
Component
Database
Validator
Util
Deploy
Tutorial
Most Common Example : Hello World! -- go!
Print "Hello World" is the most popular first-demo in many program languages, since it is the most basic task, required least knowledge points, and most easily run.
It's required that a entrance file, a simple class and a method, to print "Hello, world" on Kiwi, less than 10 lines of codes.
Now, Let's say Hello to the World!

