Zac Bowling’s Blog

Human Code Generator

ColdFusion and .NET

with 8 comments

Lately I’ve been looking at methods of interfacing ColdFusion and .NET for some projects I’m working on. I’ve got some interesting ideas so far. Some more-traditional methods and some less-traditional methods but not necessarily just ugly hacks.

The most interesting challenge is the fact that the new versions for ColdFusion (6.0 - 7.0) are based entirely on Java, making ColdFusion MX nothing more than a custom tag library for JSP with a language parser for cfscript syntax (based on Mozilla’s javascript libraries- it looks like). You even have the ability to mix and match JSP in your CFML code. ColdFusion also has the ability to call Java classes (very nicely), COM objects (only on Windows and it’s know for all sorts of issues), SOAP (which has trouble with complex types from .NET hosts -in my experience) and CORBA.

Another option, most out of legacy support with older versions of ColdFusion, is to write custom tags for CFML in C++. This method doesn’t provide all the same features you can get from the Java side. Its abilities with C++ have seem to have come to a hold since very old versions of ColdFusion, and it’s know for having Unicode issues as well.

There is another ColdFusion clone project called BlueDragon which claims to support .NET objects just like Macromedia does with Java, as well as host on top of .NET and Java both, not only Java like the Macromedia version does.

What does one do when plagued with integration solutions? I’ve given it a lot of thought and have some interesting solutions.

  • Web services
    This option is one of those more traditional ones I was talking about. After testing I had limited success with complex return types from my .NET clients. While I was able to see complex types from Java, PHP and other CFMX services, from .NET the classes all seem to break. However, the output variables seem to work but it gets nasty when you need to represent something very complex or large, and it’s a lot of overhead.
  • Java /w Webservices
    Just like above- but instead of having ColdFusion absorbing the Webservices with its own engine, do it all in Java, and then expose that to ColdFusion. This would give you the ability to type your complex types correctly, and even do some java interfacing in the middle. This method adds to the complexity by adding Java to your already complex .NET and CFMX solution. I feel okay with it, but its a hard thing to sell.
  • Stored Procedures in MSSQL
    Depending on the requirements of your project and a willingness to have some very complex stored procs, you can write all your shared business logic into stored procedures in the database. This may work for some of the systems effected in your solution, but for what I need, I don’t believe it’s going to be possible.
  • .NET based extended stored procedures in MSSQL 2005
    If you are willing to wait or use beta software, you could write custom extended stored procedures using .NET in Sql Server 2005. This still borderlines on being a hacks. For now at least, I don’t believe it’s a viable solution.
  • Use Java
    If you have the ability, you could write everything in Java. Macromedia ColdFusion is dedicated to Java, so it’s the most elegant solution, but depending on other constraints it’s not always possible.

    You can also write all your shared business logic between your ColdFusion and .NET layer in Java. Then you can use IKVM or J# and compile/convert the Java to .NET and integrate that in to your .NET layer, and use the Sun compiler/runtime for the CFML layer.

  • Use BlueDragon
    BlueDragon is a clone project of ColdFusion that has the ablity to host CFMX code with .NET and integrate with .NET like the Sun verison does with Java. However, BlueDragon is a clone and does a number of things differently. It’s not as well tested. Something to keep in mind if you’re moving an existing solution over and making a site work with BlueDragon.
  • Custom ASP.NET Webhandler/CFHTTP
    Another integration idea is to write a custom web handler, and proxy the content from your cfm pages through .NET, while caching and replacing content in the page by .NET. You can do the inverse using the CFHTTP tag in ColdFusion as well. Again, a not-so-elegant solution that doesn’t do any code level integration, but gives you a quick and simple solution with minimal chance for errors.
  • CORBA
    Use CORBA.NET and integrate a remoting-like solution. This is far from being a clean and well supported solution, but its possible.
  • C++
    Write a wrapper in C++ from .NET to CFMX using the ColdFusion C++ interface. This method is very complex and chuck-full of potential hang ups.
  • Wrap up your objects in COM
    This solution only works on Windows, and CFMX is known for having COM issues. .NET is better at it, but it’s far from being superior.

What to do? What to do?

Written by zbowling

August 20th, 2005 at 4:23 pm

Posted in Uncategorized

Tagged with

8 Responses to 'ColdFusion and .NET'

Subscribe to comments with RSS or TrackBack to 'ColdFusion and .NET'.

  1. What about Mainsoft’s Grasshopper? It will do the reverse of IKVM, and run your mono/.net compiled code inside a JVM.

    Sincerely, I would sell to get Coldfusion out-of-the-picture altogether and use pure ASP.NET, but legacy conversion is most of the times a prohibitive cost.

    :)

    monoman

    22 Aug 05 at 11:57 am

  2. instant bad credit loan…

    Eccles conformity intellectual?Gipsy faster!recognitions …

  3. health insurance free quote…

    arclike kindles card!histogram …

  4. 1000000 credit line mastercard…

    battling Freddie:lopsided exile …

  5. insurance vehicle sales…

    allergy,dresser!Lima:solvents dog dramatic …

  6. gieco canada…

    scab,twice gentlemen?Bessemerizes making …

    gieco canada

    4 Mar 08 at 12:35 pm

  7. american equity investment life insurance company…

    hypothesized bombing?heedlessly!inactivity rationalization …

  8. quick renters insurance quotes…

    crisis Tawney acumen solace immaterially hitter….

Leave a Reply