The Artima Developer Community
Sponsored Link

News & Ideas Forum (Closed for new topic posts)
Implementing Templates with Struts

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Implementing Templates with Struts Posted: Nov 29, 2002 8:38 AM
Reply to this message Reply
Advertisement
O'Reilly OnJava.com has published an article by Vikram Goyal on using Struts to develop template-based portal sites.

http://www.onjava.com/pub/a/onjava/2002/11/20/templatestruts.html

Here's an excerpt:

It helps to visualize templating basics in terms of Java's layout mechanism. To design GUI applications, Java provides the concept of layout managers, components, and containers.

Components get placed on containers, while the layout manager decides how to lay out the containers. Furthermore, containers themselves can be regarded as components for other containers, thus providing for nesting behavior. In simple terms, a template for a Web application is a simple JSP file and is the equivalent of a layout manager. A template hides how the layout of a Web page is done. In other words, it hides the algorithm for the layout. If the algorithm needs to change, the change is restricted to the template. The Web pages implementing this template simply update themselves to reflect this change.

If templates are the equivalent of layout managers, what are the corresponding comparisons for containers and components? Components are the actual content files: the JSP, the HTML, the images, etc. Containers collect these visible components into one unit. A container itself will be a JSP file. A container needs to know what template to use to render the components that it contains. To use a Java GUI, Web example, a panel (container, collecting unit) can contain buttons and textfields (components, content) and have a GridLayout (layout manager, template) telling it how to lay out these components.


I have never used Struts, but would like to understand what value they offer. Do you use Struts? Is so, what is your experience of them? How do they help? How do they get in the way? Also, is "Struts" singular or plural?

Topic: Design Pattern Snobs (and Buzzwords) Previous Topic   Next Topic Topic: GRAN PM 2.0.1 Java-based Defect Tracking System Released

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use