I'm sitting in Rupesh's ColdFusion .Net Integration session right now. The main benefits of .Net integration has to do with leveraging some .Net functionality within ColdFusion. Adobe has no plans to port ColdFusion to the .Net platform, but their integration strategy should make it easier to leverage MS products like Excel, Word, Outlook, Exchange, etc. The .Net integration will also let you integrate with components and services created in .Net.

Right now, the only way to integrate with .Net is via web services, messaging, or by using COM. With the Scorpio release, you'll be able to integrate with .Net using what's called Runtime Unification - just like we do now with COM, CORBA, and Java - via createObject() and the cfobject tag (type=".net").

The Runtime Unification makes .Net assemblies locally available. It gives you more fine grained control than the previously mentioned integration strategies. Benefits include:

  • Tight coupling
  • Fine grained control as it's a local object
  • High performance, reliability and security
  • Stateful
  • Communication can be binary (default) or http for use across firewalls
  • Supports SSL

Syntax for calling looks like this:

view plain print about
1<cfobject type=".Net"
2class=".Net class"
3assembly="assembly"
4name="return object name"
5host="host"
6port="port">

7
8Instantiating a .Net object:
9
10<cfobject type=".Net" class="com.comp.Account" assembly="act.dll" name="act">
11<cfset act.init("Rupesh", 1000)>
12
13Calling static methods:
14<cfset types = act.getAccountTypes()>
15<!--- no need to init a call to a static method --->

Rupesh then went on to show an example of using a few lines of code to generate a MS Word document. It was FAST and relatively simple to do. Finally, native integration without having to use COM or Apache POI!

There's also automatic datatype conversion fr primitive .Net datatypes to CF and CF to .Net. Decimal type is not supported. You can also use javaCast() where required (ambiguous method arguments).

There's a chart for datatype mapping from .Net to Java. All primitive types are supported except for decimal.

Deployment scenarios include ColdFusion and .Net on the same server, ColdFusion and .Net on separate Windows machines, and ColdFusion on other platforms with .Net installed on a Separate Windows machine. Each of these configurations has various configurations and steps required to make it all work. The simplest is CF and .Net on the same machine, but it will work across all three of the options.

Some limitations: Enum and decimal datatype not currently supported. Methods with out parameters as arguments and methods with pointers as arguments or return types are also not supported. Unfortunately, you also can't use .Net UI components. Callbacks are also not supported.