5 ms·
Wordpress (yes I know) has a pretty robust JSON API plugin[1], which is being rolled into core as of the next release (4.4). This means it's dead easy to have a
by jwarren 11y ago
Wordpress (yes I know) has a pretty robust JSON API plugin[1], which is being rolled into core as of the next release (4.4). This means it's dead easy to have a familiar CMS experience and then pull out the data in whatever way you want.
There are plugins available for other CMSs[2] which do pretty much the same thing too.
[1]: http://v2.wp-api.org http://v2.wp-api.org
[2]: https://github.com/pixelandtonic/ElementAPI https://github.com/pixelandtonic/ElementAPI
- jontro 11y agoWe have been using wordpress as a cms with their xmlrpc api since at least 2010. Works great and is easily extensible using hooks. Front end written in java.
- mtbcoder 11y agoYou are still dependent on XML-RPC, which has its own overhead issues, and PHP/Wordpress though.
- mtbcoder 11y agoI don't think this is what the OP is advocating since a major caveat with the Wordpress API plugin is that you are still tightly coupled to PHP and Wordpress. This is simply due to the poorly designed database schema and how Wordpress "renders" posts. I can't simply use Wordpress as a generic CMS, as post data is still dependent on Wordpress to render.
- jwarren 11y agoUnless I'm misunderstanding something, it's not rendering any views, it's returning queried data. I guess you could call the JSON a rendered view if you wanted to. Are you concerned about being coupled to the particular shape of the returned JSON? That seems valid to me, especially if you're not very fond of the schema. I wouldn't advocate for WP for anyone continually developing an evolving product, but for small business clients it's not bad. It's easy to use and familiar, which goes a long way.
- morgante 11y agoI disagree with the notion that the WordPress REST API plugin is "robust." Having developed on it several times, it really doesn't live up to the standard set by great APIs and has a lot of missing components. Having a great JSON API baked into the core and dogfooded for the admin UI should really be a focus for WordPress.
- jwarren 11y agoThe JSON API is getting baked into the next core release, and dogfooding it is (afaik) on the medium-term cards. Have you tried version 2? Personally I found it substantially easier to work with than v1.
- morgante 11y ago> The JSON API is getting baked into the next core release, and dogfooding it is (afaik) on the medium-term cards. Awesome, that's great to hear. > Have you tried version 2? I've actually worked with both versions. v2 is nicer but also didn't support some required functionality at all.