貌似是个误传,wordpress将会全面兼容REST模式,从而使一些新的JS前端特性被充分利用,而不是用nodejs取代PHP。
下面是部分博客节录。
WordPress is not being rewritten in Node.js
Relax. WordPress is written in PHP, but the Calypso admin interface for WordPress is written with popular front end tools like React and Lodash.
This is part of a popular trend – use your server to just give us raw JSON data, and then build your application entirely in JavaScript to consume that JSON data. WordPress essentially becomes an API which you can pull and push data from. This decoupling of the view and the backend logic has let the developers of WordPress move much faster because they don’t have 12 years of PHP view logic dragging them down.
What about WordPress is Node.js?
So, why are we seeing tweets about Node.js? Well, almost all front-end tooling is built in Node.js. Calypso is built with popular node tools like WebPack, Babel, Jade, Uglify, Hot Loader, Marked and over 100 other modules.
This is how the front end space is evolving and frankly I’m glad to see WordPress start using them because its one space we don’t see a lot of people using these tools.
- 上一篇: node.js 怎么请求java后台api
- 下一篇: 返回列表