Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[buckminster-dev] Re: Components that come into existence during abuild

Henrik Lindberg wrote:
I like attribute names that helps the reader - "inParent" is much better than just "parent" (naturally when you are 100% familiar with the syntax, it does not matter, the naming is most important for those that are newbies). But, "inParent" sounds a bit odd. Some my suggestions are:

- subcomponentOf
- inComponent
- parentedBy
- foundIn
- definedIn
- inScope

Don't know which one I favor the most. 'subcomponentOf' is very clear, so is 'parentedBy' and perhaps 'definedIn'. The others are more fuzzy.

I think it is best to declare the subcomponent in the parent component. In that declaration the action that produces the component is stated. Actions return ArtifactGroup - not a Component. Better to have an extra declaration that turns an ArtifactGroup into a component. I think it is better encapsulation if the action is specified only in the parent.

Yes, I agree. And in most cases it should be a private action too. It should not be callable as a normal action. At least not from the outside.

Now, whatif there are attributes and actions in the generated component? Where are they specified? (Is it possible to have them nested?

Taking the two points in consideration (a subcomponent should be declared in the parent, and nesting). This could be specified as:

<subcomponents>
   <subcomponent name"a.source" producedBy="producingAction" ...>
       <... a nested CSPEC...>
   </subcomponent>
  ...
</subcomponents>

Powerful, but perhaps too complicated.

so:
a) nested CSPEC - something powerful, but also a bit complicated, and that probably requires more from the implementation, but required if attributes, actions etc are needed on a subcomponent.
b) subcomponent declaration that names the producing action

This makes a lot of sense. A minor complication is that the sometimes the generated component has a generated CSPEC. But I guess that the nested CSPEC in that case becomes the extension. We will need this right from the start. The PDE is fairly competent and will allow nested generated source features (using templates to define the nesting). I don't think it's that complicated really. Recursion is simple for a programmer :-)

- thomas


Back to the top