2 1 The Relationship Between WAMs Webroutines Weblet and Weblet Templates

LANSA WAM

2.1 The Relationship Between WAMs, Webroutines, Weblet and Weblet Templates

After reading An Introduction to WAMs you should have a clear picture of what WAMs and webroutines are, so we'll now shift the focus and explain, in more depth, weblets and weblet templates, and how they interact with WAMs and webroutines to build up and customize the presentation layer.

Let's review some WAM concepts. You should already be familiar with most of these concepts:

  • Simplistically, each webroutine is comprised of two parts: the RDMLX portion encapsulating the application logic (in the Application Logic Layer), and the XSL/XML portion defining the presentation interface (in the Presentation Layer, also known as the Web Design).
  • A WAM includes one or more webroutines.
  • All webroutines are defined in the RDMLX code of a WAM using a simple WEBROUTINE / ENDROUTINE construct. The webroutine definition may include WEB_MAP commands to pass field and working list information to and from the presentation layer.
  • The RDMLX code of a WAM can also include method routines (MTHROUTINE) and subroutines (SUBROUTINE). If you need a refresher on these concepts refer to the LANSA Technical Reference Guide.
  • Webroutines are generally presented as a user interface (for example, HTML for a web browser), but can be generated as a non-visual presentation if the appropriate Technology Services are defined.
  • Typically, opening a webroutine in the LANSA Editor opens the Extensible Stylesheet (XSL) object generated for the webroutine so it can be viewed and modified as required. The initial presentation in the LANSA Editor is based on the internally defined LXML (a list representation of XML tags) and the XSL/XML objects, which can be generated during a build. We'll review these objects again later in this document.
  • A weblet includes one or more weblet templates.  Weblet Templates determine how a weblet is applied for a technology service or another variant which requires different XSL, like inline lists.
  • The presentation of a webroutine can be modified by dragging and dropping weblet templates onto the webroutine's Web Page tab in the LANSA Editor.
  • Weblet Templates are Technology Service specific. This means that while a consistent set of weblets is shown in your LANSA repository, when you change your current Technology Service the list of available Weblet Template will be modified.

The following diagram shows the relationship between a webroutine (the application logic) and the generated XSL, XML and various weblets (the presentation layer):