beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Olander <dolan...@gmail.com>
Subject [SimpleTags] Architecture
Date Wed, 19 Oct 2005 16:06:57 GMT
The simple tags have been committed (as a prototype). This mail describes
the architecture.

There are five primary things in the architecture, Renderers, Behaviors,
Services, Utilities, and JSP tags.

Renderers -- These are Markup specific classes that take a state object and
output markup (usually HTML). These are scoped to the individual element
level and typically don't output any content, they only output the begin and
end tags. These are duplicated from the existing tags which has this same
abstraction.

Behaviors -- This is the core logic that runs to produces features on the
page such as Anchors, TextBoxes, Forms, etc. All of the logic necessary to
create both the markup (state) and the content is found in these classes.
These are independent as much as possible from the Servlet API. One behavior
may contain other behaviors (the body my contain a form which contains a
textbox). There is a stack maintained to walk the hierarchy at any point
during rendering. Behaviors have a simple life cycle that includes start,
preRender, renderStart, renderEnd, postRender, and terminate.

Services -- There are a number of services that are provided to the
Behaviors. These services stand outside of the Behaviors. These services
currently include the BehaviorStack, ErrorReporter, IdScopeStack and
ScriptReporter.
BehaviorStack -- This is the stack that tracks the current hierarchy of
Behaviors.
ErrorReporter -- This is responsible for tracking all runtime errors that
are generated by the Behaviors and provides formatted output for reporting
these errors. Responsibility for getting errors into the page is up to the
Behaviors.
IdScopeStack -- This is a stack that tracks the current id scope.
ScriptReporter -- This is responsible for gather all JavaScript and the
generates the actual script that will be output. Responsibility for getting
the JavaScript into a page is up to the Behaviors.

Utilities -- This is the primary place that the abstractions over the
Servlet API and PageFlow API are. This is the only set of classes that
should use these APIs (with a few exceptions).

JSP Tags -- This is a set of JSP tags that expose the behaviors to the JSP
author. The JSP tags are responsible for create the behaviors and then
running their life cycle. The entire Tag set is based upon the SimpleTag API
in JSP. In addition, most tags support dynamic attributes which replaces the
Attribute tag from the core tag set. There is not a one to one relationship
between JSP tags and Behaviors. For example, the JSP Parameter tag is not
represented as a behavior, instead the parameter is set on Behaviors found
on the BehaviorStack.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message