GSoC – Week 12: A week full of Background Studies

A Sudden Break From Coding

After quite a long time, since the start of this year’s GSoC this was a rare week with me spending most of the time researching and studying various ways of tackling XHR requests via Enyo.js in a way that’s compatible with Firefox OS. Essentially, I had to study quite a bit to understand how exactly Web Services work in Enyo and what are the various implementation options available for it.

Using Firefox OS’s systemXHR APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.

For this purpose my primary focus has been on understanding how the enyo.WebService component can be used to perform XHR requests for the Firefox OS app. Turns out, that this is quite an easy implementation for Firefox OS. All that needed to be done was to set the app’s permissions within it’s manifest file as follows:-

“permissions”: {
“systemXHR”: {}
}

Then whenever a systemXHR is to be needed, I would simply add the ‘mozSystem’ attribute to
the XHR instance:-

var xhr = new XMLHttpRequest({
mozSystem: true
})

This pretty much handles the major requirement for such an app for Firefox OS.

Enyo Web Services

Basically enyo.WebService is a component that performs XHR requests; it acts as a wrapper for the Async subkinds enyo.Ajax and enyo.JsonpRequest, using these subkinds internally to manage HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. transactions. Since the WordPress APIs are XML based, the primary focus here is on using enyo.Ajax to retrieve all published properties of the enyo.AjaxProperties object. Hence allowing direct communications to take place via the app.

Current Work Status

I’ve already completed a significant amount of the background research required for the implementation of the XHR requests for the app. However, due to some unexpected personal problems I expect to be a bit slow at work this week, however, looking at the amount of work left, I am pretty confident of completing a basic working version of the app running by the end of the next week.

#firefoxos