subclass or bean?

2006-05-26 Thread Willem van Asperen
Hello, I have a set of pages that have very similar behavior. They have listeners like handleTransition and startNewProcess. The first implementation I did was, obviously, to capture all these general functionality into XXX a subclass of BasePage and then sub class my page classes YYY from

Re: subclass or bean?

2006-05-26 Thread Stephane Decleire
I would vote for subclassing : 1. It's the core of OOP to share common pieces of code in a parent class. 2. A bean is not a library. A bean should be seen as an independant entity which can have a life by itself ... IMHO ;-) Willem van Asperen wrote: Hello, I have a set of pages that have

Re: subclass or bean?

2006-05-26 Thread Jesse Kuhnert
It depends on exactly what kind of functionality you are working with in these listeners, but I would probably do something similar to: -) If you do have functionality that's not related to the web stuff at all make it a bean that is managed via hivemind, ie make it a service that you inject.