CoffeeFilter

Home |  Usage |  Download |  Contact 

What is CoffeeFilter?

CoffeeFilter

is a lightweight java validation and data object creation framework that works off of incoming request URL parameters. It is intended for JSP web application. CoffeeFilter is basically a Filter pattern product.

In it's most basic usage

CoffeeFilter

can be used to validate that parameters required for the view are included in the request URL string. In more advanced usage, it can generate data objects based on URL parameters before hitting the view; ie pre-processing data based on URL parameters to resolve data. Data objects are really just JavaBeans that implement an interface.

Why use CoffeeFilter?

I've thought about this a lot after a friend, ML, smartly questioned the intent behind this framework... It is two fold: There are a lot of other great tools out there that do similar things, but I've yet to find one that matched my needs.
Here is a run down of pros and cons:
  • Struts

    • I use Struts all over the place, however, Struts doesn't handle robust DO instantiation before hitting the jsp. Sure it can create bean object for you, but what if you need URL parameters to figure out what attributes the bean should contain?
    • I guess that Struts2 has largely bundled this idea into validation rules and Interceptors, namely the "param" and "prepare" interceptors. However, this code still works on top of Struts (not Struts2) and would require no rewrite of legacy code in that regard. Once Struts2 becomes mature enough, I will most likely stop development of

      CoffeeFilter

      . The good thing is that my idea is the similar to their idea. What an ego boost!
  • Java Beans

    • Java beans on JSPs are ok, I guess... But you run into the same problems I outlined in the first Struts section with populating beans based on URL parameters.
  • Spring

    • Being a Struts guy, I've never got Spring. Err, "got into Spring"... I know that it can handle object instantiation while on a page, but don't know if it can do much with url parameters...
MyLoanBiz, LLC © 2007.