I hear you Mike on this statment.  

"I have endured millions of pop-up ads going through 'tutorial' sites for
info on how to
make this work. "

It seems to be getting worst and worst. I may have to get one of those popup
blocking things soon!!!

Could you email me the php cfhttp code. I'm a bit curious.  it404 at
yahoo.com.

thanks. DRE

-----Original Message-----
From: Haggerty, Mike [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 2:49 PM
To: CF-Community
Subject: Coldfusion is King


Alright, I am letting off a little steam here. It has been a long week, and
Friday is still hours away.

Coldfusion is king among dynamic Web technologies. Period. It is easy to use
and does not require you to build an API every time you want to do
something. I have known this for a long time, but sometimes I am forced to
prove this fact via a practical demonstration (in much the same way as a
gibbering idiot sometimes proves he cannot pound railroad spikes into
concrete walls with his own forehead).

I have a project where we need a low-cost data feed technology to distribute
to regional offices. What will happen is the contents of a database will be
thrown into a WDDX packet, which will be downloaded via a Web server to the
central office. The data can be anything, but the transport protocol must be
http. And the technology must already be installed or else freely available,
meaning we can will use PHP, Perl or ASP.

So I get to learn how to automatically post variables to a Web server in PHP
and return the content.

To do the following in CF: 

<cfset login = structNew()>
<cfset login.name = "someuser">
<cfset login.pass = "somepass">
<cfset login.call = "somecall">
<cfwddx input="#login#" output="WXDDlogin" action="CFML2WDDX">
<cfhttp url="http://www.somewhere.org/wddx_output.cfm"; method="POST"
resolveurl="true" throwonerror="no">
    <cfhttpparam name="login" value="#WXDDlogin#" type="FORMFIELD">
</cfhttp>
<cfwddx input="#cfhttp.fileContent#" output="data" action="WDDX2CFML">

...is insanely difficult to do in PHP.

First off, their file system functions are restricted to local operations,
meaning you have to connect to their server via a socket connection. Once
that connection is open, you have to write the F***ING headers yourself to
GET and POST data, which is not easy considering you have to write one for
each and every piece of data you wish to post. The resulting content is not
a WDDX packet, it is a raw HTTP packet which you then get to strip via regex
functions. Then, if you are lucky and everything worked the way it was
supposed to, you have a WDDX packet you can deserialize and start using. If
you are unlucky and something goes wrong, poor you because the debug
information is sparse at best.

Now, this would not be such a big deal were it not for the nearly complete
lack of information on how to do this. In the time it has taken me to figure
out the steps in the code I could have rewritten the Bible. I have endured
millions of pop-up ads going through 'tutorial' sites for info on how to
make this work. I have posted dozens of questions to PHP lists and for each
one received at least 10 responses from people who either didn't understand
the question or think asking 'Why would you want to do that?' is an answer.

I could go on, but the problem is now solved and the data client is now in
place. At least I won't have to learn how to do this again. I built out all
the functions into a class library, and now have the equivalent of CFHTTP in
PHP to use on further development.

It only took me about a week to complete a simple task that would have taken
15 minutes to set up in CF.

Praise the king.

M










 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
                                

Reply via email to