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

Learning from Reverse Engineered JSF Components (Part 1)

DZone's Guide to

Learning from Reverse Engineered JSF Components (Part 1)

· Java Zone
Free Resource

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

One thing I really enjoy doing is reverse engineering technology solutions to learn from them. A case in point is Manfred Riem's set of JSF components, with sources available at the Manor Rock site.

In this context I took the sources of Manfred's NAL Component. (Here NAL stands for "name and location", consisting of a common set of entry fields on many web applications, for inputting the name and address details of the customer in question.) This is a JSF component that requires nothing more than this tag in a JSF file:

<nal:inputNAL value="#{NalBean}" />

Then, if the referenced bean is a registered JSF managed bean that extends the JSF component's NAL class, the tag above will magically render as follows:

This was a nicely understandable scenario, so I took the sources and imported them into NetBeans IDE, as a standard Java application, which is the first application you see in the screenshot below. The second application is the web application where I've implemented the JSF component:

Handily, by putting the Java application that provides the JSF component on the web application's classpath (i.e., via the Libraries node in the lower part of the screenshot above) in NetBeans IDE, it is rebuilt whenever I rebuild the web application. That's pretty useful.

In the next part, we'll look at all the files in the JSF component, to see how they work together to let the web application developer make use of the JSF tag shown above!

Read Part 2 Here 

 

Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}