Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

AngularBeans — Java EE 7/CDI Integration With AngularJS

DZone's Guide to

AngularBeans — Java EE 7/CDI Integration With AngularJS

In the highly volatile world of JavaScript frameworks, AngularJS has managed to maintain a lead at least for now. The good news for Java EE developers is that Java EE (generally) and Java EE 7 (in particular) work extremely well as a back-end for frameworks like AngularJS.

· Integration Zone
Free Resource

The Integration Zone is brought to you in partnership with Cloud Elements. What's below the surface of an API integration? Download The Definitive Guide to API Integrations to start building an API strategy.

In the highly volatile world of JavaScript frameworks, AngularJS has managed to maintain a lead at least for now. The good news for Java EE developers is that Java EE (generally) and Java EE 7 (in particular) work extremely well as a back-end for frameworks like AngularJS. To see why this is, you need not look much farther than my talk on the topic and the corresponding example code (the code is deliberately self-contained with setup instructions so that you can explore it in detail on your own).

One of the drawbacks of the JavaScript rich client approach is that it often involves some boilerplate code that does not exist in server-side web frameworks due to the remote communication layer involved. To borrow concepts from the old J2EE design patterns, this boilerplate involves the creation and maintenance of DTOs (Data Transfer Objects) and remote proxies, not to mention the plumbing code necessary for the remote communication.  If you look carefully at my code example, the boilerplate is not that hard to spot.

One way of avoiding this boilerplate is a tight binding layer with the underlying back-end technology that automatically generates the DTO, remote proxy, and remote plumbing parts. In the process, the binding layer can bring a lot of interesting back-end features forward to the client as well.

Fortunately, for the Java EE ecosystem, my Tunisian friend Bessem Hmidi has formulated just such a solution focusing on CDI as the back-end component model. He has aptly named his project AngularBeans and the project is now on GitHub for everyone to use. I am very happy that we were able to host Bessem at JavaOne 2015 to talk about the project. In his session, he explained the basic motivation for AngularBeans, discussed the features he has implemented so far, and did quite a bit of live coding in the process!

You can view the session below: (click here if you can't see the embedded video)

The session really speaks volumes as to the power of the solution and why it is a very valuable part of the CDI/Java EE ecosystem. The project is at a very early stage, so this is a great time to get involved, evaluate the project, and perhaps even contribute.

Your API is not enough. Learn why (and how) leading SaaS providers are turning their products into platforms with API integration in the ebook, Build Platforms, Not Products from Cloud Elements.

Topics:
java ,angular js ,cdi ,web design and web development

Published at DZone with permission of Reza Rahman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}