/  21
 
HomePortals Modules Framework
By Oscar Arevalo
Created: July 20
th
2006Last Update: December 19, 2007
 
HomePortals Module Frameworkwww.HomePortals.net
Introduction ..........................................................................................................................3HomePortals Module Lifecycle ...........................................................................................4Module Physical Structure ...................................................................................................5The Module Controller ........................................................................................................6Defining a Module: the ConfigBeans ..................................................................................7Page Settings and Module Properties ..............................................................................8Module Properties ........................................................................................................8Page Settings ................................................................................................................9ContentStore ......................................................................................................................10Remote Server Requests ....................................................................................................12Resource Descriptor Files ..................................................................................................14Components Reference ......................................................................................................17Home.Components.BaseModule ...................................................................................17Home.Components.moduleController ...........................................................................17Home.Components.contentStore ...................................................................................19Home.Components.moduleConfigBean ........................................................................19Home.Components.contentStoreConfigBean ................................................................20Page 2 of 21
 
HomePortals Module Frameworkwww.HomePortals.net
Introduction
HomePortals is an extensible and highly configurable free-form environment that allowsusers and editors to create different kinds of web pages and web applications bycombining the functionality of pre-existing components.In HomePortals, content is described using HomePortals pages, which are XMLdocuments that follow a given specification. This xml document tells HomePortals howto layout the page, what external resources to use and what content to render on the page.Any element that can go within a HomePortals page is called a “Resource”. The mostimportant type of resources are the modules, they define the actual content andfunctionality of the page. Modules are declared within the <modules> section of the xmldocument using <module> tags. The <module> tag takes several arguments that giveinformation to HomePortals about how to locate the module, where and how it should berendered, and more.Modules are self contained elements that can be reused and placed anywhere on a page.These elements can range from simple html content to complex mini-applications withseveral views and actions. This document describes the framework provided byHomePortals for building these modules. The module framework allows modules to havea certain degree of pre-built functionality that facilitate the development of rich andcomplex modules.The same module may appear several times on the same HomePortals page, having asonly requirement that it ID attribute is not used again by any other module on the page.HomePortals uses this ID or ModuleID to uniquely identify each module. Eachoccurrence of a module is called a “module instance”, and all instances of the samemodule are said to belong to the same “module class”. When a page is built using theintegrated Control Panel, then the HomePortals engine will be responsible of assigningthe module ID and making sure they are unique.All HomePortals Modules are defined as ColdFusion Components (CFCs) that extendHome.Components.baseModule.
baseModule
provides the basic interface for eachmodule, being responsibility of each module to define views and implement the specificmethods to provide its unique functionality and/or visual output.Each HomePortals module is actually a small MVC-like application on its own, with themodule CFC (along with the Home.Components.moduleController cfc) acting as theapplication controller. Each module may have one or more views associated with it,however only one view may be displayed on the module output area at any given time.HomePortals module framework provides access to a storage file personalized for eachaccount which the module can use to store any necessary data. Nevertheless, developersare free to deal with data any way they choose within the module component.Page 3 of 21

Share & Embed

More from this user

Add a Comment

Characters: ...