June 30th, 2017
by Alexander Wilden

It took us a bit longer than we hoped, but today we are proud to announce our second major release of LaxarJS! So, what’s new? Let’s start with the topics we promised in our LaxarJS v2.0.0 Roadmap:

  • Translating our code base to ES2015: That was a bit of monkey business but it paid off. The actual code size shrank and readability was greatly improved. Finally, we could also ditch RequireJS modules in favor of ES2015 modules, since we now …
  • use webpack to resolve artifacts and bundle LaxarJS applications. Configuration is now much simpler and even the rather complex Grunt setup could completely be removed. Instead everything is handled by webpack plugins and invoked using simple npm scripts.
  • Using webpack and ajv, all JSON schema processing performed by LaxarJS now happens at build time, improving startup times and shaving JSON schemas as well as processing code from the bundle size, making LaxarJS a rather slim fellow.
  • Although AngularJS was the foundation of the first LaxarJS releases, we finally extracted it completely from the core of LaxarJS into its own adapter, that can be used at will. So now, if you don’t want to write widgets using AngularJS, there won’t be anything from its code within your LaxarJS application.
  • As promised, moving AngularJS from the core into its own adapter paved the way for a dedicated Angular 2 adapter (since Angular 4 was announced to actually be a non-breaking update, this should also work with the adapter). You can now even mix widgets using AngularJS and Angular 2. Just as a side note: Our personal experience with Angular 2 wasn’t that great, especially in the LaxarJS context. From its design Angular really is a full-fledged framework that likes to have complete control over the DOM and the application setup. We managed to tame the beast and widgets in LaxarJS work well, but it doesn’t feel like the perfect match. Hence, we want to promote our new …
  • Vue.js adapter and React adapter! Both are great view-only libraries / frameworks, that integrate seamlessly into the LaxarJS widget and control world. We really advise you to have a look at Vue.js if you haven’t already done that. It really won our ❤️. In this regard, the integration of widgets and activities using only plain-old-JavaScript was improved, and we encourage you to write all activities using the plain adapter, since you’ll need no view rendering there. Additionally it will make reusability in another application not using your adapter of choice easier.
  • AngularJS routing was replaced by the lightweight Navigo router for now, but our ultimate goal is to make routing easily pluggable. Routing seems to be a complex topic, where each implementation has its good and bad sides. Hence, we would like to give you the choice which solution fits the best to your use case. It’s on our roadmap for the future.
  • It is now possible to run multiple LaxarJS applications side-by-side within a single browser window. This is possible because the LaxarJS modules are no longer stateful, which also greatly improves testability.
  • The no more super secret debugging tool we promised was already released for LaxarJS v1.3.0 and was enhanced to work with fancy new LaxarJS v2.0.0 applications as well.
  • As there are a couple of breaking changes, mostly related to project setup and stateful APIs turning into injections, we strongly recommend having a look at the upgrade guide, part of the overall much-improved LaxarJS docs site. As to the definite information on what has changed, don’t hesitate to consult the CHANGELOG.

Next Steps:

  • Modifying or reloading pages at runtime still isn’t possible. Switching to webpack and actually having more static builds hasn’t made this easier. Nevertheless, this is still a point on our roadmap for some future (perhaps minor) release of LaxarJS.
  • Having an application that renders only a single page or even a single widget without all the flow and navigation stuff still isn’t possible. Since we wanted to get the v2.0.0 release out on the road, we moved this to the next minor release of LaxarJS. The foundation for that feature has already been laid out and hence shouldn’t introduce a breaking change.
  • As mentioned above, pluggable routing isn’t implemented in its final stages. As soon as this is possible, you’ll read about it here!
  • Also, we’re looking into the challenge of server-side-rendering, which promises to improve page loading time, but also imposes additional constraints on our lifecycle semantics.
  • Finally, we’d like to make it easy to have application code load incrementally as you navigate from page to page. As we’re now based on webpack, this should not be too hard to accomplish.

We hope that you like the new features and have even more fun developing with LaxarJS. We’d love to get your feedback!