MicroStrategy ONE

Use of the Term "Web Component" in the MSDL

It is important to understand the meaning of the term Web Component as it is used in the MSDL. Confusion can arise because MicroStrategy Web products use both a WebComponent interface and <web-component> elements.

In the MSDL, <web-component> elements are referred to as Web GUI Components.

Web GUI Components are essentially dynamic page elements.

  • Each <page> element in the Page Configuration file is associated with one or more  <template> elements. Each <template> element can have one child <web-components> element, which can include one or more <web-component> elements. Each <web-component> element represents a part of a Web page that can be dynamically updated. For example, the elements of the tree in a tree view represent a single <web-component> element.  

  • When you define a specific part of a Web page as a <web-component>, the content on that part of the page can be updated independently of the rest of the page. The use of <web-component> elements in conjunction with IFRAMES allows such partial dynamic updates.  

  • In almost every case, a Web GUI Component is made up of a particular bean and style combination. It is possible for a Web GUI Component to represent a menu, but in most cases, it is a bean/style combination.

In the MSDL, objects that implement the WebComponent interface are referred to as Web Components.

Web Components are Java classes that can be instantiated in the MicroStrategy Web application and interact with other peer Web Components.

  • Each component of the application— such as a page, a servlet, or a WebBean— implements the WebComponent interface. This allows the component to become the parent of other components. The parent component is responsible for handling interactions between the components it contains. For example, the servlet is responsible for choosing the correct page, the page is responsible for interactions between the WebBeans (or other WebComponents) it contains, and each WebBean (or other child WebComponent that is not the parent of another WebComponent) is responsible only for itself.  

  • The WebComponent interface provides the framework that allows these components to interact with one another. For example, a WebComponent by itself has no knowledge of whether an action that it triggers should modify the state of another WebComponent or whether execution should be redirected to another page (that is, to another WebComponent). However, when a WebComponent is the child of another WebComponent, the parent understands the relationships between the child WebComponent and its siblings. It is this ability to have a relationship with other child WebComponents that allows the parent WebComponent to affect how data and control get to its children.  

  • WebComponent objects are Java classes that have business logic and can be plugged into the application. Any class that is associated with a WebBean must implement the WebComponent interface. In fact, in most cases, WebComponents can be thought of as synonymous with WebBeans. All WebBeans are WebComponents, though not all WebComponents are WebBeans.

Summary

In the MSDL, the pages defined in the Page Configuration file and the beans that provide the content for those pages are both referred to as Web Components. Web GUI Components, on the other hand, refer to the page elements that provide the dynamic content for various sections of a page template. Each Web GUI Component (that is, each individual <web-component> element) refers to a specific  Web Component (that is, a specific object that implements the WebComponent interface).