<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>OscarArevalo.com - frameworks</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:18:16 -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>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>Update to &apos;Core&apos; Framework. Now in GitHub!</title>
				<link>http://www.oscararevalo.com/index.cfm/2010/2/10/Update-to-Core-Framework-Now-in-GitHub</link>
				<description>
				
				A while ago I shared a small &lt;a href=&quot;http://www.oscararevalo.com/index.cfm/2008/7/29/A-Peek-Inside-the-Software-Factory-Core-Framework&quot;&gt;framework&lt;/a&gt; I created which I use to develop pretty much all of my projects (both open source and paid engagements). The framework, as is usual for web frameworks, follows the MVC and Front Controller patterns; also like Sean Corfield&apos;s &lt;a href=&quot;http://fw1.riaforge.org/&quot;&gt;FW/1&lt;/a&gt; and Barney&apos;s &lt;a href=&quot;http://www.barneyb.com/barneyblog/projects/fb3lite/&quot;&gt;FB3 Lite&lt;/a&gt; (and many others) it has an emphasis on minimalism and makes an effort to stay out of the way as much as possible. I recently made some changes to the framework and wanted to share them with the community.  [More]
				</description>
				
				<category>Architecture</category>				
				
				<category>Core</category>				
				
				<category>Coldfusion</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Wed, 10 Feb 2010 03:31:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2010/2/10/Update-to-Core-Framework-Now-in-GitHub</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>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>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>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>A Peek Inside the Software Factory: Core Framework</title>
				<link>http://www.oscararevalo.com/index.cfm/2008/7/29/A-Peek-Inside-the-Software-Factory-Core-Framework</link>
				<description>
				
				&lt;b&gt; *** THIS IS A REPOST OF AN EARLIER ARTICLE THAT GOT WIPED OUT ON A RECENT DB CRASH. *** &lt;/b&gt;

If you ever wanted to modify ColdBricks or BugLog, but didn&apos;t understood how these application were constructed; or if you just want to see yet another way of developing CF applications, then this post may be for you.

I just posted &lt;a href=&quot;http://www.oscararevalo.com/page.cfm/core&quot;&gt;some pages&lt;/a&gt; describing the framework I use for developing CF projects. It doesn&apos;t even has a proper name, I just call it &quot;Core&quot; due to its simplicity and its minimalistic nature. The basic principle of this framework, and the reason why I choose to use it instead of going with more traditional offerings, is that it only focuses on one thing and one thing only: provide a formal mechanism for going from one page to another and for invoking actions.

It doesn&apos;t do any fancy things, no complex request lifecycles, no sophisticated caching, no extensive API, none; however, it does provide enough extension points to which I can hook any functionality that I desire on a per-project basis. Basically the framework consists on a Front Controller implementation, a base event handler and a few conventions for directory structure and nomenclature.

Anyway, you can find the code and read more about this framework by going to the &lt;a href=&quot;http://www.oscararevalo.com/projects&quot;&gt;Projects&lt;/a&gt; section or by going directly &lt;a href=&quot;http://www.oscararevalo.com/page.cfm/core&quot;&gt;here&lt;/a&gt;. 
				</description>
				
				<category>Architecture</category>				
				
				<category>Core</category>				
				
				<category>Coldfusion</category>				
				
				<category>ColdBricks</category>				
				
				<category>frameworks</category>				
				
				<category>BugLogHQ</category>				
				
				<category>General</category>				
				
				<pubDate>Tue, 29 Jul 2008 00:11:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2008/7/29/A-Peek-Inside-the-Software-Factory-Core-Framework</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>
			
			<item>
				<title>A Rant on Frameworks, Libraries, and Shells</title>
				<link>http://www.oscararevalo.com/index.cfm/2008/5/30/A-Rant-on-Frameworks-Libraries-and-Shells</link>
				<description>
				
				We spend &lt;a href=&quot;http://www.coldfusionguy.com/ColdFusion/blog/index.cfm/2008/5/23/Do-I-Suck-Because-I-Dont-Use-Frameworks&quot;&gt;ridiculous amount of time&lt;/a&gt; discussing the merits (or lack of) of the different MVC frameworks in ColdFusion, and we keep doing it again and again. Well, at least everyone should agree that when it comes time to decide how to go from one page to another we got that pretty much well covered. But for all the OO fever taking over the hard-core ColdFusion community as of lately, why are we still focusing on the presentation layer still, which honestly is the least OO place in the whole application? Where are the repositories of just plain libraries? components and subsystems that we plug together to provide sophisticated functionality to our applications regardless of how the presentation layer is done.

Yes, we have &lt;A href=&quot;http://www.transfer-orm.com/&quot;&gt;Transfer&lt;/a&gt;, &lt;a href=&quot;http://www.coldspringframework.org/&quot;&gt;ColdSpring&lt;/a&gt;, and &lt;a href=&quot;http://trac.reactorframework.com/&quot;&gt;Reactor&lt;/a&gt;, and they really rock; but it seems that that&apos;s where the list ends. Has nobody written a really tight, super strong, caching library? what about a job-scheduling library? It could be that the lack of these libraries as separate entities is what motivates MVC framework authors to add more and more complexity to their projects, which in turn fuels the discussions of why these frameworks are so bloated and complicated. I know Luis, from &lt;a href=&quot;http://www.coldboxframework.com/&quot;&gt;ColdBox&lt;/a&gt;, has put a lot of effort in building the caching functionality in his framework, and knowing the quality of his code I&apos;m pretty sure it kicks a$$; but sadly is all tied into the framework. Wouldn&apos;t it be much more beneficial to everyone if there were already some project out there that would provide this functionality so that you could just plug it in into your application?

If we have enough of these little libraries that would focus on doing one thing and one thing only, then the &apos;framework&apos; in which an application is built would not need to be these gigantic-swiss-army-knife platforms that we are getting used to. They would become lighter and lighter until they are reduced to a &apos;core&apos;, just down to the basic principle that embodies their core ideas. Imagine a coldbox-core, a modelglue-core, a fusebox-core, super small code bases that just provide the basic guidelines and minimal code to support a proposal on how an application should be structured; And then on top of them we could have &apos;distributions&apos; or &apos;shells&apos;, canned projects that would group together a &apos;core&apos; and a few libraries to put together a basic solution, custom tailored for specific purposes. For example, you could have a shell for an intranet application that includes the framework core, a caching subsytem, a security subsystem, an IOC subsystem and an ORM subsystem; or on the other hand there could be a shell for a plain website that may only include the framework core and a caching subsystem. The bottom line is that all those parts can be plugged in an out and replaced or extended, and the application as a whole could be customized to the specific needs and would not need to carry any added complexity that is not desired by the author.

If I may give a suggestion, we should move on from the MVC frameworks and start focusing in these kind of projects. We need to focus more on libraries and subsystems in that the only interface is an API that can be used by other applications. Of course, in order to do that, it should be easy for everyone to find these libraries. &lt;a href=&quot;http://www.riaforge.org/&quot;&gt;RIAForge&lt;/a&gt; makes a terrific job as a repository of entire projects, and maybe it could be extended to add a new category exclusively for ColdFusion libraries and APIs; or maybe we need an entirely new website to allow us to post and search libraries for different types of functionalities that anyone wanted to add to their application.

Any thoughts? 
				</description>
				
				<category>OO</category>				
				
				<category>Architecture</category>				
				
				<category>Coldfusion</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Fri, 30 May 2008 09:51:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2008/5/30/A-Rant-on-Frameworks-Libraries-and-Shells</guid>
				
			</item>
			
			<item>
				<title>ColdBricks Update and Documentation</title>
				<link>http://www.oscararevalo.com/index.cfm/2008/5/20/ColdBricks-Update-and-Documentation</link>
				<description>
				
				New updated versions of ColdBricks and HomePortals are now available for download. 

ColdBricks 1.0.377:

- Fixed issues with case-sensitive OSes

- Fixed compatibility issues with BlueDragon

- Added option to edit current skin from the Page Editor screen

- Added option to create a Skin resource based on a page&apos;s local stylesheet

- Fixed minor bugs



HomePortals 3.0.189:

- Added support for BlueDragon and OpenBlueDragon

- Added support for case-sensitive operating systems


Also, the ColdBricks User&apos;s Guide is now finished and ready for download. 

You can download the new ColdBricks release and the user&apos;s guide from the &lt;a href=&quot;http://www.coldbricks.com/download.cfm&quot;&gt;Downloads area&lt;/a&gt; in the ColdBricks site.

If you want to get the new HomePortals release by itself, you can get it from the &lt;a href=&quot;http://www.homeportals.net&quot;&gt;HomePortals&lt;/a&gt; site.

Enjoy! 
				</description>
				
				<category>Homeportals</category>				
				
				<category>ColdBricks</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Tue, 20 May 2008 14:45:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2008/5/20/ColdBricks-Update-and-Documentation</guid>
				
			</item>
			
			<item>
				<title>ColdBricks 1.0</title>
				<link>http://www.oscararevalo.com/index.cfm/2008/5/7/ColdBricks-10</link>
				<description>
				
				So it&apos;s official, my &lt;a href=&quot;http://www.coldbricks.com&quot;&gt;new venture&lt;/a&gt; is now live and open to the public. ColdBricks is a free and open source content management system specially tailored for highly modular websites like portals and dashboards. The current version runs on ColdFusion 7, 8 and Railo 2 (still having problems with BlueDragon though).  [More]
				</description>
				
				<category>Homeportals</category>				
				
				<category>Coldfusion</category>				
				
				<category>ColdBricks</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Wed, 07 May 2008 14:17:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2008/5/7/ColdBricks-10</guid>
				
			</item>
			
			<item>
				<title>HomePortals 3 Portal Framework</title>
				<link>http://www.oscararevalo.com/index.cfm/2008/4/10/HomePortals-3-Portal-Framework</link>
				<description>
				
				Well, after several years of going back and forth with this project, I finally decided to share it with everyone and release my little baby as an open source project. &lt;a href=&quot;http://www.homeportals.net&quot;&gt;HomePortals&lt;/a&gt; is a framework or platform for creating and running portals in ColdFusion. Most of the features in HomePortals focus around modularity, reusability of visual components, and personalization.

Besides providing the framework, conventions and APIs for creating the sites, HomePortals also acts as a &apos;runtime&apos; or &apos;rendering&apos; engine. All pages in a HomePortals application are actually XML documents that describe the elements and modules to display as well as their layout and arrangement. The HomePortals engine is responsible for reading, parsing and rendering the actual pages based on the specifications of the given XML documents. This is a little bit like MXML in Flex, but in ColdFusion.

I have succesfully tested HomePortals in ColdFusion MX 7, ColdFusion 8 and Railo 2. I have not yet had the chance to try it out in BlueDragon.

I created a small site for this project, where you can download the framework, a sample application and find some documentation. The URL for the site is &lt;a href=&quot;http://www.homeportals.net&quot;&gt;http://www.homeportals.net&lt;/a&gt;

HomePortals has an LGPL license, which means that the library itself has to remain open source and any changes have to be shared, but it can also be used by non open source applications as an external library or component of the application.

If someone wants to try HomePortals out I&apos;d really like to hear some feedback.

Another related project I will be releasing soon is ColdBricks... but I&apos;ll talk about that some other time :) 
				</description>
				
				<category>Homeportals</category>				
				
				<category>Coldfusion</category>				
				
				<category>ColdBricks</category>				
				
				<category>frameworks</category>				
				
				<pubDate>Thu, 10 Apr 2008 01:10:00 -0500</pubDate>
				<guid>http://www.oscararevalo.com/index.cfm/2008/4/10/HomePortals-3-Portal-Framework</guid>
				
			</item>
			</channel></rss>