On Mon, 31 Dec 2001 13:06, Magesh Umasankar wrote:
> From: "Peter Donald" <[EMAIL PROTECTED]>
>
> > Whats not straightforward about that?
>
> I feel it is not straightforward because it brings in
> the concept of a new 'preprocessor (?)' tool to
> generate the required code.

the preprocessor will just generate the TaskInfo - not any code as such. And 
if TaskInfo is absent then it will be like it is now. If you want to 
implement validators like you suggest then there is no support required from 
the Container. You could simply add a line into the execute method or 
wherever you wanted to check the precondtions.

> > > Can't we instead introduce methods like getSrcDirValidator,
> > > getSrcDirAttribute, getSrcDirDefault, isSrcDirOptional, etc?
> >
> > Im not sure how that is easier.
>
> It is not just a question of easiness.  I feel we need to
> factor in flexibility also.

Flexability is easy enough to achieve. It basically comes down to the 
language we use to describe the preconditions/metadata. We could just point 
to another validator class at one extreme and at the other end of spectrum we 
could implement a precondition style language (see IContract for a fairly 
comprehensive example). However it will be the container that will be 
checking these preconditions (rather than being baked into the code ala 
IContract).

-- 
Cheers,

Pete

----------------------------------------
Whatever you do will be insignificant, 
but it is very important that you do it. 
                              --Gandhi
----------------------------------------

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to