New Portal Comparison
New Portal Comparison
New Portal is the original version of the OpenACS portals package written for
.LRN. This package is inadequate for a variety of reasons:
- Can't run standalone (is tied to .LRN)
- Defining a portlet requires the writing of dozens of lines of boilerplate SQL code
for Oracle and PostgreSQL.
- Defining a portlet requires the writing of dozens of lines of custom Tcl code to implement
a fairly complex service contract. Among other things, the portal has to "know" how to
add itself to a new-portal page and to remove itself as well. The new-portal package itself
provides very limited management help.
- Likewise, in order to add an application which supports portlets, one must implement a .LRN
applet or similar functionality. new-portal provides no configuration help.
- Portlets are called with parameters passed in an array. It's impossible to wrap an existing
template with a portlet definition and run it unchanged (i.e. share it with existing code)
without providing an intermediate interface template.
- There's a lot of dynamic HTML generated within the new-portal package's Tcl library. Besides
making it more difficult to customize the output, the template engine is unable to cache the
compiled byte-code generated for dynamic HTML, which impacts efficiency.
- Theming is only available for portals, not pages or elements.
- Portal pages are referenced with URLs containing a page number variable, rather than
a symbolic URL.
By comparison, the Layout Manager package:
- Provides a simple Tcl API for defining a new includelet. No SQL or service contract
implementation is required. An includelet may provide an optional initializer
procedure, for instance to create a private calendar for a user if desired, etc.
- Parameters are defined directly, by name, when an includelet's template is rendered,
just as is typically true when they're passed using the template system's
<include> tag.
- All rendering is done through use of <include> tags, and a simple Tcl API is
provided to allow the addition of custom page templates (which define page layout), themes,
etc. The template engine is able to cache the resulting compiled byte-code, for increased
performance.
- The Layout Manager is a service, and is not meant to be mounted. However,
a library of templates and page configuration scripts are provided, which can easily be
integrated into an application through use of the new "extends package" facility built
into ACS Core versions starting with 5.5.0. See the Layout Managed Subsite package
for an example.
- Commonly used database queries and associated computations are cached, so performance
should be better than new-portal's.
- Theming can be applied to a set of pages, or individual pages and elements.
- Pages are referenced with symbolic URLs.