<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>OscarArevalo.com - Homeportals</title>
			<link>http://www.oscararevalo.com/index.cfm</link>
			<description>About ColdFusion and Developing Software</description>
			<language>en-us</language>
			<pubDate>Tue, 07 Sep 2010 17:20:44 -0500</pubDate>
			<lastBuildDate>Thu, 15 Apr 2010 18:46:00 -0500</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>oarevalo@gmail.com</managingEditor>
			<webMaster>oarevalo@gmail.com</webMaster>
			
			<item>
				<title>Version 3.1.570 Released</title>
				<link>http://www.oscararevalo.com/index.cfm/2010/4/15/Version-31570-Released</link>
				<description>
				
				The new update for HomePortals is now released. The current version is 3.1.570; This is a roll up of all the latest bug fixes since the last release. If you use the nightly build then you will not notice any difference right now. 

The full post about what is new/fixed on this release is here: 

&lt;a href=&quot;http://www.homeportals.net/blog/index.cfm/2010/4/15/Version-31570-Released&quot;&gt;http://www.homeportals.net/blog/index.cfm/2010/4/15/Version-31570-Released&lt;/a&gt;

All comments are welcome! 
				</description>
				
				<category>Homeportals</category>				
				
				<category>Coldfusion</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Thu, 15 Apr 2010 18:46:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2010/4/15/Version-31570-Released</guid>
				
			</item>
			
			<item>
				<title>Introducing the New HomePortals CMS Plugin</title>
				<link>http://www.oscararevalo.com/index.cfm/2010/3/1/Introducing-the-New-HomePortals-CMS-Plugin</link>
				<description>
				
				A few days ago I released the &lt;a href=&quot;http://www.oscararevalo.com/index.cfm/2010/2/24/Available-Update-for-HomePortals-and-ColdBricks&quot;&gt;latest update&lt;/a&gt; to the &lt;a href=&quot;http://www.homeportals.net&quot;&gt;HomePortals framework&lt;/a&gt; and its counterpart management platform &lt;a href=&quot;http://www.coldbricks.com&quot;&gt;ColdBricks&lt;/a&gt;. Besides the obligatory bug fixes and improvements, there was one new major feature on this release: the CMS Plugin. The CMS Plugin is a HomePortals extension to provide content management and site administration features to any HomePortals-based application without requiring the use of an external application (like ColdBricks) or building your own administration features.  [More]
				</description>
				
				<category>Homeportals</category>				
				
				<category>Coldfusion</category>				
				
				<category>ColdBricks</category>				
				
				<pubDate>Mon, 01 Mar 2010 00:09:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2010/3/1/Introducing-the-New-HomePortals-CMS-Plugin</guid>
				
			</item>
			
			<item>
				<title>Available Update for HomePortals and ColdBricks</title>
				<link>http://www.oscararevalo.com/index.cfm/2010/2/24/Available-Update-for-HomePortals-and-ColdBricks</link>
				<description>
				
				I just pushed new updated versions of &lt;a href=&quot;http://www.homeportals.net&quot;&gt;HomePortals&lt;/a&gt; and &lt;a href=&quot;http://www.coldbricks.com&quot;&gt;ColdBricks&lt;/a&gt; to their respective sites and are now available for download. As usual the updates contain multiple bug fixes and small improvements here and there. However there are a couple of features that are worth mentioning.  [More]
				</description>
				
				<category>Homeportals</category>				
				
				<category>Coldfusion</category>				
				
				<category>ColdBricks</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Wed, 24 Feb 2010 17:35:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2010/2/24/Available-Update-for-HomePortals-and-ColdBricks</guid>
				
			</item>
			
			<item>
				<title>Model-Glue / HomePortals Sample Application</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/11/17/ModelGlue--HomePortals-Sample-Application</link>
				<description>
				
				A few weeks ago I &lt;a href=&quot;http://www.oscararevalo.com/index.cfm/2009/10/30/HomePortalsColdBox-Integration-Revisited&quot;&gt;wrote&lt;/a&gt; about how to use the layout management features of HomePortals on a ColdBox 3 application. This time I want to show how to do the same but with an application built with the &lt;a href=&quot;http://www.model-glue.com/coldfusion.cfm&quot;&gt;Model-Glue framework&lt;/a&gt; and also explain a bit more of why would you want to do so in the first place.  [More]
				</description>
				
				<category>Homeportals</category>				
				
				<category>Coldfusion</category>				
				
				<category>frameworks</category>				
				
				<category>Model-Glue</category>				
				
				<pubDate>Tue, 17 Nov 2009 18:10:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/11/17/ModelGlue--HomePortals-Sample-Application</guid>
				
			</item>
			
			<item>
				<title>miniwiki: a minimalist wiki</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/11/2/miniwiki-a-minimalist-wiki</link>
				<description>
				
				Miniwiki is a very basic and light wiki application for any CFML engine. Although it is designed to have a very small footprint, it can be easily customized in terms of skinning and layout. 

miniwiki uses a subset of reStructuredText as the syntax for the wiki pages, although it is trivially simple to replace the rendering mechanism to use WikiMedia syntax using the &lt;a href=&quot;http://wikiconverter.riaforge.org&quot;&gt;WikiConverter project&lt;/a&gt;.

miniwiki uses &lt;a href=&quot;http://www.homeportals.net&quot;&gt;HomePortals&lt;/a&gt; as the layout engine and also to manage and store the content.

miniwiki is entirely file-based, although since it uses HomePortals resource libraries to store content you can also make it store content in something more exotic as Amazon S3.

Here is a &lt;a href=&quot;/miniwiki/index.cfm&quot;&gt;demo&lt;/a&gt;, and you can download the project from RIAForge &lt;a href=&quot;http://miniwiki.riaforge.org&quot;&gt;here&lt;/a&gt;. 
				</description>
				
				<category>Homeportals</category>				
				
				<pubDate>Mon, 02 Nov 2009 02:10:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/11/2/miniwiki-a-minimalist-wiki</guid>
				
			</item>
			
			<item>
				<title>HomePortals/ColdBox Integration Revisited</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/10/30/HomePortalsColdBox-Integration-Revisited</link>
				<description>
				
				A while ago I &lt;a href=&quot;http://www.oscararevalo.com/index.cfm/2008/6/20/Using-HomePortals-and-ColdBox-Together&quot;&gt;wrote a post&lt;/a&gt; about how to integrate the &lt;a href=&quot;http://www.homeportals.net&quot;&gt;HomePortals&lt;/a&gt; layout rendering features into an a &lt;a href=&quot;http://www.coldboxframework.com&quot;&gt;ColdBox&lt;/a&gt; application. Since then a lot has changed on both the HomePortals and ColdBox camps so I&apos;ve been wanting to revisit that experiment and see if it could be made in an easier way now, using the advances on both frameworks. Read on for the findings.  [More]
				</description>
				
				<category>Homeportals</category>				
				
				<category>coldbox</category>				
				
				<category>ColdBricks</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Fri, 30 Oct 2009 14:50:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/10/30/HomePortalsColdBox-Integration-Revisited</guid>
				
				<enclosure url="http://www.oscararevalo.com/enclosures/hpcbox.zip" length="13594" type="application/zip"/>
				
			</item>
			
			<item>
				<title>ColdBricks 1.1 Update: Custom Resource Libraries &amp; Extension Modules</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/10/27/ColdBricks-11-Update-Custom-Resource-Libraries--Extension-Modules</link>
				<description>
				
				A new update to &lt;a href=&quot;http://www.coldbricks.com/&quot;&gt;ColdBricks CMS&lt;/a&gt; is now available for everyone to download and play. This is still part of the greater 1.1 release but it adds some new interesting features that I thought would be interesting to blog about. Besides the obligatory bug fixes/performance enhancements, the two most prominent features are Custom Resource Libraries and the completion of a full modular architecture, including the option to install/uninstall modules directly by the end user.  [More]
				</description>
				
				<category>Homeportals</category>				
				
				<category>Coldfusion</category>				
				
				<category>ColdBricks</category>				
				
				<pubDate>Tue, 27 Oct 2009 17:57:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/10/27/ColdBricks-11-Update-Custom-Resource-Libraries--Extension-Modules</guid>
				
			</item>
			
			<item>
				<title>Launched 2 New Homeportals/ColdBricks powered Websites</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/10/1/Launched-2-New-HomeportalsColdBricks-powered-Websites</link>
				<description>
				
				I wanted to quickly share that two new ColdFusion websites have been launched recently: &lt;a href=&quot;http://www.msdynamicswire.com&quot;&gt;MSDynamicsWire.com&lt;/a&gt; (a news portal) and &lt;a href=&quot;http://www.meancycles.com/owners&quot;&gt;Meancycles Owners Galleries&lt;/a&gt; (a social network). Both sites were developed using &lt;a href=&quot;http://www.homeportals.net&quot;&gt;HomePortals&lt;/a&gt; and &lt;a href=&quot;http://www.coldbricks.com&quot;&gt;ColdBricksCMS&lt;/a&gt;. 

Both sites show different level of integration and customization, as each serves a very different function, but they are good examples of the wide range of solutions that can be obtained by combining the HomePortals framework with the ColdBricksCMS platform.  [More]
				</description>
				
				<category>Homeportals</category>				
				
				<category>Coldfusion</category>				
				
				<category>ColdBricks</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Thu, 01 Oct 2009 01:59:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/10/1/Launched-2-New-HomeportalsColdBricks-powered-Websites</guid>
				
			</item>
			
			<item>
				<title>Anyone wants to help test the new ColdBricks CMS?</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/6/24/Anyone-wants-to-help-test-the-new-ColdBricks-CMS</link>
				<description>
				
				I am finally ready to enter the testing/packaging phase for the new version of ColdBricks. ColdBricks, if you don&apos;t know is a CF-based Content Management System (CMS) that is used to build sites on a modular fashion. 

This new version includes some nice features such as:

- Template management (author and manage your own page templates and layouts)
- Module maker (create and customize your own configurable modules/widgets)
- Site monitor (monitor site, cache, and memory status of your sites from within ColdBricks)
- Fully modular and extensible architecture (think &apos;custom plugins&apos;)
- A new and more simpler page management format
- Create your own catalog of resources to use in your site (great complement to the ModuleMaker)
- Completely updated rendering engine (yes, that means HomePortals 3.1)
- And more!

At this moment there is not an official distribution package, but if you want to play around with it (and help me test and/or provide feedback), here are the download links:

&lt;a href=&quot;http://www.coldbricks.com/download.cfm&quot;&gt;ColdBricks 1.1 (Beta)&lt;/a&gt;

Also you will need the new version of HomePortals:
&lt;a href=&quot;http://www.homeportals.net/downloads.cfm&quot;&gt;HomePortals 3.1&lt;/a&gt;

For both of these, just download and unzip on the root folder of your site, and go to http://your_domain/ColdBricks to get started.

Additionally some of the site templates in ColdBricks, like the StartPage and the Blog, require a couple of HomePortals plugins. Here are the links:

&lt;a href=&quot;http://www.homeportals.net/downloads.cfm&quot;&gt;HomePortalsAccounts&lt;/a&gt;

&lt;a href=&quot;http://www.homeportals.net/downloads.cfm&quot;&gt;HomePortalsModules&lt;/a&gt;

Again, just unzip on the root and thats it.

As for requirements, this version has been mostly developed on Railo 3, but was tested on CF 8.0.1. I did all my dev on a Windows machine, so if you test on a *nix or mac, let me know if you run into any upper/lowercase issue.

As always, documentation is still trailing behind (far behind), but i&apos;ll be happy to explain and even write some blog posts to clarify any doubt.

Feedback and bugs are **really** appreciated.

Cheers!

*** UPDATE: I updated the download links to point to the general downloads page for each project, rather than a specific release. From each download page, you may download the &quot;Beta&quot; version for each project. 
				</description>
				
				<category>Homeportals</category>				
				
				<category>Coldfusion</category>				
				
				<category>ColdBricks</category>				
				
				<pubDate>Wed, 24 Jun 2009 15:26:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/6/24/Anyone-wants-to-help-test-the-new-ColdBricks-CMS</guid>
				
			</item>
			
			<item>
				<title>So, How about a templating engine for BlogCFC?</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/5/8/So-How-about-a-templating-engine-for-BlogCFC</link>
				<description>
				
				Recently I finished overhauling the way &lt;a href=&quot;http://www.homeportals.net&quot;&gt;HomePortals&lt;/a&gt; 3.1 handles page templates and wanted to find a real-life (and useful) way in which I could demonstrate its new features. So, in this post I want to show how the templating features in the new HomePortals version can be leveraged to provide layout management capabilities on top of an existing application like &lt;a href=&quot;http://blogcfc.riaforge.org/&quot;&gt;BlogCFC&lt;/a&gt;. Why BlogCFC? well, first because it has a great segmentation between the blogging engine (the actual blog.cfc) and its presentation layer, and second because I already use it on my own blog and have plenty of real-life data to play with.  [More]
				</description>
				
				<category>Homeportals</category>				
				
				<category>Coldfusion</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Fri, 08 May 2009 02:40:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/5/8/So-How-about-a-templating-engine-for-BlogCFC</guid>
				
				<enclosure url="http://www.oscararevalo.com/enclosures/keepItSimple.zip" length="48460" type="application/x-zip"/>
				
			</item>
			
			<item>
				<title>Using jQuery.UI.layout to handle HomePortals layouts</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/4/6/Using-jQueryUIlayout-to-handle-HomePortals-layouts</link>
				<description>
				
				&lt;b&gt;** Update: **&lt;/b&gt; Updated code examples and attached file to be compatible with HomePortals 3.1.570

A few days ago I found out (via tweeter) about &lt;a href=&quot;http://layout.jquery-dev.net/&quot;&gt;this plugin&lt;/a&gt; for jQuery. Apparently UI.Layout is a port or adaptation of &lt;a href=&quot;http://extjs.com/deploy/dev/examples/layout/complex.html&quot;&gt;extJS border-layout&lt;/a&gt; but done the jQuery way. Well, this is basically a plugin to create complex full-screen layouts, with resizable panels and everything... really cool stuff. So I started wondering if I could use this to leverage the way HomePortals deals with page layouts and see if I could use hp to declare the page modules/widgets/content but on a layout controlled by the UI.Layout plugin. It turns out in fact that I was able to mix both projects pretty easily. Here&apos;s how.

First of all, lets jump to the end and see what the finished product looks like

&lt;a href=&quot;http://www.oscararevalo.com/images//ui_layout_1.jpg&quot;&gt;&lt;img src=&quot;http://www.oscararevalo.com/images//ui_layout_1.jpg&quot; width=&quot;500&quot; border=&quot;0&quot;&gt;&lt;/a&gt;

And this is the corresponding HomePortals page:

&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;Page&gt;
	&lt;title&gt;Using jquery UI Layout with HomePortals. Example 1&lt;/title&gt;
	&lt;layout&gt;
		&lt;location name=&quot;header1&quot; type=&quot;region&quot; class=&quot;ui-layout-north&quot; /&gt;
		&lt;location name=&quot;column1&quot; type=&quot;region&quot; class=&quot;ui-layout-west&quot;/&gt;
		&lt;location name=&quot;column2&quot; type=&quot;region&quot; class=&quot;ui-layout-center&quot;/&gt;
		&lt;location name=&quot;column3&quot; type=&quot;region&quot; class=&quot;ui-layout-east&quot;/&gt;
		&lt;location name=&quot;footer1&quot; type=&quot;region&quot; class=&quot;ui-layout-south&quot;/&gt;
	&lt;/layout&gt;
	&lt;eventListeners/&gt;
	&lt;body&gt;
		&lt;content id=&quot;c1&quot; href=&quot;../lorem.txt&quot; location=&quot;header1&quot; title=&quot;c1&quot; /&gt;
		&lt;content id=&quot;c2&quot; href=&quot;../lorem.txt&quot; location=&quot;column1&quot; title=&quot;c2&quot; /&gt;
		&lt;view id=&quot;c3&quot; href=&quot;../about.cfm&quot; location=&quot;column2&quot; title=&quot;c3&quot; /&gt;
		&lt;content id=&quot;c4&quot; href=&quot;../lorem.txt&quot; location=&quot;column3&quot; title=&quot;c4&quot; /&gt;
		&lt;content id=&quot;c5&quot; href=&quot;../lorem.txt&quot; location=&quot;footer1&quot; title=&quot;c5&quot; container=&quot;false&quot; /&gt;
	&lt;/body&gt;
&lt;/Page&gt;
&lt;/code&gt;

You can check out a live demo of this page &lt;a href=&quot;http://www.oscararevalo.com/uilayout/ex1/&quot;&gt;here&lt;/a&gt;.

So, did I pick your interest? well, if yes, then keep reading to find out how this was implemented. At the end of this post you can find a zip with the entire example, but let me go over the important bits here.

** Note that this example requires HomePortals 3.1, and will not work in earlier versions. You can get the latest release &lt;a href=&quot;http://www.homeportals.net/downloads.cfm&quot;&gt;here&lt;/a&gt;

First of all, we need to setup a HomePortals application for this example and set the appropriate environment. For the purpose of this example, our HomePortals application will live on a directory named &quot;uilayout&quot;. You can find the complete dir structure and required files on the attached zip file.

For the main settings we will use the standard config xml file.

&lt;b&gt;homePortals-config.xml.cfm&lt;/b&gt;
&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;homePortals&gt;
	&lt;baseResources&gt;
		&lt;resource href=&quot;../includes/jquery.js&quot; type=&quot;script&quot;/&gt;
		&lt;resource href=&quot;../includes/ui.core.js&quot; type=&quot;script&quot;/&gt;
		&lt;resource href=&quot;../includes/ui.draggable.js&quot; type=&quot;script&quot;/&gt;
		&lt;resource href=&quot;../includes/jquery.layout.js&quot; type=&quot;script&quot;/&gt;
		&lt;resource href=&quot;init.js&quot; type=&quot;script&quot;/&gt;
	&lt;/baseResources&gt;
	&lt;renderTemplates&gt;
		&lt;renderTemplate href=&quot;pageTemplate.htm&quot; type=&quot;page&quot; name=&quot;page&quot; /&gt;
	&lt;/renderTemplates&gt;
&lt;/homePortals&gt;
&lt;/code&gt;

Here we declare all the necessary jQuery javascript files. These are ones required by the UI.Layout plugin plus one additional &quot;init.js&quot; to handle our jQuery initialization routine for this page.

&lt;b&gt;init.js&lt;/b&gt;
&lt;code&gt;
$(document).ready(function () {
	$(&apos;body&apos;).layout({ applyDefaultStyles: true });
});
&lt;/code&gt;

The only thing this does is to initialize the layout plugin.

Then finally the final bit of configuration that we need to add is to define a &quot;page&quot; render template. This is because the overall HTML markup needed by the UI.Layout is way much simpler than the default HTML structure that comes out of the box in HomePortals. The &quot;page&quot; render template controls the overall HTML structure that will be used to render all HomePortals pages.

&lt;b&gt;pageTemplate.htm&lt;/b&gt;
&lt;code&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
	&lt;head&gt;
		&lt;title&gt;$PAGE_TITLE$&lt;/title&gt;
		$PAGE_HTMLHEAD$
	&lt;/head&gt;
	&lt;body onLoad=&quot;$PAGE_ONLOAD$&quot;&gt;
		$PAGE_CUSTOMSECTION[&quot;HEADER&quot;]$
		$PAGE_LAYOUTSECTION[&quot;REGION&quot;][&quot;DIV&quot;]$
		$PAGE_CUSTOMSECTION[&quot;FOOTER&quot;]$
	&lt;/body&gt;
&lt;/html&gt;
&lt;/code&gt;

The relevant part here is the &lt;b&gt;$PAGE_LAYOUTSECTION[&quot;REGION&quot;][&quot;DIV&quot;]$&lt;/b&gt; line. This just tells the HomePortals renderer to render all &quot;region&quot; sections one after another and use DIV tags around them. The HEADER and FOOTER custom sections are really not needed and not even used on this example.

The UI.Layout plugin uses CSS class names on DIV elements to determine the type of layout region. There are five types: center, north, south, east and west; each one with its own specific class name. So, since all our layout regions will be rendered the same, we will need only &quot;one&quot; kind of layout region. We will name this a &quot;region&quot;.

So, once that is in place, we can just declare our pages and use the UI.Layout class definitions to create the layout. Like this:

&lt;b&gt;default.xml&lt;/b&gt;
&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;Page&gt;
	&lt;title&gt;Using jquery UI Layout with HomePortals. Example 1&lt;/title&gt;
	&lt;layout&gt;
		&lt;location name=&quot;header1&quot; type=&quot;region&quot; class=&quot;ui-layout-north&quot; /&gt;
		&lt;location name=&quot;column1&quot; type=&quot;region&quot; class=&quot;ui-layout-west&quot;/&gt;
		&lt;location name=&quot;column2&quot; type=&quot;region&quot; class=&quot;ui-layout-center&quot;/&gt;
		&lt;location name=&quot;column3&quot; type=&quot;region&quot; class=&quot;ui-layout-east&quot;/&gt;
		&lt;location name=&quot;footer1&quot; type=&quot;region&quot; class=&quot;ui-layout-south&quot;/&gt;
	&lt;/layout&gt;
	&lt;body&gt;
		&lt;content id=&quot;c1&quot; href=&quot;../lorem.txt&quot; location=&quot;header1&quot; title=&quot;c1&quot; /&gt;
		&lt;content id=&quot;c2&quot; href=&quot;../lorem.txt&quot; location=&quot;column1&quot; title=&quot;c2&quot; /&gt;
		&lt;view id=&quot;c3&quot; href=&quot;../about.cfm&quot; location=&quot;column2&quot; title=&quot;c3&quot; /&gt;
		&lt;content id=&quot;c4&quot; href=&quot;../lorem.txt&quot; location=&quot;column3&quot; title=&quot;c4&quot; /&gt;
		&lt;content id=&quot;c5&quot; href=&quot;../lorem.txt&quot; location=&quot;footer1&quot; title=&quot;c5&quot; container=&quot;false&quot; /&gt;
	&lt;/body&gt;
&lt;/Page&gt;
&lt;/code&gt;

The &lt;b&gt;layout&lt;/b&gt; section is where we declare the page layout using the UI.Layout class names for the different regions. So if we want to customize the layout, say, do not have a footer, or have only one left column, we can change that here easily by just removing the location tags that we don&apos;t need.

The next section &lt;b&gt;body&lt;/b&gt; is where we declare what goes into which layout region. the &lt;b&gt;content&lt;/b&gt; tags just display plain text or html content while the &lt;b&gt;view&lt;/b&gt; tag does a cfinclude of a CFML template. Of course you can now use the whole HomePortals framework features to create your own tags and do whatever you need.

And since jQuery is so awesome, &lt;a href=&quot;http://www.oscararevalo.com/uilayout/ex2/&quot;&gt;here&lt;/a&gt; is another example that uses pretty much the same setup but adds some drag &amp; drop funkyness. 
				</description>
				
				<category>Homeportals</category>				
				
				<category>jQuery</category>				
				
				<category>Coldfusion</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Mon, 06 Apr 2009 18:57:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/4/6/Using-jQueryUIlayout-to-handle-HomePortals-layouts</guid>
				
				<enclosure url="http://www.oscararevalo.com/enclosures/uilayout-updated.zip" length="135475" type="application/octet-stream"/>
				
			</item>
			
			<item>
				<title>HomePortals 3.1 Beta (Part 2)</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/3/27/HomePortals-31-Beta-Part-2</link>
				<description>
				
				A couple of days ago I &lt;a href=&quot;http://www.oscararevalo.com/index.cfm/2009/3/23/HomePortals-31-Early-Beta&quot;&gt;wrote a post&lt;/a&gt; talking about the new iteration of the &lt;a href=&quot;http://www.homeportals.net&quot;&gt;HomePortals framework&lt;/a&gt;. Today I want to continue talking about the new features for this release. In the previous article I posted an example template of a sample HomePortals page showcasing the new API, today I want to go over the example of provide more insight into the new objects and methods exposed by the framework.

As a reminder, here is the code from the previous template:

&lt;b&gt;index.cfm&lt;/b&gt;
&lt;code&gt;
&lt;cfscript&gt;
   // initalize homePortals    

   application.homePortals = CreateObject(&quot;component&quot;,&quot;homePortals.Components.homePortals&quot;).init(&quot;/testPage/&quot;);
   application.homePortals.getConfig().setContentRenderer(&quot;rss&quot;,&quot;testPage.rss&quot;);


   // declare modules    

   feed1 = {
		 moduleType = &quot;rss&quot;,
		 href=&quot;http://www.oscararevalo.com/rss.cfm&quot;,
		 title=&quot;Oscar Arevalo&apos;s Blog&quot;
	  };

   feed2 = {
		 moduleType = &quot;rss&quot;,
		 href=&quot;http://www.railo.ch/blog/rss.cfm?mode=full&quot;,
		 title=&quot;Railo Blog&quot;,
		 maxItems=&quot;3&quot;
	  };

   feed3 = {
		 moduleType = &quot;rss&quot;,
		 href=&quot;http://www.dzone.com/links/feed/frontpage/rss.xml&quot;,
		 title=&quot;DZone.com&quot;,
		 maxItems=&quot;10&quot;
	  };


   // assemble page    

   oPage = createObject(&quot;component&quot;,&quot;homePortals.Components.pageBean&quot;)
		 .init()
		 .setTitle(&quot;My News Page&quot;)
		 .setSkinID(&quot;rounded&quot;)
		 .addLayoutRegion(&quot;col1&quot;,&quot;column&quot;)
		 .addLayoutRegion(&quot;col2&quot;,&quot;column&quot;)
		 .addLayoutRegion(&quot;col3&quot;,&quot;column&quot;)
		 .addModule(&quot;mod1&quot;,&quot;col1&quot;,feed1)
		 .addModule(&quot;mod2&quot;,&quot;col2&quot;,feed2)
		 .addModule(&quot;mod3&quot;,&quot;col3&quot;,feed3)
	  ;

   // load and render page   

   oPageRenderer = application.homePortals.loadPageBean(oPage);
   html = oPageRenderer.renderPage();
&lt;/cfscript&gt;

&lt;!--- output page ---&gt;
&lt;cfoutput&gt;#html#&lt;/cfoutput&gt;
&lt;/code&gt;

if you want to see how the final product looks, click &lt;a href=&quot;http://www.oscararevalo.com/images//news_page_example1.jpg&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.

Ok, so lets start from the beginning:



&lt;b&gt;Setting Up The Environment&lt;/b&gt;

&lt;code&gt;
   // initalize homePortals    
   Application.homePortals = CreateObject(&quot;component&quot;,&quot;homePortals.Components.homePortals&quot;).init(&quot;/testPage/&quot;);
&lt;/code&gt;

This line initializes the homePortals environment as a singleton on the Application scope. This reads all the default configuration settings, initializes and loads a few objects, and leaves everything ready for you to start rendering your homePortals pages.

Each HomePortals instance is bound to a specific path, which is where your application is located. This path can be a directory off the webserver root (like in this example), or even be the webserver root itself. To declare an application at the root level, just call the init method as &lt;b&gt;init(&quot;/&quot;)&lt;/b&gt;

After HomePortals is initialized, we use our instance to call any methods, render pages, modify settings or anything else you want to do. 



Now we need to need to start customizing our HomePortals instance to do whatever we want. Since what we want to do in our example is render a few RSS feeds, we need to show HomePortals how to do this. The way we do this is by adding &quot;ContentRenderers&quot;. A Content Renderer is a little widget that is responsible for generating some kind of content. This content can be anything: rss feeds, calendars, external HTML content, cfincludes, etc. All content renderers are implemented as CFCs and must extend homePortals.components.contentTagRenderer. The details of their implementation go a bit beyond this example, but basically they just generate whatever output they need and return it using an output buffer.

You can take a look at the rss.cfc component included in the example files to see how a contentRenderer is implemented. 

The following line illustrates how we can programmatically tell HomePortals about the content renderer that we want to use:

&lt;code&gt;
   application.homePortals.getConfig().setContentRenderer(&quot;rss&quot;,&quot;testPage.rss&quot;);
&lt;/code&gt;

Here we are declaring a content renderer named &quot;rss&quot; and give the path to the corresponding CFC in dot-notation form. Note that you can define as many content renderers as you want or need.

That&apos;s all the environment configuration that we need. Now we can building our page.


&lt;b&gt;Building a Page&lt;/b&gt;

HomePortals is all about modular content and reusability. For that purpose, everything that goes into the page is defined outside of the page itself, so that it can be reused multiple times across a site or application. Although our example consists of only one single page, we will define our &quot;modules&quot; or content widgets individually. We already saw that it is the content renderer that is the one responsible for knowing HOW to render the output. So we only need to tell it WHAT to render. In our case we just want three different RSS feeds. Let&apos;s use the feeds for this blog, the Railo blog and the DZone blog.

Defining the page content is really simple, we just need to do it declaratively using common structures. We need to create a struct variable for each of the widgets we want to add to our page. There are few keys that are used internally and have special meanings like &quot;moduleType&quot; and &quot;title&quot;, but everything else will be considered an &quot;attribute&quot; of the widget and will be available to the content renderer to customize the output. The only required key on the struct is &quot;moduleType&quot;, which is how you tell HomePortals which content renderer to use. Since we declared our RSS renderer with to be named &quot;rss&quot;, then that&apos;s what we need to use for each widget.

&lt;code&gt;
   // declare modules    
   feed1 = {
		 moduleType = &quot;rss&quot;,
		 href=&quot;http://www.oscararevalo.com/rss.cfm&quot;,
		 title=&quot;Oscar Arevalo&apos;s Blog&quot;
	  };

   feed2 = {
		 moduleType = &quot;rss&quot;,
		 href=&quot;http://www.railo.ch/blog/rss.cfm?mode=full&quot;,
		 title=&quot;Railo Blog&quot;,
		 maxItems=&quot;3&quot;
	  };

   feed3 = {
		 moduleType = &quot;rss&quot;,
		 href=&quot;http://www.dzone.com/links/feed/frontpage/rss.xml&quot;,
		 title=&quot;DZone.com&quot;,
		 maxItems=&quot;10&quot;
	  };
&lt;/code&gt;

In this example we are defining the three widgets to use the same content renderer (rss) but there is no restriction here, you can mix and match module types  as long as you tell HomePortals about them.


Now it&apos;s time to assemble the final page:

&lt;code&gt;
   // assemble page    
   oPage = createObject(&quot;component&quot;,&quot;homePortals.Components.pageBean&quot;)
		 .init()
		 .setTitle(&quot;My News Page&quot;)
		 .setSkinID(&quot;rounded&quot;)
		 .addLayoutRegion(&quot;col1&quot;,&quot;column&quot;)
		 .addLayoutRegion(&quot;col2&quot;,&quot;column&quot;)
		 .addLayoutRegion(&quot;col3&quot;,&quot;column&quot;)
		 .addModule(&quot;mod1&quot;,&quot;col1&quot;,feed1)
		 .addModule(&quot;mod2&quot;,&quot;col2&quot;,feed2)
		 .addModule(&quot;mod3&quot;,&quot;col3&quot;,feed3)
	  ;
&lt;/code&gt;

Programmatically, all pages are represented as instances of the pageBean object. All the modifier methods in the CFC return the same instance, that way you can chain all your modifier methods together to form a mini DSL to define a page. I think each of the methods have pretty self-explanatory methods as to what each one does.

First, we are initializing the instance, then setting a page title, and setting a skin (this is a way to determine the look and feel of the entire page). Next we are defining three layout regions of type column, with names col1, col2 and col3. Finally we are assigning our widgets to each of the three columns with addModule(). The first argument is a unique identifier for the widget, the second is the layout region name where we want to place it and the third is the struct containing the widget attributes.


&lt;b&gt;Rendering The Output&lt;/b&gt;

Finally is time to send something to the screen. This is done by the following lines:

&lt;code&gt;
   // load and render page   

   oPageRenderer = application.homePortals.loadPageBean(oPage);
   html = oPageRenderer.renderPage();
&lt;/cfscript&gt;
&lt;/code&gt;


We start by asking HomePortals to process our pageBean instance and prepare it for rendering. Here is where all the magic happens. HomePortals does its thing and the call to loadPageBean() returns an instance of a pageRenderer object. This is the guy responsible for actually spitting the HTML back to us, and HTML is what we get when we call its renderPage() method. Note that homePortals has not actually sent any content to the screen, it just has given us back the HTML for the page we declared, it is up to us to decide how that HTML will be used.

And so we output the generated HTML to our browser for the grand finale...

&lt;code&gt;
&lt;!--- output page ---&gt;
&lt;cfoutput&gt;#html#&lt;/cfoutput&gt;
&lt;/code&gt;

And here is a screenshot of how this actually looks:

&lt;img src=&quot;http://www.oscararevalo.com/images//news_page_example1.jpg&quot;&gt;

Not bad for a few lines of code, isn&apos;t it?

On the next post I&apos;ll talk about other new features and fancy tricks. 
				</description>
				
				<category>Homeportals</category>				
				
				<pubDate>Fri, 27 Mar 2009 20:53:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/3/27/HomePortals-31-Beta-Part-2</guid>
				
			</item>
			
			<item>
				<title>HomePortals 3.1 Early Beta</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/3/23/HomePortals-31-Early-Beta</link>
				<description>
				
				For the last few weeks I have been working again on the development of &lt;a href=&quot;http://www.homeportals.net/&quot;&gt;HomePortals&lt;/a&gt;; picking up where I left a few months back and implementing a couple more ideas that I had. As I get closer to a final &quot;3.1&quot; release, I wanted to start sharing some info on what has changed and explain a bit more on the new features and what possibilities they open.

First of all, if you are unfamiliar with &lt;a href=&quot;http://www.homeportals.net/&quot;&gt;HomePortals&lt;/a&gt; it is basically a web-based framework to handle modular layout rendering. The whole point is to provide a declarative way of indicating which content goes where on a page.

&lt;br /&gt;

&lt;b&gt;Back To Basics&lt;/b&gt;

For this release I wanted to zero-in on making HomePortals a framework/environment that would be easy and even fun to program in. I focused a lot on cleaning up and removing everything that was not part of the &quot;core&quot; functionality or was not essential to the main goal of the project, which was to provide an engine to layout modular content on a web page. 

This cleanup process led to two major changes: 

&lt;ul&gt;
&lt;li&gt;a) A more compact API and&lt;/li&gt;
&lt;li&gt;b) An extensible plugin architecture to extend the available features&lt;/li&gt;
&lt;/ul&gt;

&lt;br /&gt;&lt;br /&gt;

&lt;b&gt;A cleaned up and easier to use API&lt;/b&gt;&lt;br /&gt;
First, the directory containing the framework has now been renamed to a more consistent &quot;/homePortals&quot; instead of the awkward and potentially conflictive &quot;/Home&quot; of previous versions.&lt;br /&gt;

The whole application environment can now be contained on a single instance of the homePortals.cfc object, which can be initialized at its minimum just by passing the path to wherever the host application is located. No need for config files or special folder structures. You now have the option to completely configure an application programatically (calling a bunch of setters) or, as always, by having a config file with your settings. Its your choice.

So for example, if I want to use homePortals in an application with path  &lt;b&gt;/mySuperApp&lt;/b&gt;, I just need to have this line somewhere in my application code (Application.cfc, index.cfm, wherever you like):

&lt;code&gt;
&lt;cfset application.homePortals = createObject(&quot;component&quot;,&quot;components.homePortals.homePortals&quot;).init(&quot;/mySuperApp&quot;)&gt;
&lt;/code&gt;

And you don&apos;t even need to use the application.homePortals variable; you can put your instance anywhere. However, since IT IS a whole environment you may really want to consider using it as a singleton to avoid going through the initialization process again and again.

Once initialized, the homePortals instance lets you access any part of the HomePortals environment. You can modify its settings, call the high level features, and even go into a lot of the internal guts to get the exact behaviour you want.

The fact that the entire homePortals environment is contained within a single cfc instance also makes it very easy to integrate homePortals into existing applications or even other frameworks. This way you can have your application driven by your framework/non-framework of choice and still leverage the layout rendering features of HomePortals.

I already mentioned that the new API lets you do everything programmatically (previous versions required a lot of XML files). To give an idea of what kind of things it lets you do here is a brief cfm template that renders a three-column layout and places a small RSS feed reader on each one.

&lt;em&gt;&lt;b&gt;Note:&lt;/b&gt; For the purpose of this example, lets assume the following template is located at /testPage/index.cfm&lt;/em&gt;

&lt;code&gt;
&lt;cfscript&gt;
	// initalize homePortals
	
	application.homePortals = CreateObject(&quot;component&quot;,&quot;homePortals.Components.homePortals&quot;).init(&quot;/testPage/&quot;);
	application.homePortals.getConfig().setContentRenderer(&quot;rss&quot;,&quot;testPage.rss&quot;);

	
	// declare modules
	
	feed1 = {
			moduleType = &quot;rss&quot;,
			href=&quot;http://www.oscararevalo.com/rss.cfm&quot;,
			title=&quot;Oscar Arevalo&apos;s Blog&quot;
		};

	feed2 = {
			moduleType = &quot;rss&quot;,
			href=&quot;http://www.railo.ch/blog/rss.cfm?mode=full&quot;,
			title=&quot;Railo Blog&quot;,
			maxItems=&quot;3&quot;
		};

	feed3 = {
			moduleType = &quot;rss&quot;,
			href=&quot;http://www.dzone.com/links/feed/frontpage/rss.xml&quot;,
			title=&quot;DZone.com&quot;,
			maxItems=&quot;10&quot;
		};
	
	
	// assemble page
	
	oPage = createObject(&quot;component&quot;,&quot;homePortals.Components.pageBean&quot;)
			.init()
			.setTitle(&quot;My News Page&quot;)
			.setSkinID(&quot;rounded&quot;)
			.addLayoutRegion(&quot;col1&quot;,&quot;column&quot;)
			.addLayoutRegion(&quot;col2&quot;,&quot;column&quot;)
			.addLayoutRegion(&quot;col3&quot;,&quot;column&quot;)
			.addModule(&quot;mod1&quot;,&quot;col1&quot;,feed1)
			.addModule(&quot;mod2&quot;,&quot;col2&quot;,feed2)
			.addModule(&quot;mod3&quot;,&quot;col3&quot;,feed3)
		;
	
	// load and render page		
	
	oPageRenderer = application.homePortals.loadPageBean(oPage);
	html = oPageRenderer.renderPage();
&lt;/cfscript&gt;

&lt;!--- output page ---&gt;
&lt;cfoutput&gt;#html#&lt;/cfoutput&gt;

&lt;/code&gt;

I know there are a lot of things to explain here, and I will go by each one of those, but I think this gives an idea about the &quot;feel&quot; of what can be done programmatically in 3.1. 

On the next post I&apos;ll go over the previous template explaining what is what, and then talk a bit about the Plugin architecture in 3.1

For now I am attaching to this post the necessary files to run the above example. The current beta for 3.1 can be downloaded &lt;a href=&quot;http://www.homeportals.net/includes/download.cfm?downloadID=24&quot;&gt;here&lt;/a&gt;. BE WARNED THAT THIS IS A VERY EARLY BETA, SOME STUFF MAY NOT WORK AND MAY CHANGE BEFORE THE FINAL RELEASE!!! 

Any kind of feedback is greatly appreciated.

Have fun! 
				</description>
				
				<category>Homeportals</category>				
				
				<pubDate>Mon, 23 Mar 2009 20:35:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/3/23/HomePortals-31-Early-Beta</guid>
				
				<enclosure url="http://www.oscararevalo.com/enclosures/testPage.zip" length="1802" type="application/octet-stream"/>
				
			</item>
			
			<item>
				<title>Back to blogging</title>
				<link>http://www.oscararevalo.com/index.cfm/2009/3/16/Back-to-blogging</link>
				<description>
				
				To the couple of misguided souls that used to pay attention to my blog, you may have noticed that after an unfortunate db crash last year (resulting in loosing a couple of really interesting comment threads) I seemed to drop down from the face of the blogosphere and just abandoned completely my blog. Well, what really happened was that the last few months of 2008 and the beginning of 2009, have been pretty hectic in my life, sorta like a rollercoaster of life changes that took me (literally) from one corner of the country to the other.

First, I left a job I had had for a little more than four years to seek fame and fortune elsewhere. Working at &lt;a href=&apos;http://www.sandals.com&apos;&gt;Unique Vacations/Sandals Resorts&lt;/a&gt; was a very interesting experience; I made great friendships, learned from a &lt;a href=&apos;http://www.luismajano.com&apos;&gt;master developer&lt;/a&gt;, and tried my hand at building/improving pretty interesting and &lt;a href=&apos;http://obe.sandals.com&apos;&gt;high profile applications&lt;/a&gt;. But in the end I felt it was time for a change and that I had to move on. So I left Miami and headed north to Tampa.

In Tampa something extraordinary happened: our first child, Diego, was born. The experience of being a father for the first time is pretty unbelievable and way too much to put in words. We stayed in Tampa for a couple of months, while I worked for a little bit at a consulting/software company there. Then, with the turn of the new year, I was presented with an extraordinary opportunity to work together with some &lt;a href=&apos;http://www.joshuafrankamp.com&apos;&gt;very&lt;/a&gt; &lt;a href=&apos;http://www.barneyb.com&apos;&gt;smart&lt;/a&gt; &lt;a href=&apos;http://www.mentor.com&apos;&gt;people&lt;/a&gt; on a beautiful place called Oregon. So yep, at the beginning of the year, my wife, the baby and I, packed our things and flew cross-country to start a new life on the other corner of the country.

And so, here I am, living south of Portland, Oregon, surrounded by a beautiful scenery, working with a great team on challenging projects and technologies, and blessed with a wonderful baby and wife.

Finally, I already started working again in a couple of personal projects. Over the next few weeks, I&apos;ll post about some improvements for the next versions of &lt;a href=&apos;http://www.homeportals.net&apos;&gt;HomePortals&lt;/a&gt; and &lt;a href=&apos;http://www.coldbricks.com&apos;&gt;ColdBricks&lt;/a&gt; to give an idea of where they stand, and hopefully get some feedback about them too.

Until then, have fun and code a lot. 
				</description>
				
				<category>Homeportals</category>				
				
				<category>Personal</category>				
				
				<category>ColdBricks</category>				
				
				<category>General</category>				
				
				<pubDate>Mon, 16 Mar 2009 03:27:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2009/3/16/Back-to-blogging</guid>
				
			</item>
			
			<item>
				<title>Using HomePortals and ColdBox Together</title>
				<link>http://www.oscararevalo.com/index.cfm/2008/6/20/Using-HomePortals-and-ColdBox-Together</link>
				<description>
				
				This afternoon I have been experimenting with a somewhat interesting and funky idea: mixing the layout rendering engine of HomePortals with a full application framework like ColdBox. 

Why? Because integrating these two engines would allow developers to create applications that can benefit from the modularity provided by HomePortals on the front end and at the same time enjoy all the swiss-army knife functionality provided by ColdBox, in particular the rich control over the lifecycle of the requests and the application. 

For example, this could be great for developing dashboards or BI applications. HomePortals would make it easy to create a modular interface based on small widgets or pods, and ColdBox could handle the overall application structure and tasks (security, persistence, logging, etc). 

In theory it sounded possible, so I just went ahead and see what I could get. Well, at the end I found that the two worked beautifully together.

I do not have yet a full working application that I can share, so for the time being this is just &quot;proof-of-concept&quot; type of stuff. 

Here is what I did.

** For this I used ColdBox 2.5.2 and HomePortals 3.0.189, which are the current releases for both projects.

First I created a new coldbox application using the &quot;ApplicationTemplate&quot; found on the standard ColdBox distro. I named the new application &quot;hpcoldbox&quot; and put it on a directory under my web root so I could get to it by going to:   http://localhost/hpcoldbox

The first part was setting up the HomePortals side, which was basically just modifying the newly created application to look like a HomePortals site and then writing a sample page to display. Let me describe this step by step.

Within the &quot;config&quot; directory I added the two main HomePortals configuration files: homePortals-config.xml and accounts-config.xml.cfm

homePortals-config.xml:

&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;homePortals&gt;
	&lt;appRoot&gt;/hpcoldbox/&lt;/appRoot&gt;
	&lt;accountsRoot&gt;/hpcoldbox/accounts/&lt;/accountsRoot&gt;
&lt;/homePortals&gt;
&lt;/code&gt;

accounts-config.xml.cfm
&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;homePortalsAccounts version=&quot;1.0&quot;&gt;

	&lt;!-- Root directory for account directories --&gt;
	&lt;accountsRoot&gt;/hpcoldbox/accounts/&lt;/accountsRoot&gt;

	&lt;!-- storage type --&gt;
	&lt;storageType&gt;xml&lt;/storageType&gt;
	&lt;storageFileHREF&gt;/hpcoldbox/accounts/accounts.xml&lt;/storageFileHREF&gt;

&lt;/homePortalsAccounts&gt;
&lt;/code&gt;

Those files provide a very basic configuration for HomePortals. The first one just states where the application is located and where will the account files be stored. The second one just expands a bit on some details about how we are going to store the account data.

Next I needed to create an account an a sample page. For that, under the root of the new application, I created a new directory named &quot;accounts&quot;, with the following internal structure:

&lt;img src=&quot;http://www.oscararevalo.com/images//hpcoldbox_accountsdir.gif&quot;&gt;

To make things easier I just copied the accounts.xml and site.xml from /Home/Accounts/accounts.xml and /Home/Accounts/default/site.xml since I was using pretty much a default setup.

For default.xml, which is our sample page, I used the following code:

&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;Page access=&quot;general&quot; owner=&quot;default&quot;&gt;
	&lt;title&gt;HP+ColdBox&lt;/title&gt;
	&lt;stylesheet href=&quot;/Home/resourceLibrary/Pagetemplates/layouts/layoutTemplates.css&quot;/&gt;
	&lt;skin id=&quot;boxy&quot;/&gt;
	&lt;layout&gt;
		&lt;location class=&quot;column_small&quot; id=&quot;h_location_column_2&quot; name=&quot;left&quot; type=&quot;column&quot;/&gt;
		&lt;location class=&quot;column&quot; id=&quot;h_location_column_3&quot; name=&quot;middle&quot; type=&quot;column&quot;/&gt;
		&lt;location class=&quot;column_small&quot; id=&quot;h_location_column_4&quot; name=&quot;right&quot; type=&quot;column&quot;/&gt;
	&lt;/layout&gt;
	&lt;modules&gt;
		&lt;module displayMode=&quot;short&quot; id=&quot;rssReader1&quot; location=&quot;left&quot; maxItems=&quot;10&quot; name=&quot;RSSReader/RSSReader&quot; 
				rss=&quot;http://www.coldfusionbloggers.org/rss.cfm&quot; /&gt;
		&lt;module id=&quot;FlickrFeed1&quot; location=&quot;middle&quot; maxItems=&quot;10&quot; name=&quot;flickrFeed/flickrFeed&quot; 
				onClickGotoFlickr=&quot;true&quot; showheader=&quot;true&quot; tags=&quot;coldfusion&quot; title=&quot;FlickrFeed1&quot;/&gt;
		&lt;module displayMode=&quot;short&quot; id=&quot;rssReader2&quot; location=&quot;right&quot; maxItems=&quot;10&quot; name=&quot;RSSReader/RSSReader&quot; 
				rss=&quot;http://digg.com/rss/index.xml&quot; title=&quot;Digg&quot;/&gt;
	&lt;/modules&gt;
&lt;/Page&gt;
&lt;/code&gt;

Nothing fancy, just display a couple of feeds and a flicker photo stream.

Finally I had to create a template to allow HomePortals modules to talk back to HomePortals in an asynchronous way. So I created a file named gateway.cfm in the root of the application with the following contents:

&lt;code&gt;
&lt;cfinclude template=&quot;/Home/Common/Templates/gateway.cfm&quot;&gt;
&lt;/code&gt;

That was it for the HomePortals side. The next part was doing the ColdBox part.

HomePortals works basically as an API, that means that everything is object-based, so the crucial part is to have an instance of the HomePortals main object, which is Home.components.homePortals. The best practice is to instantiate it as a singleton and just leave it on the application scope. Since we need to do this only once for the lifetime of the application, I added the following code to /hpcoldbox/handlers/main.cfc

&lt;code&gt;
&lt;cffunction name=&quot;onAppInit&quot; access=&quot;public&quot; returntype=&quot;void&quot; output=&quot;false&quot;&gt;
	&lt;cfargument name=&quot;Event&quot; type=&quot;coldbox.system.beans.requestContext&quot;&gt;
	&lt;!--- ON Application Start Here ---&gt;
	&lt;cfset application.homePortals = createObject(&quot;component&quot;,&quot;Home.components.homePortals&quot;).init(&quot;/hpcoldbox/&quot;)&gt;
&lt;/cffunction&gt;
&lt;/code&gt;

I know ColdBox offers more options for these kind of things but for the purpose of the experiment this seemed like the quickest way to get up and running.

Then, I modified the default event (general.dspHome) in /hpcoldbox/handlers/general.cfc

&lt;code&gt;
&lt;cfcomponent name=&quot;general&quot; extends=&quot;coldbox.system.eventhandler&quot; output=&quot;false&quot;&gt;
	&lt;cfsetting enablecfoutputonly=&quot;false&quot;&gt;

	&lt;cffunction name=&quot;dspHome&quot; access=&quot;public&quot; returntype=&quot;void&quot; output=&quot;false&quot;&gt;
		&lt;cfargument name=&quot;Event&quot; type=&quot;coldbox.system.beans.requestContext&quot;&gt;
	
		&lt;cfset var account = &quot;default&quot;&gt;
		&lt;cfset var page = &quot;default&quot;&gt;

		&lt;cfset var oPageRenderer = application.homePortals.loadPage(account, page)&gt;
		&lt;cfset var html = oPageRenderer.renderPage()&gt;
	
		&lt;cfset Event.setValue(&quot;html&quot;, html)&gt;	
	
		&lt;!--- Set the View To Display, after Logic ---&gt;
		&lt;cfset Event.setView(&quot;home&quot;)&gt;
	&lt;/cffunction&gt;
&lt;/cfcomponent&gt;
&lt;/code&gt;

What this code does is get the homePortals instance and load the page named &quot;default&quot; on the account named &quot;default&quot;. After the page has been loaded and parsed internally, it then asks for the rendered HTML corresponding to that page. Then we set that returned html content into a variable named &quot;html&quot; in the request collection. Finally we set the view to render.

Notice also the &amp;lt;cfsetting&amp;gt; tag that I had to add on top. This was needed because it seems that coldbox internally has it set to true and that affected the rendering of some parts of the output in HomePortals.

Next I modified the default layout file (/hpcoldbox/layouts/Layout.Main.cfm) to just limit itself to render the view. I did this because the output of the HomePortals rendering is already a full HTML document. However, you can modify your HomePortals settings to only a partial HTML page and use ColdBox layouts to handle the page&apos;s HTML structure.

This is what my Layout.Main.cfm looked like:

&lt;code&gt;
&lt;cfoutput&gt;#renderView()#&lt;/cfoutput&gt;
&lt;/code&gt;

The last piece was updating the view (views/home.cfm) in the same way.

&lt;code&gt;
&lt;cfset html = Event.getValue(&quot;html&quot;)&gt;
&lt;cfoutput&gt;#html#&lt;/cfoutput&gt;
&lt;/code&gt;

And that was it, when I went into my browser and fired up the application, the HomePortals page was rendered perfectly.

Again, this is a very simple proof-of-concept but I trust that if you are familiar with ColdBox you can see how this fully integrates into the application. You could have some pages rendered normally and some pages rendered with HomePortals; and thats without even going into further integration within custom HomePortals modules that you could write that could take advantage of the coldboxproxy to make even more interesting things.

I am really excited to have been able to find this out, as I said at the beginning, because I think it opens the door to very interesting opportunities. It would also be interesting to see if HomePortals can also be integrated in the same manner with Model-Glue, MachI, Fusebox, or other full application frameworks; however my practical knowledge of those is even less than what I know about ColdBox, so if anyone is willing to give it a try I&apos;d love to hear how it went.

Thats it for now,

Happy coding! 
				</description>
				
				<category>Homeportals</category>				
				
				<category>coldbox</category>				
				
				<category>Coldfusion</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Fri, 20 Jun 2008 19:32:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2008/6/20/Using-HomePortals-and-ColdBox-Together</guid>
				
			</item>
			</channel></rss>