Re: (OO) UI in CFCs

2005-03-04 Thread Thomas Chiverton
On Thursday 03 Mar 2005 16:43 pm, Michael Dinowitz wrote:
 I'm starting this topic to get peoples feelings on the subject. Do you use
 CFCs for UI? Do you have a good reason to do so? Do you see a reason to use

Yup, we've got a bunch of stuff in com.bluefinger.gbb.gui. that performs the 
job of providing a decent widget set - all of them have draw() and 
drawJavascript() methods, so you can just drop a dateTimeChooser into a 
template and get a DHTML calender control, to take a trivial example.

-- 
Tom Chiverton 
Advanced ColdFusion Programmer

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


RE: (OO) UI in CFCs

2005-03-04 Thread Micha Schopman
We have a lot of ui logic inside cfc's. After actions are done we need
to inform javascript functions so these are called from cfc functions.

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380



-
Modern Media, Making You Interact Smarter. Onze oplossingen verbeteren
de interactie met uw doelgroep. 
Wilt u meer omzet, lagere kosten of een beter service niveau? Voor meer
informatie zie www.modernmedia.nl 


-


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197426
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


Re: (OO) UI in CFCs

2005-03-04 Thread Nathan Strutz
wow Dwayne, that's a lot of attributes.
To me, it comes to a certain point where reusability just needs to give 
way to practicality. However, when looking at your code, I'm reminded of 
something a little familiar...

ah yes, here it is, the ASP.NET textbox control list of members:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolstextboxmemberstopic.asp

Still though, how about a cfcomponent for the offices list gui object, 
then set a few variables and call a show() function? How about 
showDefault() and a few showCustom() variations like 
showCustomInOfficeDefault(). That would cut down on my complaint about 
aspnet's form controls, having large tags and seemingly endless attributes.

obj.displayListOffices(12,6,4,http://blah;... ... ... ... [snip] ...)

could possibly be cut down to

listOffices.showCustomSuperDuper(prop1,prop2)

If you like, your function below could still be in there, just kinda 
hidden and private. See, objects should simplify life for other systems, 
and if you can't, then build a simplified interface (a façade) for it

Anyways, points to ponder for the weekend.

-nathan strutz
http://www.dopefly.com/



Dwayne Cole wrote:
 All the time!
 
 I use one cfc that returns a list of office locations. Simple enough right.  
 Well this same cfc is used by 10 different sites and in each case the output 
 is some what different.   To me, a list of offices is a list of offices sure 
 we may have different output versions for example a 2 column output, a list 
 out put, and output with an image to the right or an output with an image to 
 the left, but the list is still a list.  So we use a single cfc and pass 
 arguments that help us control the output.  Here's the good thing, If we add 
 another display version it's available to anyone of the sites.  
 
 I use cfc not for objects but for extreme code reuse.  With most of mysites, 
 as much as 70 percent of the code is reused code, not copy and past but 
 shared and reused.
 
 True, the functions have, in some case 50 attributes but to me its worth it.  
 Here's sample of the function and arguments.
 
 cffunction name=displayListOffices hint=I return a list of offices
   cfargument name=id_office_cat
   cfargument name=id_firm
   cfargument name=itemsOut
   cfargument name=link
   cfargument name=linkback
   cfargument name=showListType
   cfargument name=showListTitle
   cfargument name=isShowDirectorySectTitle
   cfargument name=isNameLink 
   cfargument name=isShowOfficeTitle
   cfargument name=isShowOfficePhone 
   cfargument name=isShowOfficeContact
   cfargument name=isShowOfficeContactEmail
   cfargument name=isShowOfficeAddress  default=false 
 required=No  
   cfargument name=isShowImage  default=false 
 required=No
   cfargument name=ItemStyle 
   cfargument name=cssFormatDirSectionTitle
   cfargument name=styleFormatDirSectionTitle
   cfargument name=cssFormatTitle
   cfargument name=cssFormatBody
   cfargument name=FormatRowOdd 
 default=background-color:##ff;
   cfargument name=FormatRowEven
 default=background-color:##ff;   
   cfargument name=BlockFormat  default=c5
 required=No
   cfargument name=BlockStyle   default= 
 required=No
   cfargument name=BlockSizedefault=N 
 required=No
   cfargument name=BlockColumnCount default=1 
 required=No  
   cfargument name=BlockColumnWidth default=  
 required=No  
 
 
   cfargument name=isLinkdefault=True required=No
   cfargument name=Iconlink default=more... 
 required=No!--- text or image to use and a read more link---
   
   cfargument name=ImagePos default=Float:Right; 
 margin-top:10px; margin-left:5px; required=No
   cfargument name=ImageWidth   default= required=yes
   cfargument name=ImageHeight  default= required=yes  
   cfargument name=ImageCSS default=defaultImage 
 
 
 -- Original Message --
 From: COLLIE David [EMAIL PROTECTED]
 Reply-To: cf-talk@houseoffusion.com
 Date:  Thu, 3 Mar 2005 19:47:16 -
 
 
And if you don't agree with me, I'll take my Property p = new
Property(Ball.Color(Red)) and Structure.Home.Go()

That's one of the funniest things I've read all week!!! (It's been a
hard one :)

-- 
dc


 
 
 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197547
Archives: 

(OO) UI in CFCs

2005-03-03 Thread Michael Dinowitz
I'm starting this topic to get peoples feelings on the subject. Do you use
CFCs for UI? Do you have a good reason to do so? Do you see a reason to use
it (or not) vs. CFINCLUDEs or CFMODULEs?

According to commonly discussed practices in the community (and in part of
the Macromedia docs), UI elements should not go inside of CFCs. 
According to the Macromedia CFC examples, UI can go inside CFCs. 
According to the makeup of the CFCOMPONENT and CFFUNCTION tags, the ability
exists explicitly (the output attribute). 
According to many of the OO books I've been reading, there's no reason for
UI not to be within an object. 




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


Re: (OO) UI in CFCs

2005-03-03 Thread Bryan Stevenson
It's a big no noone of the points of using CFCs is to seperate business 
logic from the presentation layer

I know it's possiblebut it's also possible to put page header display 
code in Application.cfmbut 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 


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197276
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


RE: (OO) UI in CFCs

2005-03-03 Thread Adrian Lynch
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 noone of the points of using CFCs is to seperate business
logic from the presentation layer

I know it's possiblebut it's also possible to put page header display
code in Application.cfmbut 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




~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197278
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


Re: (OO) UI in CFCs

2005-03-03 Thread Marlon Moyer
This is one of those topics where I see people making CFC's into
something they aren't.  Yeah, CFC's can be used to separate BL from UI
blah blah blah.  But that doesn't preclude the use for other things.

I see so many emails floating around about OO design and how this rule
keeps you from doing this or that or that you must follow this way of
doing things.  The plain fact is that CF is still procedural by nature
with some OO abilities.  I say use CFC's for whatever you want to use
them for.  You might just stumble on a really neat implementation.

I'm currently in the middle of OOP Demystified.  Excellent book so
far.  The author gives real world examples of creating objects.  Then
he also gives situations where it might not be the best course of
action to use OO, but to do it procedurally.  That was surprising from
an OO book.  He said that OO programmers will model objects after
reality and sometimes, to keep to the hard and fast rules of OO
design, they would 'bend' reality to fit the OO model.

If you get a chance, check out the book. It starts out like all the
other OO books I've read, but then after the definition chapters,
he'll actually start using real world designs to illustrate his
points.

Marlon



On Thu, 3 Mar 2005 11:43:09 -0500, Michael Dinowitz
[EMAIL PROTECTED] wrote:
 I'm starting this topic to get peoples feelings on the subject. Do you use
 CFCs for UI? Do you have a good reason to do so? Do you see a reason to use
 it (or not) vs. CFINCLUDEs or CFMODULEs?
 
 According to commonly discussed practices in the community (and in part of
 the Macromedia docs), UI elements should not go inside of CFCs.
 According to the Macromedia CFC examples, UI can go inside CFCs.
 According to the makeup of the CFCOMPONENT and CFFUNCTION tags, the ability
 exists explicitly (the output attribute).
 According to many of the OO books I've been reading, there's no reason for
 UI not to be within an object.
 
 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197281
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


RE: (OO) UI in CFCs

2005-03-03 Thread Michael Dinowitz
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 noone of the points of using CFCs is to seperate
 business
 logic from the presentation layer
 
 I know it's possiblebut it's also possible to put page header display
 code in Application.cfmbut 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:197282
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


Re: (OO) UI in CFCs

2005-03-03 Thread Aaron Rouse
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.


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197286
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


Re: (OO) UI in CFCs

2005-03-03 Thread toru okada
[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. 

we have talked about his many times in our shop.

the main advantage that we have come up with is giving UI an interface
of sorts.  It would allow you to define what is required for the UI
element.   This helps a lot when you are editing a display and need to
know what variables are available to you.

toru

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


RE: (OO) UI in CFCs

2005-03-03 Thread Burns, John D
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


Re: (OO) UI in CFCs

2005-03-03 Thread Aaron Rouse
A datagrid as you refered to it is exactly the example I am thinking
of.  We just use custom tags here to do what you are describing.  Now
our system was developed long before CFCs were even available.  I
could see how maybe it would be easier using some Set/Get functions
over potentially a lot of attributes.  Although we actually do not run
into a problem with a lot of attributes as is.

I have been wanting to redo a form builder tag we have here for awhile
and have often debated if I would benifit any over doing it in a CFC
instead.


On Thu, 3 Mar 2005 12:28:04 -0500, Burns, John D
[EMAIL PROTECTED] wrote:
 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
 


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


Re: (OO) UI in CFCs

2005-03-03 Thread Nick de Voil
 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.

We do something similar. We have a set of report-building CFCs where you can
populate paragraphs of text and arrays of data, then choose to (re-)display
the report as HTML, RTF, PDF or CSV, with the arrays shown as tables or
charts. Some kind of object-oriented approach is ideal for this.

I can't see any sense in the assertion that you shouldn't use CFCs for UI.
Why on earth not? In fact, in my experience the object-oriented approach is
more useful for UI than it is for business data processing - although of
course this is far more true when you're programming an interactive
stateful environment  (ActionScript, JavaScript etc).

Nick




~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197292
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


RE: (OO) UI in CFCs

2005-03-03 Thread Burns, John D
Yeah, my main intrigue with it is that you could have different
mini-functions within the CFC that could do formatting and arranging and
stuff and could be used for a lot of data display.  That way, even more
than with a custom tag, you could reuse the CFC for all kinds of
displays and such. 


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:38 PM
To: CF-Talk
Subject: Re: (OO) UI in CFCs

A datagrid as you refered to it is exactly the example I am thinking of.
We just use custom tags here to do what you are describing.  Now our
system was developed long before CFCs were even available.  I could see
how maybe it would be easier using some Set/Get functions over
potentially a lot of attributes.  Although we actually do not run into a
problem with a lot of attributes as is.

I have been wanting to redo a form builder tag we have here for awhile
and have often debated if I would benifit any over doing it in a CFC
instead.


On Thu, 3 Mar 2005 12:28:04 -0500, Burns, John D
[EMAIL PROTECTED] wrote:
 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
 




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


RE: (OO) UI in CFCs

2005-03-03 Thread Calvin Ward
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=homehome/a
/ui:navdiv

Than

cfsavecontent variable=myvar
a href=homehome/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 noone of the points of using CFCs is to seperate
 business
 logic from the presentation layer
 
 I know it's possiblebut it's also possible to put page header display
 code in Application.cfmbut 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


Re: (OO) UI in CFCs

2005-03-03 Thread Aaron Rouse
Our tags handle a lot of this. They are however fed a single file that
is nothing more than a big switch case.  You set the cases values to
various things based upon what and how you want the datagrid to be
displayed.  The more I think about it from a coding(code within custom
tag or CFC, not code that implements it) standpoint the CFC probably
would be a lot easier to follow.


On Thu, 3 Mar 2005 12:51:14 -0500, Burns, John D
[EMAIL PROTECTED] wrote:
 Yeah, my main intrigue with it is that you could have different
 mini-functions within the CFC that could do formatting and arranging and
 stuff and could be used for a lot of data display.  That way, even more
 than with a custom tag, you could reuse the CFC for all kinds of
 displays and such.
 
 
 John Burns
 Certified Advanced ColdFusion MX Developer
 Wyle Laboratories, Inc. | Web Developer


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


RE: (OO) UI in CFCs

2005-03-03 Thread Steve Brownlee
Yes, I use CFCs for presentation of content, but only in situations where it
makes sense.  For simple web pages, absolutely not, there's no point.  My
main use of CFC is, for example, in a custom content management system where
almost every view is the same and only a query resultset changes what content
appears in the view.  Just simple components such as PageHeader, QueryTable,
QueryList, PersistentSructForm, InterfaceBreadcrumb, etc...  They have
minimal, but consistent HTML and/or CSS formatting applied to them every
time.  When creating hundreds of pages, it adds up.

Would custom tags perform the same function?  Of course.  However, when
creating something of significant size, with many hands touching it, I like
to keep the elements used in development to a minimum.  

Again, as a few people have mentioned, whatever flavor you like best is what
you should be eating.  Like I've said to many people: it's a ColdFusion
Component, not a ColdFusion Business Logic Container, or ColdFusion
Transaction Processor.  You can make a component out of anything you like.

And if you don't agree with me, I'll take my Property p = new
Property(Ball.Color(Red)) and Structure.Home.Go()

- Steve

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

I'm starting this topic to get peoples feelings on the subject. Do you use
CFCs for UI? Do you have a good reason to do so? Do you see a reason to use
it (or not) vs. CFINCLUDEs or CFMODULEs?

According to commonly discussed practices in the community (and in part of
the Macromedia docs), UI elements should not go inside of CFCs. 
According to the Macromedia CFC examples, UI can go inside CFCs. 
According to the makeup of the CFCOMPONENT and CFFUNCTION tags, the ability
exists explicitly (the output attribute). 
According to many of the OO books I've been reading, there's no reason for UI
not to be within an object. 


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


Re: (OO) UI in CFCs

2005-03-03 Thread Deanna Schneider
We use CFC's to _return_ UI elements. In other words, we don't use 
output=true but we do use CFC's to return data that generates output. For 
example, we have a contentserver CFC. This CFC returns images and files 
that are outside of the webroot. We also have a template CFC for one 
specific template that gets used over and over from both the secure and 
non-secure sides of our server.


- Original Message - 
From: Michael Dinowitz [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Thursday, March 03, 2005 11:09 AM
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.


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


RE: (OO) UI in CFCs

2005-03-03 Thread Andy Ousterhout
Nick,
I am not sure that previous discussions where about CFC's designed
specifically for UI, but for CFC's that are instances of objects.

-Original Message-
From: Nick de Voil

I can't see any sense in the assertion that you shouldn't use CFCs for UI.
Why on earth not? 


~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197306
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


RE: (OO) UI in CFCs

2005-03-03 Thread COLLIE David
 And if you don't agree with me, I'll take my Property p = new
 Property(Ball.Color(Red)) and Structure.Home.Go()

That's one of the funniest things I've read all week!!! (It's been a
hard one :)

-- 
dc

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


RE: (OO) UI in CFCs

2005-03-03 Thread S . Isaac Dealey
Beyond what's already been said, I would say that CFC's are also a
reasonable way to encapsulate GUI functionality that's not already
built in to HTML like tabsets, related select boxes, etc... There are
of course custom tags that do the same thing, but imo don't have the
same flexibility. The onTap framework also includes a good deal of
this sort of thing, although they're not actually using CFC's, just
consistently formatted structures and a slew of functions in 3
separate libraries. I obviously don't think CFC's are absolutely
necessary for a good implementation of these sorts of things -- the
libraries were originally designed for compatibility with CF5 although
more recent versions include an XML syntax which makes them easier to
grasp for programmers who are accustomed to templated display, and
obviously since it uses XML extensively this requires CFMX to drive
it.

The framework includes a fair amount of extra CFC features, most
notably pathing and dynamic-inheritance features which make it
possible to set a single variable within the application and have
_all_ CFC's in the application use the specified variable as the root
path for their discovery (and all inheritance then also uses these
paths, which is not natively available with CF), which helps to
resolve issues related to CFC's having been all written to work under
a specific directory, as was the case with early versions of Mach-II
where initially the framework had to be directly under the web root or
it had to have a mach-ii mapping specifically in order to function,
preventing multiple instances of the framework on a single CF Server
instance. Iirc they've changed this now, although I can't speak to the
method.

In general I think the display layer in applications gets a bad rap.
Many of the programmers I've met seem to consider it like a
second-class citizen or a red-headed step-child as the saying goes.
They abhore the idea of working on anything that deals with the
display for more than a moment because I guess that smacks of actually
caring what users think and many of us have a strange notion that
users are stupid people who should be seen and not heard. But I
digress... I think display is at _least_ as important as the model of
an application because it's all the client ever sees in most cases and
in general our most effective tool for communciating with our clients,
for dazzling them and for impressing on them the value of our work,
which ultimately is what helps us get paid and more importantly get
repeat business that pays. To that end, if a component is useful for
encapsulating and reusing business-logic, then I would say that a
component might be equally useful for encapsulating and reusing
display-logic.

YMMV

This article might give you some ideas about how you might want to use
CFC's for encapsulating display:

http://www.sys-con.com/story/?storyid=48229DE=1

and for those who haven't seen it, here's a recent introductory
presentation to the onTap framework:

http://www.fusiontap.com/demo/powerontap.htm

Not it's permanent home -- I'm accumulating feedback to improve the
presentation and will be placing it in the articles section of the
framework site once I've tidied it up some. :)


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://macromedia.breezecentral.com/p49777853/
http://www.sys-con.com/story/?storyid=48229DE=1
http://www.sys-con.com/story/?storyid=44477DE=1
http://www.sys-con.com/story/?storyid=45569DE=1
http://www.sys-con.com/story/?storyid=48229DE=1
http://www.fusiontap.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:197366
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


Re: (OO) UI in CFCs

2005-03-03 Thread Jared Rypka-Hauer - CMG, LLC
I've got one app that uses what amounts to an embedded UDF for
generating select boxes, lists of links, and/or text lists (rather
like valuelist()) for the UI.

For good or ill, at the moment it's embedded in a business object
(it's due to be refactored) because it seemed appropriate at the time.
There are two methods for generating UI elements, one is called mList
(for Managed List - my own internal convention) and it outputs either
select/options, HTML anchor tags, or a text-only list of the DB column
relevant to that business object. It's parameterized as follows:
cfargument name=type default=text hint=required to give type of
content generated
cfargument name=url default= hint=required if type=url in order
to generate links
cfargument name=name default= hint=reqired if type=select to
give select element a name property
cfargument name=staff_id default= hint=optional, will generate a
list for specificed staff_id
cfargument name=catch_id default= hint=optional, passed-in
company_id to mark selected when type=select
cfargument name=jump type=boolean default=false hint=option,
generates a Go button and JS function for jump-style menu
cfargument name=style type=string default= hint=optional -
supplies a style sheet class selector to include for URL or Select
cfargument name=startempty default=false type=boolean
hint=optional - adds a blank option to start of select

It works fantastic, and I'm using it for probably 5 separate objects
on innumerable screens in the application.

Also, there's xList (x=child object, i.e. userList(), companyList(),
etc.) that works the opposite of mList. If mList lists all the
companies in tbl_company in any of the 3 formats, then xList lists all
the employees for company_id in tbl_user. I'm sure there's a more
unified, encapsulated, cohesive, rational, sensible, and altruistic
way to do this... but it works so well. The way I implemented it, I
generally use cfinvoke to pull it into my forms unless I've got an
active instance of the relevant object in which case I'll just do
objName.mList(parm1, parm2, parm3)... BUT... for an administrative
page for adding new/editing existing employees in the system (which
supports multiple employers), I'll do this:

(at top)

user = createObject(component,cfc.user).init(310,true)
// 310 = user_id in DB, true means INIT uses CFRETURN to send instance
back to caller
 much more HTML ...
cfinvoke component=cfc.company method=mList
catch_id=#user.getUserId()# ...
 even more HTML ...
There's more parameters to pass in, but that's the gist of how it works.

Now, I know, I shouldn't have UI generators in the business object. Or should I?

From one perspective, no. UI and BL must be strictly separate. But...
but... see... well, if a business object is meant to maintain and
manage the business objects in the model, then how is it not
acceptable for it to fetch data and generate output relevant to the BO
for which it is reponsible? It's still being controlled by the
controller, it's still PART OF the model, and I'm still not embedding
any logic IN the page.

So my question is this: What real, explicable reason to I have for NOT
putting this in a BO... what's the rationale for creating separate
model objects for logic and for UI generation even though the BO is
technically responsible for managing access to the data in question?

I'm not expressing this very well, so I hope someone else understands
well enough to either answer or restate. If not, I'll try again later.

Laterz,
J
On Thu, 3 Mar 2005 11:43:09 -0500, Michael Dinowitz
[EMAIL PROTECTED] wrote:
 I'm starting this topic to get peoples feelings on the subject. Do you use
 CFCs for UI? Do you have a good reason to do so? Do you see a reason to use
 it (or not) vs. CFINCLUDEs or CFMODULEs?
 
 According to commonly discussed practices in the community (and in part of
 the Macromedia docs), UI elements should not go inside of CFCs.
 According to the Macromedia CFC examples, UI can go inside CFCs.
 According to the makeup of the CFCOMPONENT and CFFUNCTION tags, the ability
 exists explicitly (the output attribute).
 According to many of the OO books I've been reading, there's no reason for
 UI not to be within an object.
 
  


-- 
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://cfobjective.neo.servequake.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:197393
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: 

Re: (OO) UI in CFCs

2005-03-03 Thread Sean Corfield
On Thu, 3 Mar 2005 11:43:09 -0500, Michael Dinowitz
[EMAIL PROTECTED] wrote:
 I'm starting this topic to get peoples feelings on the subject. Do you use
 CFCs for UI? Do you have a good reason to do so? Do you see a reason to use
 it (or not) vs. CFINCLUDEs or CFMODULEs?

Anyone who uses Mach II is using CFCs to generate their UI whether
they realize it or not. Mach II has a CFC dedicated to rendering a
view (and it cfincludes the view .cfm page). It also manages the
optional use of cfsavecontent to place generated output in content
variables.

 According to commonly discussed practices in the community (and in part of
 the Macromedia docs), UI elements should not go inside of CFCs.
 According to the Macromedia CFC examples, UI can go inside CFCs.
 According to the makeup of the CFCOMPONENT and CFFUNCTION tags, the ability
 exists explicitly (the output attribute).
 According to many of the OO books I've been reading, there's no reason for
 UI not to be within an object.

Most typical OO systems have a UI that is built with objects that you
interact with to render your data. In those systems, the 'system'
maintains the UI model and your application simply calls methods on it
- and sometimes registers objects that are invoked for UI operations.
That model doesn't apply as well to web apps - you get a request, you
generate HTML, you spit it back out. A Servlet app is OO and calls
methods to write HTML to the response object but a JSP app hides that
and gives the impression of rendering HTML directly. CFML follows the
same model.

The idea that CFCs shouldn't generate HTML is mostly based on the
separation of business logic and presentation - so if you have pure
presentation CFCs that contain no business logic, you're not breaking
any rules. But usually it's just easier to recommend that folks use
custom tags and CFML pages for UI and CFCs for model stuff.

Because of ColdFusion's page-based underpinnings, which hides the real
Servlet model underneath, it can be pretty ugly to work with CFCs for
general UI generation - simple CFML pages and custom tags tend to be
easier to work with for UI generation.
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 49, yes 49, invites to give away!

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

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


RE: (OO) UI in CFCs

2005-03-03 Thread Dwayne Cole
All the time!

I use one cfc that returns a list of office locations. Simple enough right.  
Well this same cfc is used by 10 different sites and in each case the output is 
some what different.   To me, a list of offices is a list of offices sure we 
may have different output versions for example a 2 column output, a list out 
put, and output with an image to the right or an output with an image to the 
left, but the list is still a list.  So we use a single cfc and pass arguments 
that help us control the output.  Here's the good thing, If we add another 
display version it's available to anyone of the sites.  

I use cfc not for objects but for extreme code reuse.  With most of mysites, as 
much as 70 percent of the code is reused code, not copy and past but shared and 
reused.

True, the functions have, in some case 50 attributes but to me its worth it.  
Here's sample of the function and arguments.

cffunction name=displayListOffices hint=I return a list of offices
cfargument name=id_office_cat
cfargument name=id_firm
cfargument name=itemsOut
cfargument name=link
cfargument name=linkback
cfargument name=showListType
cfargument name=showListTitle
cfargument name=isShowDirectorySectTitle
cfargument name=isNameLink 
cfargument name=isShowOfficeTitle
cfargument name=isShowOfficePhone 
cfargument name=isShowOfficeContact
cfargument name=isShowOfficeContactEmail
cfargument name=isShowOfficeAddress  default=false 
required=No  
cfargument name=isShowImage  default=false 
required=No
cfargument name=ItemStyle 
cfargument name=cssFormatDirSectionTitle
cfargument name=styleFormatDirSectionTitle
cfargument name=cssFormatTitle
cfargument name=cssFormatBody
cfargument name=FormatRowOdd 
default=background-color:##ff;
cfargument name=FormatRowEven
default=background-color:##ff;   
cfargument name=BlockFormat  default=c5
required=No
cfargument name=BlockStyle   default= 
required=No
cfargument name=BlockSizedefault=N 
required=No
cfargument name=BlockColumnCount default=1 
required=No  
cfargument name=BlockColumnWidth default=  
required=No  


cfargument name=isLinkdefault=True required=No
cfargument name=Iconlink default=more... 
required=No!--- text or image to use and a read more link---

cfargument name=ImagePos default=Float:Right; 
margin-top:10px; margin-left:5px; required=No
cfargument name=ImageWidth   default= required=yes
cfargument name=ImageHeight  default= required=yes  
cfargument name=ImageCSS default=defaultImage 


-- Original Message --
From: COLLIE David [EMAIL PROTECTED]
Reply-To: cf-talk@houseoffusion.com
Date:  Thu, 3 Mar 2005 19:47:16 -

 And if you don't agree with me, I'll take my Property p = new
 Property(Ball.Color(Red)) and Structure.Home.Go()

That's one of the funniest things I've read all week!!! (It's been a
hard one :)

-- 
dc



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