Get your team started on a custom learning journey today!
Our Boulder, CO-based learning experts are ready to help!
Get your team started on a custom learning journey today!
Our Boulder, CO-based learning experts are ready to help!
Follow us on LinkedIn for our latest data and tips!
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.
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
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:
{
"foo" : "bar",
"baz" : "qux"
}
Set up and use a request utilizing Ajax
amplify.request.define( "ajaxExample1", "ajax", {
url: "/myApiUrl",
dataType: "json",
type: "GET"
});
// later in code
amplify.request( "ajaxExample1", function( data ) {
data.foo; // bar
});
For more information read the Request documentation.
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:
amplify.store( "storeExample1", { foo: "bar" } );
amplify.store( "storeExample2", "baz" );
// retrieve the data later via the key
var myStoredValue = amplify.store( "storeExample1" ),
myStoredValue2 = amplify.store( "storeExample2" ),
myStoredValues = amplify.store();
myStoredValue.foo; // bar
myStoredValue2; // baz
myStoredValues.storeExample1.foo; // bar
myStoredValues.storeExample2; // baz
For more information see the Store documentation.
The core of Amplify provides a pub/sub system.
Example
amplify.subscribe( "dataexample", function( data ) {
alert( data.foo ); // bar
});
//...
amplify.publish( "dataexample", { foo: "bar" } );
For more information see the Pub/Sub documentation.
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.
Customized Technical Learning Solutions to Help Attract and Retain Talented Developers
Let DI help you design solutions to onboard, upskill or reskill your software development organization. Fully customized. 100% guaranteed.
DevelopIntelligence leads technical and software development learning programs for Fortune 500 companies. We provide learning solutions for hundreds of thousands of engineers for over 250 global brands.
“I appreciated the instructor’s technique of writing live code examples rather than using fixed slide decks to present the material.”
VMwareThank you for everyone who joined us this past year to hear about our proven methods of attracting and retaining tech talent.
© 2013 - 2020 DevelopIntelligence LLC - Privacy Policy
Let's review your current tech training programs and we'll help you baseline your success against some of our big industry partners. In this 30-minute meeting, we'll share our data/insights on what's working and what's not.
Training Journal sat down with our CEO for his thoughts on what’s working, and what’s not working.