RE: Using CFMX to generate Static HTML pages
Forgive my ignorance, but what is the purpose of building static pages from dynamic content? Search engines? (Kinda funny...seems like we all work so hard to make dynamic pages, now we're talking about how to make them static?) Rick -Original Message- From: Aaron Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 11:03 AM To: CF-Talk Subject: RE: Using CFMX to generate Static HTML pages Some people have suggested using CFSAVECONTENT and CFFILE from within your page, or using CFHTTP. I'll instead suggest using an external HTTP fetch utility, like wget, to spider through your content. The advantage of this is that you don't have to make any changes to your existing code, and you don't put extra work on CF as you would with CFHTTP. +1 WGET is a great utility...and you get more bang for your buck on a unix machine... for instance, let's say you want to mirror your company's site... you following the directions I have here (http://cephas.net/blog/archives/29.html ) to set it up on Windows and then you'd do this from the command line: wget --mirror http://www.yoursite.com/ On Windows, any pages that depend on URL variables (ie: /news/default.cfm would work fine, but /news/newsdetail.cfm?newsid=10) doesn't get saved on Windows).. they just get ignored as bad file names. On Unix/Linux, you actually get the *all* the pages named by the URL variable... so you'd get /news/default.cfm /news/newsdetail.cfm?newsid=10 /news/newsdetail.cfm?newsid=11 ... Pretty cool... AJ -- Aaron Johnson http://cephas.net/blog/ [EMAIL PROTECTED] ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Using CFMX to generate Static HTML pages
Rick, It is about speed, scale and deployment from my end and why we run batch flat files from dynamic pages... Actually if you get really nifty, you could create flats, that were just HTML... No CF processing at all on the page request... and deploy the flats to multiple servers for redundancy/load balancing/etc... That's why/how I use such in projects. Paris Lundis Founder Areaindex, L.L.C. http://www.areaindex.com http://www.pubcrawler.com 412-292-3135 [finding the future in the past, passing the future in the present] [connecting people, places and things] -Original Message- From: Rick Faircloth [EMAIL PROTECTED] Date: Wed, 15 Jan 2003 10:43:21 -0500 Subject: RE: Using CFMX to generate Static HTML pages Forgive my ignorance, but what is the purpose of building static pages from dynamic content? Search engines? (Kinda funny...seems like we all work so hard to make dynamic pages, now we're talking about how to make them static?) Rick -Original Message- From: Aaron Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 11:03 AM To: CF-Talk Subject: RE: Using CFMX to generate Static HTML pages Some people have suggested using CFSAVECONTENT and CFFILE from within your page, or using CFHTTP. I'll instead suggest using an external HTTP fetch utility, like wget, to spider through your content. The advantage of this is that you don't have to make any changes to your existing code, and you don't put extra work on CF as you would with CFHTTP. +1 WGET is a great utility...and you get more bang for your buck on a unix machine... for instance, let's say you want to mirror your company's site... you following the directions I have here (http://cephas.net/blog/archives/29.html ) to set it up on Windows and then you'd do this from the command line: wget --mirror http://www.yoursite.com/ On Windows, any pages that depend on URL variables (ie: /news/default.cfm would work fine, but /news/newsdetail.cfm?newsid=10) doesn't get saved on Windows).. they just get ignored as bad file names. On Unix/Linux, you actually get the *all* the pages named by the URL variable... so you'd get /news/default.cfm /news/newsdetail.cfm?newsid=10 /news/newsdetail.cfm?newsid=11 Pretty cool... AJ -- Aaron Johnson http://cephas.net/blog/ [EMAIL PROTECTED] ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Using CFMX to generate Static HTML pages
I for the first time just last week had to develop 30 promotional pages for different product lines. Client doesn't use CF - I built a database, 2 templates and within 2 hours with one set of variable queries had created 30 flat pages - Ported them over to his server and saved a good 10 hours of fiddling around with static links - increased my per hour 10 fold. Additionally - yes - in some cases search engines it does work for also. If you don't use something like fusebox and have ? all over your url parameters - search engines will ingore it - they don't want to get lost in those pages. Static pages have their place on the web. Lastly as Paris pointed out - a great point In some cases the static page would indeed be faster depending on the size and scope of a page. There is a whole additional world I believe in using CF as a development tool - not only to deliver. just my .02 cents jay miller Paris Lundis wrote: Rick, It is about speed, scale and deployment from my end and why we run batch flat files from dynamic pages... Actually if you get really nifty, you could create flats, that were just HTML... No CF processing at all on the page request... and deploy the flats to multiple servers for redundancy/load balancing/etc... That's why/how I use such in projects. Paris Lundis Founder Areaindex, L.L.C. http://www.areaindex.com http://www.areaindex.com http://www.pubcrawler.com http://www.pubcrawler.com 412-292-3135 [finding the future in the past, passing the future in the present] [connecting people, places and things] -Original Message- From: Rick Faircloth mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wed, 15 Jan 2003 10:43:21 -0500 Subject: RE: Using CFMX to generate Static HTML pages Forgive my ignorance, but what is the purpose of building static pages from dynamic content? Search engines? (Kinda funny...seems like we all work so hard to make dynamic pages, now we're talking about how to make them static?) Rick -Original Message- From: Aaron Johnson [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Tuesday, January 14, 2003 11:03 AM To: CF-Talk Subject: RE: Using CFMX to generate Static HTML pages Some people have suggested using CFSAVECONTENT and CFFILE from within your page, or using CFHTTP. I'll instead suggest using an external HTTP fetch utility, like wget, to spider through your content. The advantage of this is that you don't have to make any changes to your existing code, and you don't put extra work on CF as you would with CFHTTP. +1 WGET is a great utility...and you get more bang for your buck on a unix machine... for instance, let's say you want to mirror your company's site... you following the directions I have here ( http://cephas.net/blog/archives/29.html http://cephas.net/blog/archives/29.html ) to set it up on Windows and then you'd do this from the command line: wget --mirror http://www.yoursite.com/ http://www.yoursite.com/ On Windows, any pages that depend on URL variables (ie: /news/default.cfm would work fine, but /news/newsdetail.cfm?newsid=10) doesn't get saved on Windows).. they just get ignored as bad file names. On Unix/Linux, you actually get the *all* the pages named by the URL variable... so you'd get /news/default.cfm /news/newsdetail.cfm?newsid=10 /news/newsdetail.cfm?newsid=11 Pretty cool... AJ -- Aaron Johnson http://cephas.net/blog/ http://cephas.net/blog/ [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Using CFMX to generate Static HTML pages
This is the first time I've heard of doing this... Is there any detailed info on how to go about this? A tutorial or article somewhere? Rick -Original Message- From: Paris Lundis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 15, 2003 10:46 AM To: CF-Talk Subject: RE: Using CFMX to generate Static HTML pages Rick, It is about speed, scale and deployment from my end and why we run batch flat files from dynamic pages... Actually if you get really nifty, you could create flats, that were just HTML... No CF processing at all on the page request... and deploy the flats to multiple servers for redundancy/load balancing/etc... That's why/how I use such in projects. Paris Lundis Founder Areaindex, L.L.C. http://www.areaindex.com http://www.pubcrawler.com 412-292-3135 [finding the future in the past, passing the future in the present] [connecting people, places and things] -Original Message- From: Rick Faircloth [EMAIL PROTECTED] Date: Wed, 15 Jan 2003 10:43:21 -0500 Subject: RE: Using CFMX to generate Static HTML pages Forgive my ignorance, but what is the purpose of building static pages from dynamic content? Search engines? (Kinda funny...seems like we all work so hard to make dynamic pages, now we're talking about how to make them static?) Rick -Original Message- From: Aaron Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 11:03 AM To: CF-Talk Subject: RE: Using CFMX to generate Static HTML pages Some people have suggested using CFSAVECONTENT and CFFILE from within your page, or using CFHTTP. I'll instead suggest using an external HTTP fetch utility, like wget, to spider through your content. The advantage of this is that you don't have to make any changes to your existing code, and you don't put extra work on CF as you would with CFHTTP. +1 WGET is a great utility...and you get more bang for your buck on a unix machine... for instance, let's say you want to mirror your company's site... you following the directions I have here (http://cephas.net/blog/archives/29.html ) to set it up on Windows and then you'd do this from the command line: wget --mirror http://www.yoursite.com/ On Windows, any pages that depend on URL variables (ie: /news/default.cfm would work fine, but /news/newsdetail.cfm?newsid=10) doesn't get saved on Windows).. they just get ignored as bad file names. On Unix/Linux, you actually get the *all* the pages named by the URL variable... so you'd get /news/default.cfm /news/newsdetail.cfm?newsid=10 /news/newsdetail.cfm?newsid=11 Pretty cool... AJ -- Aaron Johnson http://cephas.net/blog/ [EMAIL PROTECTED] ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Using CFMX to generate Static HTML pages
Basically, there are two ways to do this (as I'm sure you've gathered from the rest of the thread). One: A single template generates the HTML in a variable, probably by using cfsavecontent tags, and uses cffile to save that information to a static HTML file. Two: You first create the template as if you were calling it from a browser. That is, it's just a plain old CF page that creates whatever content you want. A second CF template uses cfhttp to call that first template and save the content to a static HTML file. I like the second one a bit better, although the first is what I've been doing up to now. Neither is particularly complicated. If you try one of these and can't get it to work, feel free to contact me off-list for more assistance. Unless, of course, people want to hear more about this. :-) -- Ben Doom Programmer General Lackey Moonbow Software, Inc : -Original Message- : From: Rick Faircloth [mailto:[EMAIL PROTECTED]] : Sent: Wednesday, January 15, 2003 11:21 AM : To: CF-Talk : Subject: RE: Using CFMX to generate Static HTML pages : : : This is the first time I've heard of doing this... : Is there any detailed info on how to go about this? : A tutorial or article somewhere? : : Rick ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Using CFMX to generate Static HTML pages
Forgive my ignorance, but what is the purpose of building static pages from dynamic content? Search engines? (Kinda funny...seems like we all work so hard to make dynamic pages, now we're talking about how to make them static?) The primary reason is simply performance. Dynamic pages are very expensive, database queries are very expensive. In cases where they're not really needed, you can support a lot more users with much less runtime work by using static pages. Many sites and applications provide the same data to all viewers; why do all that work over and over again at runtime, when you could build a static HTML page once ahead of time and present that same page to everyone? In my experience, this way of thinking is the key to building scalable applications - whenever possible, avoid doing unnecessary work at runtime. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Using CFMX to generate Static HTML pages
I'm joining this thread a little late, but wanted to chime in one small thing in case it wasn't mentioned. Instead of going through the work to create static pages from cf, you can also use cfcache to have CF do that for you. I used this on a content management site we wrote that doesn't change often (actually, we still use a small Flash widget to display dynamic content inside the static page) and it's great. Most page processing time is 200-300ms without caching, but 10-20ms with caching. Over 95% of page requests retrieve cached pages. Sam ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Using CFMX to generate Static HTML pages
What is the easiest way to use CFMX to generate static HTML pages from dynamic content. I want to store the pages as .html pages in the web server root, rather than in the CFMX server root. The static site will be accessed with no load on the CFMX server. Some people have suggested using CFSAVECONTENT and CFFILE from within your page, or using CFHTTP. I'll instead suggest using an external HTTP fetch utility, like wget, to spider through your content. The advantage of this is that you don't have to make any changes to your existing code, and you don't put extra work on CF as you would with CFHTTP. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Using CFMX to generate Static HTML pages
There is an article at webmonkey with a great way to dynamically create static content with ColdFusion: http://hotwired.lycos.com/webmonkey/02/26/index4a.html?tw=programming David Murphy www.cfugcny.org = = = Original message = = = What is the easiest way to use CFMX to generate static HTML pages from dynamic content. I want to store the pages as .html pages in the web server root, rather than in the CFMX server root. The static site will be accessed with no load on the CFMX server. Some people have suggested using CFSAVECONTENT and CFFILE from within your page, or using CFHTTP. I'll instead suggest using an external HTTP fetch utility, like wget, to spider through your content. The advantage of this is that you don't have to make any changes to your existing code, and you don't put extra work on CF as you would with CFHTTP. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Using CFMX to generate Static HTML pages
I like this approach that Dave is suggesting, and use it often. Specifically, I like using wget to generate HTML (and even CFM, but in your case, HTML) files, primarily because I can use make to determine dependancies and handle the build process. Once it's all working correctly, you make a few changes to your source files, type make at the command line, and your site rebuilds only the portions it needs to. You can then do fancy things like make install to move or even FTP (or scp) files to a live or staging server. I also like Dave's point about not having to change your code. When I'm using a technique like the one described above, I make direct requests to the CFM pages through my browser while I'm developing the template. I can see the output immediately without having to actually build the site (using make) after every change. Once I have it working like I want, I then switch to the build system. Christian On Tuesday, January 14, 2003, at 10:28 AM, Dave Watts wrote: What is the easiest way to use CFMX to generate static HTML pages from dynamic content. I want to store the pages as .html pages in the web server root, rather than in the CFMX server root. The static site will be accessed with no load on the CFMX server. Some people have suggested using CFSAVECONTENT and CFFILE from within your page, or using CFHTTP. I'll instead suggest using an external HTTP fetch utility, like wget, to spider through your content. The advantage of this is that you don't have to make any changes to your existing code, and you don't put extra work on CF as you would with CFHTTP. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Using CFMX to generate Static HTML pages
Some people have suggested using CFSAVECONTENT and CFFILE from within your page, or using CFHTTP. I'll instead suggest using an external HTTP fetch utility, like wget, to spider through your content. The advantage of this is that you don't have to make any changes to your existing code, and you don't put extra work on CF as you would with CFHTTP. +1 WGET is a great utility...and you get more bang for your buck on a unix machine... for instance, let's say you want to mirror your company's site... you following the directions I have here (http://cephas.net/blog/archives/29.html ) to set it up on Windows and then you'd do this from the command line: wget --mirror http://www.yoursite.com/ On Windows, any pages that depend on URL variables (ie: /news/default.cfm would work fine, but /news/newsdetail.cfm?newsid=10) doesn't get saved on Windows).. they just get ignored as bad file names. On Unix/Linux, you actually get the *all* the pages named by the URL variable... so you'd get /news/default.cfm /news/newsdetail.cfm?newsid=10 /news/newsdetail.cfm?newsid=11 ... Pretty cool... AJ -- Aaron Johnson http://cephas.net/blog/ [EMAIL PROTECTED] ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Using CFMX to generate Static HTML pages
What you have to do is wrap your content with cfsavecontent variable=foo HTML content here /cfsavecontent then write the html doc using cffile ie:cffile action=WRITE file=#YOUR PATH#\#html_doc#.html output=#foo# addnewline=No - Original Message - From: Dick Applebaum [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, January 13, 2003 10:47 PM Subject: Using CFMX to generate Static HTML pages What is the easiest way to use CFMX to generate static HTML pages from dynamic content. I want to store the pages as .html pages in the web server root, rather than in the CFMX server root. The static site will be accessed with no load on the CFMX server. TIA Dick ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Using CFMX to generate Static HTML pages
Hi Dick, Use CFHTTP. I pulled the following straight out of my CMPro cms: query goes here cfhttp url=#request.BaseHRef#control.cfm?id=#MakePages.ID# method=GET path=#request.BasePath# file=page_#MakePages.ID#.html resolveurl=false useragent=CMPro_PageCreator There's literally nothing to it. This routine queries my own site from my own server, so connectivity across the web really sin't an issue. My whole site is built on this, although I built in stuff that lets the system specify a .cfm page is used if I need something more than simple markup. To take this a step further, you can even build a 'static cfm' page, which exists so that a visitor doesn't risk dropping off CF's radar insofar as inactivity-based expiry is concerned. I also do a thing where I throttle down the execution of the page builder. A nice spiff if you have to create 200-1000 pages at a whack. Keeps your server from freaking. Contact me off-list if you want a complete code sample. Cheers, Matt Robertson [EMAIL PROTECTED] MSB Designs, Inc. http://mysecretbase.com -Original Message- From: Dick Applebaum [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 9:48 PM To: CF-Talk Subject: Using CFMX to generate Static HTML pages What is the easiest way to use CFMX to generate static HTML pages from dynamic content. I want to store the pages as .html pages in the web server root, rather than in the CFMX server root. The static site will be accessed with no load on the CFMX server. TIA Dick ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4