WordPress and Node.JS

Czech version: WordPress a Node.JS.

Maybe you noticed today release of WordPress Calypso. It is a completely new administrative interface to WordPress (wp-admin). It is written in Node.JS and React. It’s a downloadable application that can be connected to your own WordPress installation. For full functionality you will need a JetPack plugin. At first look it can seem as weird announcement. What? JavaScript? And an Application?

But to me it seems like a logical step. Let me explain it to you.

Internet is getting slower

In the past you were using servers in your nearby city. But today you access servers that are accross whole continent. And that means higher latency. And latency is bad. Very bad. And whats more the internet is getting less reliable. You use tablet with cellular network instead of a computer connected using cable.

I can recommend you great two articles – 7 Principles of Rich Web Applications and It’s the Latency, stupid (it was written in 1996).

We move all to the client’s browser

As a solution to previous problem we change the way how we develop applications. We don’t write client/server applications anymore. We write standalone applications with ability to work sometime over network.

That means we have to do much more in the browser. And that means being able to work with unreliable network (sometime even offline). That’s also the reason why mobile apps are so successfull.

But desktop apps are harder

If you ever developed a desktop application, you would agree that it is hard. Much harder than simple request/response paradigma of web. You must take care of all the changes of state in memory. If you modified one item, should it rerender the list visible in the background that includes the items? And when? And what if the user cancelled the change? Even Facebook wasn’t able to fix problem with unread message issue.

React makes it simpler

So they developed React and it’s ecosystem. A solution that gives back the simplicity of request/response paradigma. You just rerender the whole page in memory and thanks to React the browser rerenders just what really changed (thanks to Virtual DOM and immutability). And it still works even when some changes come from the server while the user was working.

WordPress has legacy code

WordPress is backward compatible nearly for 13 years. And that is one of their advantages. It just work. Always. But that means they had to trade compatibility with innovations.

Great chance for WordPress

But the user’s expectations are changing. And that is great chance for WordPress to use it for inovation. They separated WordPress and Administration to two separate packages. And API is the glue that allow them communicate together. This allows them to improve the interface of Administration without loosing the compatibility. And every plugin developer will try to support this new interface. Because it will be much better.

And when the adoption of new Administration will be big enough, we can expect WordPress rewrite to Node.JS as well. And the API will be still compatible.

Well played WordPress. Good luck with that!

PS: this article was written in Calypso. It is amazingly fast 🙂

2 thoughts on “WordPress and Node.JS”

  1. Thanks for this great info. My concern is the area of native mobile app like Android app and IOS, is it possible to have self-hosted wordpress websites in native with immediate alert notifications to posts, messages, friendship (buddypress ) right from our mobile phones like other native app open source. I want to know the advancages of this new release in relation to native app everyone is going “native apps” ways.

    1. Hello,

      currently it is not possible. But React as a platform has React Native variant. It can share 90%+ of codebase and you rewrite “just” UI layout for Native. But everything is still in JavaScript. It seems to be the way for multiplatform applications.

Leave a Reply

Your email address will not be published. Required fields are marked *