Advanced REST Client blog
Blog for Advanced Rest Client - a Google Chrome application.

Background page for Advanced Rest Client

Hi developers.
Greetings from Googleplex - just befor Google IO ;)

Today I've noticed that you asked me hwy the application use background page. Yes, there are event pages that don't require consistent presence of the application process but it just don't fit.

To know what exactly background page do refer to source file and previous article about ARC API.
Earlier I introduced an API for Rest Client. Now other extensions can cooperate with application - they can run an application with predefined values (like URL, payload, headers list). To make it possible I have to implement handlers for message passing (either for cross-extension communication and for web intents). It require to initialize background page. Without it the application have no place to initialize handlers without actually running the app.

Furthermore, GWT (Google's framework used to develop the application) is not ready to be used with Chrome extensions/applications. Thanks the background page I can actually develop the app using Chrome API (which is required). Without it developing the app would be extremely difficult.

You may have concerns about memory and starting up Chrome itself. Well, there is actually really little code in background page. Most of the function in background page are used when you making a request. It's do nothing when you are not using the app. But still I need to have it loaded in case if related from ARC app would like to use it.

If you have a question post it in an comment. I'll answer you. You may also report an issue if you find one.

Happy RESTing ;)