[cfaussie] Re: programmer etiquette and writing good CF code
I just wanted to point out a few things to anyone in the know. Barry is currently doing work for me, fixing up the project he is working on, and that he has talked about here. I am not the original coder on this project. A contractor was brought in for this. For a variety of reasons, the people responsible for explaining coding standards and reviewing code, seem to have done neither (again not me). The contractor was sold to us as a 'senior developer' with extensive experience. The contractor in question has, to my knowledge, never posted to this list, so no one here is likely to know him/her. The contractor in question does not do CF work anymore. (there IS a God!) I have worked previously on this project a little, after the original contractor but before Barry. Most of my time was spent equally pulling my hair out and fixing mind bogglingly stupid code. Barry was warned before he started that the code he would be working on was very bad. (clearly he thought I was exagerating!) This project was not a badly evolved and misbegotten prototype stretched beyond its life or intent. This was a built from scratch, designed, prototyped project, with screen layouts, business rules, etc, and a very healthy original development schedule. Admittedly, the original documentation was messy and not well layed out, but it was all there and there were also people to ask if anything wasn't clear. I just wanted to point these things out as I didn't want anyone to think for 1 second that I was responsible for this awful code, and I also didn't want anyone considering doing work for us (we're hiring!) to be concerned that this was the norm or even a small chunk of the type of code we have. It is a single, one off, really painfully awful piece of code amongst a sea of otherwise average code. Regards Darren On Mar 14, 12:59 pm, barry.b [EMAIL PROTECTED] wrote: (I thought the teacher in me was well and truly burnt to a crisp... aparently not...) hyperthetical * you're finishing off someone elses project, it's only a couple of weeks of work * that person is someone that you know/see around the traps * you know you're not the world's gift to coding but trying to follow best practices has put you in good stead for years (and reduced the amount of obscure bugs) * the code is full of (lets say) less than optomial practices eg - SELECT * - reuse of the variable ID on the same page for diffent usages/ contexts - hardly any use of scopes (esp URL and FORM) with lots of using isDefined() - not a cfqueryparam to be seen. do you a) shoot them when next you meet then dance on their grave. b) make a semi formal list of what's wrong and why then bail them up to go on chapter-and-verse about it c) make an informal comment on next meeting that it had a few rough edges and leave it at that d) keep your mouth shut, your head down and keep saying to yourself it's only for a short while... thoughts? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Creating Excel files with multiple worksheets
CF8 is not an option on this project yet. On Mar 27, 3:52 pm, Andrew Scott [EMAIL PROTECTED] wrote: I suppose you don't have the luxury of running it under Coldfusion 8:-) Andrew Scott Senior Coldfusion Developer Aegeon Pty. Ltd.www.aegeon.com.au Phone: +613 9015 8628 Mobile: 0404 998 273 -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Tracey Sent: Thursday, 27 March 2008 4:40 PM To: cfaussie Subject: [cfaussie] Creating Excel files with multiple worksheets Making an Excel files come out of your CF pages is pretty straight forward with tables and CFContent. Is there any way to make an Excel file that has multiple worksheets? The solutions I've found involve calling COM objects for a server copy of Excel, but my server doesn't have Excel installed so I can't use that method. How would you make a second (or third) worksheet in an Ecel output file without having Excel installed on the server? Regards Darren- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Creating Excel files with multiple worksheets
Ok, Any of these work for you? http://www.activexls.com/products/java_professional.aspx?gclid=CL6SsY_ZrJICF QkvgwodslwRQg http://poi.apache.org/hssf/index.html -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Tracey Sent: Thursday, 27 March 2008 5:10 PM To: cfaussie Subject: [cfaussie] Re: Creating Excel files with multiple worksheets CF8 is not an option on this project yet. On Mar 27, 3:52 pm, Andrew Scott [EMAIL PROTECTED] wrote: I suppose you don't have the luxury of running it under Coldfusion 8:-) Andrew Scott Senior Coldfusion Developer Aegeon Pty. Ltd.www.aegeon.com.au Phone: +613 9015 8628 Mobile: 0404 998 273 -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Tracey Sent: Thursday, 27 March 2008 4:40 PM To: cfaussie Subject: [cfaussie] Creating Excel files with multiple worksheets Making an Excel files come out of your CF pages is pretty straight forward with tables and CFContent. Is there any way to make an Excel file that has multiple worksheets? The solutions I've found involve calling COM objects for a server copy of Excel, but my server doesn't have Excel installed so I can't use that method. How would you make a second (or third) worksheet in an Ecel output file without having Excel installed on the server? Regards Darren- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Creating Excel files with multiple worksheets
http://poi.apache.org/hssf/index.html Ben Nadel has written a nice CFC wrapper for some POI functionality. It has methods to create sheets and write excel files, though I've only used it for reading (which works well). http://www.bennadel.com/blog/624-ColdFusion-POIUtility-cfc-Updates-And-Bug-Fixes.htm Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Creating Excel files with multiple worksheets
I second Ryan's suggestion. We have done it for our site, and there is no need for Java or other server extensions, just write out a properly formated Excel 2003+ XML file. As a bonus you to multiple worksheets, you also get formatting, cell sizing, text wrapping, etc. On Mar 27, 4:48 pm, Ryan Sabir [EMAIL PROTECTED] wrote: Generate it as XML.. 1. Manually create the spreadsheet in Excel, with the multiple worksheets. 2. Save it as XML 3. Examine the XML in a text editor and use your mad CF skillz to recreate the content dynamically 4. Profit! -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Tracey Sent: Thursday, 27 March 2008 4:40 PM To: cfaussie Subject: [cfaussie] Creating Excel files with multiple worksheets Making an Excel files come out of your CF pages is pretty straight forward with tables and CFContent. Is there any way to make an Excel file that has multiple worksheets? The solutions I've found involve calling COM objects for a server copy of Excel, but my server doesn't have Excel installed so I can't use that method. How would you make a second (or third) worksheet in an Ecel output file without having Excel installed on the server? Regards Darren --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Creating Excel files with multiple worksheets
Yeah I would agree with Brontojoris...I have used code written as per Ryan's post, to output in Excel and it was pretty neat. On Mar 27, 8:40 pm, Brontojoris [EMAIL PROTECTED] wrote: I second Ryan's suggestion. We have done it for our site, and there is no need for Java or other server extensions, just write out a properly formated Excel 2003+ XML file. As a bonus you to multiple worksheets, you also get formatting, cell sizing, text wrapping, etc. On Mar 27, 4:48 pm, Ryan Sabir [EMAIL PROTECTED] wrote: Generate it as XML.. 1. Manually create the spreadsheet in Excel, with the multiple worksheets. 2. Save it as XML 3. Examine the XML in a text editor and use your mad CF skillz to recreate the content dynamically 4. Profit! -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Tracey Sent: Thursday, 27 March 2008 4:40 PM To: cfaussie Subject: [cfaussie] Creating Excel files with multiple worksheets Making an Excel files come out of your CF pages is pretty straight forward with tables and CFContent. Is there any way to make an Excel file that has multiple worksheets? The solutions I've found involve calling COM objects for a server copy of Excel, but my server doesn't have Excel installed so I can't use that method. How would you make a second (or third) worksheet in an Ecel output file without having Excel installed on the server? Regards Darren --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: Creating Excel files with multiple worksheets
Darren, besides the options mentioned so far, I'll note that I did a blog entry a couple months ago where I tried to gather in one place all the various ways, with links to resources with still more details: How can I process Excel files in CFML? Let me count the ways http://carehart.org/blog/client/index.cfm/2008/1/12/coldfusion_excel_xls_pro cessing BTW, I realize you're asking specifically about creating a file with multiple sheets. I haven't used each of these to be able to say which supports that, but I have to believe at least one of them would. Hope that's helpful. /charlie -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darren Tracey Sent: Thursday, March 27, 2008 1:40 AM To: cfaussie Subject: [cfaussie] Creating Excel files with multiple worksheets Making an Excel files come out of your CF pages is pretty straight forward with tables and CFContent. Is there any way to make an Excel file that has multiple worksheets? The solutions I've found involve calling COM objects for a server copy of Excel, but my server doesn't have Excel installed so I can't use that method. How would you make a second (or third) worksheet in an Ecel output file without having Excel installed on the server? Regards Darren --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] CF8 clustering - adding new instance
Hi, I've just installed CF8 and want to utilise the multi-server clustering on the same physical server. In CF Admin Instance Manager, I can see there is a samples instance already there but I can't find the default instance cfusion. If I add a new instance (e.g. Instance1) I can add Instance1 to a cluster in the Cluster Manager. As I can't find cfusion instance in the Cluster Manager, how can I add cfusion to the cluster which already have Instance1 in it? Please help. Regards, George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: CF8 clustering - adding new instance
Hi George, The 'cfusion' instance isn't seen in the Enterprise/Cluster Manager. You *might* be able to cluster cfusion and instance1 using the JRun Admin Console, but I wouldn't do it. Instead I'd recommend creating another instance (instance2) and then clustering that with instance1. The 'cfusion' instance is cloned to create other instances. So it might be a good idea to leave it in it's original state. Cheers. On Fri, Mar 28, 2008 at 2:57 PM, George Lu [EMAIL PROTECTED] wrote: Hi, I've just installed CF8 and want to utilise the multi-server clustering on the same physical server. In CF Admin Instance Manager, I can see there is a samples instance already there but I can't find the default instance cfusion. If I add a new instance (e.g. Instance1) I can add Instance1 to a cluster in the Cluster Manager. As I can't find cfusion instance in the Cluster Manager, how can I add cfusion to the cluster which already have Instance1 in it? Please help. Regards, George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: CF8 clustering - adding new instance
Thank you MrBuzzy. So can I still do load balance and fail-over with instance1 and instance2 (cluster)? And can I still use cfusion as default server to access my CF pages? On 28/03/2008, MrBuzzy [EMAIL PROTECTED] wrote: Hi George, The 'cfusion' instance isn't seen in the Enterprise/Cluster Manager. You *might* be able to cluster cfusion and instance1 using the JRun Admin Console, but I wouldn't do it. Instead I'd recommend creating another instance (instance2) and then clustering that with instance1. The 'cfusion' instance is cloned to create other instances. So it might be a good idea to leave it in it's original state. Cheers. On Fri, Mar 28, 2008 at 2:57 PM, George Lu [EMAIL PROTECTED] wrote: Hi, I've just installed CF8 and want to utilise the multi-server clustering on the same physical server. In CF Admin Instance Manager, I can see there is a samples instance already there but I can't find the default instance cfusion. If I add a new instance (e.g. Instance1) I can add Instance1 to a cluster in the Cluster Manager. As I can't find cfusion instance in the Cluster Manager, how can I add cfusion to the cluster which already have Instance1 in it? Please help. Regards, George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: CF8 clustering - adding new instance
Sorry mate, I'm not completely following you on that one...? I think the answer is yes On Fri, Mar 28, 2008 at 3:42 PM, George Lu [EMAIL PROTECTED] wrote: Thank you MrBuzzy. So can I still do load balance and fail-over with instance1 and instance2 (cluster)? And can I still use cfusion as default server to access my CF pages? On 28/03/2008, MrBuzzy [EMAIL PROTECTED] wrote: Hi George, The 'cfusion' instance isn't seen in the Enterprise/Cluster Manager. You *might* be able to cluster cfusion and instance1 using the JRun Admin Console, but I wouldn't do it. Instead I'd recommend creating another instance (instance2) and then clustering that with instance1. The 'cfusion' instance is cloned to create other instances. So it might be a good idea to leave it in it's original state. Cheers. On Fri, Mar 28, 2008 at 2:57 PM, George Lu [EMAIL PROTECTED] wrote: Hi, I've just installed CF8 and want to utilise the multi-server clustering on the same physical server. In CF Admin Instance Manager, I can see there is a samples instance already there but I can't find the default instance cfusion. If I add a new instance (e.g. Instance1) I can add Instance1 to a cluster in the Cluster Manager. As I can't find cfusion instance in the Cluster Manager, how can I add cfusion to the cluster which already have Instance1 in it? Please help. Regards, George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: CF8 clustering - adding new instance
What I try to say is I was intend to create a cluster for load-balancing and fail over with default server cfusion. If I create a cluster with just instance1 and instance2 which will have different http ports such as 8301 Is that mean I need to access my CF app via port 8301 not 80? e.g. http://servername:8301/ On 28/03/2008, MrBuzzy [EMAIL PROTECTED] wrote: Sorry mate, I'm not completely following you on that one...? I think the answer is yes On Fri, Mar 28, 2008 at 3:42 PM, George Lu [EMAIL PROTECTED] wrote: Thank you MrBuzzy. So can I still do load balance and fail-over with instance1 and instance2 (cluster)? And can I still use cfusion as default server to access my CF pages? On 28/03/2008, MrBuzzy [EMAIL PROTECTED] wrote: Hi George, The 'cfusion' instance isn't seen in the Enterprise/Cluster Manager. You *might* be able to cluster cfusion and instance1 using the JRun Admin Console, but I wouldn't do it. Instead I'd recommend creating another instance (instance2) and then clustering that with instance1. The 'cfusion' instance is cloned to create other instances. So it might be a good idea to leave it in it's original state. Cheers. On Fri, Mar 28, 2008 at 2:57 PM, George Lu [EMAIL PROTECTED] wrote: Hi, I've just installed CF8 and want to utilise the multi-server clustering on the same physical server. In CF Admin Instance Manager, I can see there is a samples instance already there but I can't find the default instance cfusion. If I add a new instance (e.g. Instance1) I can add Instance1 to a cluster in the Cluster Manager. As I can't find cfusion instance in the Cluster Manager, how can I add cfusion to the cluster which already have Instance1 in it? Please help. Regards, George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---
[cfaussie] Re: CF8 clustering - adding new instance
George, I am assuming as you really didn't say, and I am no expert at this so I am guessing. When you log into the cfide/administrator you can control the instances and clustering in there, I assume this is what you are doing and not the jrun management console! When you create a new instance this will run from a different port, when you cluster I strongly believe that it will share the port for the cluster (this is the bit I am not sure on). The clusters that you are trying to do, are they on the same VPS or machine? Or are you creating other VPS / servers for this. I strongly recommend multiple VPS or machines for clustering, but not critical for development though. There is also another mailing list on house of fusion that is dedicated to Coldfusion Servers, it might pay to post on there as well. Sorry I am not with it, I am only guessing as I have no real experience in clustering Coldfusion as yet. Andrew Scott Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au Phone: +613 9015 8628 Mobile: 0404 998 273 From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of George Lu Sent: Friday, 28 March 2008 4:28 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: CF8 clustering - adding new instance What I try to say is I was intend to create a cluster for load-balancing and fail over with default server cfusion. If I create a cluster with just instance1 and instance2 which will have different http ports such as 8301 Is that mean I need to access my CF app via port 8301 not 80? e.g. http://servername:8301/ On 28/03/2008, MrBuzzy [EMAIL PROTECTED] wrote: Sorry mate, I'm not completely following you on that one...? I think the answer is yes On Fri, Mar 28, 2008 at 3:42 PM, George Lu [EMAIL PROTECTED] wrote: Thank you MrBuzzy. So can I still do load balance and fail-over with instance1 and instance2 (cluster)? And can I still use cfusion as default server to access my CF pages? On 28/03/2008, MrBuzzy [EMAIL PROTECTED] wrote: Hi George, The 'cfusion' instance isn't seen in the Enterprise/Cluster Manager. You *might* be able to cluster cfusion and instance1 using the JRun Admin Console, but I wouldn't do it. Instead I'd recommend creating another instance (instance2) and then clustering that with instance1. The 'cfusion' instance is cloned to create other instances. So it might be a good idea to leave it in it's original state. Cheers. On Fri, Mar 28, 2008 at 2:57 PM, George Lu [EMAIL PROTECTED] wrote: Hi, I've just installed CF8 and want to utilise the multi-server clustering on the same physical server. In CF Admin Instance Manager, I can see there is a samples instance already there but I can't find the default instance cfusion. If I add a new instance (e.g. Instance1) I can add Instance1 to a cluster in the Cluster Manager. As I can't find cfusion instance in the Cluster Manager, how can I add cfusion to the cluster which already have Instance1 in it? Please help. Regards, George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~--~~~~--~~--~--~---