Complete Reference
  Beginner's Guide
  Instance CF
  My Articles
  Jeff's Blog
  The Flex Show
  Hire Jeff

In Association with Amazon.com
  

ColdFusion MX vs ASP.NET


This is written based on my own experiences developing through ColdFusion (which I know tons about) and developing with ASP.NET (which I am learning about). It is probably not complete and may not be accurate. Use at your own risk.

Some of this is borrowed (stolen / inspired / whatever) from the House of Fusion comparison of CF4 and ASP w/ IIS 3.

Feature ASP.NET w/ IIS 5.0 ColdFusion MX Comments
Language Supports multiple languages including VB.NET, C#, and coming soon even CFML (via BlueDragon). CFML, Java ASP has support for multiple languages and mixing the two of them in a single application is almost trivial. With ColdFusion you have CFML and can now easily integrate with J2EE applications or code.
Syntax script-based, similar to other programming languages tag-based, similar to HTML. Supports JS style scripting as well through CFScript. ASP has support for multiple, extensible scripting languages. CF's tag syntax is simpler and easier
DB connectivity Built in database connectivity through ADO.NET object. OLE connection objects are included as part of the .NET install and they can be used with connection strings directly to the database. ODBC support add-in is downloadable from the Microsoft web-site. Database connectivity through tags - JDBC, Native drivers .NET takes a lot more code to create a connection, ColdFusion tags are lots easier to use.
Data manipulation direct, through ADO objects implicit, through tag usage .NET is much more powerful and flexibile; but it will take a while to get up to speed.
Mass database Insert or Updates Can be done Through the use of Dataset and Oledbcommand Use CFInsert or cfquery in a loop. I'm not sure of the specific implementation of either of these, however in .NET I could write code to grab thousands of records from one database, transform the data, and insert them into another database. The code ran in minutes. Similar code I've written in ColdFusion would take hours.
Architecture ISAPI filter ISAPI, WSAPI, NSAPI filters and Apache Modules Built on the J2EE architecute. Run as ISAPI filters in IIS's address space for excellent performance and integration with IIS. CF also runs on the other 'standard' servers or as a plug-in to a J2EE server.
Extendibility Server components can be created in any tool that produces COM objects (OLE servers), like VB, VC++, etc. extension tags can be produced using the CF language itself, or C++ API, any COM objects usable in ASP can also be used here. CORBA objects are supported. Java tags are supported implicitly CFMX COM support is flakey at best, but aside from that it seems to win; it can use any ASP components, plus you can write your own tags
Note: In my own development I've never had to try to extend either platform.
Pre-built functionality A rich object library can do just about whatever you need it to, from any .NET supported language. Function library and Server objects both have excellent support here
Application framework Event driven and set up through IIS Uses the Application.cfm file (an implicit include) and cfapplication to define an application. ASP's model is event based, and can execute code on a session start, session end, application start, or application end.

ColdFusion doesn't have any parallel to session end or application end. Conditionals are usually used to test if an application (or session) variable exists and if they don't, then the session or application hasn't started yet.
State Management dynamic, using a temporary cookie to identify a server side object with configurable expiration Static across user sessions, using a permanent cookie with storage in the Windows registry/database, or dynamic just like ASP's CF will do state management just like ASP, or it can preserve state across browser sessions making it more flexible.
Debugging error message sent to browser upon runtime errors, or not. On/Off switch, no customization. configurable debugging information (including SQL debugging info) sent to browser upon runtime errors, can be restricted to certain IP addresses CF has by far the better debugging
Error Handling Default error screens are ugly, roll your own if you don't like them. You can trap and handle errors in script, although the process is ugly and limited. Allows specification of a default error handling HTML template, into which error information is plugged, much easier to display consistent and complete error information. Ability to trap errors in script and take conditional action. CF has much better support for customizable error messages.
Web Server Support IIS only any CGI compliant web server, a number of servers using native APIs (ISAPI, NSAPI, WSAPI, etc) CF wins hands down
XML The Dataset is designed to handle XML just like it would handle relational data Specials set of tags and functions to create and maintain XML data .NET is much easier because the XML specifics are in the background.
Web Services ?I don't know yet? You can easily turn a ColdFusion Component into a Web Service It's easy in ColdFusion, but I don't know about .NET
Looping over Grouped Queries You need to perform two queries, put them into the same dataset, create a relation, and then you can loop over one table in the query, and through the relation get all of its children rows in the other query. Can easily loop over grouped queries using nested cfoutput tag. ColdFusion is much easier to accomplish. .NET's implementation is interesting
Code Modularization CodeBehind to separate business logic and presentation. You can also write custom functions and subroutines as needed You can write User Defined Functions to meet your needs. ColdFusion Components can be made to create object-like instances .NET seems to win here, but I expect future version of ColdFusion to ramp up
Controls WebForms. They are a hidden way to say that a form is self-submitting. There are built in ways to tell if the form is in "postback mode" or "new form mode". You can write code to handle each mode differently and to store values between submits. cfform, Java applet version of standard form controls. cfform is avoided due to performance reasons, so I avoided webforms because they seem to be roughly the same thing. The maintenance hit of trying to maintain code that does 100 things in a page is not usually worth it.

I'd like to hear from other .NET developers on their experience here.
Search Engines Integrates with Microsoft Index Server through OLE connection. Includes the Verity K2 Server. It can index database data and static data. CF is better because it will index database driven pages. It is also easier to implement. Index server is better than nothing.
Maturity Rough Around the Edges Rough around the ednges CF has been around longer than ASP, but both CFMX and .NET are new approaches. CFMX is a new J2EE based implementation and has a lot of kinks to work out. .NET seems relatively bug-free but is clunky in many operations.


Copyright Info | Email The Author | Hosted by CFDynamics