Errai experience: user interface, communication, dependency injection

I have a lot of experience with GWT, GIN, and GWTP sending, and since I have no experience with Errai, I would like to ask you if it is really a good choice to create whole pages with a single page Errai application as a basis. If you have extensive experience with Errai, it would be great to hear from you.

I am creating a web application for a video stream. Let's say this is another YouTube (layout, actions, flow, etc.), but on steroids (which are not relevant).

I read the whole Errai docs and here are my problems / questions.

  • Errai JAX-RS - I'm not interested in any complicated messaging system. Errai is really known for server-> client, client-> client, broadcast, conversations, etc. I need simple AJAX calls over RS. The obvious problem is communication performance, lack of redundant calls, just one HTTP request and response?
    What about the limitations mentioned here ( How do you integrate GWT with a JAX-RS / RESTEasy server using Errai? ): Are these things relevant and would I have to use REST services with some Errai restrictions?

  • Errai IoC / CDI - GIN seems more mature to me, definitely more popular (with all the benefits of this). But it looks like they can coexist perfectly, or should I choose one of them? It's nice to have a lot of Errai beans (like Caller) with one annotation. As far as I understand, I do not need CDI. If I use Errai IOC in my project, what additional functionality will I get with CDI? Should I have this on my classpath so that everything is created by the ioc container?
    Do I understand correctly: IoC allows simple wiring and CDI, where can I actually configure and create an instance of beans to be introduced? For example, @Produces is in CDI, not in IOC. Could you explain what is the difference between Errai IOC and CDI in the context of pure DI? I know this is another's supernet, but I still don't quite understand.

  • Errai Data Binding: A great feature, but it distorts the MVP pattern. Currenlty I wrote my application in basic MVP (without mvp framework and without interaction between Model and View). Can I control data bindings to @Model from the presenter, and not from the view (which will use HTML templates with Errai user interface)?

  • Errai UI: What about existing GWT widgets such as CellTable in the context of data binding and posting Viewing a class using a template?
    In general, what approach do you use when writing more complex widgets (for example, in the gallery of images with a pager) with Errai? Do you use an existing GWT widget (for example, CellTable) - a single heavy widget - or, rather, place everything in an html template and just bind specific divs to the corresponding data fields in the View class - lighter widgets? I came across this opinion of one of the authors of the Errai interface:
    The best part about the Errai user interface is that you simply dump this template file into your project and you say “OK, this part of the template belongs to this component” or “this part of the template belongs to this other component”. And you can link these things together, and your template just comes to life in front of you - right in the browser.
    So let's say I have an html layout for the entire image gallery. Obviously, I would not want to recreate this with CellTable, but use this layout so that I can: create an entire image gallery as a composite, which itself must connect to the most external element in the layout and connect each data field to the corresponding property in my Composite class . Is it possible?

The server must be aggregated GWT / Errai: On the server side, I would like to use Errai as little as possible (because I do not need any fancy communication functions, as I said), and support the application using Spring on Jetty or Tomcat.

With the addition of new technology as a basis, i.e. creating the entire application on it, there is always the risk that it will not be flexible enough so that some hacks are necessary to overcome unforeseen obstacles or in some terrible circumstances all the technology will have to be abandoned.

One last simple question: where is errai online javadoc located?

+8
inversion-of-control gwt cdi jax-rs errai
source share
1 answer

The short answer is, building using GWT is greatly simplified, structured using Errai.

HTML-based templates allow you to create web applications using standard web technologies, rather than working with UiBinder or a domain-specific language, the Page-drive approach allows you to solve your problem with the application domain, page by page, which is more natural for any web application, after all, we browse the web page by page.

As part of the JBoss Errai you will be much more interesting.

I hope this answers your long-buried question.

+1
source share

All Articles