I was wondering if anyone would post some very simple, yet complete code for how they implement CFCs.  I have quite a bit of structure already built for an intranet site, but I'm stepping back to evaluate what I have done.  I also want to compare/contrast with code structure developed by others.
 
I thought that if there could be a simple structure that could be agreed on by a majority, this structure could be posted on cfcdev's site.  It would be nice to have a single location that newbies, on this list or the MACR forums, could go to for reference.
 
I'm not really looking for long, complex applications, but more like a CFC, or two, that has, for example, two or three methods, fully-functional error handling for different causes.  Finally, there should be code examples of the calling code that consumes the CFCs and handles any thrown errors.  Basically, an example of each use of a CFC, based on the type such as Public, Private, Remote, WebService.
 
Does this sound reasonable or am I asking for too much?  I don't really want any trade secrets nor a full framework such as Fusebox or the such, just a standard starting point.
 
My whole reason for thinking about this is related to the recent posting of how to return empty strings when the method return type is "date".  How would you code a simple, complete application that had to allow for this issue?  Where, in the CFC, in the calling page, would you put error handling?  That's the sort of example that I would like shared for everyone.
 
Thanks
M!ke

Reply via email to