Someone I work with uses CFCs for UI. For instance, something he did is
make a CFC that runs a query and returns a recordset. He then passes the
recordset to a UI CFC and it formats the results in a datagrid fashion.
I believe the default action is to take the column names and make them
table headers with a specific look and sorting functionality and then
display the data in cells below the header.  There's also functionality
to map a "display name" to a column and also to limit which columns are
displayed. This is used on a reporting site that uses these datagrid
displays all over.  So now, he can control the UI on the majority of the
site within 1 simple CFC.  I haven't used it yet or looked into it at
great length, but in theory it sounds like a pretty good idea. 


John Burns
Certified Advanced ColdFusion MX Developer
Wyle Laboratories, Inc. | Web Developer
 

-----Original Message-----
From: Aaron Rouse [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 12:21 PM
To: CF-Talk
Subject: Re: (OO) UI in CFCs

Thus far I have only seen one example where someone was using a CFC for
the UI.  I never got to see the actual code but his explanation made it
sound like a good chunk of the business logic was in other CFCs and then
he had a set of CFCs for the UI portion.  Without really seeing the
code, I always had a hard time seeing how this approach was any better
or worse than just have a custom tag for that portion of his UI.  That
example though was not just one CFC to display the
information, it used 3 or 4 I think to build it all up.    What he was
displaying was exactly what we do here but with custom tags and we
probably use the same amount of tags as he was using CFCs.


On Thu, 3 Mar 2005 12:09:57 -0500, Michael Dinowitz
<[EMAIL PROTECTED]> wrote:
> Personally, I don't see a reason not to have a separate CFC just for 
> UI elements that go on a page. Basically, you have a page which calls 
> a BL (business logic) CFC for logic and a UI (user interface) CFC for 
> specific UI elements that go on the page with the business logic.
> Take an average blog for example. Most have a calendar on the side. 
> Why is this not inside a blogui.cfc file with other specific UI 
> elements that are re-used. Yes, a custom tag can be built for each of 
> the UI elements but on an average blog, there are 4 or 5 different 
> small side elements. A single location for all of them would make 
> sense rather than 4 or 5 different modules.
> At the moment I'm not using CFCs for UI but for UI elements less than 
> 10 lines long, it's looking good.
>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:197288
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to