Thursday, July 8, 2010

Utility methods from Frameworks

Ever project invariably needs several utility logic for various tasks( a very simple example would be utilities for String/array/ manipulations, XML reading/writing etc.).
Being a follower of "don't reinvent the wheel", I have found it many times useful to go through the utility classes used internally by various frameworks like Struts, Hibernate,Spring Framework,JSF etc for things which I can use in my project.
A nice habit is to have the source code of these frameworks in my IDE and occasionally go through each of the utility files.I have to admit many times I have got better code for a particulat task than the one I could write on my own.More often than not, it was other way round too. But overall very helpful in the end and it enhanced my learning as well.

Tuesday, July 6, 2010

Detailed JSF Life cycle

There are plethora of articles on net which explain the JSF Life cycle. If you know the JSF life cycle superficially then I would suggest you to look at this article. Personally I prefer to understand about a framework by going through documentation and source code. Especially in case of JSF I found it very useful as the lifecycle is bit complex and it gives you a lot of points where you can plug in your custom application logic, so if you want to understand and master the internals of the framework then get the source code of the JSF implementation (myfaces, mojarra etc) you are using and go through this article. Thanks to Damodar Chetty for this article.
Another excellent article is by ever amazing BaluC on JSF lifecycle.