LCDS 2.6 - load-on-demand

As many already noticed, LCDS 2.6 ( LCDS updater 1) has been finally released.

Relase notes can be found here.

Data Management has been improved by implementing load-on-demand. With a mix of load-on-demand and lazy-loading, your applications can benefit from a very nice boost of performance.

Imagine the two following destinations:

<destination id="cfcompany">
<properties>
<metadata>
<identity property="companyId"/>
<one-to-many property="employees" destination="cfemployee" lazy="true" load-on-demand="true"/>
</metadata>
</properties>
</destination>

<destination id="cfemployee">
<properties>
<metadata>
<identity property="employeeId"/>
</metadata>
</properties>
</destination>

Back in 2.5.1, when you invoked a fill on a company assembler, you would have to populate the employees property, if they were lazy-loaded, you would have to populate their IDs which,could be expensive in some fills.

In 2.6, you just need to populate the main Company object and once you request employees property a first ItemPendingError(client-side) will be thrown and a the get method (implemented in every Data Management Destination to retrieve a single Item) will be invoked for the selectedItem. In the get method (in your Company's Assembler) you will populate the company object and the employees property. Now if that association (one-to-many) is configured as a lazy property, you'll just have to provide the employees with an array of corresponding IDs. If you need to access one of those employees objects,flex will throw a second ItemPendingError(again client side) and that request will invoke the get method on the employees' Assembler. On the other hand,if your employees property is not lazy, then you'll have to fully create your objects on the get method of the company's assembler.

Additional instructions for LCDS 2.6 with CF8

If you plan upgrading built-in LCDS to version 2.6 you should follow the instructions provided in the LCDS_for_CF.txt under the resources/ColdFusion folder.

Additionally to that, you should also copy the cfgatewayadapter.jar that you can find under the { extractedLCDSFolder }/WEB-INF/lib to your ColdFusion /WEB-INF/flex/jars folder.

In my previous post, I mentioned that Flex 3 revision 1092 should be used but unfortunately there is a bug which creates a lot of stacktraces on your server's logs and it seems that it has been fixed in revision 1122 that you can get here.

LCDS 2.6 Beta 2 on Labs + CF integration update

If you want to try some new features of LCDS 2.6 with ColdFusion you can get the new bits from Adobe Labs. Additionally you'll have to download also the J2EE webtier compiler (special zip for CF) to update your CF instance(s).

The full installation process can be found here.

If compiling in Flex Builder you should update the SDK at least to revision 1092 that you can find here. After downloading the SDK, extract it somewhere (could be under the sdks' folder in FB) and then go to: Window > Preferences > Flex > Installed Flex SDKs and add the new extracted SDK.

You'll need this SDK since there were some fixes applied to both rpc.swc , fds.swc and the messaging jars.

AMF for server-to-server communication?

In last couples of days I've being thinking about this, why should we only take advantage of AMF communication between a Flex/AIR app with our back-end? Now that the specifications of AMF data format were released on Labs and a lot of AMF3 implementations are already all around ( CF, Java, .NET, PHP etc), why not take advantage of this data format for server-to-server communication?

If I have a CF server and I need to consume for example data from a PHP platform, why not doing through AMF if they use AMFPHP? Or instead of consuming a .NET webservice, why not call a WebOrb endpoint?

The cf team could eventually enhance the cfinvoke and createObject to support this.

Something like

<cfinvoke amfdestination="endpointurl" method="someRemoteMethod" returnVariable="someVar"/>
or
<cfset endpoint = createObject('amfendpoint','http://someAMFEndpoint')>
<cfset result = endpoint.someMethod( arguments ) >
Not only we would get simple data types conversion automatically but also our DTOs.

Toughs?

ColdSpring 1.2 RC1 available

Chris Scott just announced in the ColdSpring mailing list that version 1.2 RC1 is available.

You can grab it here.

Using Eclipse for ColdFusion Development - Videos

Mark Drew gave a very nice introduction to CFEclipse.

He started by explaining what Eclipse is. Then he explained very simply but clearly how to install it on an existing Eclipse installation and gave an overview of multiple functionalities available.

A very nice presentation for those who aren't using CFEclipse yet.

Enjoy it.

[More]

CF8 bug resolving CFC paths when using RTMP channel

I didn't understand why sometimes my application failed to start properly. I've launched a debug session and enabled the 'break on exception' option and found that onApplicationStart was failing in this line:

<cfset application.beanFactory = createObject('component','coldspring.beans.DefaultXMLBeanFactory').init()>

throwing that the returned type of the init method wasn't of the type 'coldspring.beans.DefaultXMLBeanFactory'. This is weird because my Application.cfc is in my webroot, the ColdSpring folder also and I have a / for the webroot (needed for RTMP).

[More]

CF8 and realtime data with AJAX Data Services

I'm not an AJAX user but the CFTeam added a lot of AJAX functionality in CF8 and this should be mentioned: Did you know that you can have real time data and messaging support in your AJAX applications using the integrated LifeCycle Data Services?

LCDS is not exclusively for Flex but also for HTML based applications.

[More]

CF8 Hotfix 1 & CF7 Hotfix 3 available

Sarge just announced the availability of CF8 hotfix 1 along with CF7 hotfix 3.

The first bug on the CF8 hotfix fixed list is one of my biggest issues with the debugger. Now I can happily debug with runtime exceptions turned on without having to step over twice in each line of code.

Thanks for fixing this.

RTMP troubles under windows XP (CF8)

There is a problem with the RTMP connection under windows XP. I didn't found the pattern yet but sometimes after restarting the ColdFusion server, it cannot use the rtmp port anymore because the server is throwing the following error in the log file:

[More]

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.8.001. Design by dcarter.