Hey everyone, I thought it would be nice to give a quick post on releasing the third iteration of Aurelia-Slickgrid 3.x that just came out and answer some of the questions you might have and also wanted to advertise the new release.
New Version Q&A
Question 1) why a new major 3.x version?
For a few reasons, the biggest being that it now uses an external monorepo library named Slickgrid-Universal and here’s a few reasons why…
- because it’s a monorepo structure it allows for better decoupling of a few Services (Text Export, Excel Export, OData & GraphQL are now decoupled and opt-in)
- since a few of these Services are now decoupled, it should, at least in theory, provide smaller production build size (download only what you really need and use)
- that external lib is also framework agnostic (and it will potentially be used in the future by other frameworks that I also support). For example, we use it in Salesforce with ES6 syntax.
- it also helps me quite a lot in maintaining less code, any changes made into Slickgrid-Universal bubbles up to Aurelia-Slickgrid, 1 library to rule them all
- there are also some new features that were created originally only in Slickgrid-Universal and are now available in Aurelia-Slickgrid, the biggest new feature is Composite Editor Modal Window
- you can see a demo of that in the Example 30 - Composite Editor
Question 2) why create yet another lib? Slickgrid-Universal that is…
- because I needed to use it in another framework, Salesforce with ES6 syntax.
- since I had to support yet another framework, I decided to make it framework agnostic with a monorepo structure. I created 3 libs around SlickGrid (Aurelia-Slickgrid, Angular-Slickgrid and Slickgrid-Universal) and I wanted to try to simplify the code maintenance and structure.
- I wanted a lib that would act as a central piece which could be used by any framework while I could push features & fixes in 1 location and expect the changes to bubble up to the other libs (Aurelia-Slickgrid for instance).
- all libs have (had) around 80-85% code in common, they are all 100% unit tested (10K lines of code)
- so the end result is that Slickgrid-Universal is now used in our Salesforce implementation and now also in Aurelia-Slickgrid and the bonus is that it becomes much simpler for to support. At the end, I dropped about 9k lines of code when Aurelia-Slickgrid switched to using Slickgrid-Universal code.
Migration and Installation
You have multiple ways to get started
- to migrate from 2.x to 3.x, follow the new Migration Guide to 3.x.
- Make sure to read it all, you will get compilation errors that is a certainty (unfortunately) but it’s for the greater good
- to start fresh, follow the HOWTO - Step by Step Wiki
- or clone the Aurelia-Slickgrid-Demos
Quick Recap, the biggest reasons of why to upgrade to 3.x?
- More Decoupling = Smaller Bundle size (monorepo structure, download only what you need)
- One common repo to update (that was mostly my personal goal)
- The library is now fully Typed, even the SlickGrid core lib (written in JS) now has full TS Typing (I added it all manually)
- New Features and bug fixes will only be available going forward with version
- It’s fully tested with Jest (100% coverage) and Cypress for E2E testing (400 tests in Aurelia-Slickgrid and another 200 tests in Slickgrid-Universal)
- Bootstrap or any other UI framework like Bulma, Material, …
A big thanks to @3cp and @zewa666 for their invaluable help in providing better support for all bundlers and also help with some code review.
If you like the lib, please upvote and/or Buy Me a Coffee
Cheers and Happy End of the Year