some gossip
First of all, the original intention of this writing. I've got a blueprint for Zend Engine 2.0. It's been a while since I read the impulse to write a review--because according to the documentation, the next generation of PHP will be a language that is more in line with the existing object-oriented development habits, at least with more object-oriented features. But the question is whether a language such as PHP, which is the initial goal of web rapid development, is worth decorating itself with. This question seems to need some comment articles to discuss, and I would like to make my own point of view. But then some busy things will this impulse a little bit back to the belly, until the recent period of time to think again, so I read a few times design blueprint document, hence this article. (When I got this English document, I also have the plan to translate this blueprint document into Chinese, but considering that one is not the final blueprint, the second is that we should cultivate the habit of reading the original text directly, and the third is that translation will inevitably bring some obscure places, so I have to give up temporarily. However, when written in this article, or decided to "risk" translation once, can not accurately convey the place also ask you to correct. )
The second is an explanation of the focus of this discussion-in this commentary I will comment mainly on object-oriented features that will be greatly enhanced in future PHP. If you're a PHP developer, then I guess you should be aware of some of the object-oriented features of the PHP language, but due to the fact that PHP is used for "extreme rapid development environments" (a term I've sporogenous myself, it's a case of some customer-oriented website development, The feature is that the duration is very short and customer requirements are not very clear, so the real large number of developers using its object characteristics and development projects are not many, in addition, the existing PHP object model relative to C + + and Java weaknesses, but also limits the use of this feature. In future versions of PHP, however, the focus is on the object-oriented model of the language, perfecting many of the undesirable features in the existing version and adding other features. So discussing the future of PHP is focused on the object-oriented nature of PHP.
Okay, let's get to the point and see what's new with Zend Engine 2.0.
inductive zend Engine 2.0 Design Blueprint (draft)
It is clear from the blueprint (draft) that the next generation Zend engine is based on a new object-oriented model. If you've ever used the object-oriented nature of your existing PHP 4, you might find it a little awkward to look at a bit of Java or C + +-not only in the lack of object-oriented syntax, but sometimes in unexpected results-all because of the existing PHP support The less graceful object-oriented model of the 4 Zend Engine 1.0.
In short, the next generation of Zend engine will move closer to Java, drawing heavily on its object-oriented model. From the type of improved features, it should be divided into three categories: the first class is the improvement and enhancement of the existing object-oriented model, including the definition of builders and destructors, the addition of private member variables, static member variables, multiple inheritance, overload and other object-oriented features, the second is to control the flow of changes and additions and deletions, such as the addition of the form of try/catch/throw violation of the mechanism; the third class is about function modification and additions and deletions, such as the increment function for the string offset. (For each class of improvement details, you can refer to the documentation listed in the Resources section.) As you can see, with the first and second classes of improvements, PHP is gradually refining itself into a language with object-oriented features.
But the problem is precisely the result:
On the positive side, the language of object-oriented features is more popular in today's programming world (even though the language itself is not built on an object-oriented basis, but by increasing the number of defined objects so that the language does not fall behind the tide)-in this sense, Zend Engine 2.0 makes PHP's object-oriented support from today's exploratory contact to the future of comprehensive advocacy, it seems more in line with the trend of programming language development; In addition, in the construction of enterprise applications (which is now often criticized by PHP), the use of object-oriented approach to modeling and implementation is already a de facto standard, This improvement in PHP may cater to this need and address the weaknesses of the language itself.
On the negative side, it doesn't make sense to dedicate a new version of PHP to developers that is more Java-like. PHP is widely used for reasons, in addition to source open and cross-platform, and so on, to adapt to the Internet station building simple, fast Web programming features I am afraid it is also important. Very short study time, friendly language style (especially if you are familiar with C) and a large number of expansion of the class library function is strong enough to prove it, but if the next version of such a language is transformed into a similar object-oriented language, not only will the original large number of developers in a short period of time, And it's very bad for attracting new developers-since there's a language like Java, why learn PHP?
The above is my own "objective" analysis-the so-called "objective" is to write positive aspects of the time to disguise themselves as a Zend Engine 2.0 loyal supporters, and in writing negative aspects, it is the opposite (I hope you after reading my analysis can also be considered objective). But "objective" is actually just for my "subjective" argument play a role in the cushion-
What do we expect PHP to be like in the future?
In fact, the crux of the problem may lie in which direction we expect PHP to go, or where PHP will work.
PHP is so popular, especially with virtually no commercial support (Zend is now supporting PHP, but its strength is negligible compared to Microsoft and Sun.) ) becomes a programming language capable of competing with ASP and JSP because it is fully oriented to the reality of a fast web programming environment. This is clearly seen in many PHP tutorials-implementing some commonly used Web features, using PHP often means less code and complexity, and for programming in a particular area, PHP has extensions for functions that are available (although without commercial support, But PHP has many supporters of open source software, which not only contribute to the generation and development of PHP, but also provide various extension module functions. , so that for developers, more immediately available and free libraries mean less work, all that needs to be done is to consult the function manuals and use them properly. and PHP's rivals, there are some "academic"-inflexible and rigorous, perhaps the product of large commercial companies in the ease of use is indeed less than the pride of hackers.
However, in order to adapt to the reality of the fast Web programming environment, PHP in the focus on ease of use when the time to give up something: such as the developer's own module authoring and encapsulation (non-source level), and object-oriented features (the existing version just does not fully support part of the feature), and so on--and the lack of these PHP is what its competitors have (such as ASP can communicate with COM components, JSP can easily use Java beans , JSP is derived from Java, a completely object-oriented language, and so on), so PHP is often excluded from building a candidate list for enterprise applications.
The core of the problem has been clearer-the current development of PHP has encountered a fork in the road: is to continue to its own fast Web programming language features to play the most thoroughly, or to improve themselves, to adapt to a serious business environment needs of the programming language? 1
http://www.bkjia.com/PHPjc/446695.html www.bkjia.com true http://www.bkjia.com/PHPjc/446695.html techarticle Some of the first is the original intention of this paper. I've got a blueprint for Zend Engine 2.0, and I've had the urge to write a review after reading it-because ...