The use of ZF is equal to the load ZF MVC framework every time, so it is not wasteful, how to deal with

Source: Internet
Author: User
With ZF, it's equal to load ZF's MVC framework every time, which is not a waste
Sorry, I used to be a Java EE, just touched PHP, some things are not too understanding.

Because PHP is not a let that runs in container, it keeps the life cycle of the object consistent with the request, even if it is a session that is implemented in a file that is serialized and persisted to the persistence layer.
Is this understanding right?
Therefore, unlike the Java EE, in the entire container lifecycle, the configuration of the framework can only be read once (similar to Application.ini), the framework of the Master object can be generated only once (similar to zend_application), and in PHP, Each request must be initialized all at once.

Wouldn't that be a question of efficiency? Especially for the ZF framework, it is certainly slower than PHP without framework?
Or do you know what other configuration methods are available to enable the above procedure to be performed only once?

------Solution--------------------
You don't understand it, you understand it thoroughly:)

This is the PHP design, so there is no very thorough way ....
It is precisely because of this design, so this problem is not the effect of the efficiency of imagination so serious ...
(maybe PHP does not behave as well in some cases.)

Specific understanding should be to Zend engine search, but the manual here with blank mainly:(
http://www.php.net/manual/en/internals2.php

Some cache libraries can be improved to some extent, see http://www.php.net/manual/en/refs.basic.php.php

Now there seems to be some experimental PHP variants that try to mimic the Java EE.

------Solution--------------------
Absolutely right

Because of this, PHP can be lap up on any Web server
Any attempt to improve PHP's operating mechanism will reduce the scope of PHP's application
  • 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.