Skip to main content

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

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

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.

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

- henrik



"Thomas Hallgren" <thomas@xxxxxxx> skrev i meddelandet 
news:mailman.6.1159529512.5209.buckminster-dev@xxxxxxxxxxx...
> Henrik Lindberg wrote:
>> However, I guess that in a world of million options, some projects may 
>> need to structure things so that a parent component creates components 
>> named completely disjunct from the parents name. component "x.y.z" 
>> produces "a.source". Naturally such a naming scheme is more confusing, 
>> but should be handled by Buckminster.
>>
>>
> Yes, I think we have to. PDE recommends that pure source components are 
> called <original-name>.source. Another reason is that generated 
> features/plugins will be visible in the Eclipse update-manager and in a 
> deployed instance. In my opinion, exposing the build process (in this 
> case - how a component came into existence) as part of the name so that 
> the end user can see it is not ideal. I see your point about model clarity 
> too though.
>
>> then this could be stated as:
>> <cs:dependency name="the.subcomponent.name" 
>> subcomponentOf="the.parent.component">
>>
>> Which is the same as your last example, but with a different name for the 
>> "producedBy" attribute.  If you want something short, why not:
>> <cs:dependency name="the.subcomponent.name" in="the.parent.component">
>>
>>
> Perhaps we should also define what action in the parent that is 
> responsible for creating the sub-component? The suggested prebind is too 
> limited and also obsolete when the subcomponent semantics are expressed in 
> the dependency. Perhaps like this:
>
> <cs:dependency name="the.subcomponent.name" parent="the.parent.component" 
> parentAction="subcomponent.generation"/>
>
> One could argue that 'parentAction' should be 'parentAttribute' for sake 
> of consistency. In this case though, I think it has to be an action.
>
> We need to agree on whats best of 'subcomponentOf', 'in', or 'parent'. I'm 
> in favor of the last one since it ties in nicely with 'parentAction'.
>
>
>> How do you suggest the declaration of a subcomponent is made in the 
>> parent component?
>>
>>
> Given the above I think the actual declaration of the parentAction would 
> be all that is needed in the parent. Do you see a need for some other 
> explicit declaration?
>
> - thomas
> 




Back to the top