For ColdFusion, I prefer presentation elements (we are talking about
HTML/XHTML/XML for the most part, right?) to be in tags.

The main reasons are simple.

I'd rather see:

<ui:navdiv>
        <a href="home">home</a>
</ui:navdiv>

Than

<cfsavecontent variable="myvar">
        <a href="home">home</a>
</cfsavecontent>
<cfset WriteOutput(obj.showNavDiv(myvar))>

Or variations along those lines. The tag based solution feels like a natural
fit alongside the tag based output for the most part, and it seem like a
cleaner method to wrap with tags than if you are using CFCs, and finally, it
appears that you will have no choice on using tags for UI, then it makes
sense to me to always use tags for UI, for consistency sake.

- Calvin

-----Original Message-----
From: Michael Dinowitz [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 12:10 PM
To: CF-Talk
Subject: RE: (OO) UI in CFCs

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. 
 
> I don't think he means use UI and business together, but rather CFCs for
> the
> presentation.
> 
> Mike?
> 
> Ade
> 
> -----Original Message-----
> From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
> Sent: 03 March 2005 16:52
> To: CF-Talk
> Subject: Re: (OO) UI in CFCs
> 
> 
> It's a big no no....one of the points of using CFCs is to seperate
> business
> logic from the presentation layer
> 
> I know it's possible....but it's also possible to put page header display
> code in Application.cfm....but we don't do it ;-)
> 
> Ultimately it's up to the developer ;-)
> 
> Cheers
> 
> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> phone: 250.480.0642
> fax: 250.480.1264
> cell: 250.920.8830
> e-mail: [EMAIL PROTECTED]
> web: www.electricedgesystems.com.cfm/54
> 
> 
> 
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:197296
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

Reply via email to