List Info

Thread: do we support multiple inheritance in templating?




do we support multiple inheritance in templating?
user name
2006-10-01 12:55:23
hi everyone!


i just found out about the method
String[] getTemplateIds
in org.apache.lenya.cms.publication.Publication.

does that mean we support or plan to support multiple
inheritance?

my first guess was that this method automatically walks the
inheritance 
tree, returning parent, grandparent, etc. as an array of
strings, but it 
turns out it doesn't.

is this dead code? or should i make provisions for multiple
inheritance 
whenever i access the getTemplateIds information?


regards,

jörn



-- 
"It's sad to behold how lately the wonderful English
language has,
in the hands of corporate executives and marketing experts,
re-
adjusted its prospective itinerary towards mythical
subterranean
realms of discomfort, leveraging traditional woven
containment
devices."

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-adminuni-due.de, Telefon: 0203/379-2736

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org

do we support multiple inheritance in templating?
user name
2006-10-04 16:33:49
Jörn Nettingsmeier schrieb:
> hi everyone!
> 
> 
> i just found out about the method
> String[] getTemplateIds
> in org.apache.lenya.cms.publication.Publication.
> 
> does that mean we support or plan to support multiple
inheritance?

Actually it should work
(see
PublicationTemplateManagerImpl.getPublications(publication))
.

But this is of course subject to discussion.
Do you consider this concept valuable or even necessary?

-- Andreas


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org

Re: do we support multiple inheritance in templating?
country flaguser name
Germany
2007-02-24 09:22:58
Andreas Hartmann wrote:
> Jörn Nettingsmeier schrieb:
>> hi everyone!
>>
>>
>> i just found out about the method
>> String[] getTemplateIds
>> in org.apache.lenya.cms.publication.Publication.
>>
>> does that mean we support or plan to support
multiple inheritance?
> 
> Actually it should work
> (see
PublicationTemplateManagerImpl.getPublications(publication))
.
> 
> But this is of course subject to discussion.
> Do you consider this concept valuable or even
necessary?

warming up an old thread...

andreas: is this mechanism tested and functional? reason i'm
asking is 
i'm hacking on the PublicationConfiguration anyways, and if
nobody 
really uses it, i could rip it out while i'm at it.


regards,

jörn


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


change of Publication interface?
country flaguser name
Germany
2007-02-27 06:25:39
hi everyone !

getting rid of the bogus multiple-inheritance has an impact
on the 
publication interface. (quote of the relevant discussion
below, for your 
reference)

basically, i see these options:

1. leave public String[] getTemplateIds() as it is, and
return a 
one-element String[].


2. deprecate getTemplateIds() and make it return
getTemplateId() cast to 
String[], add public String getTemplateId()


3. rip out getTemplateIds() entirely, breaking backwards
compatibility, 
and introduce public String getTemplateId()


i'm in favour of (3), because we never published an API that
contained 
getTemplateId(), and it fits well with my personal
NoCruft(tm) agenda.
there's only a handful places in the code that need to be
updated.
(1) is not an option to me, because it implies functionality
that we 
can't provide, and that's bad manners. if people are willing
to dig in 
and learn by reading code, we should not plant red herrings
to lead them 
astray...


wdyt?


regards,

jörn



Andreas Hartmann wrote:
> Jörn Nettingsmeier schrieb:
>> Andreas Hartmann wrote:
>>> Jörn Nettingsmeier schrieb:
>>>> hi everyone!
>>>>
>>>>
>>>> i just found out about the method
>>>> String[] getTemplateIds
>>>> in
org.apache.lenya.cms.publication.Publication.
>>>>
>>>> does that mean we support or plan to
support multiple inheritance?
>>> Actually it should work
>>> (see
PublicationTemplateManagerImpl.getPublications(publication))
.
>>>
>>> But this is of course subject to discussion.
>>> Do you consider this concept valuable or even
necessary?
>> warming up an old thread...
>>
>> andreas: is this mechanism tested and functional?
reason i'm asking is
>> i'm hacking on the PublicationConfiguration
anyways, and if nobody
>> really uses it, i could rip it out while i'm at
it.
> 
> +1 to rip it out.
> 
> Thanks for mentioning it again!
> 
> -- Andreas
> 
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
> For additional commands, e-mail: dev-helplenya.apache.org
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: change of Publication interface?
country flaguser name
Germany
2007-02-27 08:14:27
Andreas Hartmann wrote:
> Joern Nettingsmeier schrieb:
>> 1. leave public String[] getTemplateIds() as it is,
and return a
>> one-element String[].
> 
> This would have the advantage that we can
"upgrade" to multiple
> inheritance later on without changing the API. Does
anyone see
> the necessity to use more than one template?

not at all. it's a lot of complication for very little
gain.

>> 3. rip out getTemplateIds() entirely, breaking
backwards compatibility,
>> and introduce public String getTemplateId()
> 
> If nobody needs multiple inheritance, then +1 for (3).
> 
> -- Andreas


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: change of Publication interface?
country flaguser name
Switzerland
2007-02-27 09:50:53
Andreas Hartmann wrote:
> Joern Nettingsmeier schrieb:
>> hi everyone !
>>
>> getting rid of the bogus multiple-inheritance has
an impact on the
>> publication interface. (quote of the relevant
discussion below, for your
>> reference)
>>
>> basically, i see these options:
>>
>> 1. leave public String[] getTemplateIds() as it is,
and return a
>> one-element String[].
> 
> This would have the advantage that we can
"upgrade" to multiple
> inheritance later on without changing the API. Does
anyone see
> the necessity to use more than one template?
>
>
Not yet, but I could imagine such usecases e.g.

             -------------------
            |  University Home  |
             -------------------
              |         |
     ------------       |      ------------
    | Faculty A  |       -----|  Faculty B |
     ------------              ------------
        |    |
        |     ----------
        |               |
  ------------     ------------
 | Institute A |  | Institute B |
  -------------    -------------

This is also mentioned in:
http://lenya.apache.org/docs/1_4/ref
erence/publication-templating/index.html

Or do i misunderstand something?

Jann

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: change of Publication interface?
country flaguser name
Germany
2007-02-27 10:08:58
Jann Forrer wrote:
> Andreas Hartmann wrote:
>> Joern Nettingsmeier schrieb:
>>> hi everyone !
>>>
>>> getting rid of the bogus multiple-inheritance
has an impact on the
>>> publication interface. (quote of the relevant
discussion below, for your
>>> reference)
>>>
>>> basically, i see these options:
>>>
>>> 1. leave public String[] getTemplateIds() as it
is, and return a
>>> one-element String[].
>> This would have the advantage that we can
"upgrade" to multiple
>> inheritance later on without changing the API. Does
anyone see
>> the necessity to use more than one template?
>>
>>
> Not yet, but I could imagine such usecases e.g.
> 
>              -------------------
>             |  University Home  |
>              -------------------
>               |         |
>      ------------       |      ------------
>     | Faculty A  |       -----|  Faculty B |
>      ------------              ------------
>         |    |
>         |     ----------
>         |               |
>   ------------     ------------
>  | Institute A |  | Institute B |
>   -------------    -------------
> 
> This is also mentioned in:
> http://lenya.apache.org/docs/1_4/ref
erence/publication-templating/index.html
> 
> Or do i misunderstand something?

yes.
the case you described is single inheritance. every
publication as 
exactly one template. i'm not trying to change that.

however, the syntax
<templates>
   <template id="foo"/>
   <template id="bar"/>
</template>


implies that publications could inherit from more than one
predecessor:

               -------------------
              |  University Home  |
               -------------------
                |         |
       ------------       |      ------------
      | Faculty A  |       -----|  Faculty B |
       ------------              ------------
          |    |                       0
          |     ----------   00000000000
          |               |  0
    ------------     ------------
   | Institute A |  | Institute B |
    -------------    -------------

in this case, institute b would inherit both from faculty a
and b.

part of the code implies we can do that, but nobody has ever
tried it, 
and the fallback sources wouldn't know what to do with a
situation like 
that...


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: change of Publication interface?
country flaguser name
Switzerland
2007-02-27 10:07:36
Joern Nettingsmeier wrote:
> Jann Forrer wrote:
>> Andreas Hartmann wrote:
>>> Joern Nettingsmeier schrieb:
>>>> hi everyone !
>>>>
>>>> getting rid of the bogus
multiple-inheritance has an impact on the
>>>> publication interface. (quote of the
relevant discussion below, for
>>>> your
>>>> reference)
>>>>
>>>> basically, i see these options:
>>>>
>>>> 1. leave public String[] getTemplateIds()
as it is, and return a
>>>> one-element String[].
>>> This would have the advantage that we can
"upgrade" to multiple
>>> inheritance later on without changing the API.
Does anyone see
>>> the necessity to use more than one template?
>>>
>>>
>> Not yet, but I could imagine such usecases e.g.
>>
>>              -------------------
>>             |  University Home  |
>>              -------------------
>>               |         |
>>      ------------       |      ------------
>>     | Faculty A  |       -----|  Faculty B |
>>      ------------              ------------
>>         |    |
>>         |     ----------
>>         |               |
>>   ------------     ------------
>>  | Institute A |  | Institute B |
>>   -------------    -------------
>>
>> This is also mentioned in:
>> http://lenya.apache.org/docs/1_4/ref
erence/publication-templating/index.html
>>
>>
>> Or do i misunderstand something?
> 
> yes.
> the case you described is single inheritance. every
publication as
> exactly one template. i'm not trying to change that.
> 
> however, the syntax
> <templates>
>   <template id="foo"/>
>   <template id="bar"/>
> </template>
> 
> 
> implies that publications could inherit from more than
one predecessor:
> 
>               -------------------
>              |  University Home  |
>               -------------------
>                |         |
>       ------------       |      ------------
>      | Faculty A  |       -----|  Faculty B |
>       ------------              ------------
>          |    |                       0
>          |     ----------   00000000000
>          |               |  0
>    ------------     ------------
>   | Institute A |  | Institute B |
>    -------------    -------------
> 
> in this case, institute b would inherit both from
faculty a and b.
> 
> part of the code implies we can do that, but nobody has
ever tried it,
> and the fallback sources wouldn't know what to do with
a situation like
> that...
>

Ah ok i understand  So

> 3. rip out getTemplateIds() entirely, breaking
backwards compatibility,
> and introduce public String getTemplateId()

is ok for me.

Jann


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


[1-8]

about | contact  Other archives ( Real Estate discussion Medical topics )