Background language is much more. In terms of choice PHP vs. node. js, want to ask for advice. Node has a tendency to rise, just as before, less people get involved in the programmer's career, so knock code.
Reply content:
In terms of evolution, JS faster than PHP,ES6 has not been popularized, all began to ES7, grammar changes too much, three days do not write to keep up, node faster, a version of the day, express more extreme, find a sample of last year's code can not run, a lot of changes.
PHP is not language design, there is no beauty, write more, even a little want to vomit, but PHP is pragmatic, can caller Ah, caller fast Ah, node. JS does not say that JS callback can not adapt to (Promise), callback in the exception capture and so on, but JavaScript is not for the web, the lack of writing the web is a lot of things, such as sprintf No, strftime No, Strtotime no, The even get Timestamp is parseint ((New Date ()). GetTime ()/1000), template parsing is not, of course, these can rely on third-party packages, the result is to write a small thing, everywhere is require.
PHP is much simpler, basically you need to have built-in functions are, in practical terms, node is much worse. Does the Lord want to play for himself or to make a living?
Take it and play it right here and continue to see the answer.
Looking for a job to pull a check to see if nature has an answer. It is also very distressing to learn a good technology and then not have an offer. Wrote 7 years php,5 JavaScript, let me choose from scratch, I choose JavaScript.
The reasons are as follows:
PHP is still just a WEB back-end language, JavaScript is already a full-stack language (web, desktop, mobile, embedded, database, etc. have important applications), if the programming language is an investment, JavaScript long-term return higher.
PHP is still primarily an OO language in the real programming environment, and multi-paradigm applications in JavaScript scenarios are ubiquitous (oop,functional,event driven,declarative programming, etc.), Learning JavaScript can open your mind.
Web development Inevitably is full stack development, when you need to do the front-end, JavaScript is the only target language.
JavaScript's toolchain is more flexible than PHP, iterations are faster, community support is better (PHP's core community is much smaller), and what PHP can do is not yet found to be V8 by JavaScript. It's Haskell, of course, and even the PHP-writing companies like Facebook are starting to use Haskell to process some high-performance services.
Frequently Asked Questions:
One, Haskell minority, career choice is not many.
A: Learning Haskell minutes to node. JS is not a problem.
Second, learning will not do?
A: First of all, you have to try to know the IQ is not enough. Secondly, you can also refer to other answers under this question. See the answer is useless, everyone will recommend his heart of the artifact, but actually with too strong subjective performance, which is unavoidable, because there is no proficient in all languages, I feel CPP JS these four languages enough. Small and medium projects. The rails.
PHP code ugly, node. js play can, really do project headache.
Only rails, writing web projects like flowing clouds. Have the development efficiency that small and medium-sized enterprises must start quickly.
Ror is also the first choice for start-up companies abroad. For example: Twitter Airbnb 500px Kickstater Square Hulu Producthunter et cetera
A variety of powerful gems, such as login management devise, image upload management papaerclip, role Rights Management cancan and so on. The ability to make a general programming language 3 days and 5 days is done in rails for a few minutes.
A project that needs to be written to despair in PHP and Python may be done in one months with rails. Look at the picture. The language is on GitHub, JavaScript is still a little bit lighter than PHP.
There's either a community or a father.
In the father's side, Java, C #, Golang better. Java has ORACLE/IBM and other manufacturers support, C # has Microsoft support, Golang Google support, are powerful companies. PHP barely can count dad, after all, there are zend/facebook/sina and other companies to support and use. node. JS is a thing to forget.
In the community, Java, C #, PHP, Python is better, Golang development speed is relatively fast. Feel PHP is still in the upward trend, in the celestial PHP first estimate 10 years no problem, not to mention PHP to 7 of the main job search, or PHP bar, do not listen to the trick to learn the small crowd technology.