Thank you, Geert. Your explanation is very clear and clears my confusion 
about which one to use. 

Now, is it possible to have multiple inheritance? 

Regards,

Eddy

Quoting Geert Bevin <[EMAIL PROTECTED]>:

> Hi Eddy,
> 
> I'm not sure that will make enough sense, I'll clarify JR's statement  
> a bit.
> 
> RIFE splits up your site structure in two distinct parts:
> * declaration
> * implementation
> 
> Declaration is the whole site structure itself and implementation is  
> the Java code (or Groovy, Pnuts, Janino, ...) code of each element.
> 
> When using 'extends', you take the declaration of one particular  
> element and extend upon it. This is mostly for convenience sake and  
> doesn't actually give you much real value beside having a central  
> place of modification and reducing the amount of declaration to write.
> 
> When using 'inherits' you take the combination of the declaration and  
> the implementation, which I call the behavior, of an element and  
> ensure that it happens before the behavior of another element. This  
> behavior can however be very complex and you should actually see it  
> as layering several site-structures on top of each other. You will  
> stay in the inherited behavior until its associated child trigger  
> condition has been encountered or the child is explicitly triggered.  
> Only then you will 'drop down' to the lower level and execute that  
> behavior.
> The implementation of this is done is such a way that when a request  
> targets the lower level, and it inherits other behavior in an upper  
> level, the whole context that was sent to the initial element is  
> preserved and even though several request/response cycles might be  
> executed in the upper level, once it drops down to the original child  
> element, the original context will also be restored as if nothing  
> happened. The benefits of this are explained here: http://rifers.org/ 
> blogs/gbevin/2005/3/15/session_timeout_solution
> 
> So you see that 'inherits' gives you a way to declare cross-concern  
> logic in a way that's not very different from AOP. It offers a lot of  
> new and unique features since you can stack your inheritance  
> declarations and have a real inheritance tree. This is one of the  
> features that you will only find in RIFE afaik.
> 
> I hope this as clear enough for you, I do tend to over complicate  
> things at time when explaining.
> 
> Best regards,
> 
> Geert
> 
> On 15-nov-05, at 23:29, JR Boyens wrote:
> 
> > You can inherit multiple interfaces, you can only extend one class.
> >
> > On 11/15/05, Eddy Young <[EMAIL PROTECTED]> wrote:
> > Can anyone please explain the reason behind having both "extends" and
> > "inherits"? These two attributes seem to serve the same purpose.
> 
> --
> Geert Bevin                       Uwyn bvba
> "Use what you need"               Avenue de Scailmont 34
> http://www.uwyn.com               7170 Manage, Belgium
> gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03
> 
> PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
> Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net
> 
> 
> _______________________________________________
> Rife-users mailing list
> Rife-users@uwyn.com
> http://www.uwyn.com/mailman/listinfo/rife-users
> 


-- 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to