Struts Tiles Definition Inheritance and ASP.Net Masterpages

While studying about Struts Tiles, I encountered the topic about definitions and inheriting from other definitions. For those who are not yet familiar with Tiles, a definition defines a tile or template. This reminded me of ASP.Net Master Pages which I learned during my stay with my previous employer. From  http://www.oreilly.com/catalog/jakarta/chapter/ch14.html, One who has used master pages and used tiles would quickly recognize the similarities  in features.

[code Language="XML"]

<tiles-definitions>

 <definition name="storefront.default" path="/layouts/storefrontDefaultLayout.jsp">   

  <put name="header" value="/common/header.jsp" />

  <put name="menubar" value="/common/menubar.jsp" />

  <put name="copyright" value="/common/copyright.jsp" /> 

 </definition>

</tiles-definitions>

[/code]

When Inheriting from above code

[code Language="XML"]

<tiles-definitions>

 <definition name="storefront.custom" extends="storefront.default">   

  <put name="copyright" value="/common/new-copyright.jsp" /> 

 </definition>

</tiles-definitions>

[/code]

 But ofcourse, this feature existed in Tiles and other JSP Templating Framework before it did in ASP.Net(as my ego tells me). With the advent of Portlets though(see WebParts for ASP.Net), I'm wondering how the acceptance of templating frameworks such as tiles would still be accepted and/or adapted by the younger generation of developers. Or perhaps, maybe, we could just use both at the same time. For now, I have to deal with this technology until our team decides that we use Portlets again in our development.
Published 01-09-2008 2:08 AM by lamia
Filed under: ,

Comments

Sunday, September 28, 2008 12:13 PM by Amy

# re: Struts Tiles Definition Inheritance and ASP.Net Masterpages

I still don't understand the definition of master pages!!!