What are the advantages of Python and PHP in WEB development? Why?

Source: Internet
Author: User
For non-engineers, how to explain to them in a concise way to choose Python rather than PHP?

such as the PM discussion, such as the boss of the meeting suddenly asked, such as the same group members need to occasionally read the code of the question

Reply content:

The so-called glue language is not covered, when you have some of the more wonderful class package to call when you know Python is good. In a server that shares genetic data, there is a random reading of some very exotic genetic files, just Python has a package to achieve this function. The feeling of Python is that you can solve anything. The learning curve is not to say that PHP is the end of the Python, in the end you still need to use the framework. In the social network, when the two twin brothers are still pondering and figuring out how to achieve their exciting grand goal, Zuckerberg took two weeks to really bring this social platform to life.

So my recommendation is: You should continue to discuss, to ponder down.
Very not recommended is, which is fast, which is easier to quickly develop, fast implementation, the vision must be put in the long-term, that. Shall we have a meeting to discuss the discussion? Rapid development of PHP, to do general election pythonphp environment good deployment
Python is more difficult
Language difficulty, almost the Python code style is simple and easy to understand, and the PHP code is a lot of confusion.

Personal feeling easy to maintain is key. Because the cost of software development is mainly in the maintenance above. Compared to Php,python, it can be extended to queues (RabbitMQ), Background processing systems (celery-based), data Mining (SciPy, NumPy), Text Processing (NLTK), System Deployment (Fabric), Monitoring (Supervisord) and so on all aspects, and PHP can only do the web front desk. To see whether the demand is a re-presentation or a heavy business logic, the re-expression of PHP, the heavy business logic of Python can directly let them read the more simple Python code, and PHP code, compared to the former closer to natural language.
Like what
Python:var is not None
PHP: $var!== NULL

One of the reasons Paul Graham in "Hackers and painters" is to advocate Lisp is that it can do the same thing with less code than other common languages. So you can roll out new features faster than your competitors and reduce potential bugs in your code. For the internet industry, fast is a very important thing. It's even more important if it's a small company or a startup team.

Python also has the same advantage. And it is more grammatical than php,lisp easy to learn.

The downside may be fewer programmers with it, fewer companies to recruit it. But what does that matter?



PS: For your boss's question, you can say, I went to the bottom of the question, I was told I know it is written in Python mainly depends on what aspect
    1. Slot PHP $ is not an excuse, I have to use the left Alt map to $ , or right Windows key, no one forced you to press shift+4 every time.
    2. PHP Rich in Chinese information This is no doubt, Python is mostly English, but learning English is not difficult.
    3. PHP is closer to the foreground, but that doesn't mean it can't do background processing.
    4. Web site or PHP used more handy, whether it is a template engine or a variety of frameworks ( personal views ).
    5. The most impressive thing about Python is the fact that strings and arrays of slices are very handy.
    6. Python has a very wide range of applications, and basically the problems I encounter can be solved with python , and the amount of code is much smaller than PHP .
    7. Python Namespaces and libraries are better imported than PHP, and php you can often see very long function names, usually starting with the module name, such as "Mb_".
    8. I personally feel that PHP is better than Python in terms of database query and execution efficiency. (millions data volume tested).
    9. Python2 to Python3 is easy to transition, small and medium-sized projects just take a little time to do.
    10. Since PHP and Python each have advantages and disadvantages, why not use together?

Finally spit the trough, with PHPWrite crawlers are powerless to encounter cookies and sign-in representations.
The above is only a personal point of view, just look.
  • Related Article

    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.