Hi,

yes, I've red the Wiki page a new it already. But still these classes and
the Wiki do not form a good understanding for me... Sorry. Maybe I should
also spit into it deeper. Below a few word about what I understand and where
it's still foggy for me. And some thoughs I have while reading these
classes. Please write them as my thoughs, it's not said that I dissagray
with the implementation, it more what I would expect from what I know yet
about the framework and for my experience with coding untill now.


Mmm, ok, I understand that these classes represent some 'identifier'.

What I guess:
- These identifiers are used in creating a dependency graph?
 Or (also) somewhere else?

What I not understand
- A module contains an organistation and module-name.
 Which can be for example 'apache' and 'commons-lang'.
 Why is there a ModuleRevisionId?
 For my understanding only Artifact would have a version (RevisionId).
- Why do Id classes have a generic attribute container with them
 (XxxRevisionId extend UnmodifiableExtendableItem).
 - For me it also doesn't make sence to extend from this class. I think
   it would be better to delegate to an instance of that class. This keeps
   the design mutch cleaner. (In UML design terminology, there also the
rule
   that a parent/child relation should also be a 'is a'.
   Class Rabbit extends class Animal (Rabbit is an Animal).
   For as for as I see this doesn't make since for the
   XxxRevisionId extend UnmodifiableExtendableItem.
   But maybe I'm totaly wrong here....
   Or maybe there are some other very good reason(s) what it's solved this
way.
- Would it not be nice to create a small piece of xml for the encoded id's?
 Something like:
 <module  org="apache"  name="commons-lang" />
 Or with attibutes:
 <module  org="apache"  name="commons-lang">
   <attrubte  name=""  value="" />
 <module />
 - creating the encoded part is simple
 - decoding could be done by own code, or by a xml parser.
   - making the encoding / decoding plugable, would make it easy to switch
between
     own (fast) implementation and parser implemenation.

Regards, Tjeerd

On 7/4/07, Xavier Hanin <[EMAIL PROTECTED]> wrote:

On 7/3/07, Tjeerd Verhagen <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> after looking into the following classes:
>
> - ArtifactId
> - ArtifactRevisionId
> - ModuleId
> - ModuleRevisionId
>
> What I understand from the classes:
> The Module is needed for all module specific stuff, organisation and
> module
> name.
> An Artifact represents the created product in the form of a xxx.jar /
> xxx-src.zip or so.
> An ArtifactRevision represent a release / version of a Artifact.
>
> Questions:
> What I don't get here is why every class-name contains Id at the end?
> Why is there ModuleRevision?
>
> Probably I'm making some incorrect observations by reading the code... A
> few
> words explaining these base classes would be appreciated!


First I don't know if you've had a look at this:
http://wiki.apache.org/ivy/IvyDataModel

It gives basic explanation about these classes.

For the Id at the end, it's because those classes represents only
identifiers, and not the model content. For instance a ModuleRevisionId is
part of the description of a dependency of a module upon another module.
In
this dependency description, only the identifier of the dependency module
with revision is used, the whole content of the metadata associated with
it
(a ModuleDescriptor) is not known yet.

Does it help your understanding?

Xavier

Thx, Tjeerd
>



--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/

Reply via email to