Wijmo UI for the Web
Breeze.js
Show AllShow All
Hide AllHide All
Using Wijmo with Breeze.js

Wijmo now supports Breeze.js, a JavaScript library that helps you manage data in client applications. This library allows you to store data in a relational database, query and save that data, and share that data across many screens of your JavaScript client. Breeze.js dynamically creates business data objects whose properties bind to UI controls. This allows the UI to update when the data model changes so that each object knows when it has changed and what has changed. You can also query in a JavaScript query language, save a single entity or a batch of entities, cache data on the client, and extend the model with custom methods, properties, and events.

Breeze.js works through an entity-oriented style of data management using the EntityManager to access and cache model data. The EntityManager functions as both a gateway to the backend persistence service and a cache of the entities you're working with locally. When you ask the EntityManager to execute queries or save pending changes, then the EntityManager builds the requests and handles the communications with the backend service.

For a full Breeze.js introduction, tutorials, documentation, and more, visit http://www.breezejs.com/home. In the following sample, you will use Knockout for data-binding and Breeze.js to manage the data. You can easily use Breeze.js with Wijmo by following a few simple steps:

  1. Add references to the latest jQuery dependencies, Wijmo widgets, Breeze.js file, and Breeze.js extension library for Wijmo
  2. Create a ViewModel, a MetadataStore, and an EntityManager.
  3. Apply and queries, sorting, or filtering.
  4. Create the markup.

Getting Started

To get started, take a look at the following sample that binds a wijgrid widget with Knockout and uses Breeze.js to manage the data. It will show you how to add references to the required files, create the ViewModel and EntityState, and create the markup.

Using Grid with Breeze.js

In this example, we'll create a project that uses Knockout for data binding and Breeze.js to manage the data.

  1. Add library references.

  2. Add some CSS styling.

  3. Create the ViewModel, the EntityManager, and the MetadataStore.

  4. Create and apply any specific queries, filters, or sorting functionalities.

  5. Apply and activate the Knockout bindings.

  6. Create the markup.

When you run your application, it resembles the following image.

Use the buttons above the grid to sort, filter, or modify the data.

 
Support Options