Errai: The browser as a platform

Tuesday, November 7, 2017

Errai 4.1.0.Final Released

We've recently released Errai 4.1.0.Final, the first release on master since branching off the 4.0.x series. In this short post, I will highlight some of cool new things you can find in 4.1.0.Final, which include:
  • Size and performance improvements in code generated for Errai Marshalling and Errai Data Binding
  • Custom content delegation in Errai Navigation
  • moved to META-INF
  • Templating and Data Binding support for Elemental 2
The best part: two of these changes were delivered by our fantastic community. Read below for descriptions about these features. At the end I will talk briefly about forward-development currently happening in Errai.

Marshalling and Data Binding Improvments

Both Errai Marshalling and Data Binding use generated code to introspect and access members of annotated classes. In Errai 4.1.0.Final, this code has been refactored to decrease generated code size and better take advantage of optimisations for String literals in the GWT compiler.

If you use Errai Marshalling or Data Binding heavily, Errai 4.1.0.Final should noticeably decrease the size of your JavaScript payload. A big shout out to slavap for this excellent contribution!

Custom Content Delegation

Errai Navigation provides lots of page-specific mechanisms for hooking into the navigation lifecycle, but until now there were no convenient ways to generically customize how all pages were shown or hidden.

Errai 4.1.0.Final introduces a content delegation system. Users can override a ContentDelegation interface and replace the default implementation to insert their own custom logic for displaying and hiding all pages. The delegation is quite flexible, even allowing for asynchronous actions.

A big thanks to BenDol for the concept and implementation of this feature!

Configuration Moved to META-INF

By convention, configuration files that don't require name-spacing are supposed to be placed in the META-INF folder. Errai 4.1.0.Final supports scanning files in the META-INF folder, allowing users to follow this convention. Moving forward, you should consider this a best practice.

Errai 4.1.0.Final will still work properly with files outside of a META-INF folder, but you may see an abundance of warnings in your logs, as we will likely phase out support for this in our next major release.

Elemental 2 Support for Templating and Data Binding

Elemental 2 is a project that exposes built-in web APIs in Java. Like the first Elemental, the project is automatically generated from external definitions of web APIs. Unlike its predecessor, Elemental 2 uses JS Interop.

Back when we began work on Errai 4, Elemental 2 was not yet available. We didn't want that to slow down our work on HTMLElement-based user interfaces and JS Interop support, and so we created a collection of hand-written element wrappers in Errai.

But now that Elemental 2 is available, it is in the best interests of the GWT community to standardise around these. As such, Errai's DOM wrappers have been deprecated and we have added full support to templating and data-binding for classes from Elemental 2.

We will not be removing the Errai element wrappers, but we will also not be updating them, and you are highly encouraged to use Elemental 2 going forward.

Looking to the Future

The biggest priority for Errai in the coming months is preparing for migration to GWT 3. We've known for some time that GWT 3 will require big changes to the way we develop GWT applications. There probably won't be GWT Widgets. There definitely won't be GWT Generators.

We've already made large strides towards GWT-Widget-less UI development. Although there is some more work to be done here, we are also beginning progress on the even larger and equally important task: migrating Errai's GWT generators to annotation processors.

I'd like to take this opportunity to mention recent addition to our team, Tiago Bento, who has been the driving force behind our APT migration efforts. It's not quite ready for a test drive yet, but keep an eye out in the future for blog posts about how to try out Errai annotation processors on our snapshot releases.

Until the next time, happy coding!


  1. This comment has been removed by the author.

  2. Hi Author just now i found your blog its really awesome. Keep this work.Hire Xamarin Developer , Xamarin Development company

  3. Thanks for sharing, nice post! Post really provice useful information!

    Giaonhan247 chuyên dịch vụ vận chuyển hàng đi mỹ cũng như dịch vụ ship hàng mỹ từ dịch vụ nhận mua hộ hàng mỹ từ website nổi tiếng Mỹ là mua hàng amazon về VN uy tín, giá rẻ.

  4. my name is Promise dickson Finch am from Texas USA. I want to share a testimony of how Dr. OLU herbal mixture cream saves me from shame and disgrace, my penis was a big problem to me as the size was really so embarrassing,and i was also having weak erection problem. I can make love to my wife and my penis was just too small a full grown man like me having 4 inches penis and to worsen it i don't last in sex i cant even last two minutes it was really a thing of shame to me. My wife was really tired of me because my sex life was very poor,she never enjoyed sex,i was always thinking and searching for solutions everywhere until when i saw a testimony of how Dr. OLU. herbal mixture cream have been helping people regarding their sex life, so i decided to give him a try and to my greatest surprise in less than two weeks of taking the herbs my penis grow to 8 inches i couldn't believe my eyes and as i speak now my penis is now 8 inches and i do not have weak erection again. I can make love to my wife longer in bed. And my marriage is now stable,my wife now enjoy me very well in bed. You can contact him via ( You can contact him today and get your problem solved.Call +2348140654426 .." or you can also contact him through his what-app +238140654426

  5. Your share in this article is very helpful to me, I have often read your article. Thank you.
    Chung tôi cung cấp tới quý khách hàng những dịch vụ tốt nhất hiện nay như: dịch vụ vận tải, dịch vụ chuyển phát nhanh, cho thuê xe tải, ship cod toàn quốc,... Chúng tôi tự tin đảm bảo chất lượng dịch vụ tốt nhất, uy tín và giá cả phù hợp nhất.