Re: Best practice question for Application.cfc
On Sun, Oct 14, 2012 at 7:27 PM, Azadi Saryev azadi.sar...@gmail.comwrote: If it is only applicationname that you need to be unique, then you could just use a hash of template path as app name, or some variation of the below: this.name = hash(getCurrenttTmplatePath()); I second this method. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352912 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best practice question for Application.cfc
Hi Azadi, Thanks for the follow up. In this case, I'm also using the listlast() function to extract the name of the containing directory. So, my guess is in that scenario, I would not need the hash because we're only dealing with a single folder name. If that seems off to you, let me know. N . Nick Gleason | CitySoft, Inc. | http://www.citysoft.com Direct: (617) 899-5395 | Fax: (617) 507-0444 Spend Less Do More - Community Enterprise combines great features with an affordable price . . Return-Path: listmas...@houseoffusion.com Received: from mail.houseoffusion.com [64.118.74.225] by mail67.safesecureweb.com with SMTP; Mon, 15 Oct 2012 23:41:35 -0400 To: cf-talk cf-talk@houseoffusion.com Message-ID: cafczd6eray5dujyqz9pwcxqndfg543tqihedxuykvvvmo4e...@mail.gmail.com Subject: Re: Best practice question for Application.cfc References: 15d47c6$67f60c41$750c1d46$@com Date: Tue, 16 Oct 2012 12:41:22 +0900 Precedence: bulk Reply-To: cf-talk@houseoffusion.com From: Azadi Saryev azadi.sar...@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Rcpt-To: n.glea...@citysoft.com X-SmarterMail-Spam: SpamAssassin 0 [raw: 0], SPF_None, DK_None X-SmarterMail-TotalSpamWeight: 0 I use hash() not for security, but to 'normalize' the value of application name - to make sure it does not contain any problematic special characters, which getCurrentTemplatePath() may return (like 'C:\\some path\some.sub.path\my folder\etc etc etc\Application.cfc'). Azadi On Mon, Oct 15, 2012 at 9:20 PM, Nick Gleason wrote: Hello Azadi, Thanks for the feedback. Although I am interested in the extends attribute of the cfc for this, that seemed a bit tricky. Since all I need in the short run was to get the applicationname variable into application.cfc, I did do something similar to what you suggest. One question about the hash function in your example. Why would that be necessary here? I'm not storing this in a database at this point so I'm not sure if it's still necessary. Thoughts? Best, Nick . Nick Gleason | CitySoft, Inc. | http://www.citysoft.com Direct: (617) 899-5395 | Fax: (617) 507-0444 Spend Less Do More - Community Enterprise combines great features with an affordable price . . Return-Path: Received: from mail.houseoffusion.com [64.118.74.225] by mail67.safesecureweb.com with SMTP; Sun, 14 Oct 2012 19:28:02 -0400 To: cf-talk Message-ID: Subject: Re: Best practice question for Application.cfc References: 4f9f30b3$2f548fd9$34618e3a$@com Date: Mon, 15 Oct 2012 08:27:46 +0900 Precedence: bulk Reply-To: cf-talk@houseoffusion.com From: Azadi Saryev MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Rcpt-To: X-SmarterMail-Spam: SpamAssassin 0 [raw: 0], SPF_None, DK_None X-SmarterMail-TotalSpamWeight: 0 If it is only applicationname that you need to be unique, then you could just use a hash of template path as app name, or some variation of the below: this.name = hash(getCurrenttTmplatePath()); Azadi On Sat, Oct 13, 2012 at 10:47 PM, Nick Gleason wrote: Hi Folks, We're moving from application.cfm to application.cfc and I had a question regarding best practices. We re-use our base code and in the past, we have used a settings page that is external from the base code and unique per client to set the applicationname variable (and other variables). This is called at the beginning of application.cfm and provides with the unique application name. That same structure seems to work with application.cfc but requires calling a file at the top of application.cfc, above setting the application variables in application.cfc, to provide the applicationname. Is that approach (calling a file at the top of application.cfc to provide a unique client setting) considered a best practice for this kind of thing. Or, is there a more appropriate way? The only other thing I could think of would be to hard code the unique client applicationname in Application.cfc, but that would then require that Application.cfc be a unique file per client and thus not part of our core base code in the sense that we wouldn't include it in upgrades (so that it wouldn't over-write a unique client file with default values). Any thoughts on that? Let me know if I'm not being clear. Thank you in advance! Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com
Re: Best practice question for Application.cfc
Hello Azadi, Thanks for the feedback. Although I am interested in the extends attribute of the cfc for this, that seemed a bit tricky. Since all I need in the short run was to get the applicationname variable into application.cfc, I did do something similar to what you suggest. One question about the hash function in your example. Why would that be necessary here? I'm not storing this in a database at this point so I'm not sure if it's still necessary. Thoughts? Best, Nick . Nick Gleason | CitySoft, Inc. | http://www.citysoft.com Direct: (617) 899-5395 | Fax: (617) 507-0444 Spend Less Do More - Community Enterprise combines great features with an affordable price . . Return-Path: listmas...@houseoffusion.com Received: from mail.houseoffusion.com [64.118.74.225] by mail67.safesecureweb.com with SMTP; Sun, 14 Oct 2012 19:28:02 -0400 To: cf-talk cf-talk@houseoffusion.com Message-ID: CAFcZD6dP9NYjRtW6QVzen=penxrnowx4hw-6brii9jssp0h...@mail.gmail.com Subject: Re: Best practice question for Application.cfc References: 4f9f30b3$2f548fd9$34618e3a$@com Date: Mon, 15 Oct 2012 08:27:46 +0900 Precedence: bulk Reply-To: cf-talk@houseoffusion.com From: Azadi Saryev azadi.sar...@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Rcpt-To: n.glea...@citysoft.com X-SmarterMail-Spam: SpamAssassin 0 [raw: 0], SPF_None, DK_None X-SmarterMail-TotalSpamWeight: 0 If it is only applicationname that you need to be unique, then you could just use a hash of template path as app name, or some variation of the below: this.name = hash(getCurrenttTmplatePath()); Azadi On Sat, Oct 13, 2012 at 10:47 PM, Nick Gleason wrote: Hi Folks, We're moving from application.cfm to application.cfc and I had a question regarding best practices. We re-use our base code and in the past, we have used a settings page that is external from the base code and unique per client to set the applicationname variable (and other variables). This is called at the beginning of application.cfm and provides with the unique application name. That same structure seems to work with application.cfc but requires calling a file at the top of application.cfc, above setting the application variables in application.cfc, to provide the applicationname. Is that approach (calling a file at the top of application.cfc to provide a unique client setting) considered a best practice for this kind of thing. Or, is there a more appropriate way? The only other thing I could think of would be to hard code the unique client applicationname in Application.cfc, but that would then require that Application.cfc be a unique file per client and thus not part of our core base code in the sense that we wouldn't include it in upgrades (so that it wouldn't over-write a unique client file with default values). Any thoughts on that? Let me know if I'm not being clear. Thank you in advance! Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352908 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
API best practice question
Hi Folks, I have a question regarding the best way to handle loading an API for the CMS side of our application. In this case, the API I am talking about not meant for remote calls but instead is meant to be for web developers creating themes and features for a web site who need to be able to make calls to the database (for example). So, it's meant to be like similar functionality in WordPress (http://codex.wordpress.org/WordPress_API's), Drupal, etc. We have these functions in a cfc and what I want to know is the best way to provide them to the user and developer. Loading them on every request seems like it would create unnecessary overhead although for all I know, that is the way other CMS' do it. Would it be better to use the onApplicationStart in Application.cfc to load this file into memory so that the functions can be called that way? If so, what would that look like? Or is there a better way? I expect that Mura, Coldbox, etc. have done this well but I haven't tracked that down. Thanks in advance, Nick . Nick Gleason | CitySoft, Inc. | http://www.citysoft.com . . ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352909 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: API best practice question
It sounds like you're dealing with a singleton, so instantiating it onApplicationStart() and placing it into the application scope would be perfectly reasonable. I let ColdSpring manage my singletons for me, but it's the same basic principle: Instantiate ColdSpring onApplicationStart(), and it resides in the application scope. Then when you need the bean, you ask CS for it. http://www.coldspringframework.org/coldspring/examples/quickstart/ HTH On Mon, Oct 15, 2012 at 7:45 AM, Nick Gleason n.glea...@citysoft.comwrote: Hi Folks, I have a question regarding the best way to handle loading an API for the CMS side of our application. In this case, the API I am talking about not meant for remote calls but instead is meant to be for web developers creating themes and features for a web site who need to be able to make calls to the database (for example). So, it's meant to be like similar functionality in WordPress (http://codex.wordpress.org/WordPress_API's), Drupal, etc. We have these functions in a cfc and what I want to know is the best way to provide them to the user and developer. Loading them on every request seems like it would create unnecessary overhead although for all I know, that is the way other CMS' do it. Would it be better to use the onApplicationStart in Application.cfc to load this file into memory so that the functions can be called that way? If so, what would that look like? Or is there a better way? I expect that Mura, Coldbox, etc. have done this well but I haven't tracked that down. Thanks in advance, Nick . Nick Gleason | CitySoft, Inc. | http://www.citysoft.com . . ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352910 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best practice question for Application.cfc
I use hash() not for security, but to 'normalize' the value of application name - to make sure it does not contain any problematic special characters, which getCurrentTemplatePath() may return (like 'C:\\some path\some.sub.path\my folder\etc etc etc\Application.cfc'). Azadi On Mon, Oct 15, 2012 at 9:20 PM, Nick Gleason n.glea...@citysoft.com wrote: Hello Azadi, Thanks for the feedback. Although I am interested in the extends attribute of the cfc for this, that seemed a bit tricky. Since all I need in the short run was to get the applicationname variable into application.cfc, I did do something similar to what you suggest. One question about the hash function in your example. Why would that be necessary here? I'm not storing this in a database at this point so I'm not sure if it's still necessary. Thoughts? Best, Nick . Nick Gleason | CitySoft, Inc. | http://www.citysoft.com Direct: (617) 899-5395 | Fax: (617) 507-0444 Spend Less Do More - Community Enterprise combines great features with an affordable price . . Return-Path: listmas...@houseoffusion.com Received: from mail.houseoffusion.com [64.118.74.225] by mail67.safesecureweb.com with SMTP; Sun, 14 Oct 2012 19:28:02 -0400 To: cf-talk cf-talk@houseoffusion.com Message-ID: CAFcZD6dP9NYjRtW6QVzen=penxrnowx4hw-6brii9jssp0h...@mail.gmail.com Subject: Re: Best practice question for Application.cfc References: 4f9f30b3$2f548fd9$34618e3a$@com Date: Mon, 15 Oct 2012 08:27:46 +0900 Precedence: bulk Reply-To: cf-talk@houseoffusion.com From: Azadi Saryev azadi.sar...@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Rcpt-To: n.glea...@citysoft.com X-SmarterMail-Spam: SpamAssassin 0 [raw: 0], SPF_None, DK_None X-SmarterMail-TotalSpamWeight: 0 If it is only applicationname that you need to be unique, then you could just use a hash of template path as app name, or some variation of the below: this.name = hash(getCurrenttTmplatePath()); Azadi On Sat, Oct 13, 2012 at 10:47 PM, Nick Gleason wrote: Hi Folks, We're moving from application.cfm to application.cfc and I had a question regarding best practices. We re-use our base code and in the past, we have used a settings page that is external from the base code and unique per client to set the applicationname variable (and other variables). This is called at the beginning of application.cfm and provides with the unique application name. That same structure seems to work with application.cfc but requires calling a file at the top of application.cfc, above setting the application variables in application.cfc, to provide the applicationname. Is that approach (calling a file at the top of application.cfc to provide a unique client setting) considered a best practice for this kind of thing. Or, is there a more appropriate way? The only other thing I could think of would be to hard code the unique client applicationname in Application.cfc, but that would then require that Application.cfc be a unique file per client and thus not part of our core base code in the sense that we wouldn't include it in upgrades (so that it wouldn't over-write a unique client file with default values). Any thoughts on that? Let me know if I'm not being clear. Thank you in advance! Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352911 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best practice question for Application.cfc
If it is only applicationname that you need to be unique, then you could just use a hash of template path as app name, or some variation of the below: this.name = hash(getCurrenttTmplatePath()); Azadi On Sat, Oct 13, 2012 at 10:47 PM, Nick Gleason n.glea...@citysoft.com wrote: Hi Folks, We're moving from application.cfm to application.cfc and I had a question regarding best practices. We re-use our base code and in the past, we have used a settings page that is external from the base code and unique per client to set the applicationname variable (and other variables). This is called at the beginning of application.cfm and provides cfapplication with the unique application name. That same structure seems to work with application.cfc but requires calling a file at the top of application.cfc, above setting the application variables in application.cfc, to provide the applicationname. Is that approach (calling a file at the top of application.cfc to provide a unique client setting) considered a best practice for this kind of thing. Or, is there a more appropriate way? The only other thing I could think of would be to hard code the unique client applicationname in Application.cfc, but that would then require that Application.cfc be a unique file per client and thus not part of our core base code in the sense that we wouldn't include it in upgrades (so that it wouldn't over-write a unique client file with default values). Any thoughts on that? Let me know if I'm not being clear. Thank you in advance! Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352904 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best practice question for Application.cfc
Many thanks Mike and Dave. Sounds like we're in the ball park. If anyone else has different ways of doing it, let me know. Best, Nick Return-Path: listmas...@houseoffusion.com Received: from mail.houseoffusion.com [64.118.74.225] by mail67.safesecureweb.com with SMTP; Sat, 13 Oct 2012 14:12:49 -0400 To: cf-talk cf-talk@houseoffusion.com Message-ID: CAOnEp2f+=czlr6qqqsjymn6lvnqy0srlow5ts+ks8nv5+a6...@mail.gmail.com Subject: Re: Best practice question for Application.cfc References: CACi=xszchjy1aa1pzuhnjw5qktbat800vd+sasfjpmvugv9...@mail.gmail.com Date: Sun, 14 Oct 2012 05:12:19 +1100 Precedence: bulk Reply-To: cf-talk@houseoffusion.com From: Mike Kear afpwebwo...@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Rcpt-To: n.glea...@citysoft.com X-SmarterMail-Spam: SpamAssassin 0.6 [raw: 0.6], SPF_None, DK_None X-SmarterMail-TotalSpamWeight: 0 Which ever way you do it, somewhere or other you have to have a file that's unique to this site, or have a settings record in a database or some such. Does it REALLY make much difference if it's a site-specific Application.cfc or a site-specific Settings.xml file or a site-specific Settings table in a database? The way I do it is to have a config folder in the core code, which is where I put the site-specific things that are called by the generic core code. There's usually a config.xml with site name, application name, passwords to things. Then when I create a new site, I copy all the core code over, then go into the config folder and modify all the values in the config.xml.The config.xml file is called into a config.cfc that sets up all the application and other critical variables for the site at application start. But I dont think you necessarily need to do it the way I do.I would suggest though, that you keep all the site-specific variables in one place (in my case a config folder) so it's quick and easy to set up a new site. And also when you modify your code, you know that you can safely copy all your modified files into your other similar sites without breaking all the site-specific settings. This is not related to whether or not you use Application.cfm or Application.cfc. The same principles apply however you set up your code. But since you are changing your architecture, it's a good time to examine whether you have opportunities to make your code better organised. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month On Sun, Oct 14, 2012 at 1:46 AM, Dave Watts wrote: We're moving from application.cfm to application.cfc and I had a question regarding best practices. We re-use our base code and in the past, we have used a settings page that is external from the base code and unique per client to set the applicationname variable (and other variables). This is called at the beginning of application.cfm and provides with the unique application name. That same structure seems to work with application.cfc but requires calling a file at the top of application.cfc, above setting the application variables in application.cfc, to provide the applicationname. Is that approach (calling a file at the top of application.cfc to provide a unique client setting) considered a best practice for this kind of thing. Or, is there a more appropriate way? The only other thing I could think of would be to hard code the unique client applicationname in Application.cfc, but that would then require that Application.cfc be a unique file per client and thus not part of our core base code in the sense that we wouldn't include it in upgrades (so that it wouldn't over-write a unique client file with default values). I think the most common approach for this sort of thing with Application.cfc is to use inheritance. You can have a base Application.cfc, then use the EXTENDS attribute to create a new Application.cfc with customized settings, overridden event handlers, etc. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352905 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Best practice question for Application.cfc
Hi Folks, We're moving from application.cfm to application.cfc and I had a question regarding best practices. We re-use our base code and in the past, we have used a settings page that is external from the base code and unique per client to set the applicationname variable (and other variables). This is called at the beginning of application.cfm and provides cfapplication with the unique application name. That same structure seems to work with application.cfc but requires calling a file at the top of application.cfc, above setting the application variables in application.cfc, to provide the applicationname. Is that approach (calling a file at the top of application.cfc to provide a unique client setting) considered a best practice for this kind of thing. Or, is there a more appropriate way? The only other thing I could think of would be to hard code the unique client applicationname in Application.cfc, but that would then require that Application.cfc be a unique file per client and thus not part of our core base code in the sense that we wouldn't include it in upgrades (so that it wouldn't over-write a unique client file with default values). Any thoughts on that? Let me know if I'm not being clear. Thank you in advance! Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352898 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best practice question for Application.cfc
We're moving from application.cfm to application.cfc and I had a question regarding best practices. We re-use our base code and in the past, we have used a settings page that is external from the base code and unique per client to set the applicationname variable (and other variables). This is called at the beginning of application.cfm and provides cfapplication with the unique application name. That same structure seems to work with application.cfc but requires calling a file at the top of application.cfc, above setting the application variables in application.cfc, to provide the applicationname. Is that approach (calling a file at the top of application.cfc to provide a unique client setting) considered a best practice for this kind of thing. Or, is there a more appropriate way? The only other thing I could think of would be to hard code the unique client applicationname in Application.cfc, but that would then require that Application.cfc be a unique file per client and thus not part of our core base code in the sense that we wouldn't include it in upgrades (so that it wouldn't over-write a unique client file with default values). I think the most common approach for this sort of thing with Application.cfc is to use inheritance. You can have a base Application.cfc, then use the EXTENDS attribute to create a new Application.cfc with customized settings, overridden event handlers, etc. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352899 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best practice question for Application.cfc
Which ever way you do it, somewhere or other you have to have a file that's unique to this site, or have a settings record in a database or some such. Does it REALLY make much difference if it's a site-specific Application.cfc or a site-specific Settings.xml file or a site-specific Settings table in a database? The way I do it is to have a config folder in the core code, which is where I put the site-specific things that are called by the generic core code. There's usually a config.xml with site name, application name, passwords to things. Then when I create a new site, I copy all the core code over, then go into the config folder and modify all the values in the config.xml.The config.xml file is called into a config.cfc that sets up all the application and other critical variables for the site at application start. But I dont think you necessarily need to do it the way I do.I would suggest though, that you keep all the site-specific variables in one place (in my case a config folder) so it's quick and easy to set up a new site. And also when you modify your code, you know that you can safely copy all your modified files into your other similar sites without breaking all the site-specific settings. This is not related to whether or not you use Application.cfm or Application.cfc. The same principles apply however you set up your code. But since you are changing your architecture, it's a good time to examine whether you have opportunities to make your code better organised. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month On Sun, Oct 14, 2012 at 1:46 AM, Dave Watts dwa...@figleaf.com wrote: We're moving from application.cfm to application.cfc and I had a question regarding best practices. We re-use our base code and in the past, we have used a settings page that is external from the base code and unique per client to set the applicationname variable (and other variables). This is called at the beginning of application.cfm and provides cfapplication with the unique application name. That same structure seems to work with application.cfc but requires calling a file at the top of application.cfc, above setting the application variables in application.cfc, to provide the applicationname. Is that approach (calling a file at the top of application.cfc to provide a unique client setting) considered a best practice for this kind of thing. Or, is there a more appropriate way? The only other thing I could think of would be to hard code the unique client applicationname in Application.cfc, but that would then require that Application.cfc be a unique file per client and thus not part of our core base code in the sense that we wouldn't include it in upgrades (so that it wouldn't over-write a unique client file with default values). I think the most common approach for this sort of thing with Application.cfc is to use inheritance. You can have a base Application.cfc, then use the EXTENDS attribute to create a new Application.cfc with customized settings, overridden event handlers, etc. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352900 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
FYI, I found that storing the WDDX session data on disk was quicker than putting it in client scope. If your in a cluster then you most likely have a SAN or NAS anyway, so worth giving it a try and get away form using client vars. -- Russ Michaels www.bluethunderinternet.com : Business hosting services solutions www.cfmldeveloper.com: ColdFusion developer community www.michaels.me.uk : my blog www.cfsearch.com : ColdFusion search engine ** *skype me* : russmichaels ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351247 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
Hi Byron (and others), Quick follow up re: eliminating client variables (and wddx, etc.). Are you saying that you are able to maintain login persistence using sessions with the whole site in https so that you don't have to worry about logins being dropped with sessions (which is probably what we will do)? Or did you move to some other solution for login persistence? Another, related, example would be maintaining a url throughout a login. For instance, if you are on a site and click on a link to a password protected, you will be re-directed to the login screen. Once you login, we would like you to be directed automatically to the page. Sessions would be a handy way to do that. But, if we wanted to maintain the option to not have the whole site in https, then using sessions for this functionality would seemingly have the risk of sessions being dumped when you move into https and you would not be automatically redirected to the target page after login. So, again, I'd be interested in knowing alternate ways to handle that kind of scenario. (We have a way now but it may not be the most elegant). Thanks again, Nick Return-Path: listmas...@houseoffusion.com Received: from mail.houseoffusion.com [64.118.74.225] by mail67.safesecureweb.com with SMTP; Wed, 16 May 2012 01:37:33 -0400 To: cf-talk cf-talk@houseoffusion.com Message-ID: CAOSLZN=gUmOtmkyYOShWsPjrcoQKqgo6o7=fj0uASANHxd=8...@mail.gmail.com Subject: Re: best practice on session variable persistence and ssl? References: caclzgdmagqbd5e97e-99judpnaguzxh0abd41uyiiuuhvye...@mail.gmail.com Date: Wed, 16 May 2012 01:37:16 -0400 Precedence: bulk Reply-To: cf-talk@houseoffusion.com From: Byron Mann byronos...@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Rcpt-To: n.glea...@citysoft.com X-SmarterMail-Spam: SpamAssassin 0 [raw: 0], SPF_None, DK_None X-SmarterMail-TotalSpamWeight: 0 I hear ya, since we eliminated the client variables all together and that whole wddx thing, our (internal) cf instances only go down during OS patches. Can't remember the last time I had to restart the service itself. Should also mention we are using jetty which has seemed to uptick performance all around. Now shared is another ball of wax. Byron Mann Lead Engineer and Architect Hostmysite.com On May 16, 2012 1:30 AM, Andrew Scott wrote: Funny you should mention high session time outs. I was given a task by a friend to look at, on something that I did many years ago. Since then they had another developer come in make some changes and the server fell over about 5 times a day, when I looked at it, the session was set to 2 days, I was like WTF... Change it back to what I had set it at 6 years ago, and 8 months later it hasn't fallen over once. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Wed, May 16, 2012 at 3:12 PM, Byron Mann wrote: Note on the wddx, we were doing the same thing. We put a to client scope in the onrequestend.cfm and to session in the application.cfm/c This was all good until we started adding a lot of ajax calls and greatly increased the total numbed of http requests. We had all kinds of latency issues and even client db corruption from the number and size (we had rather large session structures) of write operations. This at one point was adding about 1.5 secs per request. We first moved to json serialization which seemed faster and smaller in size than wddx. Though, eventually we moved away from client vars all together and are just using session variables for all apps on our internal cluster. I doubt I'll every use client vars again, even in a cluster, and I've also learned to keep sessions as small as possible. One of our main issues with shared cf hosting are apps that have large sessions which hog resources. Came across a customer today with 100 sessions totalling about 45 MB, and that's just one example. High session timeouts are another factor in performance as well. Often seen customers requesting us to up the maximum to days, no so good :-) Byron Mann Lead Engineer and Architect Hostmysite.com On May 15, 2012 2:44 PM, Nick Gleason wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351241 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
Reason we were doing the session to wddx to client var, and reverse, was we are in a multi-server environment and not using the jrun session replication from server to server because of jrun's poor performance doing session replication across a cluster. Our load balancing scheme was (at the time) non-sticky. So a user could jump from server to server, so we needed a more reliable way of transporting the sessions from one server to another, since each user request could wind up at another server. So at the end of a request, we wddx the session structure to a client variable (and into the db), on the beginning of each request, we took the client var, reversed the wddx, and set all the session variables. Thus a lot of overhead. We wound up changing the load balancing to sticky sessions, so first request from a user goes to one server, and all subsequent request go to that same server unless it goes down. At that point it wasn't necessary to replicate the sessions with the wddx methodology. If a server dies, we are ok with a session lost and having the user potentially having to login again. This is a user experience vs. performance trade off we are willing to accept. From your description it sounds like you just want a user to go from http, to https, login, and jump to the original requested page. Session vars would be the way to handle tracking that requested page through the login process and then redirecting to the correct destination. Once the user is authenticated in the ssl portion of the site, subsequent secure request (from non ssl) would bypass the login and go directly to the requested page. Basically you would have 2 sessions, one http and one https, but after logging in the transition back and forth would be seamless, unless the https session times out from inactivity and the user has to log back in. This is all based on a single server concept. If you are trying to maintain the session across server instances then you would need a mechanism to replicate the user sessions across each instance in you cluster. Like we did with the session to wddx to client var and back to session, or Jrun in memory server to server session replication. Hope this helps, I think this thread got into two different areas; although somewhat related. Byron Mann Lead Engineer and Architect Hostmysite.com On May 17, 2012 3:16 PM, Nick Gleason n.glea...@citysoft.com wrote: Hi Byron (and others), Quick follow up re: eliminating client variables (and wddx, etc.). Are you saying that you are able to maintain login persistence using sessions with the whole site in https so that you don't have to worry about logins being dropped with sessions (which is probably what we will do)? Or did you move to some other solution for login persistence? Another, related, example would be maintaining a url throughout a login. For instance, if you are on a site and click on a link to a password protected, you will be re-directed to the login screen. Once you login, we would like you to be directed automatically to the page. Sessions would be a handy way to do that. But, if we wanted to maintain the option to not have the whole site in https, then using sessions for this functionality would seemingly have the risk of sessions being dumped when you move into https and you would not be automatically redirected to the target page after login. So, again, I'd be interested in knowing alternate ways to handle that kind of scenario. (We have a way now but it may not be the most elegant). Thanks again, Nick Return-Path: listmas...@houseoffusion.com Received: from mail.houseoffusion.com [64.118.74.225] by mail67.safesecureweb.com with SMTP; Wed, 16 May 2012 01:37:33 -0400 To: cf-talk cf-talk@houseoffusion.com Message-ID: CAOSLZN=gUmOtmkyYOShWsPjrcoQKqgo6o7=fj0uASANHxd=8...@mail.gmail.com Subject: Re: best practice on session variable persistence and ssl? References: caclzgdmagqbd5e97e-99judpnaguzxh0abd41uyiiuuhvye...@mail.gmail.com Date: Wed, 16 May 2012 01:37:16 -0400 Precedence: bulk Reply-To: cf-talk@houseoffusion.com From: Byron Mann byronos...@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Rcpt-To: n.glea...@citysoft.com X-SmarterMail-Spam: SpamAssassin 0 [raw: 0], SPF_None, DK_None X-SmarterMail-TotalSpamWeight: 0 I hear ya, since we eliminated the client variables all together and that whole wddx thing, our (internal) cf instances only go down during OS patches. Can't remember the last time I had to restart the service itself. Should also mention we are using jetty which has seemed to uptick performance all around. Now shared is another ball of wax. Byron Mann Lead Engineer and Architect Hostmysite.com On May 16, 2012 1:30 AM, Andrew Scott wrote: Funny you should mention high session time outs. I was given a task by a friend to look at, on something that I did
Re: best practice on session variable persistence and ssl?
Hey there. Many thanks on these great responses. This is very helpful as we think this through. May have some follow up thoughts / questions as we go. Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351233 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
best practice on session variable persistence and ssl?
Hi folks, With our CMS / CRM application, we are looking at moving from a reliance on client variables towards more reliance on session variables, including as it relates to logins. One challenging scenario happens when a client is using SSL for ecommerce transactions. If a user logs in, using session variables for persistence, then goes to a page that is not in https and then goes to a page (e.g. an ecommerce screen) that uses https, sessions are dumped when the site goes into https and the login can be lost. We are probably going to solve that problem by just requiring the whole site to go into https. However, I wanted to know if there are other good ways to solve this. We have solved that kind of problem in a related scenario (with attribute scoped variables that need to survive https) by using wddx to store variables in the client scope and then get them back from there after moving into https. That has worked pretty well, but feels a bit complex. As we look at expanding our use of sessions, it seems like a good time to look at other options. So, are there other or better ways to keep session variables alive when a logged in user goes to an https encrypted page? Thanks in advance, Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351171 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
As you would be aware going from non SSL to SSL will be seen as a new session by the browser, the one thing that you would need to do is remember to keep your session variables to a minimum. The more you keep in here the more it may end up costing you. What I mean by that is that you will need to way up the cost of growing in relation to how much memory you waste to a user being connected, the more users the more memory. Which means that in time you may find yourself having to go to more servers (clustered) quicker than you may need too. Now you may not be in a situation where that is going to affect you, but you should take that into consideration when deciding your longer plan for the life of your application. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Wed, May 16, 2012 at 4:43 AM, Nick Gleason n.glea...@citysoft.comwrote: Hi folks, With our CMS / CRM application, we are looking at moving from a reliance on client variables towards more reliance on session variables, including as it relates to logins. One challenging scenario happens when a client is using SSL for ecommerce transactions. If a user logs in, using session variables for persistence, then goes to a page that is not in https and then goes to a page (e.g. an ecommerce screen) that uses https, sessions are dumped when the site goes into https and the login can be lost. We are probably going to solve that problem by just requiring the whole site to go into https. However, I wanted to know if there are other good ways to solve this. We have solved that kind of problem in a related scenario (with attribute scoped variables that need to survive https) by using wddx to store variables in the client scope and then get them back from there after moving into https. That has worked pretty well, but feels a bit complex. As we look at expanding our use of sessions, it seems like a good time to look at other options. So, are there other or better ways to keep session variables alive when a logged in user goes to an https encrypted page? Thanks in advance, Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351172 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
your WDDX method has always worked well for me too, and I have used the same method for saving sessions as well. Just dump the entire session scope to WDDX and save it to the users record between page loads, then load it back it in later, such as after login or when switching to https. On Tue, May 15, 2012 at 7:54 PM, Andrew Scott andr...@andyscott.id.auwrote: As you would be aware going from non SSL to SSL will be seen as a new session by the browser, the one thing that you would need to do is remember to keep your session variables to a minimum. The more you keep in here the more it may end up costing you. What I mean by that is that you will need to way up the cost of growing in relation to how much memory you waste to a user being connected, the more users the more memory. Which means that in time you may find yourself having to go to more servers (clustered) quicker than you may need too. Now you may not be in a situation where that is going to affect you, but you should take that into consideration when deciding your longer plan for the life of your application. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Wed, May 16, 2012 at 4:43 AM, Nick Gleason n.glea...@citysoft.com wrote: Hi folks, With our CMS / CRM application, we are looking at moving from a reliance on client variables towards more reliance on session variables, including as it relates to logins. One challenging scenario happens when a client is using SSL for ecommerce transactions. If a user logs in, using session variables for persistence, then goes to a page that is not in https and then goes to a page (e.g. an ecommerce screen) that uses https, sessions are dumped when the site goes into https and the login can be lost. We are probably going to solve that problem by just requiring the whole site to go into https. However, I wanted to know if there are other good ways to solve this. We have solved that kind of problem in a related scenario (with attribute scoped variables that need to survive https) by using wddx to store variables in the client scope and then get them back from there after moving into https. That has worked pretty well, but feels a bit complex. As we look at expanding our use of sessions, it seems like a good time to look at other options. So, are there other or better ways to keep session variables alive when a logged in user goes to an https encrypted page? Thanks in advance, Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351174 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
I'm going to guess that you're dropping sessions because your HTTP cookies aren't secure, and your HTTPS cookies are, issuing a new identity to the browser every time it switches back forth. Putting your entire site in SSL mode is not a bad way to go, a lot of sites are doing that these days, but I understand not wanting to go that way if you can help it. From the way you described it, it seems like the easy way may be to give your less-secure application side its own application name and cookie domain and path, then when you go secure, you get a new cfapplication name, and new cookies for the domain and path. If they hit the insecure site it wouldn't matter because the cookies can't collide. That may or may not work depending on how the application is laid out. Still though, I think I've done things like this and I don't remember having this problem. It was a lot of years ago though. You know, back when security was job #2 (or 3...)! Actually I wonder if somewhere in your code you are issuing new cookies on HTTPS that are secure, and those wouldn't be readable from plain HTTP. It's a possible security hole (http interception, man-in-the-middle - not likely but possible) to keep your cookies insecure, but it would probably fix it. If you insist on keeping it all tight together, you might be able to pass your HTTPS sessionid over a URL link to the insecure site after the user is authenticated. That way they should have the same exact session. Again, you're passing HTTPS cookies over HTTP, so consider if this risk is ok for you. nathan strutz [www.dopefly.com] [hi.im/nathanstrutz] [about.me/nathanstrutz] On Tue, May 15, 2012 at 11:43 AM, Nick Gleason n.glea...@citysoft.comwrote: Hi folks, With our CMS / CRM application, we are looking at moving from a reliance on client variables towards more reliance on session variables, including as it relates to logins. One challenging scenario happens when a client is using SSL for ecommerce transactions. If a user logs in, using session variables for persistence, then goes to a page that is not in https and then goes to a page (e.g. an ecommerce screen) that uses https, sessions are dumped when the site goes into https and the login can be lost. We are probably going to solve that problem by just requiring the whole site to go into https. However, I wanted to know if there are other good ways to solve this. We have solved that kind of problem in a related scenario (with attribute scoped variables that need to survive https) by using wddx to store variables in the client scope and then get them back from there after moving into https. That has worked pretty well, but feels a bit complex. As we look at expanding our use of sessions, it seems like a good time to look at other options. So, are there other or better ways to keep session variables alive when a logged in user goes to an https encrypted page? Thanks in advance, Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351175 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
Strange how people reply to other peoples posts, and confuse future people who may end up reading these threads. For anyone else who may read this later it was the OP who does the WDDX not me. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Wed, May 16, 2012 at 5:14 AM, Russ Michaels r...@michaels.me.uk wrote: your WDDX method has always worked well for me too, and I have used the same method for saving sessions as well. Just dump the entire session scope to WDDX and save it to the users record between page loads, then load it back it in later, such as after login or when switching to https. On Tue, May 15, 2012 at 7:54 PM, Andrew Scott andr...@andyscott.id.au wrote: As you would be aware going from non SSL to SSL will be seen as a new session by the browser, the one thing that you would need to do is remember to keep your session variables to a minimum. The more you keep in here the more it may end up costing you. What I mean by that is that you will need to way up the cost of growing in relation to how much memory you waste to a user being connected, the more users the more memory. Which means that in time you may find yourself having to go to more servers (clustered) quicker than you may need too. Now you may not be in a situation where that is going to affect you, but you should take that into consideration when deciding your longer plan for the life of your application. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Wed, May 16, 2012 at 4:43 AM, Nick Gleason n.glea...@citysoft.com wrote: Hi folks, With our CMS / CRM application, we are looking at moving from a reliance on client variables towards more reliance on session variables, including as it relates to logins. One challenging scenario happens when a client is using SSL for ecommerce transactions. If a user logs in, using session variables for persistence, then goes to a page that is not in https and then goes to a page (e.g. an ecommerce screen) that uses https, sessions are dumped when the site goes into https and the login can be lost. We are probably going to solve that problem by just requiring the whole site to go into https. However, I wanted to know if there are other good ways to solve this. We have solved that kind of problem in a related scenario (with attribute scoped variables that need to survive https) by using wddx to store variables in the client scope and then get them back from there after moving into https. That has worked pretty well, but feels a bit complex. As we look at expanding our use of sessions, it seems like a good time to look at other options. So, are there other or better ways to keep session variables alive when a logged in user goes to an https encrypted page? Thanks in advance, Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351176 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
I know, but when using gmail, you see the whole threaded conversation not individual emails, so when hit reply at the end you reply to the last post. that is a negative of course for the reason you stated, but the positive is you do at least tend to read the whole thread before before replying, which avoids you giving the same answer that 10 other people have already given, which is a problem for folks who read the emails individually. On Tue, May 15, 2012 at 8:19 PM, Andrew Scott andr...@andyscott.id.auwrote: Strange how people reply to other peoples posts, and confuse future people who may end up reading these threads. For anyone else who may read this later it was the OP who does the WDDX not me. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Wed, May 16, 2012 at 5:14 AM, Russ Michaels r...@michaels.me.uk wrote: your WDDX method has always worked well for me too, and I have used the same method for saving sessions as well. Just dump the entire session scope to WDDX and save it to the users record between page loads, then load it back it in later, such as after login or when switching to https. On Tue, May 15, 2012 at 7:54 PM, Andrew Scott andr...@andyscott.id.au wrote: As you would be aware going from non SSL to SSL will be seen as a new session by the browser, the one thing that you would need to do is remember to keep your session variables to a minimum. The more you keep in here the more it may end up costing you. What I mean by that is that you will need to way up the cost of growing in relation to how much memory you waste to a user being connected, the more users the more memory. Which means that in time you may find yourself having to go to more servers (clustered) quicker than you may need too. Now you may not be in a situation where that is going to affect you, but you should take that into consideration when deciding your longer plan for the life of your application. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Wed, May 16, 2012 at 4:43 AM, Nick Gleason n.glea...@citysoft.com wrote: Hi folks, With our CMS / CRM application, we are looking at moving from a reliance on client variables towards more reliance on session variables, including as it relates to logins. One challenging scenario happens when a client is using SSL for ecommerce transactions. If a user logs in, using session variables for persistence, then goes to a page that is not in https and then goes to a page (e.g. an ecommerce screen) that uses https, sessions are dumped when the site goes into https and the login can be lost. We are probably going to solve that problem by just requiring the whole site to go into https. However, I wanted to know if there are other good ways to solve this. We have solved that kind of problem in a related scenario (with attribute scoped variables that need to survive https) by using wddx to store variables in the client scope and then get them back from there after moving into https. That has worked pretty well, but feels a bit complex. As we look at expanding our use of sessions, it seems like a good time to look at other options. So, are there other or better ways to keep session variables alive when a logged in user goes to an https encrypted page? Thanks in advance, Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351178 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
Then do what I do, remove the replied thread. I use gmail all the time, and I think it is a poor excuse to being lazy and not thinking. Not being difficult Russ, but I have no problems selecting the right post to reply too, or delete the reply if it is in reply to another. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351179 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
Note on the wddx, we were doing the same thing. We put a to client scope in the onrequestend.cfm and to session in the application.cfm/c This was all good until we started adding a lot of ajax calls and greatly increased the total numbed of http requests. We had all kinds of latency issues and even client db corruption from the number and size (we had rather large session structures) of write operations. This at one point was adding about 1.5 secs per request. We first moved to json serialization which seemed faster and smaller in size than wddx. Though, eventually we moved away from client vars all together and are just using session variables for all apps on our internal cluster. I doubt I'll every use client vars again, even in a cluster, and I've also learned to keep sessions as small as possible. One of our main issues with shared cf hosting are apps that have large sessions which hog resources. Came across a customer today with 100 sessions totalling about 45 MB, and that's just one example. High session timeouts are another factor in performance as well. Often seen customers requesting us to up the maximum to days, no so good :-) Byron Mann Lead Engineer and Architect Hostmysite.com On May 15, 2012 2:44 PM, Nick Gleason n.glea...@citysoft.com wrote: Hi folks, With our CMS / CRM application, we are looking at moving from a reliance on client variables towards more reliance on session variables, including as it relates to logins. One challenging scenario happens when a client is using SSL for ecommerce transactions. If a user logs in, using session variables for persistence, then goes to a page that is not in https and then goes to a page (e.g. an ecommerce screen) that uses https, sessions are dumped when the site goes into https and the login can be lost. We are probably going to solve that problem by just requiring the whole site to go into https. However, I wanted to know if there are other good ways to solve this. We have solved that kind of problem in a related scenario (with attribute scoped variables that need to survive https) by using wddx to store variables in the client scope and then get them back from there after moving into https. That has worked pretty well, but feels a bit complex. As we look at expanding our use of sessions, it seems like a good time to look at other options. So, are there other or better ways to keep session variables alive when a logged in user goes to an https encrypted page? Thanks in advance, Nick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351196 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
Funny you should mention high session time outs. I was given a task by a friend to look at, on something that I did many years ago. Since then they had another developer come in make some changes and the server fell over about 5 times a day, when I looked at it, the session was set to 2 days, I was like WTF... Change it back to what I had set it at 6 years ago, and 8 months later it hasn't fallen over once. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Wed, May 16, 2012 at 3:12 PM, Byron Mann byronos...@gmail.com wrote: Note on the wddx, we were doing the same thing. We put a to client scope in the onrequestend.cfm and to session in the application.cfm/c This was all good until we started adding a lot of ajax calls and greatly increased the total numbed of http requests. We had all kinds of latency issues and even client db corruption from the number and size (we had rather large session structures) of write operations. This at one point was adding about 1.5 secs per request. We first moved to json serialization which seemed faster and smaller in size than wddx. Though, eventually we moved away from client vars all together and are just using session variables for all apps on our internal cluster. I doubt I'll every use client vars again, even in a cluster, and I've also learned to keep sessions as small as possible. One of our main issues with shared cf hosting are apps that have large sessions which hog resources. Came across a customer today with 100 sessions totalling about 45 MB, and that's just one example. High session timeouts are another factor in performance as well. Often seen customers requesting us to up the maximum to days, no so good :-) Byron Mann Lead Engineer and Architect Hostmysite.com On May 15, 2012 2:44 PM, Nick Gleason n.glea...@citysoft.com wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351197 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: best practice on session variable persistence and ssl?
I hear ya, since we eliminated the client variables all together and that whole wddx thing, our (internal) cf instances only go down during OS patches. Can't remember the last time I had to restart the service itself. Should also mention we are using jetty which has seemed to uptick performance all around. Now shared is another ball of wax. Byron Mann Lead Engineer and Architect Hostmysite.com On May 16, 2012 1:30 AM, Andrew Scott andr...@andyscott.id.au wrote: Funny you should mention high session time outs. I was given a task by a friend to look at, on something that I did many years ago. Since then they had another developer come in make some changes and the server fell over about 5 times a day, when I looked at it, the session was set to 2 days, I was like WTF... Change it back to what I had set it at 6 years ago, and 8 months later it hasn't fallen over once. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Wed, May 16, 2012 at 3:12 PM, Byron Mann byronos...@gmail.com wrote: Note on the wddx, we were doing the same thing. We put a to client scope in the onrequestend.cfm and to session in the application.cfm/c This was all good until we started adding a lot of ajax calls and greatly increased the total numbed of http requests. We had all kinds of latency issues and even client db corruption from the number and size (we had rather large session structures) of write operations. This at one point was adding about 1.5 secs per request. We first moved to json serialization which seemed faster and smaller in size than wddx. Though, eventually we moved away from client vars all together and are just using session variables for all apps on our internal cluster. I doubt I'll every use client vars again, even in a cluster, and I've also learned to keep sessions as small as possible. One of our main issues with shared cf hosting are apps that have large sessions which hog resources. Came across a customer today with 100 sessions totalling about 45 MB, and that's just one example. High session timeouts are another factor in performance as well. Often seen customers requesting us to up the maximum to days, no so good :-) Byron Mann Lead Engineer and Architect Hostmysite.com On May 15, 2012 2:44 PM, Nick Gleason n.glea...@citysoft.com wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351199 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Best Practice question about database access between Dev and Production Servers
Hello, I'm setting up a new environment and I would like to have the ability, through a web UI to copy objects from our production database (separate server) to a development/debugging database (separate server). My question is not about how to implement this but rather whether this is bad practice. It would involve exposing the production database on the dev server (via a datasource mapping in the cfadmin). This would mean that any developer that is using our dev server (my concern is contractors..) would be able to write a query against the production database and potentially download sensitive data. How to people handle this type of risk? One idea I had was to not hardcode the database username/password in the CFadmin and instead prompt for it when accessing this specific tool through the web UI. Does that sound like a reasonable means of protecting the data in the production database from developers working on the development server? Anybody have better ideas? Brook ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349658 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best Practice question about database access between Dev and Production Servers
Putting production data source connections on the development server is a practice you should avoid. I cringe whenever I see developers do this. Having the development DSN on the production server is less risky. Another path would be having the two databases linked at the database level and use database code to copy objects between servers, possibly triggered by a command issued by a Web UI. Database security is easier to control at the database level, and you wouldn't have to expose the production dsn on the dev Web server. I can't think of too many examples where you would want to copy production data to development using a ColdFusion Web GUI. I use specialized database tools or scripts, with no UI, when transferring database data between environments. If you really need this ability through a ColdFusion application, then having a password prompt is a bit better than using an embedded password. -Mike Chabot On Sat, Jan 28, 2012 at 4:02 PM, Brook Davies cft...@logiforms.com wrote: Hello, I'm setting up a new environment and I would like to have the ability, through a web UI to copy objects from our production database (separate server) to a development/debugging database (separate server). My question is not about how to implement this but rather whether this is bad practice. It would involve exposing the production database on the dev server (via a datasource mapping in the cfadmin). This would mean that any developer that is using our dev server (my concern is contractors..) would be able to write a query against the production database and potentially download sensitive data. How to people handle this type of risk? One idea I had was to not hardcode the database username/password in the CFadmin and instead prompt for it when accessing this specific tool through the web UI. Does that sound like a reasonable means of protecting the data in the production database from developers working on the development server? Anybody have better ideas? Brook ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349659 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best Practice question about database access between Dev and Production Servers
just take a copy of the live database and remove all sensitive data from it. either remove all data and replace with demo data, or just run a query that replaces the sensitive data with something else. On Sat, Jan 28, 2012 at 10:15 PM, Mike Chabot mcha...@gmail.com wrote: Putting production data source connections on the development server is a practice you should avoid. I cringe whenever I see developers do this. Having the development DSN on the production server is less risky. Another path would be having the two databases linked at the database level and use database code to copy objects between servers, possibly triggered by a command issued by a Web UI. Database security is easier to control at the database level, and you wouldn't have to expose the production dsn on the dev Web server. I can't think of too many examples where you would want to copy production data to development using a ColdFusion Web GUI. I use specialized database tools or scripts, with no UI, when transferring database data between environments. If you really need this ability through a ColdFusion application, then having a password prompt is a bit better than using an embedded password. -Mike Chabot On Sat, Jan 28, 2012 at 4:02 PM, Brook Davies cft...@logiforms.com wrote: Hello, I'm setting up a new environment and I would like to have the ability, through a web UI to copy objects from our production database (separate server) to a development/debugging database (separate server). My question is not about how to implement this but rather whether this is bad practice. It would involve exposing the production database on the dev server (via a datasource mapping in the cfadmin). This would mean that any developer that is using our dev server (my concern is contractors..) would be able to write a query against the production database and potentially download sensitive data. How to people handle this type of risk? One idea I had was to not hardcode the database username/password in the CFadmin and instead prompt for it when accessing this specific tool through the web UI. Does that sound like a reasonable means of protecting the data in the production database from developers working on the development server? Anybody have better ideas? Brook ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349660 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Best Practice question about database access between Dev and Production Servers
Generally, it is pretty bad practice to copy production data to any other network. You would most definitely not pass a SaaS 70 audit if they found that you were doing it. You would also not pass the same audit if they found that all of your developers had direct access to that data without going through permission granting hoops. That said, you may not have a need to worry about it if your data isnt really that sensitive in the first place. In which case, I think domain authentication would be the better way to govern the access. When people leave or contracts expire, the removal of their domain accounts would cover removing the DB access. Otherwise, you may find yourself managing the accounts individually for everything or changing the password every time someone leaves. Another option, which Russ mentioned, is scrubbing the data before copying it down to the dev network. Of course, you'd want to do that on the production network BEFORE copying it down to the other network. I have seen people do the scrubbing AFTER the move... which is kind of pointless. Just some things to think about. .:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -Original Message- From: Brook Davies [mailto:cft...@logiforms.com] Sent: Saturday, January 28, 2012 4:02 PM To: cf-talk Subject: Best Practice question about database access between Dev and Production Servers Hello, I'm setting up a new environment and I would like to have the ability, through a web UI to copy objects from our production database (separate server) to a development/debugging database (separate server). My question is not about how to implement this but rather whether this is bad practice. It would involve exposing the production database on the dev server (via a datasource mapping in the cfadmin). This would mean that any developer that is using our dev server (my concern is contractors..) would be able to write a query against the production database and potentially download sensitive data. How to people handle this type of risk? One idea I had was to not hardcode the database username/password in the CFadmin and instead prompt for it when accessing this specific tool through the web UI. Does that sound like a reasonable means of protecting the data in the production database from developers working on the development server? Anybody have better ideas? Brook ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349661 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Best Practice for multi-page form
Is it better to store the data for the survey in an array of structures or save each page to the database as the user moves through the form, This depends on if you require the entire survey to be filled out or if partial information is acceptable. We have done both. For most of the survey applications we've built we wanted the complete survey and throw away any that are incomplete so we uses session variables. 30-50 surveys a day is not much to be concerned about for resources as that is a relatively low volume in the scheme of things especially with session timeout of 20-30 minutes Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345134 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Best Practice for multi-page form
I have a multi-page form (survey) where the user can go forward and back through the survey. I want to save the entries from each page so that I can repopulate the page if the user goes back to it. I expect to have 30-40 surveys a day. Is it better to store the data for the survey in an array of structures (CategoryID, QuestionID, AnswerValue) and then submit all the data in one pass when the user finishes the form, or save each page to the database as the user moves through the form, and then go back to the database for the data if they go back to an earlier page? I've always thought it was best to only hit the database once at the end, but I've been reading that some people recommend going to the database every time a page is submitted, because storing the data as an array of structures takes up RAM. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345095 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best Practice for multi-page form
save to db and allow them to come back later to continue. for a good example check out www.formassembly.com, it just just this and a lot more, even in the free version. On Sun, Jun 5, 2011 at 10:21 PM, Jim Brundle brundlefly...@gmail.comwrote: I have a multi-page form (survey) where the user can go forward and back through the survey. I want to save the entries from each page so that I can repopulate the page if the user goes back to it. I expect to have 30-40 surveys a day. Is it better to store the data for the survey in an array of structures (CategoryID, QuestionID, AnswerValue) and then submit all the data in one pass when the user finishes the form, or save each page to the database as the user moves through the form, and then go back to the database for the data if they go back to an earlier page? I've always thought it was best to only hit the database once at the end, but I've been reading that some people recommend going to the database every time a page is submitted, because storing the data as an array of structures takes up RAM. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345096 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfc creation best practice
One of the big advantages of caching your CFC's in memory is to reduce the overhead of instantiating them. If you have a rarely used ADMIN section, then this wont be an issue for for you if they are invoked every time you use them, so I wouldn't make any more work for yourself unnecessarily. On Mon, Mar 28, 2011 at 3:50 AM, Greg Morphis gmorp...@gmail.com wrote: Awesome! I appreciate the info Brian! On Mar 27, 2011 9:48 PM, Brian Kotek brian...@gmail.com wrote: Since the memory footprint of a CFC is generally very small, I would just create everything together at app startup (ideally using ColdSpring) and be done with it. On Sun, Mar 27, 2011 at 7:21 PM, Greg Morphis gmorp...@gmail.com wrote: If you have a site or an area of the site that's not going to get used a WHOLE lot would it make sense to create cfc objects (beans, gateways, daos) when you need them or is it still best just to create the gateway and dao object on application start? At what point would you just create it in the application scope? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343338 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfc creation best practice
Russ, This use to be a huge problem in CF 6 and to a lesser extent CF 7 (probably related to Java 1.4). But as of CF 8 the penalty for instantiation is very slight once the class is compiled. So I have flip-flopped a little bit on this. I used to use a singleton approach and stuff everything in the app scope. But now I'm more judicious and only put things in there that demonstrate a slow instantiation issue. -Mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Monday, March 28, 2011 9:22 AM To: cf-talk Subject: Re: cfc creation best practice One of the big advantages of caching your CFC's in memory is to reduce the overhead of instantiating them. If you have a rarely used ADMIN section, then this wont be an issue for for you if they are invoked every time you use them, so I wouldn't make any more work for yourself unnecessarily. On Mon, Mar 28, 2011 at 3:50 AM, Greg Morphis gmorp...@gmail.com wrote: Awesome! I appreciate the info Brian! On Mar 27, 2011 9:48 PM, Brian Kotek brian...@gmail.com wrote: Since the memory footprint of a CFC is generally very small, I would just create everything together at app startup (ideally using ColdSpring) and be done with it. On Sun, Mar 27, 2011 at 7:21 PM, Greg Morphis gmorp...@gmail.com wrote: If you have a site or an area of the site that's not going to get used a WHOLE lot would it make sense to create cfc objects (beans, gateways, daos) when you need them or is it still best just to create the gateway and dao object on application start? At what point would you just create it in the application scope? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343341 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cfc creation best practice
If you have a site or an area of the site that's not going to get used a WHOLE lot would it make sense to create cfc objects (beans, gateways, daos) when you need them or is it still best just to create the gateway and dao object on application start? At what point would you just create it in the application scope? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343327 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfc creation best practice
Since the memory footprint of a CFC is generally very small, I would just create everything together at app startup (ideally using ColdSpring) and be done with it. On Sun, Mar 27, 2011 at 7:21 PM, Greg Morphis gmorp...@gmail.com wrote: If you have a site or an area of the site that's not going to get used a WHOLE lot would it make sense to create cfc objects (beans, gateways, daos) when you need them or is it still best just to create the gateway and dao object on application start? At what point would you just create it in the application scope? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343329 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfc creation best practice
Awesome! I appreciate the info Brian! On Mar 27, 2011 9:48 PM, Brian Kotek brian...@gmail.com wrote: Since the memory footprint of a CFC is generally very small, I would just create everything together at app startup (ideally using ColdSpring) and be done with it. On Sun, Mar 27, 2011 at 7:21 PM, Greg Morphis gmorp...@gmail.com wrote: If you have a site or an area of the site that's not going to get used a WHOLE lot would it make sense to create cfc objects (beans, gateways, daos) when you need them or is it still best just to create the gateway and dao object on application start? At what point would you just create it in the application scope? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343330 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFC argument best practice question
On Mon, Mar 7, 2011 at 10:56 AM, Nathan Strutz str...@gmail.com wrote: If you have a lot of arguments, one way to refactor that is to make a component that encompasses those arguments - essentially a bean, maybe a couple of beans if the arguments are unrelated. In your first public method, instantiate that bean with the arguments, then just pass that bean around. Follow that, and you've gone from just using components to actual object-oriented programming. Hardly. A bean that's just a glorified struct with dumb get/set methods isn't OOP, it's just a struct with overhead. Frankly, creating new components just to group related arguments is a waste of time in CFML and just slows down your code. In answer to Brook's original question: yes, it is probably better practice to declare the arguments in the private method, for documentation purposes, especially if you are referring to those arguments in the code... -- Sean A Corfield -- (904) 302-SEAN Railo Technologies, Inc. -- http://getrailo.com/ An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342942 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFC argument best practice question
Hello, Just a quick Best Practices question. I have a CFC, I call a method and pass a slew of arguments to it. Internally it calls a private method using argumentCollection=arguments. My question is, should I repeat the argument definitions on the private method? The arguments are available regardless of whether or not the private method has the actual argument definitions. What is the best practice here? Define the arguments or just use them knowing they are the same as the public method? Brook ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342801 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFC argument best practice question
Presumably your private method is being called by multiple methods. It is definitely much better - at least in terms of documentation - to have those arguments clearly defined. :-) If, however, multiple methods do not call that private method, then there is no need for the private method to exist. HTH ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342802 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFC argument best practice question
If, however, multiple methods do not call that private method, then there is no need for the private method to exist. I wouldn't go as far as that. Private methods like this can serve the same purpose as functions or subroutines anywhere else - to limit the amount of code in the main method, and to provide a basis for refactoring if other methods may be introduced in the future. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342803 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFC argument best practice question
On Mon, Mar 7, 2011 at 11:21 AM, Dave Watts wrote: If, however, multiple methods do not call that private method, then there is no need for the private method to exist. I wouldn't go as far as that. Private methods like this can serve the same purpose as functions or subroutines anywhere else - to limit the amount of code in the main method, and to provide a basis for refactoring if other methods may be introduced in the future. That's the beauty of refactoring, though. Unless you need to, don't. And if no other method is calling it (or expected to call it), then it is not needed. If it becomes needed, refactor and add it in. :-) Either way, though, the arguments should be clearly defined. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342804 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFC argument best practice question
If you have a lot of arguments, one way to refactor that is to make a component that encompasses those arguments - essentially a bean, maybe a couple of beans if the arguments are unrelated. In your first public method, instantiate that bean with the arguments, then just pass that bean around. Follow that, and you've gone from just using components to actual object-oriented programming. nathan strutz [http://www.dopefly.com/] [http://hi.im/nathanstrutz] On Mon, Mar 7, 2011 at 10:06 AM, Brook Davies cft...@logiforms.com wrote: Hello, Just a quick Best Practices question. I have a CFC, I call a method and pass a slew of arguments to it. Internally it calls a private method using argumentCollection=arguments. My question is, should I repeat the argument definitions on the private method? The arguments are available regardless of whether or not the private method has the actual argument definitions. What is the best practice here? Define the arguments or just use them knowing they are the same as the public method? Brook ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342806 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFC argument best practice question
On Mon, Mar 7, 2011 at 9:24 AM, Matt Quackenbush quackfu...@gmail.com wrote: That's the beauty of refactoring, though. Unless you need to, don't. And if no other method is calling it (or expected to call it), then it is not needed. If it becomes needed, refactor and add it in. :-) I generally agree with this notion but I think it starts to fall apart with more complex methods. You might have a whole routine that only gets called one place but is complex enough that there are benefits to breaking it up into multiple methods that have single concerns. Doing so makes it easier to debug (the method names provide helpful clues to follow the chain of execution) and makes it much easier to unit test. Either way, though, the arguments should be clearly defined. Agreed. J ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342807 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFC argument best practice question
I generally agree with this notion but I think it starts to fall apart with more complex methods. You might have a whole routine that only gets called one place but is complex enough that there are benefits to breaking it up into multiple methods that have single concerns. Doing so makes it easier to debug (the method names provide helpful clues to follow the chain of execution) and makes it much easier to unit test. Yeah, this is what I was trying to get at. I don't want to go through hundreds of lines of code at once if I can avoid it. Either way, though, the arguments should be clearly defined. Agreed. I agree with that too. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342808 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFC argument best practice question
On Mon, Mar 7, 2011 at 11:57 AM, Judah McAuley wrote: On Mon, Mar 7, 2011 at 9:24 AM, Matt Quackenbush wrote: That's the beauty of refactoring, though. Unless you need to, don't. And if no other method is calling it (or expected to call it), then it is not needed. If it becomes needed, refactor and add it in. :-) I generally agree with this notion but I think it starts to fall apart with more complex methods. You might have a whole routine that only gets called one place but is complex enough that there are benefits to breaking it up into multiple methods that have single concerns. Doing so makes it easier to debug (the method names provide helpful clues to follow the chain of execution) and makes it much easier to unit test. I totally agree. I was trying to approach it from the perspective of a n00b, though. (Hence the overly generalized statement.) I was figuring that the OP is not unit testing or writing up huge, complex methods. My apologies if I misunderstood the OP's current level of experience with these concepts. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342809 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CF OOP Best practice - reference tables
I have a table, members which I need to extract emails for a particular group. To get the emails I need to use reference tables. I might need to pull more information at a later date so I was going to return a query or an array of Beans to include everything from the members table. The query would look something like this.. select email, mem_id, ... from members m join members_group mg on m.mem_id = mg.mem_id join groups g on mg.group_id = g.group_id where g.group_id = 12 So in taking an OOP approach, would the best way be modifying the getAttributesByQuery function and throwing in a group_id argument in the Gateway, modifying the query to include these 2 reference tables in the argument is not null? Or creating a whole new function to populate a structure of Member beans, a getMemberByGroup function? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340030 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF OOP Best practice - reference tables
Never mind, I guess I'm good... found this interesting website/wiki http://www.objectorientedcoldfusion.org/wiki/Gateway http://www.objectorientedcoldfusion.org/wiki/GatewayPretty good info On Mon, Dec 13, 2010 at 11:10 AM, Greg Morphis gmorp...@gmail.com wrote: I have a table, members which I need to extract emails for a particular group. To get the emails I need to use reference tables. I might need to pull more information at a later date so I was going to return a query or an array of Beans to include everything from the members table. The query would look something like this.. select email, mem_id, ... from members m join members_group mg on m.mem_id = mg.mem_id join groups g on mg.group_id = g.group_id where g.group_id = 12 So in taking an OOP approach, would the best way be modifying the getAttributesByQuery function and throwing in a group_id argument in the Gateway, modifying the query to include these 2 reference tables in the argument is not null? Or creating a whole new function to populate a structure of Member beans, a getMemberByGroup function? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340032 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Best practice for backup of CF Application server?
We're running ColdFusion 9, and I understand we can backup the XML files in Web-INF to get the datasource meta data for a less troublesome restore, God forbid we'd have to do that at any point. Aside from CFM templates of the site itself, should we also backup the CFIDE tree? Anything else that would be a good practice in the event we'd need to recover a site on short notice? Thanks so much, Chuck ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338115 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best practice for backup of CF Application server?
We're running ColdFusion 9, and I understand we can backup the XML files in Web-INF to get the datasource meta data for a less troublesome restore, God forbid we'd have to do that at any point. Aside from CFM templates of the site itself, should we also backup the CFIDE tree? Anything else that would be a good practice in the event we'd need to recover a site on short notice? You might want to back up your web server configuration also - there's typically a bunch of important details in there. If you're using Apache, this is typically very easy to do. If you're using IIS, you can explicitly back up the entire metabase (or whatever they call it now) or specific items. If you're using SSL certificates, you want to make sure you have the certificate files (including CSRs) backed up somewhere also. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338116 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Best practice for backup of CF Application server?
actually you can take a copy of the whole coldfusion install folder, and if you have to reinstall CF, you can just copy it over the top and everything will be restored. Stopping the services first of course. We have also used this method to roll back after a failed cf 9.0.1 upgrade. Russ On Wed, Oct 13, 2010 at 3:23 PM, Chuck Wyatt cwy...@clarku.edu wrote: We're running ColdFusion 9, and I understand we can backup the XML files in Web-INF to get the datasource meta data for a less troublesome restore, God forbid we'd have to do that at any point. Aside from CFM templates of the site itself, should we also backup the CFIDE tree? Anything else that would be a good practice in the event we'd need to recover a site on short notice? Thanks so much, Chuck ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338117 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Best practice for backup of CF Application server?
You might want to back up your web server configuration also For IIS6, here is the batch file we use to perform a scheduled backup of the metabase as well as an XML export. Hopefully it can benefit anyone else out there who isn't backing up their metabase regularly. (Note: gf-bigmama is a file server which holds our initial backups before they get shipped off-site, so replace that with a path you're comfortable with) @echo off md \\gf-bigmama\metabases\%computername% cd %SystemRoot%\system32 cscript.exe iisback.vbs /backup /b SchedBackup /v 0 /overwrite del \\gf-bigmama\metabases\%computername%\%computername%.xml cscript iiscnfg.vbs /export /f \\gf-bigmama\metabases\%computername%\%computername%.xml /sp /lm /inherited /children MOVE %SystemRoot%\system32\inetsrv\MetaBack\SchedBackup.* \\gf-bigmama\metabases\%computername% My understanding for IIS7 is that any configuration changes made to a site are written to web.config in the site's root folder, so backing up that file along with the rest of the site brings its settings along with it. I'm not familiar with where IIS7 stores its actual site listing though, I'm fairly certain they did away with the metabase itself though. I suspect there's some XML file hanging out somewhere that would just need to be copied. -Justin ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338119 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Best practice for backup of CF Application server?
For CF application... I backup the XML files and custom tags when I make changes. All of our templates are on a separate hard drive in the server and that is backed up every night. -Original Message- From: Chuck Wyatt [mailto:cwy...@clarku.edu] Sent: Wednesday, October 13, 2010 7:23 AM To: cf-talk Subject: Best practice for backup of CF Application server? We're running ColdFusion 9, and I understand we can backup the XML files in Web-INF to get the datasource meta data for a less troublesome restore, God forbid we'd have to do that at any point. Aside from CFM templates of the site itself, should we also backup the CFIDE tree? Anything else that would be a good practice in the event we'd need to recover a site on short notice? Thanks so much, Chuck ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338121 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
webservice params best practice
I am writing a web service for the company I work at and I have a question at to how to handle a very large number of input parameters. The basic web service is this. A client will send us the search params for data they want to search and we return a result set. My question is we have around 115 (and growing) different search criteria items that can be passed into to run a search. How would you handle that? Named Value List in a single parameter? ordered CSV in a single parameter? some sort of data structure in a single parameter? 115+ single params? Ugh - I know there has to be a better way than this. Thanks, Wil Genovese One man with courage makes a majority. -Andrew Jackson A fine is a tax for doing wrong. A tax is a fine for doing well. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330799 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: webservice params best practice
If the set of params is growing (i.e. changing on you) it's worth simply making the input a struct. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 17 February 2010 09:20, Wil Genovese jugg...@visi.com wrote: I am writing a web service for the company I work at and I have a question at to how to handle a very large number of input parameters. The basic web service is this. A client will send us the search params for data they want to search and we return a result set. My question is we have around 115 (and growing) different search criteria items that can be passed into to run a search. How would you handle that? Named Value List in a single parameter? ordered CSV in a single parameter? some sort of data structure in a single parameter? 115+ single params? Ugh - I know there has to be a better way than this. Thanks, Wil Genovese One man with courage makes a majority. -Andrew Jackson A fine is a tax for doing wrong. A tax is a fine for doing well. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330803 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Throttling CFMail - The reasons it's a good practice
You may have better luck just paying for SMTP services from a company who doesn't mind you sending that many emails at once. Last night I sent some code which does works to throttle email. I use it all the time. If you can't sort out how it works feel free to give me a shout off-list. It's pretty straight forward. Just so there's no confusion on the reasons to throttle the email - it may be a provider issue, but it's also a receiver issue. Even if your provider let's you send out a zillion emails at once, the ISPs of the recipients may block your mail (or block/blacklist your mail server or mail server IP) as a spam source. Many of the receiving ISPs (Yahoo, AOL, etc.) have robots that monitor the incoming mail and automatically block suspects. You can be blocked for a lot of reasons, but a couple of things that often trigger the alarm is: 1) too many concurrent connections from a mail server; or 2) to large a volume of incoming mail in a short period of time If your service providers IP or mail server get's blocked/blacklisted, then you are likely to have some real issues with your service provider. There is much reason to throttle outbound email, and the service provider is only half the equation. You also throttle email for the benefit of the receiving ISPs. Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged __ Information from ESET Smart Security, version of virus signature database 4366 (20090825) __ The message was checked by ESET Smart Security. http://www.eset.com ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325682 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Throttling CFMail - The reasons it's a good practice
On Tue, Aug 25, 2009 at 11:25 AM, Robert Harrisonrob...@austin-williams.com wrote: Many of the receiving ISPs (Yahoo, AOL, etc.) have robots that monitor the incoming mail and automatically block suspects. Most of these also have whitelist programs and feedback loops for unsubs. That's all very time consuming to manage though so it's not always the best route... -Cameron ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325692 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best practice - registration activation by email
Ditto, except I use a 24-hour period, which is a bit aggressive. Also on the first login the user is prompted to enter a hint and an answer for future forgotten-password routine use. The hint is encrypted and the answer is stored as a salted hash. -- -...@robertson-- Janitor, The Robertson Team mysecretbase.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319658 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Best practice - registration activation by email
Just wondering how others are dealing with public member signups that require an email activation? What I'm doing on a new site that I recently set up is sending out the activation as soon as someone registers. If a user tries to login with an account still in the unactivated state, they're shown an appropriate error message and given the option of having another activation email sent to them. I expire the unactivated accounts after 48 hours, deleting them completely from the books. This should allow someone to re-register using the same email address, in case their activation email was lost, overlooked, or caught by a spam filter. Other approaches? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319561 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best practice - registration activation by email
Jim McAtee wrote: Just wondering how others are dealing with public member signups that require an email activation? I've essentially done the same thing at DtDNS for ten years without any trouble. If they try to log in they get the error and are directed to the lost password routine. If this is used for a non-activated account it just sends a new copy of the activation code instead of the password. Accounts that aren't activated within a couple of days get removed automatically as part of the daily maintenance cycle. -Justin ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319570 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best performace/practice for storing temp data
I'm leaning towards storing temp data in the client scope. Thanks guys for your valuable input and insight. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317461 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best performace/practice for storing temp data
My thinking behind not using a db table was that I would need to clean it up somehow, and the fact that the client variable db was automatically cleaned out over time (imperfect assumption on my part) did that job for me. There are a lot of advantages to using the database and as a shopping cart becomes more and more complex, those become even more apparent. For instance, if your client decides at some point to track abandoned carts, this is far more easily done if that data is available directly from the database. It's a pretty simple function to just create a scheduled task that will clear out your cart tables on a regular basis, using a time stamp when you create the records to find the old ones. For my ecommerce product, pretty much everything is stored in the database, and then I just use a session variable with the cart ID, which also is saved to the user cookies and to the user table for logged in users as well. I also save a cart summary (items/total) to the session so I can display this on each page without recalculating the entire cart (which can be a LOT of calculation with a complex ecommerce app like mine). This gives you a pretty good persistent cart, with a very minimal amount of stuff needing to be kept in the session and/or cookies. So a lot depends on how simple you intend the cart to be, and the likelihood of it becoming more complex over time. Mary Jo Sminkey mar...@dogpatchsw.com Author of CFWebstore, CF-based E-commerce http://www.cfwebstore.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317481 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best performace/practice for storing temp data
Oops, just noticed the OP was specifically asking about shipping information. Personally, I generally use the session since if for any reason the CF server gets rebooted and it gets lost, the user is going to need to start the checkout process over again regardless. I do save their address information to a temp table, again, so it is available if I want to view that information on the merchant end, but otherwise I don't tend to use something like client scope for things like this that I don't need to persist for any length of time. But either will certainly work fine. Mary Jo Sminkey mar...@dogpatchsw.com Author of CFWebstore, CF-based E-commerce http://www.cfwebstore.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317482 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best performace/practice for storing temp data
Working on shopping cart app and stuck between storing shipping info in a db shipTable or in client scope. I'm hesitant to store shipping info into the db because some users might not complete the transaction and take up rows in the db. On the other hand if I store shipping info in the client scope I'm not sure if this would impact the server. Since Client variables are also typically stored in the database, I wouldn't worry too much about taking up rows. I would also not recommend using both the Session and the Client scopes - use one or the other. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317397 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Best performace/practice for storing temp data
You can use the session scope. You can copy the form vars to the session scope using structappend like so: cfset structappend(session, form, true) Or create another struct and store that in the session scope. cfset StrctNew() = session.myvars cfset structappend(session.myvars, form, true) Or something of that nature. I don't know if this is best practices... HTH G On Sun, Jan 4, 2009 at 10:33 PM, j s jsegur...@gmail.com wrote: Working on shopping cart app and stuck between storing shipping info in a db shipTable or in client scope. I'm hesitant to store shipping info into the db because some users might not complete the transaction and take up rows in the db. On the other hand if I store shipping info in the client scope I'm not sure if this would impact the server. The goal is hold the users shipping info and later display/process the data on the final checkout page. I tried using form variables but that only works from template to template. Any suggestions or opinions would be greatly appreciated. Thanks in advance. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317394 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best performace/practice for storing temp data
What Dave said about client scope and db rows. For my own cart I wound up using client variables. I felt they were more survivable than session vars. Restart CF and lose your session vars... bad news on a shared server where the host might have an uneven record of uptime. A cvar-based solution will typically survive a cf restart (user visits page, cf gets restarted while user reads content, next page hit is after restart and cvar cart contents persist). I haven't kept up with CF8's features but I believe they are in a struct now and much easier to work with as a result. My thinking behind not using a db table was that I would need to clean it up somehow, and the fact that the client variable db was automatically cleaned out over time (imperfect assumption on my part) did that job for me. -- -...@robertson-- Janitor, The Robertson Team mysecretbase.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317426 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best performace/practice for storing temp data
I think a struct in a session is so much easier first you dont have to worry about cleaning up the database after the uses has finished or if the user drops out you dont have to create tasks to find redundancy data. you can have just as much hassle storing temp data in a database as in a session yes sessions can time out and you could restart the cf application but the database stuff would be unless if that happened also as there is then nothing to match the user with the database data!!! you then have to start scheduling daily, weekly or monthly tasks to delete redundancy data. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317430 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best performace/practice for storing temp data
Whatever you do, don't take ease of programming your solution as a valid way to look at the problem. You are talking about a cart checkout process. The payoff to your client's entire business model. Paramount is making something that will not step on its own you-know-what ... ever. As in fault tolerant. I'd cross session vars clean off the consideration list since they can go byebye for a variety of common causes. In my mind, we are talking about database or client vars. Only. Pick the solution that survives the most number of common, imperfect circumstances. -- -...@robertson-- Janitor, The Robertson Team mysecretbase.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317433 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Best performace/practice for storing temp data
Working on shopping cart app and stuck between storing shipping info in a db shipTable or in client scope. I'm hesitant to store shipping info into the db because some users might not complete the transaction and take up rows in the db. On the other hand if I store shipping info in the client scope I'm not sure if this would impact the server. The goal is hold the users shipping info and later display/process the data on the final checkout page. I tried using form variables but that only works from template to template. Any suggestions or opinions would be greatly appreciated. Thanks in advance. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317372 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Best Practice: Looping over a query in cfscript?
So yesterday I was working in cfscript and needed to loop over a query. I reviewed my options and decided for elegance sake that a for / in loop was choice. Only problem is that for / in loops in cfscript can't be used with query objects. After trying a few things, I fell back and punted with the following code: qGetTheme = siteGW.GetSiteThemeValuesByThemeID(ARGUMENTS.themeID); colList = qGetTheme.columnlist; for ( item=1;item = ListLen(colList);item++ ) { SiteInfo.theme[ListGetAt(colList,item)] = qGetTheme[ListGetAt(colList,item)][1]; } I know this works, and is perfectly legit, but I'd love to see if there's a better way of doing this in cfscript. Anyone? Andy ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315675 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Best Practice: Looping over a query in cfscript?
Hm, I'd think I'd do that loop the same way with cfloop - there is no cfloop shortcut for looping over the query columns. What you have there is fine though I would personally use an array instead of a list in the loop as it is generally more efficient and easier to read in my opinion: qGetTheme = siteGW.GetSiteThemeValuesByThemeID(ARGUMENTS.themeID); cols = ListToArray( qGetTheme.columnlist ); nCols = ArrayLen(cols); for ( item=1;item = nCols; item++ ) { SiteInfo.theme[ cols[item] ] = qGetTheme[ cols[item] ][1]; } Looping over the rows of the query would be slightly different however. Here is a neat but undocumented way to loop a query in cfscript: cfscript foo = QueryNew(''); bar = [1,2,3,4]; QueryAddColumn(foo,'bar','integer',bar); while(foo.next()){ writeoutput(foo.bar[foo.getCurrentRow()]); } /cfscript Output would be: 1234 HTH Dominic 2008/11/20 Andy Matthews [EMAIL PROTECTED]: So yesterday I was working in cfscript and needed to loop over a query. I reviewed my options and decided for elegance sake that a for / in loop was choice. Only problem is that for / in loops in cfscript can't be used with query objects. After trying a few things, I fell back and punted with the following code: qGetTheme = siteGW.GetSiteThemeValuesByThemeID(ARGUMENTS.themeID); colList = qGetTheme.columnlist; for ( item=1;item = ListLen(colList);item++ ) { SiteInfo.theme[ListGetAt(colList,item)] = qGetTheme[ListGetAt(colList,item)][1]; } I know this works, and is perfectly legit, but I'd love to see if there's a better way of doing this in cfscript. Anyone? Andy ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315681 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best Practice: Looping over a query in cfscript?
This isn't looping over the query, though, right? It's looping over the columns in the first row only. Looks like the SiteInfo.theme struct is simply a mirror of the first row of the query when all is said and done. Is that what you're going for? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315680 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Best Practice: Looping over a query in cfscript?
You're right...with cfscript though, you can't easily loop over the query, at least not in what I'd consider an elegant way. -Original Message- From: Jason Fisher [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2008 9:22 AM To: cf-talk Subject: Re: Best Practice: Looping over a query in cfscript? This isn't looping over the query, though, right? It's looping over the columns in the first row only. Looks like the SiteInfo.theme struct is simply a mirror of the first row of the query when all is said and done. Is that what you're going for? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315693 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Best Practice: Looping over a query in cfscript?
NICE That's the sort of thing I'm looking for Dominic! Thanks! -Original Message- From: Dominic Watson [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2008 9:24 AM To: cf-talk Subject: Re: Best Practice: Looping over a query in cfscript? Hm, I'd think I'd do that loop the same way with cfloop - there is no cfloop shortcut for looping over the query columns. What you have there is fine though I would personally use an array instead of a list in the loop as it is generally more efficient and easier to read in my opinion: qGetTheme = siteGW.GetSiteThemeValuesByThemeID(ARGUMENTS.themeID); cols = ListToArray( qGetTheme.columnlist ); nCols = ArrayLen(cols); for ( item=1;item = nCols; item++ ) { SiteInfo.theme[ cols[item] ] = qGetTheme[ cols[item] ][1]; } Looping over the rows of the query would be slightly different however. Here is a neat but undocumented way to loop a query in cfscript: cfscript foo = QueryNew(''); bar = [1,2,3,4]; QueryAddColumn(foo,'bar','integer',bar); while(foo.next()){ writeoutput(foo.bar[foo.getCurrentRow()]); } /cfscript Output would be: 1234 HTH Dominic 2008/11/20 Andy Matthews [EMAIL PROTECTED]: So yesterday I was working in cfscript and needed to loop over a query. I reviewed my options and decided for elegance sake that a for / in loop was choice. Only problem is that for / in loops in cfscript can't be used with query objects. After trying a few things, I fell back and punted with the following code: qGetTheme = siteGW.GetSiteThemeValuesByThemeID(ARGUMENTS.themeID); colList = qGetTheme.columnlist; for ( item=1;item = ListLen(colList);item++ ) { SiteInfo.theme[ListGetAt(colList,item)] = qGetTheme[ListGetAt(colList,item)][1]; } I know this works, and is perfectly legit, but I'd love to see if there's a better way of doing this in cfscript. Anyone? Andy ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315694 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Best Practice: Looping over a query in cfscript?
Here is how I loop over a query in cfscript. Quick, simple and easy. cfscript // Create Query myQry = QueryNew(ColumnA,ColumnB,ColumnC,VarChar,VarChar,VarChar); // Load Query With Data for (i=1; i LTE 10; i=i+1){ QueryAddRow(myQry, 1); QuerySetCell(myQry, ColumnA, RandRange(1, 2), i); QuerySetCell(myQry, ColumnB, RandRange(1, 2), i); QuerySetCell(myQry, ColumnC, RandRange(1, 2), i); } /cfscript !--- Dump the Query to see what is in the recordset --- cfdump var=#myQry# cfscript // Loop Over Query and write out the data for (q=1; q LTE myQry.RecordCount; q=q+1){ writeoutput(myQry.ColumnA[q] -- ); writeoutput(myQry.ColumnB[q] -- ); writeoutput(myQry.ColumnC[q] br /); } /cfscript ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315747 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
CFC Objects (Best Practice)?
To those who use CFCs as Objects: Is it best to create the CFC objects within the application or session scope to be called throughout the application? Ex: -- OnApplicationStart cfscript application.lookupCFC = createobject('component','cfcs.lookup'); /cfscript -- OnSessionStart cfscript session.lookupCFC = createobject('component','cfcs.lookup'); /cfscript ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:313011 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFC Objects (Best Practice)?
Is it best to create the CFC objects within the application or session scope to be called throughout the application? Yes, if you can share them among multiple users, or multiple requests for a single user. CFCs are really no different than any other sort of variable in this way. They are more expensive to create than many other variables, though, so it's worth looking for caching opportunities for them when you might not otherwise. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:313012 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFC Objects (Best Practice)?
Randy, If your CFC is a collection of methods then this is fine.. But if you intend on persisting the return value (say in the session scope) then you may end up with some memory issues. We found that storing a return query from an application cached CFC in the session scope caused memory to be allocated on the heap that could not be recoverred by Garbage collection. By default the pass by reference caused the object returned from the application scoped method to live in the application scope and be referenced by the session scope. I wrote about it here. http://www.coldfusionmuse.com/index.cfm/2008/2/12/leaky.heap.jvm So.. If you understand the implications then yes... Storing in the application scope is an option. I have found however, that there is not a lot of overhead to the createObject( ) call once the CFC is compiled (run for the first time) so caching is often unnecessary. -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2008 8:07 AM To: CF-Talk Subject: CFC Objects (Best Practice)? To those who use CFCs as Objects: Is it best to create the CFC objects within the application or session scope to be called throughout the application? Ex: -- OnApplicationStart cfscript application.lookupCFC = createobject('component','cfcs.lookup'); /cfscript -- OnSessionStart cfscript session.lookupCFC = createobject('component','cfcs.lookup'); /cfscript ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:313013 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFC Objects (Best Practice)?
The scope I used would depend on the manner in which I was using the CFC. Something used on every request, like a user.cfc or cfc for logging I would use the application scope, however if it's something thats used less often but needs to exist across multiple requests I would use session variables, if it only needs to exist for the life of the single request, I use the request scope. Randy wrote: To those who use CFCs as Objects: Is it best to create the CFC objects within the application or session scope to be called throughout the application? Ex: -- OnApplicationStart cfscript application.lookupCFC = createobject('component','cfcs.lookup'); /cfscript -- OnSessionStart cfscript session.lookupCFC = createobject('component','cfcs.lookup'); /cfscript ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:313014 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFC Objects (Best Practice)?
Where to store the object would depend on the nature of the object... Does it have internal state (variables) that are specific to a given user (so, maybe use session, but definitely not application), or is the object sharable by every user (so, application might work). I tend not to cache lite CFC objects in either session or application scope, just to keep things simple, especially during development when you are changing the CFC and the cached versions are old... This can get really annoying. One habit I found myself in is assigning CFCs to the request scope in application.cfm... This gives every page access to them via request and those pages don't need to know where the real object lives... It could be session, or application, or created on-the-fly in application.cfm. This is probably not be a good idea to do in all cases... it may some your code read funny; using session.shopingCart probably feels better than request.shopingCart. But for global sorts of things like you are probably talking about, pulling the object from session or application and assigning it to request might not be a bad idea. Thanks Mark -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2008 9:07 AM To: CF-Talk Subject: CFC Objects (Best Practice)? To those who use CFCs as Objects: Is it best to create the CFC objects within the application or session scope to be called throughout the application? Ex: -- OnApplicationStart cfscript application.lookupCFC = createobject('component','cfcs.lookup'); /cfscript -- OnSessionStart cfscript session.lookupCFC = createobject('component','cfcs.lookup'); /cfscript ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:313016 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFC Objects (Best Practice)?
I apprecaite all the comments. I was considering storing lookup values in either scope for easy referencing throughout the application. Not everyone would be used but many are used multiple times. Ex: Being able to call the function: application.lookup.company('some company name'); would return the query scope qCompany and contain things like name, address, etc... Or something similar. This is where data may change frequently but not the database structure. I can see advanatages of both session and application scopes. My initial thought was be reducing any overhead by creating the objects either onApplicationStart or onSessionStart that way they would already exist for the user's request. (Mark.. I will read up on your blog after my meeting.. Thanks!) On Wed, Sep 24, 2008 at 9:26 AM, Gaulin, Mark [EMAIL PROTECTED]wrote: Where to store the object would depend on the nature of the object... Does it have internal state (variables) that are specific to a given user (so, maybe use session, but definitely not application), or is the object sharable by every user (so, application might work). I tend not to cache lite CFC objects in either session or application scope, just to keep things simple, especially during development when you are changing the CFC and the cached versions are old... This can get really annoying. One habit I found myself in is assigning CFCs to the request scope in application.cfm... This gives every page access to them via request and those pages don't need to know where the real object lives... It could be session, or application, or created on-the-fly in application.cfm. This is probably not be a good idea to do in all cases... it may some your code read funny; using session.shopingCart probably feels better than request.shopingCart. But for global sorts of things like you are probably talking about, pulling the object from session or application and assigning it to request might not be a bad idea. Thanks Mark -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2008 9:07 AM To: CF-Talk Subject: CFC Objects (Best Practice)? To those who use CFCs as Objects: Is it best to create the CFC objects within the application or session scope to be called throughout the application? Ex: -- OnApplicationStart cfscript application.lookupCFC = createobject('component','cfcs.lookup'); /cfscript -- OnSessionStart cfscript session.lookupCFC = createobject('component','cfcs.lookup'); /cfscript ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:313018 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SQL Server connection best practice?
Hi all, I'm not even sure how to pose this question, so I did a poor job of searching the archives, if this question has already been answered. We're running CFMX7 and SQL Server 2000 in Windows2003 Server. I know there are a variety of ways that one can get CF to talk to a SQL Server box: ODBC, JDBC, Named Pipes, and so on. I don't even pretend to know what all of that really means. The question is what's the best practice these days? I think at one point, ODBC was faster, but then JDBC was recommended, and now I'm no longer sure. This came up because I ran a query in SQL Server query analyzer that returned the result set in 0 milliseconds. however, running it using CFQUERY (debugging enabled) showed that the query took about 800ms to execute. The recordset returned is pretty big, so I'm assuming that the bulk of the 800ms is the transfer time, and that got me to thinking about the above question. Any guidance is appreciated. Thanks, Ben ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295718 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SQL Server connection best practice?
We're running CFMX7 and SQL Server 2000 in Windows2003 Server. I know there are a variety of ways that one can get CF to talk to a SQL Server box: ODBC, JDBC, Named Pipes, and so on. I don't even pretend to know what all of that really means. The question is what's the best practice these days? I think at one point, ODBC was faster, but then JDBC was recommended, and now I'm no longer sure. ColdFusion only supports JDBC, so you'll be using JDBC. You can either use a pure Java JDBC driver, or you can connect to ODBC datasources using SequeLink as a JDBC proxy of sorts. I'd strongly recommend using just JDBC. JDBC requires that your SQL Server be configured to listen on TCP/IP. It doesn't support Named Pipes. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295719 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SQL Server connection best practice?
Okay, that's kind of what I thought. I think the SequeLink thing is what I was thinking of wrt to the ODBC driver. Thanks, Dave. ColdFusion only supports JDBC, so you'll be using JDBC. You can either use a pure Java JDBC driver, or you can connect to ODBC datasources using SequeLink as a JDBC proxy of sorts. I'd strongly recommend using just JDBC. JDBC requires that your SQL Server be configured to listen on TCP/IP. It doesn't support Named Pipes. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295720 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SQL Server connection best practice?
Ben, Search House of fusion for a recent thread on query optimization as well... There was an interesting issue with a stored proc taking too long and it turned out to be permissions on the database (made me go hm.) -mark -Original Message- From: Ben Mueller [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 02, 2008 2:17 PM To: CF-Talk Subject: SQL Server connection best practice? Hi all, I'm not even sure how to pose this question, so I did a poor job of searching the archives, if this question has already been answered. We're running CFMX7 and SQL Server 2000 in Windows2003 Server. I know there are a variety of ways that one can get CF to talk to a SQL Server box: ODBC, JDBC, Named Pipes, and so on. I don't even pretend to know what all of that really means. The question is what's the best practice these days? I think at one point, ODBC was faster, but then JDBC was recommended, and now I'm no longer sure. This came up because I ran a query in SQL Server query analyzer that returned the result set in 0 milliseconds. however, running it using CFQUERY (debugging enabled) showed that the query took about 800ms to execute. The recordset returned is pretty big, so I'm assuming that the bulk of the 800ms is the transfer time, and that got me to thinking about the above question. Any guidance is appreciated. Thanks, Ben ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295727 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cfwindow best practice?
Hi, I'm in the process of converting an older version cf app to cf8. cfwindow is a 'star' tag for the new version. Form submission/process goes to the same page. The previous form looks like this: form e1, e2, function 1 (using input type=submit name=myFunction1 value=Do A) function 2 (using input type=submit name=myFunction2 value=Do B) function 3 (using input type=submit name=myFunction3 value=Do C) close form But with cfwindow the above technique won't work, that is, even if a user clicks on {myFuction2} button, only the first function would be recognized. And in my experience, to send the request to the same script which uses cfwindow one would do something like cfform function 1 (using input type=submit name=myFunction1 value=Do A) onclick=javascript:ColdFusion.Ajax.submitForm() close cfform cfform function 2 (using input type=submit name=myFunction2 value=Do B) onclick=javascript:ColdFusion.Ajax.submitForm() close cfform But the above approach is clumsy because many shared elements would have to be repeated for one thing. Is there a better way to do it? Thanks. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295353 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfwindow best practice?
Let me re-phrase the question, does anyone know of a way to suppress cfajax related err msg? I don't care about the err msg because the flow and data are ok. tks. Hi, I'm in the process of converting an older version cf app to cf8. cfwindow is a 'star' tag for the new version. Form submission/process goes to the same page. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295366 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cfthread nor not? -- any best practice out there?
I'm using cffeed for a bunch of rss feeds (specifically 4 feeds for now). For code reuse, I have a component which has a function for passing parameters including source (as a structure). One approach (named A): Not using cfthread, execution seems reasonably fast. http://24.254.1.94:8000/cf8/smallbiznewsfeed_nothread.cfm? Another approach (named B): Using cfhread, execution speed not consistent. http://24.254.1.94:8000/cf8/smallbiznewsfeed_threads.cfm? Commonality: -- both call/invoke the same cfc method same technique of invocation -- both use cfwindow to handle display Differences: -- as mentioned above, A does not use cfthread while B does -- with A, four cfwindow are constructed manually for each feed while cfwindow is inside the feed output loop for the B, so, cfwindow is dynamically constructed, and so B has a few more lines of code for dynamically setting x and y value. Server Infor Setting: -- OS= Windows XP; CFserverVersion=8 standard; CF thread default=10 Additional Info: -- the cfc has about 20 line of code; -- both A and B has about 100 line of code respectively; -- read up some blogs on cfthread, however, in this case, it does not seem to help, and I happen to think my code is not lousy, so, what's up? -- Exeution time is hiding behind windows :) Thank you. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294836 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfthread nor not? -- any best practice out there?
I'm using cffeed for a bunch of rss feeds (specifically 4 feeds for now). For code reuse, I have a component which has a function for passing parameters including source (as a structure). One approach (named A): Not using cfthread, execution seems reasonably fast. http://24.254.1.94:8000/cf8/smallbiznewsfeed_nothread.cfm? Another approach (named B): Using cfhread, execution speed not consistent. http://24.254.1.94:8000/cf8/smallbiznewsfeed_threads.cfm? Commonality: -- both call/invoke the same cfc method same technique of invocation -- both use cfwindow to handle display Differences: -- as mentioned above, A does not use cfthread while B does -- with A, four cfwindow are constructed manually for each feed while cfwindow is inside the feed output loop for the B, so, cfwindow is dynamically constructed, and so B has a few more lines of code for dynamically setting x and y value. Server Infor Setting: -- OS= Windows XP; CFserverVersion=8 standard; CF thread default=10 Additional Info: -- the cfc has about 20 line of code; -- both A and B has about 100 line of code respectively; -- read up some blogs on cfthread, however, in this case, it does not seem to help, and I happen to think my code is not lousy, so, what's up? -- Exeution time is hiding behind windows :) I'm not even sure what you're real question is, it seems you're implying that the cfthread / version is worse performing (which wasn't my experience hitting the pages a few times. The cfthread / version was always faster. Your environment is going to largely dictate what kind of advantages you see from threading tasks in your code. Also remember anytime you need to join the threads together, which would be the case here, your code is still going to have to wait for the slowest running thread. That means if you have a feed that on average takes 900ms to return its results, that's not a bottleneck threading your code will fix. The benefit really comes from when you have 4 processes that each takes 900ms to complete. You're going to have to wait at least 2800ms for that task to finish when run in serial. By threading the processes and running them in parallel, you'll drastically reduce the wait time since all of those tasks run at the same time. You could end up reducing the wait time by 2100ms. You'd really notice the benefits of threading the requests if you start running into network latency issues or issues with the server returning the results in timely manors. -Dan ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294843 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CFUnited Preview: Multi Language Applications in ColdFusion in Theory and Practice
Hi all, Today I will present a review of my CFUnited class: Multi Language Applications in ColdFusion in Theory and Practice It will start at 12:30 PM and you can follow up via Adobe Connect session via http://experts.acrobat.com/cfmeetup/ online. More information: http://coldfusion.meetup.com/17/calendar/5827901/ Sincerely, O#287;uz Demirkap#305; Sr. Application Developer TeraTech http://www.TeraTech.com ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279733 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFUnited Preview: Multi Language Applications in ColdFusion in Theory and Practice
Sigh... I tried to make it. Sorry I missed it. I got home and jumped in there in hopes to catch at least some of it but no such luck. ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Oguz Demirkapi [mailto:[EMAIL PROTECTED] Sent: Thursday, May 31, 2007 11:36 AM To: CF-Talk Subject: CFUnited Preview: Multi Language Applications in ColdFusion in Theory and Practice Hi all, Today I will present a review of my CFUnited class: Multi Language Applications in ColdFusion in Theory and Practice It will start at 12:30 PM and you can follow up via Adobe Connect session via http://experts.acrobat.com/cfmeetup/ online. More information: http://coldfusion.meetup.com/17/calendar/5827901/ Sincerely, O#287;uz Demirkap#305; Sr. Application Developer TeraTech http://www.TeraTech.com ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279751 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Topic Suggestions: Multi Language Applications in CF in Theory and Practice
Thanks Paul, Paul Hastings wrote: OÄuz Demirkapı wrote: Any other idea? :) technically maybe should add: - the importance of designing in i18n from the start, it's not that much more effort once baked in, the importance of following good i18n practices through out development. retro-fitting i18n is a major pain. This will be the main concept. Code or database organization or isolating code from languages are the main issues. No hard coded content anymore! :) - core java vs cldr locale support (this is kind of subtle at first glance but it's really a very BIG deal), my chapter in ben's advanced cf book has a table comparing locales. I think Adobe team here are also listening these conversations. :) - rb as a way of i18n life, i still see several people wallowing in one-off, home-baked solutions or trying to manage all of this using notepad, etc. like it's trivial or something. RB is the most common way but I also want to show GNU GetText method at the class. I like it in Php world with some CMS solutions such as Drupal etc. and it would be also interesting for CF world. I think creating PO files and managing them is more easier than any resource bundle packages. But I will explain all possible methods including some custom ones such as XML or DB usage. - XLIFF, while i don't like XML for humans, there's no denying this standard increasing use outside the translation business. see: http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm that's old (version 1.1 from 2003) there's actually a 1.2 spec someplace but i can't find it on any public site. for some XLIFF/ICU blood guts see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/locale/xliff-profile-icuresourcebundle-1.2.htm Good to know. Let me check this also. - writing systems, at least directionality when it comes to handling layouts, etc. I will present some Frameworks code also with best i18N practices. Specially layout management is an interesting approach. I also want to share layout management in FarCry for multi language applications. Because still there are lots of dilemmas on FarCry template management. non-technically maybe: - why bother? This is what I am trying to do now. Why this topic is important? Please share some more suggestions on this. :) - the importance of professional translators vs the know anybody who speaks Ethiopian? approach. Yes! I see some Turkish or German translations in D.C. area in big organizations and they are really funny! :) - the herding of cats (managing domain expert translators who are usually academics or some kind of professional geologist, civil engineer, whatever but not a professional translator). Great catch! Thanks again for all these suggestions. I hope I will be helpful also for the community. I will try to blog all these topics also. Let us see. -- ~~~ OÄuz Demirkapı TeraTech Inc. | Senior Developer 405 East Gude Dr Suite 207, Rockville, MD 20850, USA Voice: +1 (301) 424-3903 ext 111 | Fax: +1 (301) 762-8185 Web: http://www.teratech.com | E-mail: oguz.demirkapi AT teratech.com Winner in CFDJ awards Best Consulting. Member Team Fusebox. ~~~ ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278858 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Topic Suggestions: Multi Language Applications in CF in Theory and Practice
OÄuz Demirkapı wrote: I think Adobe team here are also listening these conversations. :) no, they're actually not. i've been told point blank it icu4j, etc. won't happen. files and managing them is more easier than any resource bundle packages. But I will explain all possible methods including some custom ones such as XML or DB usage. unless it comes with some kind of existing eco-system to manage these, i'd avoid this like the plague. too many brittle, one off, i-can-do-it-with-notepad solutions around already. doing it is easy, doing it sustainably isn't. This is what I am trying to do now. Why this topic is important? Please share some more suggestions on this. :) i'll see what i have. the g11n chapter has a brief intro. Yes! I see some Turkish or German translations in D.C. area in big organizations and they are really funny! :) might be machine ones. too many people taking too many shortcuts. many DVDs here come w/thai sub-titles that are border-line retarded, obviously machine translation. ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278859 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Topic Suggestions: Multi Language Applications in CF in Theory and Practice
Hi all, I would like to ask your suggestions for preparing a presentation. I will present a whole day class just before CFUnited (http://cfunited.com/go/classes) on Multi Language Applications in CF in Theory and Practice, and I would like to know what topics would be interesting to cover. I specially would like to focus on best practices with some different techniques and share some sample applications with basic implementation and also with some well known frameworks usage such as Fusebox or Model Glue. But meantime I also would like to get your ideas suggestions about this topic. I am developing CF applications since '97 and I already created more than 100 multi language project and I have some experience to share in i18N L10N. But still I am open to any kind of ideas that would be interesting for this class. Thanks in advance. OÄuz Demirkapı TeraTech Inc. | Senior Developer 405 East Gude Dr Suite 207, Rockville, MD 20850, USA Voice: +1 (301) 424-3903 ext 111 | Fax: +1 (301) 762-8185 Web: http://www.teratech.com | E-mail: oguz.demirkapi AT teratech.com Winner in CFDJ awards Best Consulting. Member Team Fusebox. ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278757 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Topic Suggestions: Multi Language Applications in CF in Theory and Practice
Perhaps it would be useful to share the fact that Eclipse can't seem to write a BOM header (yet Dreamweaver can), so templates with double-byte character content won't be rendered correctly unless you save your files with that flag checked from Dreamweaver (or from notepad). The inclusion of a BOM has been on my Eclipse wishlist for some time now, as I have a multilingual site that's typically the only reason for me ever to launch DW these days. Hi all, I would like to ask your suggestions for preparing a presentation. I will present a whole day class just before CFUnited (http://cfunited.com/go/classes) on Multi Language Applications in CF in Theory and Practice, and I would like to know what topics would be interesting to cover. I specially would like to focus on best practices with some different techniques and share some sample applications with basic implementation and also with some well known frameworks usage such as Fusebox or Model Glue. But meantime I also would like to get your ideas suggestions about this topic. I am developing CF applications since '97 and I already created more than 100 multi language project and I have some experience to share in i18N L10N. But still I am open to any kind of ideas that would be interesting for this class. Thanks in advance. O?uz Demirkap? TeraTech Inc. | Senior Developer 405 East Gude Dr Suite 207, Rockville, MD 20850, USA Voice: +1 (301) 424-3903 ext 111 | Fax: +1 (301) 762-8185 Web: http://www.teratech.com | E-mail: oguz.demirkapi AT teratech.com Winner in CFDJ awards Best Consulting. Member Team Fusebox. ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278776 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Topic Suggestions: Multi Language Applications in CF in Theory and Practice
On 5/21/07, Dave Anderson [EMAIL PROTECTED] wrote: Perhaps it would be useful to share the fact that Eclipse can't seem to write a BOM header (yet Dreamweaver can), so templates with double-byte character content won't be rendered correctly unless you save your files with that flag checked from Dreamweaver (or from notepad). Well, you don't technically need a BOM if the file specifies the charset / language in the appropriate metadata / cfprocessing directive etc. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278784 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Topic Suggestions: Multi Language Applications in CF in Theory and Practice
Dave Anderson wrote: Perhaps it would be useful to share the fact that Eclipse can't seem to write a BOM header (yet Dreamweaver can), so templates with double-byte character content won't be rendered correctly unless you save your files with that flag checked from Dreamweaver (or from notepad). the BOM is optional for utf-8, follow good i18n practices you shouldn't have any problems w/cfeclipse. ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278785 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Topic Suggestions: Multi Language Applications in CF in Theory and Practice
Not true! That may be true for French or Spanish, but try serving up content in Lao or Khmer, and you'll see a bunch of squares where the text should be. On 5/21/07, Dave Anderson [EMAIL PROTECTED] wrote: Perhaps it would be useful to share the fact that Eclipse can't seem to write a BOM header (yet Dreamweaver can), so templates with double-byte character content won't be rendered correctly unless you save your files with that flag checked from Dreamweaver (or from notepad). Well, you don't technically need a BOM if the file specifies the charset / language in the appropriate metadata / cfprocessing directive etc. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278786 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Topic Suggestions: Multi Language Applications in CF in Theory and Practice
I may have to take that back. Not sure I've tried the cfprocessingdirective! I do know that meta tags are insufficient when it comes to some of the double-byte stuff. Not true! That may be true for French or Spanish, but try serving up content in Lao or Khmer, and you'll see a bunch of squares where the text should be. On 5/21/07, Dave Anderson [EMAIL PROTECTED] wrote: Perhaps it would be useful to share the fact that Eclipse can't seem to write a BOM header (yet Dreamweaver can), so templates with double-byte character content won't be rendered correctly unless you save your files with that flag checked from Dreamweaver (or from notepad). Well, you don't technically need a BOM if the file specifies the charset / language in the appropriate metadata / cfprocessing directive etc. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278787 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Topic Suggestions: Multi Language Applications in CF in Theory and Practice
Dave Anderson wrote: Not true! That may be true for French or Spanish, but try serving up content in Lao or Khmer, and you'll see a bunch of squares where the text should be. well i do that all the time. having a BOM is always a good idea but following good i18n practices is an even better one. btw there is no locale for khmer you'll only get lao from the cldr (which practically means using icu4j instead of core java/native cf LS functions). ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278788 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4