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

Utilities for Java Apps

DZone's Guide to

Utilities for Java Apps

Free Resource

Just released, a free O’Reilly book on Reactive Microsystems: The Evolution of Microservices at Scale. Brought to you in partnership with Lightbend.

 Java is better programming language for building web and enterprize applications with its matured APIs and tons of frameworks to make easier and faster the development. Now we have 100s of frameworks in each area like for web app development we have Struts 1.x/2.x, SpringMVC, JSF etc, for middle tier we have Spring, EJB3, for Ajax based apps we have Dojo, ExtJS, YUI, GWT, Wicket etc.

Even though we have plenty of options to choose the right framework for our application and got most of the required functionality out of it, we still need to write some code for the following irrespective of what framework we are using.

1. Configuration Management
2. XML Marshalling/Unmarshalling
3. Converting JSON to Java and Java to JSON
4. Emailing support

The good news is even for the above mentioned tasks also we have plenty of options.
I just wanted to put down what are the options we have for the above things. It could be helpful for many if not aware of them.

1. Configuration Management:
I remember how many times i have written(atleast copy pasted) code to load a properties file and provide some convenient methods like getString(), getInt() etc methods. I wondered after knowing that there are some tools to automate this process. The following are the ones i found so far:
    a)Common-Configuation
    b)JFig
    c)JConfig
   
2. XML Marshalling/Unmarshalling:
    a) XStream
    b) Castor
    c) JAXB  http://www.vogella.de/articles/JAXB/article.html
   
3. Converting JSON to Java and Java to JSON:
    a) Jackson JSON Processor

   
4. Emailing support:
    a) Spring Email support
    b) Commons-Email 

 Instead of reinventing the wheel, we can use the above tools which are well tested and easy to use.

 

From : http://sivalabs.blogspot.com/2011/01/infrastructure-glue-to-java-apps.html

Strategies and techniques for building scalable and resilient microservices to refactor a monolithic application step-by-step, a free O'Reilly book. Brought to you in partnership with Lightbend.

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}