Errai: The browser as a platform

Wednesday, March 5, 2014

Have you taken Errai Data Sync for a spin yet?

Last June we released the first version of the Errai Data Sync module. It complements Errai JPA and provides functionality to automatically keep your local entities (persisted in local storage) in sync with the server. See the original blog post for details.

We have just added a new declarative, annotation-driven API that will make using Errai Data Sync even easier. Here's a short example:


When a user navigates to this page, either by browsing to #GroceryListView;activeUserId=1 or by transitioning from another page, a data sync worker will start to periodically synchronize the entities that match the query specified in the parameter to @Sync. This query parameter refers to a named query defined on an entity type: in this case GroceryList. The @SyncParams refer to fields of the enclosing managed bean to use them as query parameter values. In the example above we make use of the activeUserId field to only synchronize the grocery list of the currently active user.

The onDataSyncComplete method is invoked every time a synchronization cycle completes. It can be used to update the UI with the new data or to resolve conflicts. By default, conflicts are resolved in a favour of the server but you can change this behaviour (see the documentation for details).

We encourage you to try out Errai DataSync and are eager to get your feedback! What additional functionality would you like to see? Do you like the API or have changes to propose?

Please join us on Freenode #errai, the errai-dev mailing list, or on our community forums.

Friday, February 7, 2014

Errai Forge Addon Release

Many of you may have followed the recent release of Forge 2.0.0.Final. With this new release there is an accompanying Eclipse plugin so that you can now use Forge and its addons from the comfort of your IDE.

And with that preface, we at Errai are happy to announce the first release of the Errai Forge Addon. With Forge 2.0 and the Errai Addon, it's now easier than ever to create a new Errai project in Eclipse. You can find instructions on how to use Forge 2.0 and the Errai Addon here.

Here is a quick overview of its features:
  • Perform a basic setup for an Errai project, including configuring maven plugins for running development mode with JBoss AS 7 and Wildfly 8 and configuring production compilation.
  • Add Errai to an existing GWT project.
  • Add or remove dependencies and configurations for Errai features to a Maven/Eclipse project, including:
    • Errai Messaging
    • Errai IOC
    • Errai CDI
    • Errai UI
    • Errai Navigation
    • Errai Databinding
    • Errai Jaxrs
    • Errai JPA
    • Errai Datasync
    • Errai Cordova
Note that the plugin will be compatible with our upcoming milestone 4 release. Until then you can try it out with Errai 3.0-SNAPSHOT.

Thursday, November 7, 2013

Errai and GWT: State of the Union

If you've seen our recent blog posts, you know that work on Errai 3 is progressing quickly with even more additions to our declarative programming model, performance improvements and a number of simplifications that aim to make getting started a lot easier. All details can be found in our roadmap. Please take a few minutes to review our plan. We're always looking for feedback. At Red Hat we innovate together with our open source communities and we rely on your input and collaboration!

As you know, Errai is based on GWT which itself is a healthy open source project with a large and active community. GWT is a fantastic technology that not only boosts developer productivity, especially in complex browser-based applications, its extensibility also allows for building frameworks like Errai on top of it. Since 2006 I have been using GWT successfully in a number of different projects and I am happy to announce that I got the opportunity to join the GWT Steering Committee. I am honored to represent Red Hat and continue the work that Mike Brock has led in regards to Errai and GWT. I look forward to contributing to one of the best ecosystems in the Java open source landscape.

Red Hat's investment in GWT is not only based on Errai but also on a number of customer facing applications as well as new project called UberFire, a web-based workbench framework implemented with GWT and Errai, led by Jonathan Fuerth.

Errai will also be represented at the GWT.create conference, the biggest GWT community event happening in San Francisco and Frankfurt this December. Jonathan and myself will be presenting in San Francisco, Erik Jan de Wit in Frankfurt. We hope to meet many of you at these events and discuss the future of Errai and GWT or engage in other technology debates :).

GWT and Errai are both mature technologies with a bright future ahead!

We hope to meet many of you at these eventsWe
We hope to meet many of you at these events

Wednesday, November 6, 2013

New Development Mode Setup in Errai 3.0 Milestone 2

One of the new features in our latest 3.0 release is a new development mode setup using JBoss 7 (or Wildfly 8). Until this point, our demos have either:
  1. used an embedded Jetty server, or
  2. have required you to manually run your own JBoss AS instance.
But both of these setups have drawbacks. Having an embedded server makes the development process much more convenient, but it is often necessary to develop with an enterprise capable application server.

The newest development mode setup brings us one step closer to having our cake and eating it too. Using the JBoss CLI interface, we now control an external JBoss or Wildfly instance with the GWT-Maven plugin.

The Setup

All it takes to get started is two new Errai dependencies and some minor changes to the gwt-maven-plugin configurations.

The Workflow

Want to run your app in development mode? Just run mvn gwt:run .

Need to update the server-side code? Run mvn compile and then press "Restart Server".

How Can I Get In On This?

You can check out this feature on errai-tutorial. In our new tutorial guide you can get a thorough introduction on how to setup your environment to run and develop with Errai. (But you can skip to here to get straight to the development mode instructions).

But What If I'm Still On Errai 2.4.x?

Don't worry, you're invited too! The two new dependencies (errai-cdi-jboss and errai-client-local-class-hider) have no other Errai dependencies themselves. That means you can add these artifacts to your maven project without any conflicts. Just add the following to your pom:
And make sure that your gwt-maven-plugin configuration is consistent with the following (specifically the extraJvmArgs, noServer, server properties):
Hope you enjoy it.

Friday, November 1, 2013

Milestone 2 of Errai 3.0 and Errai 2.4.2.Final released!

We've just released the second milestone of Errai 3.0 with a long list of fixes and enhancements. The exact version number is 3.0.0.20131101-M2. The high level roadmap for Errai 3 can be found here. We're always looking for feedback! What features/improvements would you like to see and what is most important to you and your applications? Feel free to leave a comment on this blog, create a forum post or file a JIRA for us.

Watch this space for a follow up post by Max Barkley showing the new development mode support for JBoss AS 7 or WildFly 8 in Errai 3. This will greatly simplify the getting started experience and allow you to develop and test an Errai/GWT application in your actual runtime container.

Errai 2.4.2.Final was also just released and contains a small number of fixes. Most importantly it makes sure applications built with Errai 2.4 can be deployed to WildFly 8.0.0.Beta1.

Happy coding!