dgrid 0.4 released!

By on November 17, 2014 1:30 pm

Coinciding with the initial release of dstore, the next-generation Dojo data store, we would like to announce a new release of the best Dojo data grid: dgrid 0.4!

While this release does not focus on new features, it is an exciting release because we refactored some important components and improved dgrid’s stability while making it more flexible and extensible. Let’s take a look at the most significant changes.

A better store for tomorrow

dstoreDojo object store support in dgrid is an important and convenient way to populate a grid with your data. Connect a grid to an observable store and your grid will update automatically as modifications are made in the store.

Unfortunately in earlier versions of dgrid, there were edge cases that would cause a grid to get out of sync with an observable store. While dgrid 0.3.13 and later worked around many of these issues, ultimately this introduced a significant amount of code to deal with shortcomings of dojo/store/Observable. dstore 1.0 introduces a new Trackable mixin that is the evolution of Observable. dstore/Trackable allows dgrid to stay in sync with all store updates much more easily.

Because of improvements dstore provides over the Dojo object store API, dgrid 0.4 no longer supports the Dojo store API. Take a look at the Using Grids and Stores tutorial to see dgrid and dstore in action together.

Pulling the plug on plugins

Column plugins provided an extremely useful and expressive way to add functionality to a grid’s columns, but some people found them a bit confusing to use, and they tend to be very difficult to extend. We decided to convert the column plugins from decorator functions to declare mixins. Mixins are a familiar concept that are not only easy to use, but also easy to extend. Now you have the option to customize the column mixins as you do with any other dgrid component.

Inching towards the future

dgrid 0.4 is a few pounds lighter because we dropped support for IE 6, IE 7, quirks mode, and Dojo 1.7. dstore was designed for Dojo 1.8 and above, so dgrid 0.4 inherits this dependency. We’ve also removed old dgrid APIs which were already marked as deprecated during the 0.3 line.
Intern 2: dgrid has used the Intern as its testing stack for over a year. For 0.4, we’ve updated its tests to work with Intern 2, to continue to benefit from future fixes and enhancements.

Bower: dgrid 0.4 also includes a bower.json, as we’ve received numerous requests for better bower support. Now you can use bower to install dgrid along with its dependencies in one command.

Step into the Laboratory

One thing dgrid lacked was a sandbox providing a comprehensive demonstration of its features. We’ve put together the dgrid Laboratory to help fill that void. Take it for a spin, and feel free to have a look at the code, too – it’s included in the dgrid repository!

Migrate on over to dgrid 0.4

Unfortunately, this dgrid release is not plug-and-play for everyone due to the extent of the valuable updates that we made. If you are using a Dojo object store or one of the column plugins, you will need to make some changes to your code when you upgrade to dgrid 0.4.

The good news is the changes are pretty straightforward, and the even better news is we have written a dgrid 0.4 Migration Guide to help you out.

In addition to the Migration Guide, we have also updated the dgrid tutorials and demos.

For more details about the changes made in dgrid 0.4, please take a look at the dgrid 0.4 release notes. If you have questions or think you’ve found a bug, you can find links to the appropriate resources in the dgrid README.