T
Tarkin
Hello all,
I'm writing my latest whiz-bang app.
I'm extending javax.servlet.Filter, and in the
course of extending, I'm (naturally) adding
some convenience methods.
As a matter of style, but beyond personal
preference, does one put these 'new' methods
before the overridden methods, or after?
My hunch is to put them before, as a reader
familiar with Filter knows that init(), destroy(),
and doFilter(...), have to be in there _somewhere_,
and putting my non-standard methods first shouts,
'Here I am! Read me! Look what I do!!'?
But, is more 'traditional', or precedented, to put
these methods after init(), destroy(), and doFilter(...)?
That seems to more reflect the object pattern- in
that, I'm defining the overridden methods from
the base class first, than adding my 'extended' methods.
Opinions appreciated.
TIA,
Tarkin
I'm writing my latest whiz-bang app.
I'm extending javax.servlet.Filter, and in the
course of extending, I'm (naturally) adding
some convenience methods.
As a matter of style, but beyond personal
preference, does one put these 'new' methods
before the overridden methods, or after?
My hunch is to put them before, as a reader
familiar with Filter knows that init(), destroy(),
and doFilter(...), have to be in there _somewhere_,
and putting my non-standard methods first shouts,
'Here I am! Read me! Look what I do!!'?
But, is more 'traditional', or precedented, to put
these methods after init(), destroy(), and doFilter(...)?
That seems to more reflect the object pattern- in
that, I'm defining the overridden methods from
the base class first, than adding my 'extended' methods.
Opinions appreciated.
TIA,
Tarkin