|
Helping ordinary people create extraordinary websites! |
Java Validation With Dynamic ProxiesBy Eric Olson2005-05-14
Drawbacks of dynamic proxies Unfortunately, using dynamic proxy classes does have one major drawback: performance. Method invocations on dynamic proxy classes do not perform nearly as well a direct method call on objects. Therefore, your use of dynamic proxies in an application framework depends on what is more important to you: cleaner architecture or better performance. In many areas of an application, the performance drawback may be worth it, while in other areas performance is critical. One solution, therefore, is to use dynamic proxies in some areas and not in others. If you decide to go this route, keep in mind that the invocation handler can perform other operations besides validation, allowing you to change the behavior of your business objects at runtime or after code has been deployed. Tutorial Pages: » Decouple validation processes from your business object implementations » Tightly coupled validation » Loosely coupled validation » The dynamic proxy approach » The invocation handler » The business object implementation » The business object factory » Drawbacks of dynamic proxies » Other uses for dynamic proxies » Conclusion » Resources First published by |
|