The godfather of the PHP language shot Java: the battle for losing the Web

Source: Internet
Author: User

One of the major language developers after PHP 3, andI gutmans, one of the founders of Zend, recently bluntly criticized the Java language in the blog. He pointed out that the current Java vendor's attempt to provide dynamic language implementation on the JVM is not at all correct and should fully embrace the Standard Dynamic Language.

Due to gutmans's special position, his long article has aroused strong controversy in the technical field. For more information, see Topic 1 and 2 on the TSS.

The following is a compilation version of the full text, which basically reflects the original appearance. The comparison between multi-threaded (JVM) and multi-process (LAMP) in multi-core environments, the comparison of C language ecosystem and open-source languages with languages and technologies of Java and other vendors, it feels very valuable.

Full text

Gutmans recalled a large enterprise-level project that he participated in several years ago Based on IBM WebSphere. Both developers and architects in the project team are outstanding, but the best of them are the toys language when talking with Andi about PhP and dynamic languages. At that time, this was a typical mentality of the Java Community for dynamic languages. However, they ignore the web, so Java EE is not designed to be Web-centric and focuses on enterprise integration, transaction management, and other backend processing. Although Java EE supports Web development through Servlet and JSP, the large companies that master standard development ignore the restful nature of web, still moving towards the general platform.

At the same time, the lamp architecture built on the C language library and tool ecosystem has become the most popular development platform for web programs. The most common language is Php. Because PHP focuses on web development and continues to evolve, it is simply tailored to the Web Model (paradigm) and can quickly and easily solve common web problems, therefore, the largest market share was obtained. According to a survey by ajaxian.com, about 50% of RIA developers use PHP. Due to the popularity of various PHP programs such as WordPress, Drupal, mediawiki, oscommerce, and sugarcrm, this trend is even more obvious.

As most business applications, such as CRM, ERP, reporting, and document management, are turning to the Web, the large Java vendors are aware that, java has little influence on the formation and development of the web model. Therefore, they began to support various standard and non-standard Java Web frameworks (JSF, struts, spring MVC, etc.) to adapt Java to the Web. Although some of these frameworks have achieved some success, they cannot solve the main problem of Java on the Web: due to strict typing and architecture complexity, development time and developer skill requirements are higher, that is, the total cost is not satisfactory.

In addition, big Java vendors want to take up everything. On the one hand, I want to integrate into the web, and on the other hand, I am not willing to give up the billions of businesses I have established on java. Even the widespread popularity of dynamic languages has not significantly changed their behavior patterns. However, with the emergence of Microsoft's ambitious multi-language runtime environment. net, the trend has changed.

Successful dynamic languages, including PHP, Perl, Python, and Ruby, are all written in C, making full use of the extensiveness and depth of the C language library ecosystem. Moreover, they are all community-driven. There is no proper language specification, and development will not be blocked by the company's politics. These languages are developed by the users themselves. They have only one purpose: to get the job done quickly. Therefore, important improvements may be added to the language when the minor version is updated. This agile nature is necessary to adapt to the rapid changes of Web applications.

In addition, the lamp deployment method has significant advantages. In a multi-process architecture, faults in web servers and Dynamic Language Software generally do not cause the website to collapse. Although a process crashes, other web-requested processes can continue to run. This is in stark contrast to software failures, including crashes and deadlocks, in a multi-threaded environment such as JVM. In addition, the ability to recycle processes after a specific time can prevent memory leakage and memory fragmentation. These two common memory problems make the software performance lower over time. When software is updated on lamp, it can be easily and incrementally pushed to the server without lengthy build and packaging. Although sometimes this may cause non-standard and non-strict problems, developers and operators will have a much better time to do so as long as they are correctly implemented.

In contrast, Java vendors are stuck in JVM that is too tightly bound to Java to support a few languages. They did not turn to the loose coupling model of lamp and Java technology that could give their customers the best of both worlds. Instead, they suffered a loss, fearing that they would lose control of the customers and competing to provide dynamic languages on the JVM. Both Microsoft and competitors in Java are implementing their own dynamic language strategy.

Sun is currently investing in jruby and Jython support for its Java EE solution. IBM WebSphere has recognized that the Java EE platform is ineffective in running modern web applications and has invested heavily in Project Zero, this project aims to enable IBM to have a place in the Web 2.0 world. Currently, it supports groovy and PHP. Bea also has some incubator projects, but after Oracle's merger, the results of these projects are unknown. The Project Zero chief architect is one of the first people in IBM to publicly acknowledge that Java is now considered to be a system language and not suitable for building restful web applications. Building a restful web application is the goal of Project Zero. It took more than 10 years for Java bastion hosts to acknowledge that Java's poor return on Web investment. The current trend will allow more customers to make more informed choices. Dynamic languages will be greatly improved. Like the mainframe, Java is already available in enterprise IT and key business applications, so it will not disappear soon. However, in Web applications, the Java language is likely to drop sharply in market share.

The problem is whether the non-Microsoft Web market will adopt the JVM Implementation of Dynamic languages, or the lamp architecture that can accommodate the fact standard implementations of these languages. Although I think customers will be attracted by the former, the mainstream market will choose lamp. The reason is:

1. The standard implementation is updated quickly, while the JVM version is always lagging behind, resulting in compatibility issues. This is similar to the problem that mono cannot keep up with. net.

2. In the initial design of JVM, the support for dynamic languages was not considered. Therefore, it is very challenging to meet actual needs in the visible future. Dynamic features such as closures, indirect method calls, and type juggling are not easy to solve, as can be seen from the comparison between jruby and Ruby C. In addition, whether the hardware manufacturers are interested in keeping up with us remains to be observed. Open-source technology does not have this problem.

3. the scalability of modern web requires more and more processing strength on the web layer. The C-based architecture is more likely to have the most effective interoperability with the underlying operating system (originally primitives), providing an architecture with high efficiency and low memory usage to meet this requirement. High-performance Web servers such as Lighttpd, Zeus, IIS 7, high-performance cache systems such as memcached used by the largest websites such as Facebook, and other performance-critical subsystems such as memory management are examples.

4. multi-core systems are very suitable for the multi-process mode of lamp architecture. As the chip industry now focuses on multi-core rather than hyper-Threading Technology, the advantages of a multi-threaded environment such as JVM cannot be fully utilized in today's hardware. The multi-process approach provides more stability and reliability.

5. Thanks to lamp's simplicity, it has a very low entry threshold for developers and provides great scalability, including large-scale product systems such as Yahoo and Facebook.

All in all, it becomes increasingly clear that dynamic language will gradually become the standard for web development. Microsoft and Java vendors are aware of this trend and are now investing heavily in their respective software platforms to provide solutions. However, because the main dynamic language communities are all in. net Clr and Java JVM software platforms have developed. If these vendors just want to copy successful dynamic languages to their own platforms, they will be in a difficult situation. Some vendors are aware of this situation and adopt some mixed strategies. At the same time, they provide customers with standard implementations of dynamic languages, although they have not yet fully integrated with their solutions. Microsoft's investment in PHP is the same. Sun also began to provide native Ruby and PHP implementations for customers. I believe that although JVM's olive branch to dynamic languages may attract some java customers, it cannot keep up with the pace of developing native dynamic languages in open-source communities. JVM Dynamic Language implementation is not enough for Java vendors to keep pace with the times. They need to fully embrace native fact-standard Community-Driven Dynamic languages.

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.