1024px-Flatirons_Winter_Sunrise_edit_2

Today we are proud to release the beta version of Amplify, a component library designed to solve common web application problems with a simplistic API.

You can download the beta from Amplifyjs.com.

A changelog from the alpha version is available.

What is Amplify?

Amplify is a set of components designed to solve common web application problems with a simplistic API. Amplify’s goal is to simplify all forms of data handling by providing a unified API for various data sources. Amplify’s store component handles persistent client-side storage, using standards like localStorage and sessionStorage, but falling back on non-standard implementations for older browsers. Amplify’s request adds some additional features to jQuery’s ajax method while abstracting away the underlying data source.

Here’s a crash course in what Amplify offers.

Amplify Request

amplify.request is an abstraction layer that can be used for any kind of request for data. amplify.request sets out to separate the data retrieval and caching mechanisms from data requestors.

Using the amplify.request.define function you can create and maintain your entire server interface and caching policy in a single place, reducing the impact of any server interface changes. Components that need data can retrieve the data through amplify.request without concern for data caching, server interface, location, data types, wrappers, and all the other specificities of the client/server interaction.

Example

The example assumes that the request location returns the following as json:

Set up and use a request utilizing Ajax

For more information read the Request documentation.

Request Store

amplify.store is a wrapper for various persistent client-side storage systems. amplify.store supports IE 5+, Firefox 2+, Safari 4+, Chrome, Opera 10.5+, iPhone 2+, Android 2+ and provides a consistent API to handle storage cross-browser.

amplify.store is meant to allow you to utilize all the latest storage technologies for those browsers that have them, while gracefully degrading for those without support. amplify.store allows you to be passive or explicit in the storage technologies used. With no storage type explicitly specified, amplify.store will go through a series of technologies and pick an appropriate storage technology through feature detection. amplify.store also handles serializing to and from a JavaScript object using JSON serialization where necessary.

Example

Store data with Amplify storage picking the default storage technology:

For more information see the Store documentation.

Amplify Pub/Sub

The core of Amplify provides a pub/sub system.

Example

For more information see the Pub/Sub documentation.

Getting Involved

We encourage everyone to participate, provide feedback and help us test. You can find out how you can help over at our Community page.

We look forward to your feedback during this beta period.