Search

Errai makes rich client easy.

Errai provides a comprehensive framework and tools for building rich web applications, leveraging the GWT compiler. With standard server-side APIs, such as CDI, in the browser, managing large web applications was never so easy.

Take minutes to build a simple Errai App! It can truly be this easy!

 

Check out the latest and greatest in rich web development!

See the release notes for details.

by errai at Thu May 03 14:43:24 EDT 2012

Get Rolling

Errai makes building your rich web application in GWT easier. We cut the boilerplate and promote annotation driven development. With Errai IOC, everything is a bean in the client. Just annotate!

@EntryPoint
public void App {
  @PostConstruct
  public void helloWorld() {
     Window.alert("Hello, World!");
  }
}

 

Get Talking

Talking to the server is much easier, too! Leveraging ErraiBus, you can transparently and easily mix event-based and RPC-based functionality in your app as neccessary. When leveraging the bus, everything in your app is push, everything is asynchronous! 

@EntryPoint
public void App {
  @Inject
  Caller<MyRpcService> rpcCaller;  

  // ... //
  @UiHandler("button")
  public void clickHandler(ClickEvent evt) {
    rpcCaller.call(new RemoteCallback<String>() {
      public void callback(String response) { 
        Window.alert("The server said: " + response);
      }
    }).sayHello();
  }
}

 

Get Decoupled with CDI

With Errai CDI, the power of the CDI programming model comes to the browser. And it's more than injections, producers and qualifiers. You can hook directly into the server-side eventing system from the client with client observers, which directly use CDI APIs from the browser!

// this is really client code!
@ApplicationScoped
public void App {
  @Inject Event<ClientEvent> clientEvent; 

  public void observeServerEvent(@Observes ServerEvent evt) {
    Window.alert("Received an event from server: " + evt.getMessage());
  }

  // .. //
 
  @UiHandler("button")
  public void handleClick(ClickEvent evt) {
    clientEvent.fire(new ClientEvent("button was clicked!"));
  }
}

 

Get RESTful

Talk RESTful-ly to the server using Errai's JAX-RS module. Lay down a JAX-RS service:

@Path("customers")
public interface CustomerService {
  @POST
  @Consumes("application/json")
  @Produces("text/plain")
  public long createCustomer(Customer customer);
}      

And call in from a client side bean!

@ApplicationScoped
public class App {
  @Inject
  private Caller<CustomerService> customerService;
  // ... // 
  
  @UiHandler("button")
  public void handleClick(ClickEvent evt) {
    customerService.call(new RemoteCallback<Long>() {
      public void callback(Long response) {
        Window.alert(response);
      }
    }).createCustomer(customer);
  }
  // ..//
}

It really is that easy. With Errai, you cut the boilerplate.

 

 

Get Started Right Now

Create a started project with our Maven archetype.

If you want to get started with a CDI based project, with all the bells and whistles, then copy and paste this code into your shell. (Note: you need maven installed)

 

mvn archetype:generate -DarchetypeGroupId=org.jboss.errai.archetypes -DarchetypeArtifactId=cdi-quickstart -DarchetypeVersion=2.0.0.Final -DarchetypeRepository=https://repository.jboss.org/nexus/content/groups/public/

 

If you need further instructions, check out this link.

Our most up-to-date documentation is here: https://docs.jboss.org/author/display/ERRAI/Home

 

         

Errai Developer Blog

Errai 2.0 is Ready
May 9, 2012 10:53 AM
After months of lead-up, a few necessary breaking API changes, and a pile of feedback from our user …
Errai IOC: DI in the Browser (Part 2)
Apr 27, 2012 9:15 AM
In the last post, we got our feet a little bit wet by exploring the basics of Errai's dependency inj…
Back in Bengaluru
Apr 14, 2012 9:49 AM
For those in Bangalore area, I'll be talking at GIDS 2012 this coming week. Which will be a great op…
Category: conference Category: event Category: events
View more errai developer blog

Desktop wallpaper | Project Swag

Check out the Errai cool stuff.