Red Hat
Jan 30, 2013
by kborchers

As we approach the 1.0.0-M3 release of AeroGear.js (and the 1.0.0-M8 umbrella release of AeroGear), I just wanted to highlight some of the newest editions to the library as well as a new tool to help you get the AeroGear you need for your project.

The biggest update since M2 is the addition of handling paged resources via Pipeline. Now, if the REST endpoint your pipe is interacting with can page the data into smaller chunks and give you information about how to get to the previous and next pages of information, Pipeline can help you easily make those page transitions.

A pipe can be configured to use one of three paging methods. This means that whether the server passes the paging information back to the client via Web Linking headers (default), custom headers or in the response body, Pipeline can handle it. Once you receive a paged response from the server, Pipeline adds a couple of methods (next() and previous()) to the array of data returned. So when you’re ready for more data, it’s as simple as calling .next() and providing callbacks to be run when the next set 0f data is returned.

To get more information about paging with AeroGear.js, specific API documentation and examples check out the following links:

The other big item coming in M3 is a custom download builder. Backed by a node.js app running on OpenShift, you can now build and download a custom version of AeroGear.js from the website. This means you can select only the pieces you need, and our custom grunt build will only combine the dependencies needed for the functionality you want. Though AeroGear.js isn’t a large library now, as it grows this will be a very useful tool to help our users keep their file sizes down. A big shout out to Lucas Holmquist (@sienaluke) for his work on this awesome new tool!