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
... [More]
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 MessagingErrai IOCErrai CDIErrai UIErrai NavigationErrai DatabindingErrai JaxrsErrai JPAErrai DatasyncErrai CordovaNote that the plugin will be compatible with our upcoming milestone 4 release. Until then you can try it out with Errai 3.0-SNAPSHOT. [Less]
|
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
... [More]
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 eventsWeWe hope to meet many of you at these events [Less]
|
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
... [More]
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 eventsWeWe hope to meet many of you at these events [Less]
|
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:
used an embedded Jetty server, or
have required you to manually run your own JBoss AS instance.
... [More]
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 SetupAll it takes to get started is two new Errai dependencies and some minor changes to the gwt-maven-plugin configurations.The WorkflowWant 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. [Less]
|
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:used an embedded Jetty server, orhave required you to manually run your own JBoss AS instance.But
... [More]
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 SetupAll it takes to get started is two new Errai dependencies and some minor changes to the gwt-maven-plugin configurations.The WorkflowWant 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. [Less]
|
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:used an embedded Jetty server, orhave required you to manually run your own JBoss AS instance.But
... [More]
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 SetupAll it takes to get started is two new Errai dependencies and some minor changes to the gwt-maven-plugin configurations.The WorkflowWant 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. [Less]
|
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
... [More]
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! [Less]
|
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
... [More]
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! [Less]
|
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
... [More]
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! [Less]
|
In my last post, I talked about Errai CDI Events and began showing how they can be used to implement part of a typical lobby page for a multiplayer web-game. Near the end we encountered a typical use case that could not be handled by Events. As
... [More]
promised, I will now discuss how the Errai Message Bus can be used by the server to target a subset of the connected clients.The ProblemTo quickly recap: we have a set of clients in a game room lobby. We want Client A to invite Client B to a game. We've already figured out how to send an invitation event from Client A to the server, but we need a way to relay this invitation to Client B without broadcasting it to all the other clients.Some Message Bus BasicsService EndpointsThe Errai Message Bus is used to send messages between service endpoints. Defining a service endpoint requires only two things:
Subject: A string (not necessarily unique), used by senders to address messages to this endpoint
Callback: A method to be invoked by Errai when a message to this endpoint is received
When an endpoint is created we say that code has subscribed to the given subject. It is possible to dynamically define service endpoints, but as with most features of the framework the declarative syntax is preferable. Here is an example declaring a service in Errai.
It is also possible to annotate methods, such that a class may offer multiple services. Sending a Message
To send a message we construct it with the MessageBuilder and then send it with the MessageBus like so.
It is possible to send objects with a message by adding parts. In the following example we will send a Greeting object to everyone subscribed to the subject "LonelyPeople". Message Visibility
As with Errai CDI Events, there is only one degree of visibility of message. If the server sends a message to the subject "ErraiLovers", every subscriber to this subject will receive the message. But if a client sends a message to "ErraiLovers", only subscribers on that same client and the server will receive it.Back to the LobbyAs you may have already guessed, a simple way to deliver messages to a single client is to dynamically subscribe them to a unique service endpoint.Using Unique IdsHere is the simple model used in Errai Block Drop that can be used to establish a direct line of communication to a single client.
When a client first joins the lobby in Block Drop, they fire a CDI Event to the server
The server generates a unique id and adds the client to the lobby
The server fires back the unique id using a Conversational Event (which will only be observed by the original client)
The client observes the event and subscribes to the subject "clientid
(For those who prefer the concrete, here are the implementations of this pattern in block-drop: server side, client side, and shared code. You'll note that the client side code uses dynamic subscription, since the client's unique id cannot be known at compile time.)
Finishing the Invitation
With services based on unique ids setup for each player, it is now possible for server to target individual players in an invitation by accessing their unique ids. The relayed invitations are sent using the MessageBuilder as previously demonstrated. (Once again, here is the Block Drop implementation.)
Final Note
I hope this helps you to understand the power and flexibility that the Errai Bus provides. This is just one example out of the plethora of potential use cases that the Message Bus could fulfill. When you want the loose-coupling of CDI Events, but need a more fine-grained (or dynamic) control over recipients, Errai Messaging might be the right fit for the job.
[Less]
|