yaf advantages and disadvantages

In a new php framework to understand, first of all concerned with the performance of yaf , followed by the security elements, etc., various php framework, performance is not the same. Yii ci and performance of currently used is also good, after understanding yaf and found that their poor performance in the galaxy. yaf today to talk to me I think the advantages and disadvantages of the following excerpt from the official website, the difficulty is actually its shortcomings, the feasibility of course, a little bit of his.

1.1. Yaf features

In the other written in PHP PHP framework than words, Yaf is the second layer of the realm sword. Framework is not in your hands, and now PHP framework emerging in PHP "heart" in which there were many good frameworks, such as Zend official support of Zend framework, Yii, ci and so on. but in this framework also resulted in many of the company within the framework of a variety of business products. the difference between these frameworks, will result in a variety of versions of the library, framework agreement, specifications ,,,, so why not now open source community with a mature framework for PHP extensions developed it?
Difficulties with PHP extensions written PHP Framework
  1. Difficult to develop. To complete a PHP extension PHP framework, there is need of C background, PHP extensions development background, but also have experience in the design PHP framework.
  2. Target user N group. Now many domestic small and medium sized stations are using virtual host, and can not arbitrarily add an extension to PHP, so most of these are small and medium enterprises, individual users can not use the blog.
  3. High maintenance costs. To maintain PHP extension, not only need to be proficient in C development and debugging, but also proficient in Zend API, and upgrade and maintenance cycle will be very long.
That being so, why use PHP development framework to expand it, or that it feasible?
PHP framework written in PHP extension feasibility
  1. The expansion logic is relatively stable, generally not easy to change. Abstract them out to achieve with the extension, no additional maintenance burden.
  2. Logical framework complex, time-consuming and memory self-test are more impressive, but if the extension is implemented, will be able to significantly reduce this part of the depletion of resources.

1.2. Yaf advantages

  1. With C language development PHP framework, compared to native PHP, almost no additional performance overhead.
  2. All the framework classes, do not need to compile, load when PHP starts up, and permanent memory.
  3. Shorter turnaround memory, improve memory utilization, reduce memory usage.
  4. Smart loaded automatically. Global and local support two kinds of load rules to facilitate library sharing.
  5. View high-performance engine.
  6. Highly flexible and scalable framework to support custom view engine that supports plug-ins, support for custom routing, and so on.
  7. Built-in variety of routes can be compatible with the current common routing protocols.
  8. Powerful and highly flexible configuration file support and support for cache configuration file, to avoid performance losses caused by complex configurations.
  9. In the framework itself, the dangerous habit of doing a prohibited operation.
  10. Faster execution speed, less memory footprint.
In fact, the simple to the point, I think it is a little yaf greatest performance, this is not an ordinary faster performance than other php frameworks ten times faster, and native php difference is not very much. Disadvantages are also obvious, after all, is an extension of C, if there are loopholes in the program, the author is not up to date, in case you do not know C, you can only look at the site insulted or prayer, or close the site. Reprinted please specify from op Victoria lifetime : http: //www.ttlsa.com/html/3369.html

Reproduced in: https: //my.oschina.net/766/blog/211414

Guess you like

Origin blog.csdn.net/weixin_33757911/article/details/91548382