Which of the following advantages does Python and PHP have in Web development? Why?

Source: Internet
Author: User
For non-engineers, how do I explain to them how to select python rather than php? For example, when asked during the PM discussion, for example, the boss suddenly asked during a meeting. for example, if the members of the same group need to read the code occasionally, how can we explain to them in a concise manner how to select python rather than php?

For example, when asked during the PM discussion, for example, the boss suddenly asked during a meeting, for example, the members of the same group need to read the code occasionally and reply to the question: the so-called glue language is not covered, you will know Python when you have some amazing class packages to call. I am working on a server that shares genetic data, and I want to randomly read some amazing genetic files. I think Python has a package to implement this function. You can solve everything in Python. In terms of the learning curve, PHP is not just an example of Python. You still need to use the framework at the end. In social networks, when the two twin brothers are still thinking about how to achieve their exciting ambitious goals, zuckerberg took two weeks to implement the social platform.

So my recommendation is: you should continue to discuss and think about it.
Which of the following is not recommended? which one is faster, which is easier to develop and implement quickly, and the vision must be put into the long run? So, let's have another meeting to discuss it? Select php for quick development and make the pythonphp environment well deployed.
Python is hard
In terms of language difficulty, almost all Python code styles are concise, easy to understand, and easy to maintain, and PHP code is messy when there is a large amount of code.

The key is to make personal feelings easy to maintain. Because the current cost of software development is mainly maintained. Compared with PHP, Python can be naturally extended to the queue (RabbitMQ), background processing system (based on Celery), data mining (SciPy, NumPy), and text processing (NLTK), system deployment (Fabric), monitoring (Supervisord) and other aspects, and PHP can only be used as the front-end page. It depends on whether the requirements are re-presentation or re-presentation of business logic. if the re-presentation is php, python can directly let them read simple python code and php code, the comparison shows that the former is closer to the natural language.
For example
Python: var is not None
Php: $ var! = Null

One of the reasons Paul Graham argues for lisp in hacking and painter is that it can implement the same functionality with less code than other common languages. So you can launch new features faster than your competitors and reduce potential bugs in your code. For the Internet industry, speed is very important. It is even more important for small companies or entrepreneurial teams.

Python has the same advantages. In terms of syntax, it is easier to learn than php and lisp.

The downside may be that there are fewer programmers who use it, and fewer companies are recruited. But what does it matter?



Ps: For your boss's questions, you can say that I have gone to Zhihu and asked them, and they told me that they know what they are writing in python.
  1. TucaoPHPOf$It is really not an excuse. I use left alt to map$Or the right windows key, no one forces you to press shift + 4 each time.
  2. PHPRichChineseThere is no doubt about the information,PythonMost of them are in English, but it is not difficult to learn English.
  3. PHPIt is closer to the front-end, but this does not mean that it cannot be processed in the background.
  4. Website creation orPHPIt is easy to use, whether it is a template engine or a variety of frameworks (Personal opinion).
  5. PythonWhat impressed me most is the string and array slicing, which is very convenient.
  6. PythonIt has a wide range of applications and can be used in most of my problems.PythonAnd the amount of code is farPHPLess.
  7. PythonThe import of namespaces and libraries is better than that of PHP.PHPYou can often see a long function name, usually starting with a module name, such as "mb _".
  8. MeIndividualsThinkPHPDatabase query and execution efficiency is superiorPython. (Millions of data records have been tested ).
  9. Python2 to Python3It is easy to transition. Small and medium-sized projects only need to spend some time.
  10. Since PHP and Python have their own advantages and disadvantages, why cannot they be used together?

// Finally, use PHPWhen a crawler encounters a Cookie or login, it cannot do anything.
The above is my opinion. just take a look.

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.