Pier Fumagalli wrote:
>
> I'm thinking that blocks should always be distributed as
> "zip" files (note, not JAR archives), containing a
> "block.xml" file (block
> descriptor) and the different JARs required by it (its
> libraries) or its directories...
>
> This zip should be expanded by a Library implementation so
> that a Loader can instantiate a Block, and this expansion can
> (should) be done in the temp directory...
>
Ah, yes, I remember - we discussed this long time ago. Right. Sorry.
> >> If we want to build the full resolver inside the framework itself,
> >> and therefore the "resolve" method in "Wirings" and "Wire" will
> >> accept "block:wiring:/path" instead of only
> "wiring:/path", then yes,
> >> I agree with you that source resolution should be closer
> (or same as)
> >> Excalibur's SourceResolver.
> >
> > Currently, I don't know which way is better :) Perhaps I have to
> > understand the whole thing before I should comment on just some
> > parts...
>
> In my requirement for the framework as VNU I don't personally
> need the "extended" (a-la SourceResolver) resolution, but
> it's trivial to implement, although it poses some questions
> on how to implement it...
> I'll leave this up to you guys to decide what's better...
:)
>
> >> Only "issue" I might see with that is that Excalibur's
> Source doesn't
> >> have the "isDirectory()" and "children()" methods, so,
> well, I don't
> >> absolutely like it because it's prone to hacks.
> >>
> > Ah, this is in a sub interface of Source (TraversableSource or
> > something like that).
>
> On 31 Mar 2004, at 13:09, Gianugo Rabellino wrote:
>
> > Uh? It's in TraversableSource, a subinterface, yes, but
> it's there...
>
> I still prefer something like:
>
> if (!source.isDirectory()) throw Exception("I need a directory");
>
> rather than
>
> if (!(source instanceof TraversableSource)) throw
> Exception("I need a directory");
>
> I don't see the point of two interfaces (and as I did, it's
> easy to miss).
>
Yes, that's true. Ok, so time will tell what's best :)
Thanks!
Carsten