> Declare the file to write to and write.
> Dim FSO As FileStream = File.OpenWrite("file.txt")
> FSO.Write("Content")
Don't forget to close your stream. CF does it automatically. Oh, and
does your operation need a FileStream, BinaryStream, or StreamReader?
This is a nice example of the CF approach vs. the .NET approach. What
I think makes CF superior here is that you have the "easy" CF way, and
the option to do it the Java way (which is almost identical to .NET)
if you need to.
> "uploading a file... haven't done it, sounds difficult."
> ImageUploadField.PostedFile.SaveAs("Image.jpg");
This _is_ a place I like .NET more - I wish CFFile action="upload" was
a little more powerful.
> "cfdump? they do have debugging, but not a "dump your vars" quickie
> shortcut."
> <%@ trace="true" %>
Last I checked, it's <%@ Page Trace="true" %> - sorry to be picky, but
on my blog you said something about me not knowing enough (ASP).NET to
have an opinion.
The trace is nice, but not nearly as powerful as CFDump because you
can only Write() strings, whereas CFDump can handle complex types.
> "For consuming a web service, you have to create a stub, usually through
> the command-line tool wsdl.exe, or through VS.NET (see: web reference).
> Then call the local stub object just like you would a local class. It's
> not really more code, it's just more work, which is why Ben said it was
> "difficult"."
>
> Overall I find it as easy to use as anything else in .NET, simply because
> it's treated exactly the same as regular code.
I give .NET points here. I have found Web Services much easier to
deal with due to the homogenous environment (compared to CF's use of
Axis to produce Java stubs).
> I will say that you're going to be faster writing CF. I think that writing
> code in ASP.NET is going to be less bug-prone because of the heavy reliance
> on the OOP paradigm. So it's really a matter of time saved now vs.
> long-range maintenance.
I think it's just as easy to write bad .NET code as bad CF code - but
I think in CF, you'll find the bad code faster.
> It will take you longer to learn ASP.NET, but that's not necessarily a bad
> thing.
Why's that not a bad thing? Paying for people to learn stuff is expensive.
> Experience in any field is worth more than book learning.
Agreed.
--
Get Glued!
The Model-Glue ColdFusion Framework
http://www.model-glue.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211850
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54