Is Python the next PHP? Why?

Source: Internet
Author: User
A few days ago, chatting with a Rails developer who was bullish on python, the reason he was bullish on Python was that PHP ruled today's Web application development. And Python is much like the next PHP.

Reply content:

Python can, why does node. js not, why go can't "next PHP" how to define? Do you mean the popularity level? If so, I don't think Python is as popular as PHP. Root cause in the ease of deployment.

PHP is almost useless at the language level, and the quality of the implementation is poor, but it wins the most deadly deployment: No other language has the same way as PHP for mass deployment. After basically loading the apache/mod_php, the deployment of the PHP application is simplified in order to copy the files. Even for performance reasons such as nginx/fastcgi and other alternatives, the additional work is only the initial configuration. Once the configuration is complete, the subsequent deployment is file replication. After the server restarts, it usually starts automatically apache/nginx,fastcgi manager is responsible for starting the php-cgi process and so on, and the PHP application file-based invocation does not need to worry about more maintenance. This is critical for platforms such as Dreamhost: they typically have a single server that handles thousands of low-traffic users who do not have root privileges to run other processes. PHP scripts have a short life cycle, no resident processes, are terminated after each invocation, and are less demanding for the application author, and do not take much account of resource management issues.

This is a huge difference from the deployment of Python: Most python Web applications like Django, Tornado, etc. all require a separate resident process (Apache/mod_python seems to be a cup). These processes require additional maintenance work to manage their start-up, stop, and additional monitoring processes to handle the restart after an unexpected exit. This requires a deeper understanding of the system by the user. Resident processes need to occupy system memory, and it is often not possible to run hundreds or thousands of applications on a single server, which is not suitable for service providers like Dreamhost to handle simple applications such as WordPress blogs. The resident process also requires the author to have a better understanding of the management of system resources, garbage collection mechanism, etc. to avoid memory leaks, excessive resource consumption and so on. Now the simplest Python Web application deployment should be the app Engine, with a PHP-like life cycle (Request processing 30 seconds limit, timeout is terminated, unable to run the resident process), greatly simplifying the management difficulty, but the country can not access ...

So, to the point of popularity, Python doesn't go beyond PHP, because a huge number of service providers can't support the existing user size with Python. But this popularity does not make sense for startups or professionals. Many of the core network applications are not suitable for the short-term request processing mechanism of PHP (such as quasi-real-time push reminders, web instant chat, etc.), and more appropriate to be handled by the resident process. These are the places where languages such as Python,ruby realize their energies. Python is Python, why the next php? A problem with Python deployment? Python's web App is only a problem in virtual hosting, and other platforms are good.

Now everything is missing, there is no shortage of host, who also use cheap virtual host? I don't think Python can replace PHP at all, at least for now.
The reasons are as follows: PHP is still advancing with the times, and the number and quality of phper and PHP-related programs continues to expand and improve. The important point is that PHP is still constantly maintained and updated, language in all aspects of the continuous improvement and improvement, in this era, is eliminated, has been not with the times and anti-human products python can do a lot of things, such as mathematical calculations, 2d/3d graphics processing, In recent years, many people have thought of Python for scientific research, mathematical calculations, the establishment of a lot of scientific tools, math library, expect Python someday can be like Matlab, Octave, SAGE, Scilab as a powerful and rich computing environment. In the background of Blender, GIMP and other software, Python graphics processing scripts are already playing a more and more important role. If you've seen three of open-source animated films from the Blender Foundation, you can even anticipate the future, and Python will someday be able to move into Hollywood as a tool for digital filmmaking. Different languages have different advantages, their respective areas of expertise are different, just as PHP for the development of long-time mechanism of the program support is not so good, can say is not good, but the web development, fast and agile especially in the PHP body and reflected incisively and vividly. However, Python can be said to be more powerful, not only to do web development, but also to support the development of background data monitoring, web crawling and other long-time applications, as well as data analysis, mathematical computing and other high-end applications. It can be said that each has their own advantages, the development of the choice of the appropriate language can be, to discuss who to replace who, no meaning. Apache does not die, PHP does not fall, it is so simple. Python's strength lies in the simplicity and elegance of the language, as well as its powerful expressive power. Hacker are willing to use Python as a way to express their thinking.
In web development, Python deployment is a problem, as Rio said above, but for commercial web sites, it's not an issue to handle a VPS yourself. The versatility of Python guarantees the completion of a variety of unconventional applications.
Simply put, if you just need web1.0 content to show the site, consider PHP, web2.0, can consider Python, and Ror. In this version of Python iteration speed and forward compatibility, how possible ...
  • 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.