Utilities for Java Apps
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:
2. XML Marshalling/Unmarshalling:
c) JAXB http://www.vogella.de/articles/JAXB/article.html
3. Converting JSON to Java and Java to JSON:
a) Jackson JSON Processor
Instead of reinventing the wheel, we can use the above tools which are well tested and easy to use.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)