The Community Builder Programming Interface

Introdution to Community Builder
Community Builder is a WebObjects environment consisting of a suite of applications that share a template framework.

Community Builder Architecture
Each application in the suite uses components from a template pool (CLCommunityTemplatesFRM). The templates are all constructed from a collection of resusables display components(CLDisplayFRM.


CLCommunityTemplatesFRM contains two types of templates: page and layout.

  Page Templates produce compete html pages, i.e. full WOComponents. They are ready to be used as is by any application that supplies the required bindings.
   
  Layout Templates are page portions, one or more of them may be included in a page template. They are thus partial WOComponents. Layouts are useful for example when two or more application wish to use the same basic template but header and/or footer information is different for each of the applications. A layout will in this case contain the essential display structure (e.g. text - image - text displayed vertically). Each client applications can then create its own page template which includes this layout and a tailored or existing header/footer layout.

CLDisplayFRM contains all of the display objects that are used by the page and layout templates. They may also be used in application pages directly, in effect by-passing the template structure. Although this may be a desirable option on occassion it is suggested the one first consider using existing templates or defining new ones so that pool of reusable templates serve its intended purpose.

How to Build a Template
Although there may be variations to the method outlined here, these are the basic steps needed to create a template for Community Builder:

1. From ProjectBuilder add a new WOComponent to CLCommunityTemplatesFRM. This will be your page template so give it an appropriate name ending in the suffix "Page". e.g. MyTemplatePage.
   
2. If you need to create a new layout template for this page template, you will need to add a second new WOComponent to CLCommunityTemplatesFRM, this one will be a partial component. In most cases this will be closely related to the page component so it's name should be similar, so give it the same name as the page component without the Page suffix. In our example this would thus be MyTemplate. (See TextBlockPage and TextBlockPage for an example of this occurrence).

Steps 3 - 5 apply to both the create of page and layout templates.
   
3. Open the new WOComponent in WebObjects Builder. Using the "Add Custom WebObject" tool in the menubar build the new tempate by adding any display objects or layout templates needed. Be sure not to include a page template to you new page template.
   
4. You will need to supply your own code to make various objects display appropriately. For example ,you may wish inlcude both CLTextNugget and CLTextNuggetEdit so that you can display and edit a chunk of text on the same page. (See the TextBlock template java and html files for a specific example of this.)
   
5. Supply the appropriate bindings for all objects included. See the Community Builder Frameworks section for details
   

Community Builder Frameworks

  • CLDisplayFRM
Introduction CB Architecture How To Build Template CB Frameworks