Wordpress is one of the greatest things to have happened to the world wide web. About 25% of all the sites existing on the internet run on wordpress. It is in fact by far the most widely used content management system.
view source
Its no wonder that most web designers and developers alike make use of this awesome platform to build almost anything.
Its no secret that wordpress started out as a blogging platform meant only for showing the feed of a blogger. However, the reason wordpress became so popular is because it grew!!
Wordpress transformed from that poor little blogging platform to a full blown CMS that can support almost any type of website imaginable.
Part of this improvement in standard was the addition of the WORDPRESS REST API
The REST API came as a savior to developers who wanted to extend their applications beyond the scope of their primary url (as was necessitated by growing need for interactivity of applications).
The WordPress REST API provides API endpoints for WordPress data types that allow developers to interact with sites remotely by sending and receiving JSON (JavaScript Object Notation) objects
https://developer.wordpress.org/rest-api/
However, since its incorporation into the platform a few years ago, there hasn't been much improvement to the state of the API.
My Observations
After working with the wordpress API for quite some time now, here are some few things I noticed using it:
- It returns too much information in just one call. A simple call to the ../wp-json/wp/v2/posts returns a ton of JSON objects and strings that can literally blind a beginner and probably make him give up on coding entirely. The downside to this is the response time. The wordpress API takes a fairly longer time to respond than should be (considering the little amount of information the user is actually going to need)
how gruesome the returned JSON looks on chrome
Even after it returns, there are too many redundant arrays in the result.
A more refined look of that same JSON on mozilla
Here, we see the first post array has an element "title" which is an array and contains just one element "rendered" which is totally unnecessaryThe API Restpoints are left open by default! This, I feel is a major issue that needs to be fixed. Innocuous website owners that have no idea about what an API means have their data floating all over the internet by default and can be used by anyone. It shouldn't be.
Fairly difficult to customize. Except one is a badass oldtime kickass software developer, it is super difficult to understand and make any tangible modification the way the API should work.
Suggestions
The will suggest that more REST endpoints be added to the wordpress API so that users can pinpoint and narrow down their API calls to the specific data they need. This would improve the response time of the API call.
Irrelevant arrays and trees should be removed from the JSON response structure. This will help reduce the stress on developer that otherwise would have written slightly longer lines of code to access those inner layers.
The API endpoints should be left unaccessible by default, seeing that most people who use the wordpress platform are non-coders nor developers. On the contrary, website owners who want to make use of the REST API would have to enable that feature.
The code should be made easier to understand. At least by average developers. More tutorials should be made (video tutorials especially, as those tend to be more interactive)
I really do hope these points would be taken into consideration by the wordpress development team.
It really is time for the WORDPRESS REST API to take the next step in advancement.
Looking forward to v3!!
Go Wordpress!!!
Posted on Utopian.io - Rewarding Open Source Contributors
Hey @johnesan I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Nicely written... I've used WordPress for over 5year now. Will embrace the API capabilities
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Nice
Nice one
Congratulations! This post has been upvoted from the communal account, @minnowsupport, by johnesan from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP. Be sure to leave at least 50SP undelegated on your account.
@OriginalWorks
The @OriginalWorks bot has determined this post by @johnesan to be original material and upvoted it!
To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!