|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
page layout: cfmodule vs customtags
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 02/12/06 05:19 P You are aware, I hope, that when you use cfmodule, you are using custom tags.Raymond Camden 02/12/06 05:25 P > You are aware, I hope, that when you use cfmodule, you are usingWill Tomlinson 02/12/06 08:16 P I think custom tags are marginally easier to read from a humanKay Smoljak 02/12/06 05:31 P Personally, I use CFINCLUDEs for most of my layout. Less overhead, thoughMichael Dinowitz 02/12/06 05:47 P I do this in some cases and see nothing wrong with taking that approach. ItAaron Rouse 02/12/06 06:17 P I like using using components for layouts as well.Steve Bryant 02/13/06 12:36 A I did give the OO/CFC based methodology (model-glue to be specific) a go,Snake 02/13/06 08:14 A > I been using cfmodule for my page layouts but am making my currentWill Tomlinson 02/12/06 08:15 P dave wrote:Rick Root 02/13/06 09:02 A you know what i mean ray.dave 02/12/06 05:52 P cfimport is quicker I believe than cfmodule from a processing point of view.Sam Farmer 02/12/06 06:19 P Actually, I didn't. ;) I'm not sure you would see much difference. IRaymond Camden 02/12/06 08:59 P 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 02/12/06 05:54 P All depends on how your setting the title and other header info. I haveMichael Dinowitz 02/12/06 06:02 P 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.......dave 02/12/06 08:36 P Now children...heheheEric Roberts 02/12/06 11:36 P 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.dave 02/12/06 08:41 P Why you must constantly subject us to your personal issues against Will?Dawson, Michael 02/12/06 08:52 P Well if he does it, i will respond back, is that so hard for you to understand?dave 02/12/06 09:00 P 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.Michael Dinowitz 02/12/06 09:07 P 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.dave 02/12/06 09:05 P We use a similar CFC-based system. It allows you to easily do thingsFigy, Kam 02/13/06 12:24 P 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! You are aware, I hope, that when you use cfmodule, you are using custom tags. ----- Excess quoted text cut - see Original Post for more ----- > You are aware, I hope, that when you use cfmodule, you are using > custom tags. Ray, I seriously doubt it! LOL!! Will 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/ 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 ----- 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. :) > 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 ----- 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 ----- > 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 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 ;) 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 ----- 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~ 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 ----- 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 ----- 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 ----- 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 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 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 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~ 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! 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. 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.. ;) 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. 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
|
March 20, 2010
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||