Skip to main content
January 25, 2011
Question

createObject alternative?

  • January 25, 2011
  • 2 replies
  • 1141 views

Hey all,

I just developed a web site for a client which is going to be hosted on goDaddy. I didn't know beforehand that createObject was not allowed on their servers. So i designed my whole site like this.

Instantiate the objects on application start

    <cfset application.siteMethods = createObject("component","components.siteMethods")>
    <cfset application.userMethods = createObject("component","components.userMethods")>

then from there on in I just called methods like this


    <cfset serverInit = application.siteMethods.init(application.dsn)>

Am I totally sunk or is there any other way to accomplish the same result? Please help, I am really in a bind here.

This topic has been closed for replies.

2 replies

Inspiring
January 25, 2011

Am I totally sunk or is there any other way to accomplish

the same result? Please help, I am really in a bind here.

If you are using components only, then the alternative is cfinvoke. If you are using any java objects, you are probably out of luck.

January 26, 2011

It looks like cfobject has been disallowed as well. I didn't really know about goDaddy's crazy policies until it was too late. My client just wanted to use then, and I saw no reason why not. It looks like if we upgrade to using  a windows instance with coldfusion 8 we can get cfobject, so we might end up doing that.

I read that cfinvoke would work, but that means I have to replace every method call with a cfinvoke tag right? Cfinvoke can't store the object in memory?

Inspiring
January 26, 2011

Say to your client "we can't use GoDaddy because the service they provide is substandard to the point where they don't support fundamental parts of the ColdFusion programming language.  This is completely unnecessary, and belies the fact they don't know what they are doing.  Do you want your website hosted with someone who clearly doesn't know how to properly host (and accordingly support) the application platform you need to run on?  No".

If they are steadfast, tell them in that case there will be additional cost from your end to refactor the application to work around GoDaddy's shortcomings, which could not reasonably be expected to anticipate.

--

Adam

Inspiring
January 25, 2011

cfobject, if it's allowed.

If not, why pay for a hosting company that does not meet your requirements?