<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Luis F. Majano &#187; Transfer</title>
	<atom:link href="http://luismajano.com/category/Transfer/feed/" rel="self" type="application/rss+xml" />
	<link>http://luismajano.com</link>
	<description>Computer Engineer</description>
	<lastBuildDate>Mon, 05 Mar 2012 17:41:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>New ColdBox Addons &#8211; Transfer Config Factory and Transfer Decorator Injector Observer</title>
		<link>http://luismajano.com/2008/07/24/new-coldbox-addons-transfer-config-factory-and-transfer-decorator-injector-observer/</link>
		<comments>http://luismajano.com/2008/07/24/new-coldbox-addons-transfer-config-factory-and-transfer-decorator-injector-observer/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 00:00:00 +0000</pubDate>
		<dc:creator>Luis Majano</dc:creator>
				<category><![CDATA[ColdBox]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Coldspring]]></category>
		<category><![CDATA[Transfer]]></category>

		<guid isPermaLink="false">http://www.luismajano.com/</guid>
		<description><![CDATA[I am releasing today a set of addons for ColdBox-Transfer interactivity: TransferConfigFactory.cfc : A factory cfc that produces transfer configuration objects based on ColdBox Datasource configurations. This is thanks to Tom de Manincor TDOBeanInjectorObserver.cfc : A transfer observer based on Brian Kotek&#8217;s amazing TDOBeanInjectorObserver in his Coldspring Utilities project, used to create rich decorators by [...]]]></description>
			<content:encoded><![CDATA[<p>I am releasing today a set of addons for ColdBox-Transfer interactivity:</p>
<ol>
<li><strong>TransferConfigFactory.cfc </strong>: A factory cfc that produces transfer configuration objects based on ColdBox Datasource configurations. This is thanks to <a href="http://tomdeman.com/blog/2008/5/29/Dynamic-Datasources-With-Transfer---Using-a-Datasource-Bean-Instead-of-the-Datasourcexml" title="">Tom de Manincor</a></li>
<li><strong>TDOBeanInjectorObserver.cfc</strong> : A transfer observer based on <a href="http://www.briankotek.com/blog/">Brian Kotek&#8217;s</a> amazing TDOBeanInjectorObserver in his <a href="http://coldspringutils.riaforge.org/">Coldspring Utilities project</a>, used to create rich decorators by injecting them with dependencies from Coldspring and Lightwire.  However, we had to take it a step further, so it can even inject dependencies from the ColdBox Cache.</li>
</ol>
<p>You can download these <a href="http://www.coldboxframework.com/download">tools from here</a>. All you need to do to install them is drop them in the <strong>/coldbox/system/extras</strong> folder.  This will create a <strong>transfer</strong> folder that holds these cfc&#8217;s inside of the extras folder.  That&#8217;s it. Then you need to configure them via a coldspring.xml or a lightwire configuration object or manually (ohh brave one).  The tools have also been added to the SVN and I will be adding a link to them from the <a href="http://www.coldboxframework.com/index.cfm/download/extras">extra downloads</a> section of the website. </p>
<h2>Transfer Config Factory</h2>
<p>This object is used to create a transfer configuration object based on the datasource information found in the ColdBox configuration file.  This idea is thanks to <a href="http://tomdeman.com/blog/2008/5/29/Dynamic-Datasources-With-Transfer---Using-a-Datasource-Bean-Instead-of-the-Datasourcexml" title="">Tom de Manincor </a>and his musings in ColdBox-ColdSpring-Transfer.  This let&#8217;s you maintain all of your application&#8217;s configuration in one single location and not create a datasource.xml.  It is meant to be used alongside coldspring but it can be used as a separate object too (You will have to do the wiring).  Anyways, here is a sample coldspring declaration for this usage:</p>
<p><code><br />
<!-- coldbox Factory --><br />
<bean id="ColdboxFactory" class="coldbox.system.extras.ColdboxFactory" singleton="true"/></p>
<p><!-- MyDatasource --><br />
<bean id="MyDSN" factory-bean="ColdBoxFactory" factory-method="getDatasource"><br />
   <constructor-arg name="alias"><br />
	  <value>${TransferDSNAlias}</value><br />
   </constructor-arg><br />
</bean></p>
<p><!-- Coldbox-transfer Config Factory --><br />
<bean id="TransferConfigFactory" class="coldbox.system.extras.transfer.TransferConfigFactory" singleton="true" /></p>
<p><!-- transfer --><br />
<bean id="TransferFactory" class="transfer.TransferFactory" singleton="true"><br />
	<constructor-arg name="configuration"><br />
		<bean factory-bean="TransferConfigFactory" factory-method="getTransferConfig"><br />
			<!-- Config Path --><br />
			<constructor-arg name="configPath"><value>${TransferConfigPath}</value></constructor-arg><br />
			<!-- Definitions Path --><br />
			<constructor-arg name="definitionPath"><value>${TransferDefinitionsPath}</value></constructor-arg><br />
			<!-- ColdBox Datasource Bean --><br />
			<constructor-arg name="dsnBean"><ref bean="MyDSN" /></constructor-arg><br />
		</bean><br />
	</constructor-arg><br />
</bean><br />
<bean id="Transfer" factory-bean="TransferFactory" factory-method="getTransfer"  /></p>
<p></code></p>
<p>As you can see, we first define the coldbox factory element and construct a datasource bean element with it.  We then setup the transferConfigFactory.cfc as a coldspring factory bean.  The last step is configuring the transfer factory. We send in a configuration bean and set it up as a call to our transfer config factory with the same parameters we are used to, except that for datasource we use the <strong>dsnBean</strong> element and have it referenced to the datasource that we want to use, in our case <strong>MyDSN</strong>, that we defined at the beginning. If you need a refresher on how the ColdBox Factory for IoC works, please read the following <a href="http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbColdspringGuide">IoC Integration Guide.</a> That&#8217;s it. Simple as that, now you can define all your configurations via the coldbox configuration file and let coldspring do the heavy lifting. </p>
<h2>TDOBeanInjectorObserver</h2>
<p>This handy tools is based on <a href="http://www.briankotek.com/blog/">Brian Kotek&#8217;s</a> original observer.  I want to say thank you to Brian for his contributions and incredible code. Thanks Brian.  </p>
<p>However, we have modified it to use <strong>ColdBox beanFactory plugin</strong> to do the autowiring for us.  For those familiar with the ColdBox <a href="http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbAutowireGuide">autowiring conventions</a>, you can do autowiring via annotations using the <strong>cfproperty</strong> tag or via setter injection.  Not only that, but you can use ColdSpring or Lightwire seamlessly, and to top it off, you can <a href="http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbAutowireFromCache">autowire objects from the ColdBox cache</a>.  Here is a sample of some cool autowire annotations:</p>
<p><code><br />
  <cfcomponent name="User" output="false" hint="A transfer decorator User object" extends="transfer.com.TransferDecorator"></p>
<p>    <!--- INjected Dependencies ---><br />
    <cfproperty name="ValidatorFactory"    type="ioc" scope="instance" /><br />
    <cfproperty name="qAvailableCharSets"  type="ocm" scope="variables" /><br />
  </cfcomponent><br />
  </code></p>
<p>  As you can see from the code we have two dependencies marked by their types: <strong>ioc and ocm</strong>.  The type of <strong>ioc</strong> means that this dependency must be injected from the ioc plugin (coldspring/lighwire) and the type of <strong>ocm</strong> means that the dependency must be injected from the ColdBox Cache.  The <strong>scope</strong> attribute is also useful as you can define in which scope or pathed scope you would like this dependency injected.  The default value is <strong>variables</strong>.</p>
<p>The theory behind this tool is to be able to very easily create rich decorators that can be injected with dependencies from the IoC container or the ColdBox Cache.  It is a great way to have your objects be composed of other objects and utilities. So let&#8217;s see the coldspring.xml, but first, please note that the instructions below are for ColdSpring 1.2 that enables the usage of the <strong>lazy-init</strong> property. For Coldpsring 1.0, you will have to do some more manual work. (More instructions found in the cfc&#8217;s themselves).</p>
</p>
<p><code><br />
<!-- coldbox --><br />
<bean id="ColdboxFactory" class="coldbox.system.extras.ColdboxFactory" singleton="true"/><br />
<!-- coldbox bean factory --><br />
<bean id="ColdBoxBeanFactory" factory-bean="ColdBoxFactory" factory-method="getPlugin" singleton="true"><br />
	<constructor-arg name="plugin"><br />
	   <value>beanFactory</value><br />
	</constructor-arg><br />
</bean><br />
<!-- coldbox-transfer observer --><br />
<bean id="TDOBeanInjectorObserver" class="coldbox.system.extras.transfer.TDOBeanInjectorObserver" lazy-init="false"><br />
	<constructor-arg name="Transfer"><ref bean="Transfer"></ref></constructor-arg><br />
	<constructor-arg name="ColdBoxBeanFactory"><ref bean="ColdBoxBeanFactory"></ref></constructor-arg><br />
	<constructor-arg name="useSetterInjection"><value>true or false</value></constructor-arg><br />
	<constructor-arg name="onDICompleteUDF"><value>onDIComplete</value></constructor-arg><br />
	<constructor-arg name="debugMode"><value>true or false</value></constructor-arg><br />
</bean><br />
</code></p>
<p>We first define the ColdBox Factory, then the beanFactory plugin we will use.  We then define our Observer with some cool parameters:</p>
<ul>
<li><strong>Transfer</strong> : The transfer bean reference</li>
<li><strong>ColdBoxBeanFactory</strong> : The beanFactory plugin we just defined</li>
<li><strong>useSetterInjection</strong> : A boolean variable that enables or disabled setter injection in preference of annotations via cfproperty. If enabled, it will do cfproperty annotations first and then look for setters.</li>
<li><strong>onDICompleteUDF</strong> : The name of the UDF to call in your decorators once they have been injected with their dependencies.  The default value used is <strong>onDIComplete</strong>.  This means that you create a method in your decorators called <strong>onDIComplete</strong> or whatever you like and when the bean factory injects the dependencies, it will call this method afterwards. You can use this to do configuration or object setup.</li>
<li><strong>debugMode</strong> : This boolean variable is part of the bean factory plugin. If set to true, it will log to the logging facilities all the interactions when trying to autowire the objects. </li>
</ul>
<p>That&#8217;s it folks. Once application starts up, coldspring will create and register this observer for you. So when transfer objects are created and have autowire dependencies, they will be wired up. </p>
]]></content:encoded>
			<wfw:commentRss>http://luismajano.com/2008/07/24/new-coldbox-addons-transfer-config-factory-and-transfer-decorator-injector-observer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Josh Highland on Transfer ORM Presso!!</title>
		<link>http://luismajano.com/2007/11/07/Josh-Highland-on-Transfer-ORM-Presso/</link>
		<comments>http://luismajano.com/2007/11/07/Josh-Highland-on-Transfer-ORM-Presso/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 00:00:00 +0000</pubDate>
		<dc:creator>Luis Majano</dc:creator>
				<category><![CDATA[IECFUG]]></category>
		<category><![CDATA[Transfer]]></category>

		<guid isPermaLink="false">http://www.luismajano.com/</guid>
		<description><![CDATA[My friend Josh Highland has a great entry about our Transfer presentation last week at our CFUG. I have the privilege to work with him at ESRI, so check his blog out, he has some insaaaanee!! stuff out there.]]></description>
			<content:encoded><![CDATA[<p>My friend <a href="http://notpopular.com/blogs/josh/2007/11/07/transfer-orm-with-mark-mandel/" title="" class="broken_link">Josh Highland</a> has a great entry about our <a href="http://www.compoundtheory.com" title="">Transfer </a>presentation last week at our <a href="http://www.iecfug.com" title="">CFUG</a>. I have the privilege to work with him at ESRI, so check his blog out, he has some insaaaanee!! stuff out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://luismajano.com/2007/11/07/Josh-Highland-on-Transfer-ORM-Presso/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transfer Gotcha when using IN and lists!!</title>
		<link>http://luismajano.com/2007/09/11/Transfer-Gotcha-when-using-IN-and-lists/</link>
		<comments>http://luismajano.com/2007/09/11/Transfer-Gotcha-when-using-IN-and-lists/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 00:00:00 +0000</pubDate>
		<dc:creator>Luis Majano</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Transfer]]></category>

		<guid isPermaLink="false">http://www.luismajano.com/</guid>
		<description><![CDATA[You have an incoming argument call it <strong>myList</strong> which contains a list: '1,2,3'.  Then the following TQL

<code>
<!--- Build TQL --->
<cfsavecontent variable="tql">
<cfoutput>
SELECT Users.email
FROM mypackage.users as Users
WHERE Users.id IN ( :myList )
</cfoutput>
</cfsavecontent>

<!--- Create Query Object --->
<cfset query = transfer.createQuery(tql)>
<!--- Set Params --->
<cfset query.setParam("myList",arguments.myList,"string")>
<cfset query.setParam("true",true,"boolean")>
<cfset query.setCacheEvaluation(true)>
		
<!--- get first query --->
<cfset qEmails = transfer.listByQuery(query)>
</code>

Everything looks well and dandy right?? WRONG!!! This actually produces no results. Why in the world, well read the docs.

<blockquote>
<strong>Query.setParam(name, [value], [type], [list], [null])</strong>

<strong>The 'list' argument tells the Query object that the value being set to the mapped parameter is actually a list of values, exactly like the 'list' attribute on <cfqueryparam>. By default this set to false.</strong> 
</blockquote>

Hurray!! You need to set the list argument to TRUE. Man!!

<code>
<cfset query.setParam("myList",arguments.myList,"string",true)>
</code>

One little TRUE and you are ready to roll!! So if you are working with IN statements, or just plain o'l lists, then remember the list argument.

Thanks Mark for documenting this!!]]></description>
			<content:encoded><![CDATA[<p>First of all, I am a big advocate of Transfer, it is totally awesome and TQL totally rocks.  I came up today to almost pulling my hair out on a very simple TQL query and thought I should share this so people have a grasp on details.</p>
<p>When using a query with the IN modifier and a list, you cannot just map a parameter with a value, you have to specify that its a list.  (Reading the docs might help!!). Adventurous Luis, went ahead without fully reading Mr. Mandel&#8217;s excellent docs and of course, fell in a cavernous pit of despair.</p>
<p>Here is my sample:</p>
]]></content:encoded>
			<wfw:commentRss>http://luismajano.com/2007/09/11/Transfer-Gotcha-when-using-IN-and-lists/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Transfer Docs hosted on my site for your needs.</title>
		<link>http://luismajano.com/2007/06/26/Transfer-Docs-hosted-on-my-site-for-your-needs/</link>
		<comments>http://luismajano.com/2007/06/26/Transfer-Docs-hosted-on-my-site-for-your-needs/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 00:00:00 +0000</pubDate>
		<dc:creator>Luis Majano</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Transfer]]></category>

		<guid isPermaLink="false">http://www.luismajano.com/</guid>
		<description><![CDATA[I love Transfer!! I have been using it to the max in all my projects and now I found it an undisspensable tool for my software development. If you have not checked out this incredible ORM, please do. Since I am using it so much, I decided to host the docs on my site for [...]]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://www.compoundtheory.com/transfer/" title="">Transfer</a>!! I have been using it to the max in all my projects and now I found it an undisspensable tool for my software development.  If you have not checked out this incredible ORM, please do.  Since I am using it so much, I decided to host the docs on my site for easy access, hope this is ok with you Mark?</p>
<p>Just point your browser to: <a href="http://www.luismajano.com/transfer/documentation/" title="">http://www.luismajano.com/transfer/documentation/</a> and you can read to your eyes content.</p>
]]></content:encoded>
			<wfw:commentRss>http://luismajano.com/2007/06/26/Transfer-Docs-hosted-on-my-site-for-your-needs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ColdBox: New Transfer Sample Application! Transfer Rocks!!</title>
		<link>http://luismajano.com/2007/03/21/ColdBox-New-Transfer-Sample-Application-Transfer-Rocks/</link>
		<comments>http://luismajano.com/2007/03/21/ColdBox-New-Transfer-Sample-Application-Transfer-Rocks/#comments</comments>
		<pubDate>Wed, 21 Mar 2007 00:00:00 +0000</pubDate>
		<dc:creator>Luis Majano</dc:creator>
				<category><![CDATA[ColdBox]]></category>
		<category><![CDATA[Transfer]]></category>

		<guid isPermaLink="false">http://www.luismajano.com/</guid>
		<description><![CDATA[I have just been delving into Transfer this past few weeks and I must say I am really impressed by its design and usage. The way the ORM is layed out is impressive and even more with its TSQL addition. So I decided to create another sample application dedicated to Transfer. It will be on [...]]]></description>
			<content:encoded><![CDATA[<p>I have just been delving into <a href="http://www.compoundtheory.com/">Transfer</a> this past few weeks and I must say I am really impressed by its design and usage.  The way the ORM is layed out is impressive and even more with its TSQL addition.  So I decided to create another sample application dedicated to Transfer. It will be on the next beta or RC coming for 2.0.0, but if you do not want to wait, then get it from the Repository by <a href="http://www.luismajano.com/blog/index.cfm/2006/12/5/ColdBox-Framework-SVN-access-now-available"> Clicking here</a></p>
<h2>Kudos to Mark Mandel for this amazing tool</h2>
<p>The sample application is a very simple CRUD and Listing application and shows you how to instantiate the Transfer factory into the ColdBox cache also.  I will be posting a tutorial on it pretty soon at the usual <a href="http://ortus.svnrepository.com/coldbox/trac.cgi">documentation depot</a> <img src='http://luismajano.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Have fun and thanks Mark for this awesome project.</p>
]]></content:encoded>
			<wfw:commentRss>http://luismajano.com/2007/03/21/ColdBox-New-Transfer-Sample-Application-Transfer-Rocks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Need to Refactor Transfer to meet your server layout? Here you go!</title>
		<link>http://luismajano.com/2007/03/21/Need-to-Refactor-Transfer-to-meet-your-server-layout-Here-you-go/</link>
		<comments>http://luismajano.com/2007/03/21/Need-to-Refactor-Transfer-to-meet-your-server-layout-Here-you-go/#comments</comments>
		<pubDate>Wed, 21 Mar 2007 00:00:00 +0000</pubDate>
		<dc:creator>Luis Majano</dc:creator>
				<category><![CDATA[ANT]]></category>
		<category><![CDATA[Transfer]]></category>

		<guid isPermaLink="false">http://www.luismajano.com/</guid>
		<description><![CDATA[As you all now, the best and easiest way to install Transfer is just by droping it in your web root and boom, you are ready to roll. However, sometimes you need the flexibility to change the path and things just work. Well, I just created this ANT task to do that. It will ask [...]]]></description>
			<content:encoded><![CDATA[<p>As you all now, the best and easiest way to install Transfer is just by droping it in your web root and boom, you are ready to roll. However, sometimes you need the flexibility to change the path and things just work. Well, I just created this ANT task to do that. It will ask you for a new base path and a new relative path, then it will refactor the entire Transfer codebase to meet your directory layout. This similar Task is included with ColdBox in the install directory, so you can refactor the ColdBox codebase to your layout.</p>
<p><b>Example</b></p>
<p>I have my frameworks under a directory called: &#8216;frameworks&#8217; and I usually create a version to them, say: frameworks.coldbox2_00 or frameworks.transfer0_63</p>
<p>Everybody has their own naming conventions and ideas.  Anyways, here is the ANT Task.</p>
<p><code><br />
<?xml version="1.0"?><br />
<!-- ======================================================================<br />
     Mar 19, 2007 12:23:55 PM                                                        </p>
<p>     transfer.refactoring<br />
     This ant task will rebuild Transfer using a prefix of choice:<br />
     shared.frameworks.transfer0_63</p>
<p>     This is useful, if you are not placing the Transfer library<br />
     in your web root.</p>
<p>     Example: shared.frameworks.transfer0_63       </p>
<p>     by Luis Majano<br />
     ====================================================================== --></p>
<project name="transfer.refactoring" default="do.refactor" basedir=".">
    <description><br />
            This ant task will rebuild colspring using a prefix of choice<br />
    </description></p>
<p>	<target name="do.prefix" description="Choose the new transfer prefix"></p>
<input message="What prefix would you like to use? (ex:frameworks.transfer0_63)" addproperty="transfer.newprefix" />
<input message="What is the relative path now? (ex:/frameworks/transfer0_63)" addproperty="transfer.relativepath" />
		<echo>The prefix choosen is: ${transfer.newprefix}</echo><br />
    </target></p>
<p>	<target name="do.refactor" depends="do.prefix" description="refactor the code"><br />
		<echo>Refactoring: ${basedir}</echo><br />
		<replace dir="${basedir}" value="${transfer.newprefix}.com" summary="yes"><br />
		  	<include name="**/*.cfc" /><br />
			<replacetoken>transfer.com</replacetoken><br />
		</replace><br />
		<replace dir="${basedir}" value="${transfer.relativepath}/resources" summary="yes"><br />
		  	<include name="**/*.cfc" /><br />
			<replacetoken>/transfer/resources</replacetoken><br />
		</replace><br />
	</target></p>
</project>
</code></p>
<p>You just need to place this as build.xml or refactor.xml in the root of your Transfer directory, where the TransferFactory.cfc is.  Then just run it, it will ask you for the first path, type &#8220;frameworks.transfer0_63&#8243; then the relative path, type &#8220;/frameworks/transfer0_63&#8243; and then you are ready to roll.</p>
<p>Just make sure when you instantiate the factory it will now be: &#8220;frameworks.transfer0_63.TransferFactory&#8221;</p>
<p>There you go. Make sure you make a backup, just in case, or if you are a real geek, then keep it, so you can run it multiple times.</p>
<p>Have fun!!</p>
]]></content:encoded>
			<wfw:commentRss>http://luismajano.com/2007/03/21/Need-to-Refactor-Transfer-to-meet-your-server-layout-Here-you-go/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

