
The Story Behind the New WordPress.com - lloydde
https://developer.wordpress.com/2015/11/23/the-story-behind-the-new-wordpress-com/
======
mmaunder
So Automattic, maker of the largest open source PHP CMS in the world has
thrown out PHP in favor of node.js for their own site. And the announcement
has nothing about where this leaves wordpress.org, the open source PHP CMS
that powers 25% of the web.

If they're leading by example, we should ditch WordPress.org and PHP in favor
of node.js web apps and frameworks too, since it's the way of the future?

I happen to wholeheartedly agree. It's just that the developers of the 40,000
plugins who have bet their farms on PHP WordPress might at least want a
clearer indication of what exactly is happening here.

The only thing I could find about where this leaves wordpress.org is buried in
this wired article:

[http://www.wired.com/2015/11/wordpress-com-gets-a-new-
face-a...](http://www.wired.com/2015/11/wordpress-com-gets-a-new-face-and-
joins-the-javascript-age/)

"For the backend code, the team used the popular server-side JavaScript
platform Node.js. For users who host their own version of WordPress,
Automattic will host the Node.js portion of the code on their own server, with
which the Jetpack plugin will communicate, freeing up web hosts from having to
support Node.js."

~~~
rralian
The node.js aspect of Calypso is actually pretty minimal, basically to build
the shell of the web page. WordPress and PHP still power the API behind
Calypso as well as the entire front-end of the site (i.e., what your readers
see when they visit your blog). I don't think either of them are going away
anytime soon.

The .org community (self-hosted WordPress) is also getting serious about API-
based interactions, so this isn't an entirely new direction. I think we'll be
seeing front-end JavaScript becoming more and more important there as well.
There's still a lot to figure out, but I think the open-sourcing of Calypso
that happened today will make it easier to share ideas with the greater
WordPress community.

~~~
rmccue
> The .org community (self-hosted WordPress) is also getting serious about
> API-based interactions, so this isn't an entirely new direction.

Indeed, we're shipping the first half of the core REST API with 4.4 (just
about to hit RC), and the rest in the next release.

~~~
e12e
I just learned about jetpack - does anyone know why the functionality there
requires a wordpress.com account (or rather, are there any efforts towards
being able to self-host that part?)?

In the same vein, the wordpress.com api does indeed appear to be rather well
documented -- shouldn't it be rather easy to implement enough of that to allow
using this new web-app for interfacing with it? (Even if most of the calls
just return 403 or 500 - presumably the app handles that somewhat gracefully)?

~~~
Viper007Bond
> does anyone know why the functionality there requires a wordpress.com
> account (or rather, are there any efforts towards being able to self-host
> that part?)?

The list is long: [http://jetpack.me/features/](http://jetpack.me/features/)
(probably half of those require the connection)

Examples include stats (a pain to scale on shared hosting), related posts
(also known to kill database servers), site uptime monitoring, image CDN
(including on the fly thumbnailing), and so on.

It basically provides the things that you probably don't want to self-host.
You get some of the scaling of WordPress.com while being able to do your own
thing (plugins, custom theme, etc.).

~~~
e12e
Oh, but I could care less about stats, related posts, site uptime -- if I
could get a shiny new ui to do the basics (write posts). That's what I mean -
if all the crap I don't care about could just return 403/500 - how much work
would it be to get the stuff _I_ need to work with the new SPA?

------
drapper
Never mind the product, look at that list of React components
([https://github.com/Automattic/wp-
calypso/tree/master/client/...](https://github.com/Automattic/wp-
calypso/tree/master/client/components))! Any chance this will become a
separate framework?

~~~
rralian
I don't know if I would call it a framework per se, but absolutely we want to
break off individual pieces that can be separately re-used and make them
available for everyone. In the meantime if you see something in particular
that you're itching for, open a new issue and let us know. You may also want
to check out the library of modules here. [https://github.com/Automattic/wp-
calypso/tree/master/client/...](https://github.com/Automattic/wp-
calypso/tree/master/client/lib)

------
armandososa
Matt's post about the same topic: [http://ma.tt/2015/11/dance-to-
calypso/](http://ma.tt/2015/11/dance-to-calypso/)

------
rads
As a developer at Automattic, the most interesting thing about this to me is
that our whole workflow is now public. There are lots of companies that
release their code, but it's rare that they also make their development
process transparent.

------
pan69
OK. So basically this is an Adobe Air-esque app that is a user interface to
WordPress which at the moment only works on Mac.

I'm sorry but I don't really understand what the value proposition here is,
maybe I missed it in the article? WordPress already has a pretty good user
interface, which was build in HTML/CSS/Javascript.

When people complain about WordPress being an outdated architecture it's not
the UI they're referring to..

~~~
jeffgolenski
The desktop app is currently only for Mac, but we're working on other
platforms. WordPress.com, which is a very similar experience, is obviously web
based and can be used in any browser on any platform. This entire upgrade
utilizes the new WordPress rest API and the new WordPress.com is open source.

~~~
pan69
Sorry, maybe my previous comment wasn't very clear, let me try again;

I don't understand what problem this project solves and whom it solves it for.
We can already manage multi-site WordPress installations and usually that's
done by site admins, not the average content Joe, so does it really need a
super fancy new UI?

And what exactly does it mean when you say "WordPress.com is open source"?
Maybe I'm out of the loop but the way I understand it is that wordpress.com is
a hosted (commercial) service of wordpress.org.

My experience with WordPress is not that the UI is a problem at all, neither
multi site management, which I think is in the scheme of things quite niche.
The problem with WordPress I hear other developers complain about is the out
dated PHP system architecture.

~~~
umurkontaci
It exactly means as you hear actually, WordPress.com, as we all know, was
written in React, is now open-source.

In WordPress.com, "average content Joe", can manage multiple sites, including
self-hosted WordPress.org sites (through JetPack plugin).

Disclosure: I'm one of the authors.

~~~
oldmanjay
That's a disclosure, not a disclaimer. Unless you intend to disavow the work.

Sorry, it's my pet peeve. Downvote away!

------
avolcano
This must be one of the largest open-sourced React codebases yet, very cool.

------
Twirrim
> Code reviews were new for many developers — traditionally at Automattic, we
> have had no systematic peer code review system outside of the VIP team’s
> daily code review of client sites.

Wait... seriously? You had _no_ systemic code review until now?

It's not exactly clear what you did by way of code review before, but that
sounds suspiciously close to "almost nothing"

~~~
ofutur
Agreed. Quite shocked by that statement and their development process.

------
opendomain
This is just "Wordpress.Com" in javascript, not wordpress the blogging
software. You have to interface with Wordpress.Com to build your own site. The
code references Node.JS for the server side, but only as a proxy.

~~~
fractalsea
From
[https://developer.wordpress.com/calypso/](https://developer.wordpress.com/calypso/)

"If you run your own self-hosted WordPress site, you can install the Jetpack
plugin to use the Calypso-based editing and management tools."

------
sdnguyen90
Question unrelated to the actual story - is anyone running a WordPress.com
blog as just an API?

I've had a few friends ask me to work on their WordPress blogs but I turn them
down unless they're willing to migrate to something like Squarespace or Ghost.
Most of the time they won't switch because they're used to the WordPress
admin. Being able to just fetch a JSON API would actually make me think about
working with WordPress.

~~~
sondr3
You have both
[https://developer.wordpress.com/docs/api/](https://developer.wordpress.com/docs/api/)
and [https://github.com/WP-API/WP-API](https://github.com/WP-API/WP-API) that
can be used for something like that.

~~~
Viper007Bond
That second link soon won't be needed. WordPress 4.4 will include the
foundations for the REST API directly in core and 4.5 should include the
actual endpoints.

[https://make.wordpress.org/core/2015/09/21/wp-rest-api-
merge...](https://make.wordpress.org/core/2015/09/21/wp-rest-api-merge-
proposal/)

~~~
lucaspiller
I wonder how long until someone writes something not-PHP based that implements
this...

------
msdi
It's a web app too. Wordpress.com has been steadily introducing features
(through Jetpack) that allow you to manage your installed Wordpress instances
- this brings the two together.

So you can login to wordpress.com either via the web, apps, Air etc to
manage/publish to any types of Wordpress installs.

It means that you don't have to use the old wp-admin CMS and can use what
they've now built and released.

------
feketegy
Wodpress.org and PHP won't go away anytime soon, because of the whole
community and plugins.

Wordpress' popularity comes from the plugins, and the WP devs. won't expect
plugin authors to rewrite everything into node.js, that just won't happen
anytime soon.

Although it would be interesting to see how this will affect the client side
code of WordPress. React can be interfaced with any back-end.

~~~
csixty4
> won't expect plugin authors to rewrite everything into node.js, that just
> won't happen anytime soon.

This plugin author says "bring it on" :)

------
vineet
Wasn't Wordpress.com essentially a multi-user edition of Wordpress the open
source project? I am curious if Calypso means fewer releases of the Wordpress
project?

I noticed that some of the docs require a login, for ex:
[https://wpcalypso.wordpress.com/devdocs/design](https://wpcalypso.wordpress.com/devdocs/design)
Anyone know if this is a bug, or part of the new approach?

~~~
Viper007Bond
WordPress.com still is a single WordPress install and all of the millions of
websites are still generated and powered by PHP and MySQL.

The difference is that rather than using the admin interface that ships with
WordPress, we're encouraging usage of this new interface. It still talks to
WordPress via a PHP-powered REST API.

In short, it's a new _interface_ for WordPress, not a replacement for
WordPress itself.

>
> [https://wpcalypso.wordpress.com/devdocs/design](https://wpcalypso.wordpress.com/devdocs/design)
> Anyone know if this is a bug, or part of the new approach?

Bug. That's one of our internal staging sites and the devdocs are stripped
when pushed out to the production URL.

I've opened an issue for you: [https://github.com/Automattic/wp-
calypso/issues/577](https://github.com/Automattic/wp-calypso/issues/577)

EDIT: Not private! Just requires a login from any WordPress.com account.
There's discussion going on on that ticket to move it somewhere that doesn't
require a login but it might not be possible.

~~~
vineet
If it is a new interface for WordPress, then why does it need Node?

Thanks for filing the issue. I will reply there.

~~~
Viper007Bond
As it's REST API powered, it doesn't. It could have been anything we wanted it
to be. We just went with React & co. because we determined it'd be the best
solution.

~~~
Viper007Bond
(seems we've hit max depth)

> So what does the Node powered REST API provide that PHP powered traditional
> Wordpress API does not?

Our REST API is PHP-powered and built on top of WordPress:
[https://developer.wordpress.com/docs/api/](https://developer.wordpress.com/docs/api/)

Calypso is a React-based administration client for that API.

~~~
madeofpalk
What's confusing is that, if the React-based admin client uses an API to talk
to the PHP wordpress site, why involve node.js at all?

As far as I can tell, the node.js portion is just returning an empty
admin.html, and that's where client-side React.js kicks in? It seems PHP would
be able to do that pretty well, with the advantage of single technology and a
more obvious approach for the self-hosted wp.org sites.

~~~
Viper007Bond
My understanding is that the client and server side code is all of the same
thing and Node.js is just used to generate the initial page load with the
client continuing on from there. I wasn't involved with it's development so I
could very well be incorrect.

[https://github.com/Automattic/wp-
calypso/blob/master/docs/gu...](https://github.com/Automattic/wp-
calypso/blob/master/docs/guide/tech-behind-calypso.md)

~~~
madeofpalk
So there are lots of folders and files in their server dir
[https://github.com/Automattic/wp-
calypso/tree/master/server](https://github.com/Automattic/wp-
calypso/tree/master/server) \- but from what I can tell they're not doing
universal javascript with react running on both client and server.

------
debacle
This is a huge deal. WordPress is probably the largest project in a plurality
of projects continually dragging PHP on the ubiquity parade. If they manage to
re-write the front-end as well it could be big.

That said, the plugin ecosystem is pretty massive. I wonder how they plan on
handling that. Hosting, too. This is going to be pretty interesting for
Automattic, PHP, and Node.

------
SFjulie1
It is totally misleading.

At one moment you even dream people understand what was wrong with PHP, then
you see node.js.

------
mulander

      Today we're announcing something brand new, a new approach to WordPress, and open sourcing the code behind it.
      Written purely in JavaScript, leveraging libraries like Node and React.
    

That's their lesson from WordPress?

------
gmays
Isn't one of the best aspects of WordPress the powerful plugin ecosystem that
adds functionality, much of which is in the admin UI? Or am I missing
something?

------
rralian
I'm not sure why the title is referring to Calypso as "experimental." It's the
production codebase.

~~~
lloydde
Sorry, my mistake. WordPress co-founder Matt Mullenweg on his own site
describes it more as the project and the "experiment" behind it.

My understanding is this can be used as an interface to all WordPress blogs.
My take is that although this is acting through WordPress.com as an API
intermediary, it is only steps away from peeling out the whole PHP layer for
these interfaces.

WordPress co-founder Matt Mullenweg described it as:

> At the beginning of last year, we decided to start experimenting and see.

> Today we’re announcing something brand new, a new approach to WordPress, and
> open sourcing the code behind it. The project, codenamed Calypso, is the
> culmination of more than 20 months of work by dozens of the most talented
> engineers and designers I’ve had the pleasure of working with (127
> contributors with over 26,000 commits!).

[https://github.com/Automattic/wp-calypso](https://github.com/Automattic/wp-
calypso)

~~~
rralian
No worries. I just wanted to make it clear this is not a toe in the water. :-)

> My understanding is this can be used as an interface to all WordPress blogs.

Yes, that's correct. It works for WordPress.com blogs of course. But self-
hosted blogs can also make use of Calypso by installing our Jetpack plugin
([https://wordpress.org/plugins/jetpack/](https://wordpress.org/plugins/jetpack/))
which adds some API endpoints that allow Calypso to communicate with the self-
hosted site.

> it is only steps away from peeling out the whole PHP layer for these
> interfaces

I don't think I would go that far exactly. The php codebase is still there,
and users can still use "wp-admin" if they prefer. And the API is also powered
by PHP. But now that Calypso only communicates with a site through the API it
allows us to separate the view logic and focus on making those endpoints as
efficient as possible. I think it's possible the API could be written in a
language other than PHP. But that hasn't happened yet and would be a
significant task.

I should probably mention I am one of the authors, if that wasn't obvious. :-)

~~~
lloydde
> We still have a ton to figure out around plugins, extensibility,
> contributions, Windows and Linux releases, API speed, localization, and
> harmonizing the WordPress.com API and WP-API so it can work with core
> WordPress. Thousands more PHP developers will need to become fluent with
> JavaScript to recreate their admin interfaces in this fashion. I'm also
> really excited to revisit and redesign many more screens now that we have
> this first version out the door.

[http://ma.tt/2015/11/dance-to-calypso/](http://ma.tt/2015/11/dance-to-
calypso/)

------
nanoojaboo
Reading the article once I had no idea if it was a total replacement for the
php codebase, or intended to work along side it.

------
kingkool68
Meh.

------
andhofmt
As far as I'm concerned rails would provide a better ecosystem for
Wordpress.org. Not only is it still used commercially much more so than php in
new ventures, but it forces adherence to good architecture which is key for
something designed to be extendable like Wordpress. Additionally performance
optimization in rails is much easier than php.

~~~
scribu
> performance optimization in rails is much easier than php.

[citation needed]

