Is there really a significant weakness in CF, or are there things you cannot accomplish using it. If so what is it? In my experience, which at this point is not limited, CF is a viable platform. Why does it get such a bad wrap in the developer community?

I am beginning to use ASP.net with C#, and have not found many things that cannot be done faster using CF, including accessing middle tier objects. Am I missing something in ASP.net that is going to surpass CF in terms of building quality applications, fast? If so, what is it? Thanks.

John Rictor
Friday, March 22, 2002

Sorry for being uninformed, but what is CF?

Ged Byrne
Friday, March 22, 2002

Cold Fusion. Exactly my point, i think.

John Rictor
Friday, March 22, 2002

I am switching from CF to ASP.NET.

Now that ASP.NET is more attractive and free, this switch will lower the cost of adoption for my customers.

Apart from having to write more code in ASP.NET, in the long run it all evens out.

Jabberwocky
Friday, March 22, 2002

"ASP.NET is more attractive and free"

You have an interesting concept of free.

rich
Friday, March 22, 2002

Since ASP and CF and any other server side language both output HTML it doesn't really matter what language you choose, as they are all equally capable of creating the same web pages.

I happen to think Perl is your best choice as it has the most libraries available, saving you from re-inventing the wheel. http://search.cpan.org

Matthew Lock
Friday, March 22, 2002

no point in making a religious point about it. i haven't worked in CF, but from what i've heard it's best suited for presenting data-but not as good if you have to do a lot of manipulation on the fly. also, it's expensive.

one interesting point also. if you type "ASP" in monster you get about 10 to 20 times as many responses as if you type "PHP", but it seems there are almost as many sites in PHP as ASP now. a lot of these web languages are almost interchangeable, and if you write them in an object-oriented manner, they really start to converge. my choice of scripting language and engine is now dependent on what my customers want.

Razib Khan
Saturday, March 23, 2002

I've built sites in PHP with MySQL as a backend database, and then done nearly the same thing with ASP/SQL Server. I never bothered looking into CF because I assumed that I would find the same thing I did with PHP and ASP: namely, that there's a cosmetic difference in syntax that doesn't really affect development cost, time, or complexity.

Justin Johnson
Saturday, March 23, 2002

ColdFusion - especially the forthcoming MX version - is hands down the fastest, best, most powerful way to build web-centric applications.

That said, there are a lot of things going on besides web applications, and a lot of technologies that you would/could want to use in conjunection with ColdFusion even for web apps.

The great thing with ColdFusion is how technology agnostic it is, the fact that it is both moving to the java platform but also embracing .Net at the same time

I would argue that CF gives a better total development cost then some of the "free" alternatives and also has great tools (development, admin) to work with it

Russ Hollmann
Saturday, March 23, 2002

Russ,

Can you clarify? Specifics? I've heard people say that CF is great for someone who isn't that familiar with the ins & outs of web app development and programming-but the value added becomes diminished the more programming savy you have. I notice THE ECONOMIST does it's sites in CF, but that's the only big site I can think of off the top of my head.

Razib Khan
Saturday, March 23, 2002

No no no no no no no! And again no.

Cold Fusion has poor support for code reuse - you cannot write your own functions. Yes, you can include template files, but you cannot control the scope of variables. You could, instead, write a custom tag, but then you are using a tag based language to try to express something better suited to being expressed in a traditional way (C/C++/Pascal/Java/whatever).

Typically what happens is that a Cold Fusion pages become a huge mixture of CF tags, HTML, SQL, JavaScript, CSS, whatever - there's too many things going on. The language imposes too few restrictions on the developer, it's too easy to be undisciplined.

Try to do something like an XSLT transformation - where are the standard libraries to do this? Maybe CF MX supports this, or maybe some Joe wrote a custom tag (in C++) to do this, but whatever I strongly doubt it would be as easy to use and understand as what ships with .NET.

Cold Fusion is good for quick and dirty, but not for large systems - this is why they bought JRun and this is why
Cold Fusion is slowly turning into a JSP application - Cold Fusion tags will be implementations of JSP tags - and this is why even Macromedia say "use Java instead" (for large-scale apps).

Walter Rumsby
Sunday, March 24, 2002

Quite a few interesting points raised - just a few i'd like to respond on:

"ASP and and CF both just output HTML - therefore both can produce exactly the same pages" - this is misleading in my opinion - ASP offers more ways of extracting and using data from a greater variety of sources than does CF. With ASP.NET especially, you can harness basically the whole power of an operating system, which is essentially all encapsulated in the .NET Framework. With CF you have to resort to either finding custom tags, or duplicating functionality in .dlls that would already be available in other server-side languages.

"ASP.NET is free" - the framework may be available as a free download. It's yet to become obvious what the realworld hosting costs of this type of application are for the average small-to-medium business - or even for very many enterprise level operations. Development tools also work out more expensive. However, the actual cost of a CF Server license (Enterprise) is admittedly quite high (especially when compared with a free download base).

"if you type "ASP" in monster you get about 10 to 20 times as many responses as if you type "PHP", but it seems there are almost as many sites in PHP as ASP now."
Very true - usage does not always breakdown to jobs. The split in usage is not equal across commercial/non-commercial sites. I suspect that a lot of these statistics are skewed by the fact the PHP is the language of choice for most complex free sites run by volunteers (primarily because of it's very low overall hosting costs). It's a good language as well, but I imagine it's price is it's most attractive point for most of it's users.

The final point made by Walter Rumsby is one I would be inclined to agree with to some extent. CF is great to just jump into. It does lead to some terrible spaghetti if you're not very disciplined though, and whenever i've used it, i've always ended up with a nagging suspicion that "this could be far more efficient somehow..."

On one final speculative note. .NET is here now. You don't have to wait. CF MX is not, and MAcromedia is being very cagey about specific details. At least developing with .NET you can already see what support you have, test it, etc. That is worth quite a lot if you're still aiming to be "first-to-market" (is there still a business where people are trying to be that? :-) ).

Oh, and just another thought (this is turning into rather a ramble), but what if you're trying to work on that crossover point between a web app and a saleable desktop app? You could find yourself converting ASP.NET webpage code to desktop application code... Not with CF though...

Andrew Cherry
Monday, March 25, 2002

Andrew,

About PHP vs. ASP-I commented because yes-PHP is used for sites built on the cheap. But there are plenty of cheap ASP webhosts now (and with Chilisoft, it's on *nix as well). But, to give a few anecdotal examples, Britney Spears' site uses PHP. The Italian retailer Zara (high end fashions) used PHP. These are just two I noted recently that made me think PHP was more mainstream than I thought.

Also, a lot of the homemade servers on the net are NT-if you look at the number of sites hosted, more use Apache than IIS. But, if you look at the number of independent hosts (assume that 20 virtual hosts = 1 host say)-it turns out that there are a lot more using IIS counted there. That works against the idea that ASP is geared towards the high end. In fact, I would suspect that mission critical sites would more likely be done on Unix servers.

Anyhow, I think that a lot of programmers just leverage their ASP to PHP. It's like the urban legend that a lot of big corps use Linux instead of proprietary Unix or Microsoft stuff-but they do it off the books because the IT guys are doing it themselves.

Razib Khan
Tuesday, March 26, 2002

Razib - yeah - fair points - I see where you're coming from on that. However - due to Chillisoft ASP you can currently host ASP on *nix - as yet you can't host ASP.NET - I wonder how that is going to change things. Creating a system to duplicate the ASP functionality is I suspect a lot easier than having to duplicate the whole .NET platform essentially... Although I have seen an opensource effort trying to do just this...

Interesting times ahead I think!

Andrew Cherry
Tuesday, March 26, 2002

PHP's a lot more mainstream than you might think - I notice .php extensions
all over the web now. http://improbable.org/chris/php-sites.html hasn't been
updated in almost a year - I've need to add some big name new sites.

Virtual hosting means Apache. Ignoring the OS and free vs. commercial
flamefests, if you're doing large scale hosting, IIS is a distant second to
Apache when it comes to admin time or flexibility. (I used to install Apache on
Windows servers for this reason)

Apache has a number of established tools and configurations for having thousands
of sites on a system - IIS doesn't have any direct equivalent to most of these,
requiring you to built your own or integrate a number of 3rd part parts.

Apache is also significantly more flexible and less likely to spontaneously
commit suicide which is going to be the deciding factor if you're hosting
several thousand sites (it's 300 sites down, not just 1!).

If you already have Apache, it's likely you're going to install PHP, as it's one
of the most popular Apache modules, just like you'd probably offer ASP if you
ran IIS.

Why's it popular? I've built a number of sites for major companies in ASP, Cold
Fusion, Java Servlets, JSP, Perl, and PHP.

With the exception of Cold Fusion, you can get the job done acceptably with any
of them but PHP is the one which I like developing in - the job gets done sooner
and you don't have to reinvent the wheel quite as often. Only PHP gave me the
impression that the developers had a great deal of experience with high-end
commercial web development. Since this translates directly into greater
productivity and lower support costs, I settled on PHP and have been quite happy
with that decision.

Language Notes:

ASP: unreliable, limited built-in functionality. This has probably improved with
ASP.net (I swore off ASP in early 2000) but basic things like not regular
expressions or associative arrays, let alone more complex language structures
got old. Of course, ASP wasn't the biggest problem - IIS was unreliable and
required several times more admin time than Apache, SQL Server was similarly
unreliable, and we needed to support more than one platform, so it wasn't a good
fit.

In general, I would have liked ASP more better if I'd been in an all-Microsoft shop and had time to build a collection of existing COM objects to cover the language's shortcomings. In classic Microsoft version-3 tradition, C# will finally give it a real language compared to toys like VBScript/JScript and I believe they've finally done something about the designed-in inefficiencies in the core scripting engine. I bet they've made the documentation reflect reality by now, too. Now if they could just take a few things like ADO behind the barn and shoot them...

Cold Fusion: it simply doesn't scale beyond the basics. Cold Fusion was designed
around a decent basic idea (preserving the HTML tag semantics) and never
adequately fleshed out. The built in scripting language is primitive and slow -
almost always an order of magnitude slower than unoptimized PHP and as much as 3
orders of magnitude slower for certain things I needed - it was never within a
factor of 2. The custom tag mechanism is slow enough to preclude using it the
way you'd need to to compensate for the language.

Much noise was made about the application server helping with reliability
and performance. Real-world results put the lie to this - the app server died
randomly and frequently spun off into an infinite loop. This precluded using
Spectra on a project where our client had previously been interested in it - on
a 500Mhz system, it was taking multiple seconds per page, while all of the
competition was capable of many pages per second.

The killer was poor support - I found bugs in the basic language (CFLOOP,
CFFindRE, etc.). The black hole of Allaire's support gets no non-automatic
response; after posting in the forums, it turned out that at least one of these
was a known bug that had been reported as far back as version 3 (it was still in
the 4.5 we were using).

Macromedia's going to be fighting an uphill battle. They have nothing to
recommend their product other than inertia and superior alternatives like ASP,
JSP and PHP are all free ("Pay more, get less!"). I haven't seen any sign that
they're willing to make the serious commitment necessary to make CF a
serious general-purpose web development language candidate - it looks like it's going
to end up as a replacement for Flash Generator.

Java / JSP: it's a heavy-weight solution. If you made a major Java commitment,
you'll like them. If you haven't, you'll want to consider whether you should -
it's decidely non-trivial. On the plus side, extremely portable, widely
supported, a huge amount of available code and recent versions perform quite
well.

Perl: it gives you enough rope to hang yourself and everyone else in the
building. Perl has some addictive language features and a great deal of
existing code but I kept cringing when I saw the results of large development
projects. The "write-only code" jokes have a lot of supporting evidence. If you
can work only with really smart programmers who are into bondage-and-discipline
programming and like some of Perl's idiosyncrasies, you'll be happy with Perl.
Otherwise, reserve it for the quick hacks it does so beautifully (the "I did it
in 3 lines of Perl" jokes are also true).

PHP: a good, but not perfect, balance. I like to think of the PHP language as combining the better parts of its competitors and it'll seem familar to someone used to Perl.

Pluses:
- fast, blindingly so when you add the optimizer and caching modules.
(Uncached PHP is faster than everything I've used except very small mod_perl
scripts)
- the language gives you the structures you need to maintain real applications
but isn't as labor-intensive as Java
- a large selection of native modules, library code and it can call COM, .Net
and Java
- a lot of convenient utility functions for common tasks. See http://www.php.net/manual/en/
- runs on all of the major platforms and web servers including IIS
- well supported. They offer commercial support, but I've never needed it. The
only time I ran into a show-stopper (with a beta version no less) one of the
lead developers had a patch ready an hour later

Minuses:
- growing pains in the API - some of the older extensions have legacy naming
conventions which are being changed to fit the standard.
- object-wrappers for certain complex features still in progress
- still not as tightly integrated into the web server as mod_perl (what is?)
- still waiting for a standard set of true "app server" features - persistent
objects, shared resource pool management, etc.
- PEAR is nowhere near as widely used as CPAN