PHP framework ZenTaoPHP

Source: Internet
Author: User

I. What is the ZenTaoPHP framework?
The ZenTaoPHP framework is a lightweight PHP development framework developed by the zentao project management software development team. It has the following features:

1.1 simple code
The ZenTaoPHP framework has only four core files: scheduling class router. class. php, control class control. class. php, model class model. class. php, and tool class helper. class. php. The code is simple enough. In this way, you can easily understand its code and customize and modify it based on your actual application.

1.2 excellent performance
The ZenTaoPHP framework attaches great importance to performance during implementation. The program execution efficiency can be improved as much as possible under the premise of ensuring the function.

1.3 clear structure
The ZenTaoPHP framework is used to develop applications. The directory structure is simple and clear, which is easy to maintain.

1.4 development friendliness
The framework is first a box that contains you. Therefore, many frameworks have many conventions, such as what you want and what you want. There are also many invisible conventions, such as writing a lot of xxxx and other things in your code. I think a good framework should take into account the development habits of developers as much as possible while implementing functions. The ZenTaoPHP framework has made great efforts in this regard:

  • Neutral naming: when the framework is implemented, there is no such name as zentao, which is completely neutral: router, control, model, config, and lang.
  • Configuration objectization: configuration items can be referenced by objects. $ config-> db-> user is much simpler and smoother than $ config ['db'] ['user.
  • Relative Path inclusion: In applications developed by the ZenTaoPHP framework, all paths can be included using relative paths, so that you can clearly understand the relationship between the directory structure and code.

1.5 public domain authorization
Public domain authorization means you can use it to do anything. The zentao development team has completely donated the copyright of the ZenTaoPHP framework to the public. No one or any organization can take it to do anything without any restrictions.

Ii. Main Functions of the ZenTaoPHP framework are as follows:

2.1 Single Entry Mode
A single portal is a popular development method. The advantage is that there can be a centralized control. Or a basic framework is a single entry. The ZenTaoPHP framework now supports two portal files: web and command line. For specific examples, you can view the demo/www/index. php and cli/call files under the app directory.

2.2 MVC
ZenTaoPHP supports MVC development. However, ZenTaoPHP does not try to develop a new template system, but uses PHP as the template language. This is the fastest solution and the most concise one.
2.3 GET and PATH_INFO methods are supported
Index. php? M = user & f = info & id = 123. This GET method also supports/user/info/id/123.html. If you can control your running environment, you can use PATH_INFO to generate a URL that is simpler and more friendly to search engines.
2.4 built-in database access layer DAO
The Zen-tao framework has a built-in DAO database access layer. Based on PDO, it provides a complete SQL Assembly function that allows you to easily write SQL query statements and obtain data. In addition, when implementing DAO, we spent a lot of effort to be compatible with the habit of writing SQL statements before, so we will find it very friendly when using DAO of the Zen-tao framework, because it is basically the same as handwritten SQL.
2.5 support cross-module calls
In the ZenTaoPHP framework, the control or model of a module can directly call the model of another module, so that an application can be modularized and then different modules can be used, to implement more complex functions.
In addition to calling the model, a module's control can also fetch the control method of another module. This method is generally used for some common page elements, such as printing a search form or printing menus. Code sharing is achieved through mutual calls between controls.
2.6 a simple URL can be obtained without routing configuration
The ZenTaoPHP framework provides a simple parameter transfer method. For example, the user module has a read method that requires two parameters: id and name. The common PATH_INO parameter is user/read/id/1/name/wwccss.html, zenTaoPHP supports the user/read/1/wwccss.html format, thus omitting the parameter name transfer. All of this requires no routing, which can be obtained directly through the functions of the framework.
2.7 flexible data verification mechanism
The Zen-tao PHP framework provides a flexible data verification mechanism to correct and check data. The code is extremely compact and concise.
2.8 configuration and language can be referenced through objects
The ZenTaoPHP framework configuration does not use any INI files, yaml files, or php arrays, but directly uses PHP objects. In this way, the configuration file can be directly used without parsing, and it is very convenient to reference. Such as $ config-> db-> host, instead of $ config ['db'] ['host. The writing will be very smooth!
2.9 convenient global variable Application
In the ZenTaoPHP framework, You can reference global variables such as GET, POST, and SERVER in the following way: $ this-> get-> userName, $ this-> post-> userName, $ this-> server-> remote_addr.
2.10 what you see is API
Under the current trend of open platforms, it is important to have a very good api mechanism. In ZT, each interface can be an api. The api is differentiated by the access extension. For example, if you access user/read/id/123.html, the returned webpage is normal. If user/read/id/123. json is accessed, the returned data is in json format.
2.11 built-in multi-language support
ZT supports multiple language functions and automatically determines the language used based on the information of the current user client. This allows you to develop applications in multiple languages.
2.12 powerful scalability
The ZenTaoPHP framework provides a powerful extension mechanism. Through this extension mechanism, it can be said that custom development is easy, and there is no need to worry about the pain of maintaining multiple branches.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.