Forum Moderators: phranque

Message Too Old, No Replies

ColdFusion - major pitfalls or advantages?

         

tedster

8:06 am on Nov 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One of my clients is about to convert to ColdFusion because of easy integration with their new Content Management System.

But I know next to nothing about it - so I'm wondering if there are any particular pitfalls and also any particular advantages we can leverage for websites done with CF - especially relative to the search engines.

jatar_k

8:13 am on Nov 7, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I spoke to a big supporter of cold fusion not so long ago (wrote all of his sites in it regardless of knowing other good languages) and he said one thing; I use it because of the site search function/ability. He said it is really easy to integrate and very comprehensive. I don't know myself but I take his word for it, he knows his stuff.

He agreed with the drawbacks, expensive and slow. cfm seems to often have monster, unspiderable, query strings as well. I think that has more to do with cfm programmers as opposed to the actual language.

Not a very encouraging post but that is what I know about it.

tedster

10:33 am on Nov 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A little research uncovered the fact that we can rewrite those pages and query strings to basic .html extensions with at most a short string. The search engines are VERY important with this client so unspiderable pages are not an option. The IT person at the client confirmed that this was easy to do as of version 5.0.

"Slow" is the thing that's concerning me the most right now. Some of the slowest pages I've seen on the web are ColdFusion - and they're a lot slower than their file sizes would indicate is necessary. So I've always assumed that CF is the culprit.

But I've been told (and haven't confirmed so far) that this is because a lot of small operations with old and poorly configured servers use CF, and that this set of 4 new boxes the client is using will handle it all just fine. I am not Mr. Server Admin, so I can only kick the tires and ask what I hope are the right questions. That means I am counting on this community for good input right now, before the commitment to CF is set in stone.

Thanks, jatar.

lorax

1:01 pm on Nov 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Tedster,
Part of (but not all of) the speed issue has to do with tuning the CF Server. If the server is not under their control then they may have issues with speed. If it's their own server AND they have a geek who knows how to optimize the server then they have a better chance of getting decent performance out of it.

Which platform for CF Server - Win or *Nix?

anoryu

3:12 pm on Nov 7, 2002 (gmt 0)

10+ Year Member



You can change the url strings to be spider friendly (ie change the "?" to "/").

As for a speed The company that I work for codes 98% of all our websites and internal applications and the only time that we have noticed any kind of speed issue is when we run huge querys on our database.

sun818

6:22 pm on Nov 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think the complaint about response time is partly due to browsing web sites that are served from overloaded virtual hosts. Both ASP and ColdFusion (CF) have to process the page through the application server before the web server can send the page out. Our current host does not overload their servers and CF is very responsive! With ColdFusion 5.0 you can avoid ODBC now, using DSNless connection which will improve connection performance to the database.

Response time can also be improved by caching frequently used queries. If you have an updated news section, that query can be refreshed in 15 minute intervals instead of being queried with every visit to the page.

tedster

9:12 am on Nov 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Which platform for CF Server - Win or *Nix?

Windows NT 4

sun818

9:50 am on Nov 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Windows 2000 is a more stable environment, IMO.

tedster

10:01 am on Nov 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, I was surprised that they were on NT. They haven't upgraded because the long term plan is to go to *nix and eliminate Microsoft dependence.

lorax

1:12 pm on Nov 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Windows 2000 is a more stable environment, IMO

The temptation to challenge this is great :) BUT Tedster's issue has more to do with CF and the platform it's running on rather than the platform itself. In this case, CF on Win is a more stable combination.

The only other issue I'd want to know about is the choice of db. Speed will be an issue if they're using MS Access with an ODBC connection (not to # of connections and records).

The last thing I'll add is that I spent several years with CF and switched to PHP. Not that this is an option for you but in hindsight, I'm 200% happier with PHP.

long term plan is to go to *nix and eliminate Microsoft dependence

Just reread your post - if this is true - make the switch to PHP & MySQL now!

John_Caius

1:55 am on Dec 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How do you convert? to / in ColdFusion? Our database (site in profile) has spidering problems due to? in the URLs. Google has picked up our A-Z sitemap of pages - search in Google for the sitename - but it can't follow the links to the pages of real content. We're *really* keen to find out how to do this! Thanks.

lorax

2:26 am on Dec 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



John_Caius,
There has been much discussion on the good/bad/ugly aspects of dynamic URLs (URLs with variables) here on WebmasterWorld.

Basically, if you're looking to drop the variables and just display the page name then you'll need to do some server side work. On linux it's mod_rewrite, on Windows - I don't even know if you can do it on Windows servers. But I believe that has been discussed here as well. What dircection you head depends upon the server OS you're using.

sun818

4:59 am on Dec 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Heh, glad I save my e-mails. You can parse the URL as a script in ColdFusion. Here is one tested method that worked on ColdFusion 4.5. The typical url variables (?,&) are converted to slashes if you stick this code in your application.cfm. If you are on a shared host, you may need to put this code in the .cfm file that performs the parsing. The site should function for spiders as '/product/widget/color/blue' as replacement to the typical link structure of '?product=widget&color=blue':

<cfif isdefined("CGI.path_info")>
<cfoutput>
<CFSET mylist = Right(CGI.path_info, Len(CGI.path_info)-1)>
<CFSET mylist = Replace(mylist,"/",",","ALL")>
<cfset mylist = ListDeleteAt(mylist,1)>
<!--- remove actual .cfm file from list --->
<cfloop index="x" from=0 to=#Val(ListLen(mylist)/2-1)#>
<cfif NOT isDefined("url.#ListGetAt(mylist,x*2+1)#")>
<cfset Evaluate("url.#ListGetAt(mylist,x*2+1)# = ListGetAt(mylist,x*2+2)")>
</cfif>
</cfloop>
</cfoutput>
</cfif>

Some of your IMG SRC links may need to be absolute instead of relative using this method. If this does not work for you, I can dig up some other examples from the ColdFusion support forum. Sticky me and I will send you the links. - Sun

John_Caius

10:21 am on Dec 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



lorax - thanks, I'm well aware of the dynamic URL issue :). We've been trying various options to get our site spidered for months! We run our server on ColdFusion hence the query here.

sun818 - that's really helpful. I've also had a look at the support forums at Macromedia. We'll try this trick and let you know how we get on.

Cheers!