XML/JSON Output Format

ibnesayeed

Well-known member
I wanted to create some JavaScript rich (thick client) applications on top of XenForo for managing multiple forums (once RTL support is there). Then I realized that I need to write modifications for various resources as illustrated in "XenForo AJAX Tutorial" to output only JSON data free from any HTML template. I think it will be really nice if we get responses from XenForo engine natively in machine friendly formats as well along with the human readable HTML output. I would personally prefer JSON but adding XML too will be added sugar. It will enable cross-site communication and aggregation for XenForo powered sites.

URL formats can be something like this:

http://xenforo.com/community/find-new/threads.json
http://xenforo.com/community/find-new/threads?_format=json

(Notice, we need to consider redirects also)

PS: I think, I should have posted it in the feature request section. But it feels more of a concern for developers. So I am posting it here, feel free to move it to another forum.
 
Tapatalk API would be ideal for this :)

I think we don't need to rely on third party services, there might be some privacy concerns as well. In fact XenForo MVC architecture is so clean and well written that various output formats are expected from the core library itself. I know that JSON is in the blood of XenForo, it is just a matter of exposing it.
 
I think we don't need to rely on third party services, there might be some privacy concerns as well. In fact XenForo MVC architecture is so clean and well written that various output formats are expected from the core library itself. I know that JSON is in the blood of XenForo, it is just a matter of exposing it.

It's not as simple as you're making it out to be.

The Tapatalk API is both well documented and perfect for the job, plus you would automatically have support for other forum systems.
 
It's not as simple as you're making it out to be.

The Tapatalk API is both well documented and perfect for the job, plus you would automatically have support for other forum systems.

In my opinion, it is not very complex either. What I understood XenForo architecture so far, it makes JSON object first then wraps HTML markup around it. What complexities do you think there might be other than adding some conditionals and thorough testing of course? I am not much into PHP coding nowadays but I develop JavaScript rich Rails applications more frequently. So, I add HTML, JSON and XML output support in almost every application for SEO, AJAX and Cross-Site communication respectively.

Being a Digital Library researcher, I strongly feel the need of better machine readability in next generation web applications, without the help of any third-party service. And XenForo is no exception. :)

Lets see what Mike and/or Kier think about it.
 
Give Tapatalk API a try - we have spent tremendous effort in documenting every single details of the XMLRPC based interface we uses and has proven to be very usable by other third party developers. If you are concerns of the "third-party", we are probably the most committed third-party you can get as the same API already works on more than 5 different forum systems. (y)
 
Give Tapatalk API a try - we have spent tremendous effort in documenting every single details of the XMLRPC based interface we uses and has proven to be very usable by other third party developers. If you are concerns of the "third-party", we are probably the most committed third-party you can get as the same API already works on more than 5 different forum systems. (y)

It's not about saying NO to "third-party". We all know this forum software (or any other well written web application) is simply a structure of DATA and its RELATIONSHIP processed through authentication and access layers. In the next step presentation layer comes into picture. My concern is simple, if presentation free layer is already there in the system then why do we need external service to expose that? This is post-web 2.0 era and now machines tends to consume web applications more than humans.
 
It's not about saying NO to "third-party". We all know this forum software (or any other well written web application) is simply a structure of DATA and its RELATIONSHIP processed through authentication and access layers. In the next step presentation layer comes into picture. My concern is simple, if presentation free layer is already there in the system then why do we need external service to expose that? This is post-web 2.0 era and now machines tends to consume web applications more than humans.

The vast majority of output from XenForo is only HTML and developing the Tapatalk plugin required significant rewriting of controller and view code.

The code for outputting in alternative formats simply isn't there, and it is far from trivial to add it.

Really there is no choice other than to use an existing API plugin or develop your own. Tapatalk if you want XMLRPC and an open+well-documented API or Forum Runner for (iirc) JSON.
 
I understand where ibnesayeed is coming from - there are a lot of things that can be simple and seems just need one more minor effort to get there, but it may never get there for various reason. I can imagine it takes effort to develop and may not be used by a lot of ordinary forum owners who don't write application / integration. And the on-going cost to support the API if things break etc (it's a pain, we know..).

Good luck and hope xenForo will have an API too!
 
Top Bottom