|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
page layout: cfmodule vs customtags
Author: Figy, Kam
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232115
We use a similar CFC-based system. It allows you to easily do things
like switch layouts, or have several layouts per application. We use a
xml file to define what directories receive a particular skin, and the
call just remains #request.layout.header()#, etc on each page.
Completely separates the presentation of headers and such from the
content.
As for output from CFCs yes I'm against using output="true". There's no
real reason the CFC itself should *force* output text onto a page. That
said, the pattern of returning a string and then outputting the function
call as a variable (like I showed above) is more flexible and (imo) not
breaking OOP principles.
Kam
> I been using cfmodule for my page layouts but am making my current
> project with customtags am curious what your opinions are on each and
> why you'd pick one over the other.
Layout.cfc - showHeader(), showLeftMenu(), showFooter()
Works sweet!
Screw custom tags! :)
Will
Author: Rick Root
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232101
dave wrote:
> I been using cfmodule for my page layouts but am making my current project
with customtags am curious what your opinions are on each and why you'd pick one
over the other.
neither. I use <cfinclude> for page layout
;)
Author: Snake
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232096
I did give the OO/CFC based methodology (model-glue to be specific) a go,
but I came to the conclusion that this really defeats the purpose of what a
web page is for. It is over complicating something that should be simple.
A web page should be just that and be able to be opened in a WYSIWYG edit by
a designer and edited.
Putting everything into CFC's just really stops a web site being a web site
any more. There is no way a designer can ever work on it unless he learns to
code, it is also not very friendly toward other developers, who have to know
OO and the framework before they can work on it. It really is more like
software development.
I got one of our developers to build a model-glue site, and then myself and
one of the other developers tried to go and figure it out with no prior
knowledge of model-glue, suffice to say it was very hard. And debugging is
seriously time wasting trying to find out what actually caused the error,
because the errors don't actually tell you.
CFC's are great when used correctly, but I do not not agree with building a
whole web site with CFC's, its too much obscurity.
I also noticed that model-glue runs very slow, the site we built with it
takes several seconds for each page to load off the local network.
Russ
I like using using components for layouts as well.
Even wrote an article about it. ;-)
http://coldfusion.sys-con.com/read/154231.htm
Steve
>I do this in some cases and see nothing wrong with taking that
>approach. It usually is in its own separate CFC just for layout purposes
but not always.
----- Excess quoted text cut - see Original Post for more -----
Author: Steve Bryant
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232094
I like using using components for layouts as well.
Even wrote an article about it. ;-)
http://coldfusion.sys-con.com/read/154231.htm
Steve
----- Excess quoted text cut - see Original Post for more -----
Author: Eric Roberts
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232093
Now children...hehehe
Eric
Yeah Will and I have seen your layout.cfc and why use a cool tool like
coldfusion to make a template that looks like it was made by a deaf, dumb
blind kid using frontpage 97.......
And you wonder why you can't get any new clients...
~Dave the disruptor~
I forgot what I was gunna put here, Will woulda stole it anyways!
> I been using cfmodule for my page layouts but am making my current
> project with customtags am curious what your opinions are on each and
> why you'd pick one over the other.
Layout.cfc - showHeader(), showLeftMenu(), showFooter()
Works sweet!
Screw custom tags! :)
Will
Author: Michael Dinowitz
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232090
How about you both bitch to me privatly rather than disrupting the list with with
is basically off topic BS. Now you know what I feel about OT. If it has nothing
to do with the discussion at hand, take it to another list or to personal email.
I can and will write a moderation module that targets only you two if I have too.
Lets keep it civil AND ON TOPIC FOR THIS TECHNICAL ONLY MAILING LIST.
Thank you
> Well if he does it, i will respond back, is that so hard for you to
> understand?
> Why don't you go bitch at him for having to say something to start it.
> In case you didn't notice that doesn't happen till he tries one oh his
> like remarks.
> oh and I do..
;)
Author: dave
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232089
See now thats different then what I have heard but the speed issue is really a
non issue because its probably a difference the naked eye can't even detect.
It seems though as if using cfimport method actually might make it a bit more
difficult to use or display results from logic or processing and display back.
Maybe it's just time to jump into model-glue.
~Dave the disruptor~
I forgot what I was gunna put here, Will woulda stole it anyways!
Actually, I didn't. ;) I'm not sure you would see much difference. I
know some folks consider custom tags to be a bit slower than normal
includes, and yes, they are, but I've rarely seen that make a
difference. About the only time i saw an impact w/ custom tags is with
Spectra, which executed about 200 tags or so per request.
Author: dave
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232088
Well if he does it, i will respond back, is that so hard for you to understand?
Why don't you go bitch at him for having to say something to start it. In case
you didn't notice that doesn't happen till he tries one oh his like remarks.
oh and I do.. ;)
~Dave the disruptor~
I forgot what I was gunna put here, Will woulda stole it anyways!
Why you must constantly subject us to your personal issues against Will?
If you have a problem with Will, put it on your blog and keep this list
related to CF topics, please.
Author: Raymond Camden
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232087
Actually, I didn't. ;) I'm not sure you would see much difference. I
know some folks consider custom tags to be a bit slower than normal
includes, and yes, they are, but I've rarely seen that make a
difference. About the only time i saw an impact w/ custom tags is with
Spectra, which executed about 200 tags or so per request.
----- Excess quoted text cut - see Original Post for more -----
Author: Dawson, Michael
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232086
Why you must constantly subject us to your personal issues against Will?
If you have a problem with Will, put it on your blog and keep this list
related to CF topics, please.
Will, you don't even know what a custom tag is let not to mention when u
saw some code i had about a month ago with cfmodule, you didnt even know
what cfmodule was.
And that was after you said "wow, i really am an advanced coldfusion
developer arent i" after you did your very first cfset without looking
at cfwack.
~Dave the disruptor~
I forgot what I was gunna put here, Will woulda stole it anyways!
Author: dave
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232085
Yeah I had seen where mack daddy-o (aka corfield) said that, seems kinda odd
considering that it's importing the whole folder and not just 1 template. Is it
caching the whole customtag folder on first run or something? And if so what
happens when you update a template inside of the folder as far as re-caching it?
Personally, I kinda like who using cfimport looks but it seems to have a few
quirks that cfmodule doesn't have.
~Dave the disruptor~
I forgot what I was gunna put here, Will woulda stole it anyways!
cfimport is quicker I believe than cfmodule from a processing point of view.
> you know what i mean ray.
> ok lets rephrase thats
>
> cfmodule vs cfimport
>
> ~Dave the disruptor~
Author: dave
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232084
Will, you don't even know what a custom tag is let not to mention when u saw some
code i had about a month ago with cfmodule, you didnt even know what cfmodule
was.
And that was after you said "wow, i really am an advanced coldfusion developer
arent i" after you did your very first cfset without looking at cfwack.
~Dave the disruptor~
I forgot what I was gunna put here, Will woulda stole it anyways!
> You are aware, I hope, that when you use cfmodule, you are using
> custom tags.
Ray, I seriously doubt it! LOL!!
Will
Author: dave
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232083
Yeah Will and I have seen your layout.cfc and why use a cool tool like coldfusion
to make a template that looks like it was made by a deaf, dumb blind kid using
frontpage 97.......
And you wonder why you can't get any new clients...
~Dave the disruptor~
I forgot what I was gunna put here, Will woulda stole it anyways!
> I been using cfmodule for my page layouts but am making my current
> project with customtags am curious what your opinions are on each and
> why you'd pick one over the other.
Layout.cfc - showHeader(), showLeftMenu(), showFooter()
Works sweet!
Screw custom tags! :)
Will
Author: Will Tomlinson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232082
> You are aware, I hope, that when you use cfmodule, you are using
> custom tags.
Ray, I seriously doubt it! LOL!!
Will
Author: Will Tomlinson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232081
> I been using cfmodule for my page layouts but am making my current
> project with customtags am curious what your opinions are on each and
> why you'd pick one over the other.
Layout.cfc - showHeader(), showLeftMenu(), showFooter()
Works sweet!
Screw custom tags! :)
Will
Author: Sam Farmer
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232079
cfimport is quicker I believe than cfmodule from a processing point of view.
> you know what i mean ray.
> ok lets rephrase thats
>
> cfmodule vs cfimport
>
> ~Dave the disruptor~
Author: Aaron Rouse
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232078
I do this in some cases and see nothing wrong with taking that approach. It
usually is in its own separate CFC just for layout purposes but not always.
>
>
> I've even started using CFCs to hold some 'pods' of content that I use in
> various places. This idea'll start a firestorm from those who say CFCs
> should never output, but they're wrong anyway. :)
>
Author: Michael Dinowitz
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232076
All depends on how your setting the title and other header info. I have
sub-includes per section that see the section and uses a switch to put the
right header info in place. For the lists, the header comes from the DB
anyway so nothing passed.
My issue against custom tags is that they are a separate cf 'instance' which
is segmented from the calling page. This means that it has all of the CGI,
form, url, etc. variables set for the page are duplicated for this new
'instance'. More memory usage. If all I need is to pass in a specific
variable, I can just do a CFSET before the CFINCLUDE.
The choice is a set before the include which is part of the calling page or
a new page which has lots of data passed into it. I'm for the first. I only
use custom tags when I really want a segmented module call.
----- Excess quoted text cut - see Original Post for more -----
Author: dave
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232075
but that limits you greatly, one reason I would use cfmodule is to be able to set
variables and attributes such as title easier which is essential for search
engines.
~Dave the disruptor~
I forgot what I was gunna put here, Will woulda stole it anyways!
Personally, I use CFINCLUDEs for most of my layout. Less overhead, though
less of that nice clean variable passing that custom tags/cfmodules have.
I've even started using CFCs to hold some 'pods' of content that I use in
various places. This idea'll start a firestorm from those who say CFCs
should never output, but they're wrong anyway. :)
----- Excess quoted text cut - see Original Post for more -----
Author: dave
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232074
you know what i mean ray.
ok lets rephrase thats
cfmodule vs cfimport
~Dave the disruptor~
I forgot what I was gunna put here, Will woulda stole it anyways!
You are aware, I hope, that when you use cfmodule, you are using custom tags.
----- Excess quoted text cut - see Original Post for more -----
Author: Michael Dinowitz
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232073
Personally, I use CFINCLUDEs for most of my layout. Less overhead, though
less of that nice clean variable passing that custom tags/cfmodules have.
I've even started using CFCs to hold some 'pods' of content that I use in
various places. This idea'll start a firestorm from those who say CFCs
should never output, but they're wrong anyway. :)
----- Excess quoted text cut - see Original Post for more -----
Author: Kay Smoljak
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232072
I think custom tags are marginally easier to read from a human
perspective, but cfmodule is more flexible as you don't need a defined
custom tag path. 6 vs half a dozen :)
> I been using cfmodule for my page layouts but am making my current project
with customtags am curious what your opinions are on each and why you'd pick one
over the other.
--
Kay Smoljak
http://kay.zombiecoder.com/
Author: Raymond Camden
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232071
You are aware, I hope, that when you use cfmodule, you are using custom tags.
----- Excess quoted text cut - see Original Post for more -----
Author: dave
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:44604#232070
I been using cfmodule for my page layouts but am making my current project with
customtags am curious what your opinions are on each and why you'd pick one over
the other.
~Dave the disruptor~
I forgot what I was gunna put here, Will woulda stole it anyways!
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||