RE: Passing URL variables in a dynamic form action

2005-01-03 Thread Martin Parry
Mike - If you do a CFDUMP of the CGI scope you will see amongst other
things that you can use action="#cgi.script_name#?#cgi.query_string#"

p.s. What are the CF developer contract rates like in Oz at the moment ?

Martin Parry
Macromedia Certified Developer
http://www.BeetrootStreet.co.uk

-Original Message-
From: Mike Kear [mailto:[EMAIL PROTECTED] 
Sent: 03 January 2005 06:44
To: CF-Talk
Subject: Passing URL variables in a dynamic form action

Sorry this has been covered before but I can't bring my addled brain
to bear on the search to find it ... Perhaps some kind soul will help
me out ..

I have a form that is to appear in various locations in a dynamic
site,  - i want to pass the current page, with url variables to the
form as the action page, but i can't remember how ..

For example on a  page /goArticle.cfm?pid=548978  I want to have the
form tag as:

http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189127
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


IIS6 on Win2K3 with CFMX6.1, connection hotfix

2005-01-03 Thread Micha Schopman
I while ago I saw a Macromedia article about a slow connection between
CFMX61. and Win2K3's IIS6. This was due to bugs in IIS6, but Macromedia
provided a workaround to overcome the slow connection between the two. 

I just can't find any article on the Macromedia support website about
this, and I am convinced it existed. Someone happens to know the
article? I have searched for IIS6, Win2K3, CFMX6.1, ISAPI, Connector,
etc. but all I get is rubbish.

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380



~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189128
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: IIS6 on Win2K3 with CFMX6.1, connection hotfix

2005-01-03 Thread Micha Schopman
I found the article already:

http://www.macromedia.com/cfusion/knowledgebase/index.cfm?event=view&id=
KC.tn_19588&extid=tn_19588&dialogID=701096


Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189129
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Typesafe enum design pattern (another go)

2005-01-03 Thread Taco Fleur
 Just trying to implement the Typesafe Enum Design Pattern in ColdFusion,
and am looking for some feedback/input on the following code.
 
I have tried to get some feedback before on the Singleton design pattern,
but got not one response, so I am thinking;
1. This is not the list to post to for feedback, only problems.
2. There is no interest in these type of posts.
3. I was so way off that it wasn't even worth replying.
4. Fill in..
 
So here is another go at another design pattern..
 
 Following is the code to call the CFC
**

DataType = createObject( "component",
"_resource.class.database.microsoftSQLServer.DataType" ).init();







for ( Constant in DataType.instance )
{
 writeOutput( DataType.instance[ Constant ].getLower() & "" );
}




**
Following is the CFC itself

**



 

 

 
 

 
 this.instance = structNew();
 


 

  
  // Public static
  newConstant( name = "BIGINT", lower = -9223372036854775808, upper
= 9223372036854775807, type = "numeric" );
  newConstant( name = "INTEGER", lower = -2147483648, upper =
2147483647, type = "numeric" );
  newConstant( name = "SMALLINT", lower = -32768, upper = 32767,
type = "numeric" );
  newConstant( name = "TINYINT", lower = 0, upper = 255, type =
"numeric" );
  newConstant( name = "BIT", lower = 0, upper = 1, type = "numeric"
);
  newConstant( name = "DECIMAL", lower = "-10^38+1", upper =
"10^38-1", type = "numeric" );
  // Same as Decimal constant
  structInsert( this, "NUMERIC", this.DECIMAL, false );
  newConstant( name = "MONEY", lower = -922337203685477.5808, upper
= 922337203685477.5807, type = "numeric" );
  newConstant( name = "SMALLMONEY", lower = -214748.3648, upper =
214748.3647, type = "numeric" );
  newConstant( name = "FLOAT", lower = -1.79E+308, upper =
1.79E+308, type = "numeric" );
  newConstant( name = "REAL", lower = -3.40E+38, upper = 3.40E+38,
type = "numeric" );
  newConstant( name = "DATETIME", lower = createDate( 1753, 1, 1 ),
upper = createDate( , 12, 31 ), type = "date" );
  newConstant( name = "SMALLDATETIME", lower = createDate( 1900, 1,
1 ), upper = createDate( 2079, 6, 6 ), type = "date" );
  newConstant( name = "CHAR", lower = 0, upper = 8000, type =
"string" );
  newConstant( name = "TEXT", lower = 0, upper = 8000, type =
"string" );
  newConstant( name = "VARCHAR", lower = 0, upper = 2147483647, type
= "string" );
  newConstant( name = "NCHAR", lower = 0, upper = 4000, type =
"string" );
  newConstant( name = "NVARCHAR", lower = 0, upper = 4000, type =
"string" );
  newConstant( name = "BINARY", lower = 0, upper = 8000, type =
"string" );
  newConstant( name = "VARBINARY", lower = 0, upper = 8000, type =
"string" );
  newConstant( name = "IMAGE", lower = 0, upper = 2147483647, type =
"string" );

  // Return the instance of the Object
  return this;
  

 


 

  
  
  
  

  
  structInsert( this, arguments.name, createObject( "component",
"DataType" ).setConstant( lower = arguments.lower, upper = arguments.upper,
type = arguments.type ), false );
  // Create a reference in the this.instance structure
  structInsert( this.instance, arguments.name, this[ arguments.name
], false );

  return this;
  

 


 

  
  
  

  
  setUpper( upper = arguments.upper );
  setLower( lower = arguments.lower );
  setType( type = arguments.type );
  return this;
  

 


 

  

  
  variables.upper = arguments.upper;
  

 


 

  
  return variables.upper;
  

 


 

  

  
  variables.lower = arguments.lower;
  

 


 

  
  return variables.lower;
  

 


 

  

  
  variables.type = arguments.type;
  

 


 

  
  return variables.type;
  

 


 
 
Taco Fleur
 


~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189130
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


QofQ, buggy behaviour

2005-01-03 Thread Micha Schopman
I am experiencing weird behaviour on our production server, running the
exact same software & hardware configuration as our staging server. The
staging server returns everything back just normal, but the production
server doesn't like it. It is a very simple piece of code.



SELECT Name, Size, DateLastModified
FROM qryDirectoryContent 
WHERE Type = 'File'
ORDER BY Name


SELECT Name, Size, DateLastModified
FROM qryDirectoryContent 
WHERE Type = 'Dir'
ORDER BY Name






The message I get is this, and maybe it is because Size is a reserved
word in SQL, but still then, staging returns everything back just
normally.

Error Executing Database Query. 
Query Of Queries syntax error. Encountered "Size" at line
0, column 0. Incorrect Select List, Incorrect select column,

The error occurred in C:\persist.io.cfm: line 5 
3 : 
4 : 
5 : 
6 : SELECT Name, Size, DateLastModified
7 : FROM qryDirectoryContent


When I put quotations around the column Size, it returns the string Size
instead of the column 

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189131
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: QofQ, buggy behaviour

2005-01-03 Thread Micha Schopman
Soz... *slap* .. the code works on a higher form of CFMX .. *cough* ..
not on a fully patched CFMX6.1 machine. I just forgot this machine had
been fully assimilated by its older brother.

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380



~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189132
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Coldfusion & IIS behind firewall

2005-01-03 Thread David Manriquez
Hi there :


  I using host headers, same ip , same port , same CF server.
Only the http port is opened for non local conections.


Thanks for you help.

 

> -Mensaje original-
> De: Troy Murray [mailto:[EMAIL PROTECTED] 
> Enviado el: Sábado, 01 de Enero de 2005 12:31
> Para: CF-Talk
> Asunto: Re: Coldfusion & IIS behind firewall
> 
> How do you get to the two different sites when viewing on 
> your local network?  Is IIS using Host Headers or different 
> IP addresses to determine which site to send the user to?  If 
> it's using the IP address, and chances are your firewall's 
> WAN port has one IP address, that wouldn't work (at least not 
> how we have ours configured that way).  You'd need to use the 
> host headers feature in IIS to direct the person to the correct site.
> 
> -t
> 
> 
> 
> On Fri, 31 Dec 2004 08:06:39 -0400, David Manriquez 
> <[EMAIL PROTECTED]> wrote:
> > Hi CF-Talkers!
> > 
> >   I havea little problem here , hope someone can help me.
> > 
> > I have two sites in IIS configured with one Coldfusion MX 
> server. both sites are named site1.myhost.xx and 
> site2.myhost.xx and are viewable from the local network 
> working perfectly.!
> > Well i tried to put one of them online ( internet viewable 
> ) settings some parameters on my firewall and DNS.
> > 
> > The problem : I can see only the site1.myhost.xx itself with and 
> > index.cfm behind scene but if i call it directly or call 
> another file 
> > like http://site1.myhost.xx/index.cfm , i get an error 404
> > 
> > i have set only the port 80 open for internet connections..
> > Coldfusion uses another one?..
> > 
> > What' going on here?.. anyone can help me?.. please!
> > 
> > Happy New Year
> > 
> > 
> 
> 

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189133
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: QofQ, buggy behaviour

2005-01-03 Thread Micha Schopman
But still buggy .. this really is annoying.

A simple datatime formatting of datelastmodified throws an error just at
random dates.



#DateFormat(datelastmodified,"-mm-dd")#


coldfusion.runtime.Cast$DateStringConversionException: The value
"woensdag 8 september 2004 12:57:01 uur CEST" could not be
converted to a date.


Euhm .. okay.. 

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189134
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: QofQ, buggy behaviour

2005-01-03 Thread Katz, Dov B (IT)
Perhaps LSDateFormat would be more reliable with locale-specific date
formatting and parsing?

http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functa28.htm
 

I don't know enough about local specific stuff in CF, but just a
thought...

-dov

-Original Message-
From: Micha Schopman [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 8:14 AM
To: CF-Talk
Subject: RE: QofQ, buggy behaviour

But still buggy .. this really is annoying.

A simple datatime formatting of datelastmodified throws an error just at
random dates.



#DateFormat(datelastmodified,"-mm-dd")#


coldfusion.runtime.Cast$DateStringConversionException: The value
"woensdag 8 september 2004 12:57:01 uur CEST" could not be
converted to a date.


Euhm .. okay.. 

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort Tel 033-4535377, Fax
033-4535388 KvK Amersfoort 39081679, Rabo 39.48.05.380





~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189135
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: QofQ, buggy behaviour

2005-01-03 Thread Micha Schopman
I already fixed it with lsdateformat yes, I presumed CFMX would handle
datelastmodified despite of locale settings.

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189136
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Passing URL variables in a dynamic form action

2005-01-03 Thread Mike Kear
AH!! yes.. I KNEW it was right in front of me.  But I'm sorry given
it's a hot summer, and still new year hangover time, my brain just
wasn't working.

Thanks

As to contract rates, I'm not a good person to ask. I'm bloody glad to
see the back of 2004. It was the worst year financially for me since
1981.   For the last 11 years, I've earned about 2/3 of my income from
freelancing, and in 2004, up till November 15, I had 14 paid days
work, and all of that at a rate less than half what I was earning for
most of the previous 5 years.   Most of the people I contacted during
the year - HUNDREDS of them - simply didnt have the manners to respond
in any way, so I dont know how I did with them.  Never got a response,
even to advertised positions.  Of those I did get to talk to,  most
said they weren't making any new dvelopment in ColdFusion, only doing
mods and bug fixes on their current sites.

Thats what prompted my question a few weeks ago that caused such a
stir - who's actually selling coldfusion servers in Australia - who's
actually working to increase the market for us..

I've gone and got Macromedia CFMX certification - to advanced level no
less - and I'm hoping that might prove to the people who were so
dismissive that they couldn't even bother to send an email that I have
both practical and theoretical skills and I know what i'm talking
about.

However others said they were having a bumper year, and that the
coldfusion market here was strong and go-ahead.  I guess you have to
be on some kind of 'inner circle' or something.   Or know the secret
handshake.

I finish 4 weeks good work at a Government Department in a couple of
weeks, and I'm back hunting again.   So there's yet another big
department (they say they have Australia's largest intranet)  doing no
new development in CF and planning to move to other technology.  
Frankly I dont relish hunting for work during January.  But that's how
it's turned out.

My advice?   Don't sell up and come to Australia if you plan to rely
on ColdFusion development for your source of income.

Cheers
Mike Kear
Windsor, NSW, Australia
Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month



On Mon, 3 Jan 2005 08:07:39 -, Martin Parry
<[EMAIL PROTECTED]> wrote:
> Mike - If you do a CFDUMP of the CGI scope you will see amongst other
> things that you can use action="#cgi.script_name#?#cgi.query_string#"
> 
> p.s. What are the CF developer contract rates like in Oz at the moment ?
> 
> Martin Parry
> Macromedia Certified Developer
> http://www.BeetrootStreet.co.uk
> 
>

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189137
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Passing URL variables in a dynamic form action

2005-01-03 Thread Martin Parry
Sounds like you've had a shitty time of it lately.

Yes, our intention has always been to move to Oz, as I was offered CF
work at $75 per hour about 3 years ago (I'm a slow mover so never got
round to doing it :$ )

I noticed you had advanced - well done. I've bought Ben Forta's study
guide and I'm gonna refresh my memory and see what new features I've
missed. I've been simply too busy doing the grind to keep up to date.

Hope things improve for you !!

CYA

Martin Parry
Macromedia Certified Developer
http://www.BeetrootStreet.co.uk

-Original Message-
From: Mike Kear [mailto:[EMAIL PROTECTED] 
Sent: 03 January 2005 13:30
To: CF-Talk
Subject: Re: Passing URL variables in a dynamic form action

AH!! yes.. I KNEW it was right in front of me.  But I'm sorry given
it's a hot summer, and still new year hangover time, my brain just
wasn't working.

Thanks

As to contract rates, I'm not a good person to ask. I'm bloody glad to
see the back of 2004. It was the worst year financially for me since
1981.   For the last 11 years, I've earned about 2/3 of my income from
freelancing, and in 2004, up till November 15, I had 14 paid days
work, and all of that at a rate less than half what I was earning for
most of the previous 5 years.   Most of the people I contacted during
the year - HUNDREDS of them - simply didnt have the manners to respond
in any way, so I dont know how I did with them.  Never got a response,
even to advertised positions.  Of those I did get to talk to,  most
said they weren't making any new dvelopment in ColdFusion, only doing
mods and bug fixes on their current sites.

Thats what prompted my question a few weeks ago that caused such a
stir - who's actually selling coldfusion servers in Australia - who's
actually working to increase the market for us..

I've gone and got Macromedia CFMX certification - to advanced level no
less - and I'm hoping that might prove to the people who were so
dismissive that they couldn't even bother to send an email that I have
both practical and theoretical skills and I know what i'm talking
about.

However others said they were having a bumper year, and that the
coldfusion market here was strong and go-ahead.  I guess you have to
be on some kind of 'inner circle' or something.   Or know the secret
handshake.

I finish 4 weeks good work at a Government Department in a couple of
weeks, and I'm back hunting again.   So there's yet another big
department (they say they have Australia's largest intranet)  doing no
new development in CF and planning to move to other technology.  
Frankly I dont relish hunting for work during January.  But that's how
it's turned out.

My advice?   Don't sell up and come to Australia if you plan to rely
on ColdFusion development for your source of income.

Cheers
Mike Kear
Windsor, NSW, Australia
Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month



On Mon, 3 Jan 2005 08:07:39 -, Martin Parry
<[EMAIL PROTECTED]> wrote:
> Mike - If you do a CFDUMP of the CGI scope you will see amongst other
> things that you can use action="#cgi.script_name#?#cgi.query_string#"
> 
> p.s. What are the CF developer contract rates like in Oz at the moment
?
> 
> Martin Parry
> Macromedia Certified Developer
> http://www.BeetrootStreet.co.uk
> 
>



~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189138
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Passing URL variables in a dynamic form action

2005-01-03 Thread Micha Schopman
Mike,

Learn something extra .. do Java, do .NET, make handmade carpets..,
really. According to the hot discussions ColdFusion seems to be pretty
popular in the US, but overhere there is the same situation as you have
.. "ColdFusion .. euhm.. what is that?" ;)  

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380



~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189139
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


SOT: RegEx help

2005-01-03 Thread Todd
I would post this to the RegEx list, but I'm short on time and the HoF web site 
is giving me fits when I try to subscribe. :)

I just got a major problem dumped in my lap.  We have about 1/2 a gig of pure 
HTML files that are screwed up and the boss wants them fixed yesterday.  I'm 
writing a CF script to automate the updating of all of these files, but I am 
not very good with RegEx's and the guy who was good with them is no longer with 
the company.

All of the HTML files contain a line somewhere in them that looks like this:

Actors: Jane Doe,Sally Smith,Mary-Lou,Bob Dobbs,Dude,Stan Cox, 
etc.

I need find that line and make it look like this:

Actors: Jane Doe, Sally Smith, Mary-Lou, Bob Dobbs, Dude, Stan Cox, 
etc.

Basically, I need to make sure there is at least one space after each comma.  
There can be more than one, so checking for an existing space isn't an issue.

I would be rather grateful if anyone could help me out with this.



~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189140
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: IIS6 on Win2K3 with CFMX6.1, connection hotfix

2005-01-03 Thread Kelly Tetterton
Could this be what you're referring to (posted to CF-Talk, 9.22.04)?:



A customer recently pointed out to us that our IIS6 Windows 20003 web srever 
connector performance appeared substantially worse than the web server 
connector performance on IIS5 and earlier.

We did a little digging and came upon the Microsoft knowledge base article 
below.

The customer reran his tests using the suggested resolution and confirmed that 
with the suggested registry setting our IIS6 performance is slightly better 
than our IIS5 performance, as it should be. 

We'll publish this as a TechNote shortly, but if you're on IIS6, check it out.

Damon
---
IIS6 BUG: You notice that IIS 6.0 is slower than IIS 5.0 when you use the 
WriteClient API to send data

http://support.microsoft.com/default.aspx?scid=kb;EN-US;840875

The ISAPI connector is using the synchronous WriteClient() API.  Windows 2003 
SP1 is expected to contain a fix for this issue. 

*

-Original Message-
From: Micha Schopman [mailto:[EMAIL PROTECTED]
Sent: Monday, January 03, 2005 2:42 AM
To: CF-Talk
Subject: IIS6 on Win2K3 with CFMX6.1, connection hotfix


I while ago I saw a Macromedia article about a slow connection between
CFMX61. and Win2K3's IIS6. This was due to bugs in IIS6, but Macromedia
provided a workaround to overcome the slow connection between the two. 

I just can't find any article on the Macromedia support website about
this, and I am convinced it existed. Someone happens to know the
article? I have searched for IIS6, Win2K3, CFMX6.1, ISAPI, Connector,
etc. but all I get is rubbish.

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380





~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189141
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: SOT: RegEx help

2005-01-03 Thread Ben Doom
Well, it seems to me that there should be a space after every comma, 
anyway, so couldn't you just do a simple replace() to replace commas 
with a comma and a space?

--Ben

Todd wrote:
> I would post this to the RegEx list, but I'm short on time and the
> HoF web site is giving me fits when I try to subscribe. :)
> 
> I just got a major problem dumped in my lap.  We have about 1/2 a gig
> of pure HTML files that are screwed up and the boss wants them fixed
> yesterday.  I'm writing a CF script to automate the updating of all
> of these files, but I am not very good with RegEx's and the guy who
> was good with them is no longer with the company.
> 
> All of the HTML files contain a line somewhere in them that looks
> like this:
> 
> Actors: Jane Doe,Sally Smith,Mary-Lou,Bob Dobbs,Dude,Stan
> Cox, etc.
> 
> I need find that line and make it look like this:
> 
> Actors: Jane Doe, Sally Smith, Mary-Lou, Bob Dobbs, Dude,
> Stan Cox, etc.
> 
> Basically, I need to make sure there is at least one space after each
> comma.  There can be more than one, so checking for an existing space
> isn't an issue.
> 
> I would be rather grateful if anyone could help me out with this.
> 
> 
> 
> 

~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189142
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: SOT: RegEx help

2005-01-03 Thread Todd
Well, this is an SEO thing and I wasn't sure if having extra spaces all over 
the place in the meta tags and everywhere else would cause any confusion.

- Original Message - 
From: "Ben Doom" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Monday, January 03, 2005 9:36 AM
Subject: Re: SOT: RegEx help


> Well, it seems to me that there should be a space after every comma,
> anyway, so couldn't you just do a simple replace() to replace commas
> with a comma and a space?
>
> --Ben 


~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189143
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Biz-Dev Business Development list

2005-01-03 Thread Michael Dinowitz
I've just started the Biz-Dev Business Development list oh HoF. This list is 
designed for discussion, questions and answers about various business topics 
that we all deal with.
Topics include:
SEO
Advertising
Marketing
Business Planning/Development
etc.
For those signed into the HoF system, please go to:
http://www.houseoffusion.com/cf_lists/threads.cfm/46
and subscribe

Thank you

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189144
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: IIS6 on Win2K3 with CFMX6.1, connection hotfix

2005-01-03 Thread Micha Schopman
Kelly could be,

I have tried method 2 of the provided workarounds. Anyone tried method 1
or even both? If you tried both, did you notice any difference between
the both?

I don't understand though why there isn't a patch for this as a registry
hotfix on the Macromedia website for this. Ok, it is a IIS6 problem, but
it affects CFMX6.1 :)

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380



~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189145
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: SOT: RegEx help

2005-01-03 Thread Ben Doom
The reason that I ask is that I don't see a quick way to do what you 
originally asked.  But there are ways.  Here's the quickest (from a 
coding point of view, if not a processing point of view) that I can 
think of

There's a UDF on cflib.org called ReExtract() (I think that's right) 
that you should be able to use like this:

toBeReplaced = reextract(text, ".*?.*?");
text = replace(text, tobereplaced, replace(tobereplaced, ",", ", ", "all"));

Loop on that until you've got them all (assuming there's more than one 
per page).  Or, if reExtract() can produce an array, you can loop over 
that.  I've never used it, so YMMV.

Anyway, this is (obviously) untested, but should point you in the right 
direction.  If you need more help, feel free to ask.

--Ben

Todd wrote:
> Well, this is an SEO thing and I wasn't sure if having extra spaces all over 
> the place in the meta tags and everywhere else would cause any confusion.
> 
> - Original Message - 
> From: "Ben Doom" <[EMAIL PROTECTED]>
> To: "CF-Talk" 
> Sent: Monday, January 03, 2005 9:36 AM
> Subject: Re: SOT: RegEx help
> 
> 
> 
>>Well, it seems to me that there should be a space after every comma,
>>anyway, so couldn't you just do a simple replace() to replace commas
>>with a comma and a space?
>>
>>--Ben 
> 
> 
> 
> 

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189146
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: (ot - admin) advertisers

2005-01-03 Thread Jerry Johnson
I'd join. And post. 


>If there was a list that handled SEO, Advertising and other site business 
>things, would you both join and post?


Jerry Johnson
Web Developer
Dolan Media Company


~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189147
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Typesafe enum design pattern (another go)

2005-01-03 Thread Dawson, Michael
You might want to post this on the list at cfczone.org.

(This is a bit over my head, but I can, at least, point you to a list
dedicated to CFCs.) 

-Original Message-
From: Taco Fleur [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 4:53 AM
To: CF-Talk
Subject: Typesafe enum design pattern (another go)

 Just trying to implement the Typesafe Enum Design Pattern in
ColdFusion, and am looking for some feedback/input on the following
code.
 
I have tried to get some feedback before on the Singleton design
pattern, but got not one response, so I am thinking; 1. This is not the
list to post to for feedback, only problems.
2. There is no interest in these type of posts.
3. I was so way off that it wasn't even worth replying.
4. Fill in..
 
So here is another go at another design pattern..
 
 Following is the code to call the CFC
**

DataType = createObject( "component",
"_resource.class.database.microsoftSQLServer.DataType" ).init();
 





for ( Constant in DataType.instance )
{
 writeOutput( DataType.instance[ Constant ].getLower() & "" );
} 



**
Following is the CFC itself

**



 

 

 
 

 
 this.instance = structNew();
 


 

  
  // Public static
  newConstant( name = "BIGINT", lower = -9223372036854775808,
upper = 9223372036854775807, type = "numeric" );
  newConstant( name = "INTEGER", lower = -2147483648, upper =
2147483647, type = "numeric" );
  newConstant( name = "SMALLINT", lower = -32768, upper = 32767,
type = "numeric" );
  newConstant( name = "TINYINT", lower = 0, upper = 255, type =
"numeric" );
  newConstant( name = "BIT", lower = 0, upper = 1, type =
"numeric"
);
  newConstant( name = "DECIMAL", lower = "-10^38+1", upper =
"10^38-1", type = "numeric" );
  // Same as Decimal constant
  structInsert( this, "NUMERIC", this.DECIMAL, false );
  newConstant( name = "MONEY", lower = -922337203685477.5808,
upper = 922337203685477.5807, type = "numeric" );
  newConstant( name = "SMALLMONEY", lower = -214748.3648, upper
= 214748.3647, type = "numeric" );
  newConstant( name = "FLOAT", lower = -1.79E+308, upper =
1.79E+308, type = "numeric" );
  newConstant( name = "REAL", lower = -3.40E+38, upper =
3.40E+38, type = "numeric" );
  newConstant( name = "DATETIME", lower = createDate( 1753, 1, 1
), upper = createDate( , 12, 31 ), type = "date" );
  newConstant( name = "SMALLDATETIME", lower = createDate( 1900,
1,
1 ), upper = createDate( 2079, 6, 6 ), type = "date" );
  newConstant( name = "CHAR", lower = 0, upper = 8000, type =
"string" );
  newConstant( name = "TEXT", lower = 0, upper = 8000, type =
"string" );
  newConstant( name = "VARCHAR", lower = 0, upper = 2147483647,
type = "string" );
  newConstant( name = "NCHAR", lower = 0, upper = 4000, type =
"string" );
  newConstant( name = "NVARCHAR", lower = 0, upper = 4000, type
= "string" );
  newConstant( name = "BINARY", lower = 0, upper = 8000, type =
"string" );
  newConstant( name = "VARBINARY", lower = 0, upper = 8000, type
= "string" );
  newConstant( name = "IMAGE", lower = 0, upper = 2147483647,
type = "string" );

  // Return the instance of the Object
  return this;
  

 


 

  
  
  
  

  
  structInsert( this, arguments.name, createObject( "component",
"DataType" ).setConstant( lower = arguments.lower, upper =
arguments.upper, type = arguments.type ), false );
  // Create a reference in the this.instance structure
  structInsert( this.instance, arguments.name, this[
arguments.name ], false );

  return this;
  

 


 

  
  
  

  
  setUpper( upper = arguments.upper );
  setLower( lower = arguments.lower );
  setType( type = arguments.type );
  return this;
  

 


 

  

  
  variables.upper = arguments.upper;
  

 


 

  
  return variables.upper;
  

 


 

  

  
  variables.lower = arguments.lower;
  

 


 

  
  return variables.lower;
  

 


 

  

  
  variables.type = arguments.type;
  

 


 

  
  return variables.type;
  

 


 
 
Taco Fleur
 




~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189148
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusi

Re: (ot - admin) advertisers

2005-01-03 Thread Christian Cantrell
I'd definitely join and participate.

Christian

On Jan 2, 2005, at 11:23 PM, Michael Dinowitz wrote:

> Actually, based on the interest people have brought up, I've got a 
> general
> question for people here. If there was a list that handled SEO, 
> Advertising
> and other site business things, would you both join and post?
> We have a huge amount of people on HoF and there has to be a lot of 
> info
> here that can be shared. This all came up due to an off list 
> discussion with
> someone here about their site and what they make in non-google type 
> ads.
> Really shook me.


~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189149
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: (ot - admin) advertisers

2005-01-03 Thread Michael Dinowitz
It's live:
http://www.houseoffusion.com/cf_lists/threads.cfm/46

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189150
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Including Coldfusion content in an asp page

2005-01-03 Thread Pedro Mendes
Hello all,

 

I have a .cfm that produces some lines of content, from a Database. I
want to include this .cfm file in an .asp page. Can this be done with an
asp INCLUDE? Or do I need some kind of Web service to get the two
servers to talk?

 

Any help will be most welcome, as usual. 

Please reply privately if you prefer.

 

Many thanks in advance, and have a great 2005!

Pedro
http://www.pedromendes.com  



~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189151
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: query optimization

2005-01-03 Thread Paul Malan
> Yes. It also reminds me why I dislike the graphical execution
> plans from MS SQL Server :-)

How does one get a view other than the graphical representation?  I
poked around a bit but didn't know what to look for...

> It looks like eliminating some rows earlier may help here:

I implemented your latest version of the query and it actually
returned in the same amount of time as your version previous, to the
second.

But, it is a huge improvement over the way it was when you began
offering help, for which I'm grateful.  It seems my best permanent
solution will be to create a separate db and use DTS to bring the data
I need for my reports into a more concise, report-friendly structure,
and with your improvements in place the current system will be
workable while I work on implementing that.

Thanks for helping me learn a few things about sql!

-Paul

~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189152
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Bandwidth Throttler

2005-01-03 Thread Robert Everland III
I need to do some testing on a flash remoting project and there seems to be 
some issues with slower speeds. Does anyone know of any free or paid bandwidth 
throttlers that allow me to install it on my workstation and limit the amount 
of bandwith. 



Bob Everland

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189153
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


JSP Question (Does query caching existing)

2005-01-03 Thread Ciliotta, Mario
Hi,

Sorry for asking a JSP question here but I have not been able to find a
mailing as good as CFTALK for Java/JSP issues.

I am in the process of converting a CF application over to JSP running under
WebLogic as practice to see how long it takes to do the same coding vs. using
CFMX. 

In my CF application, I cache my queries since the data really changes and to
handle this I have a scheduled job that runs to flush and update the cached
queries if there are any changes.  Is there a way to cache the query results
in a JSP page?  I have to have the page requery the database every time
someone goes to page to look up an item.  Basically the items only change once
a year, if that.

Also does anyone know of a good JSP/JAVA equivalent of CFTALK.

Thanks
Mario




~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189154
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: query optimization

2005-01-03 Thread Jochem van Dieten
Paul Malan wrote:
>> Yes. It also reminds me why I dislike the graphical execution
>> plans from MS SQL Server :-)
> 
> How does one get a view other than the graphical representation?  I
> poked around a bit but didn't know what to look for...

http://www.sql-server-performance.com/query_execution_plan_analysis.asp

But the problem is both with 'MS SQL server' and with 
'graphical'. I created a dummy database with the same schema as 
your database (except for the indexes) and got the following 
execution plan in PostgreSQL:

Unique  (cost=4.09..4.12 rows=1 width=60) (actual time=0.38..0.38 
rows=1 loops=1)
   ->  Sort  (cost=4.09..4.09 rows=1 width=60) (actual 
time=0.38..0.38 rows=1 loops=1)
 Sort Key: t.tkt_code, t.tkt_date, t.truck_code, t.po, 
t.truck_net_wgt, t.hler_code, o.proj_code, o.cust_job_num, 
o.cust_code, o.order_code, k.curr_driv_empl_code, l.prod_descr
 ->  Nested Loop  (cost=0.00..4.08 rows=1 width=60) 
(actual time=0.18..0.19 rows=1 loops=1)
   Join Filter: ("outer".order_code = "inner".order_code)
   ->  Nested Loop  (cost=0.00..3.06 rows=1 width=52) 
(actual time=0.14..0.15 rows=1 loops=1)
 Join Filter: ("outer".truck_code = 
"inner".truck_code)
 ->  Nested Loop  (cost=0.00..2.03 rows=1 
width=44) (actual time=0.10..0.10 rows=1 loops=1)
   Join Filter: ("outer".order_code = 
"inner".order_code)
   ->  Seq Scan on tick t 
(cost=0.00..1.01 rows=1 width=28) (actual time=0.04..0.04 rows=1 
loops=1)
   ->  Seq Scan on ordr o 
(cost=0.00..1.01 rows=1 width=16) (actual time=0.03..0.03 rows=1 
loops=1)
 ->  Seq Scan on truc k  (cost=0.00..1.01 
rows=1 width=8) (actual time=0.03..0.03 rows=1 loops=1)
   ->  Seq Scan on ordl l  (cost=0.00..1.01 rows=1 
width=8) (actual time=0.03..0.03 rows=1 loops=1)

This execution plan has a much higher information density and can 
still be read without any mouse hovering.

The graphical tools for PostgreSQL have an equally low 
information density: 
http://sources.redhat.com/rhdb/tools/rhdb_explain_0501_01.png


> I implemented your latest version of the query and it actually
> returned in the same amount of time as your version previous, to the
> second.

Did the execution plan change?

Jochem

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189155
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Including Coldfusion content in an asp page

2005-01-03 Thread Burns, John D
I believe BlueDragon (and maybe others) support some sort of CFM/ASP.net
including back and forth, but if you're just talking standard
CFMX/ASP.net or ASP you'd just have to use an equivalent of CFHTTP to
call the CFM page or maybe use an IFRAME or something to load the CFM
into.  As far as I know there is no way for ASP to trigger the CFM
server to parse the pages and return the content...at least no way that
is supported.


John Burns
Certified Advanced ColdFusion MX Developer
AI-ES Aeronautics, Web Developer

-Original Message-
From: Pedro Mendes [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 11:35 AM
To: CF-Talk
Subject: Including Coldfusion content in an asp page

Hello all,

 

I have a .cfm that produces some lines of content, from a Database. I
want to include this .cfm file in an .asp page. Can this be done with an
asp INCLUDE? Or do I need some kind of Web service to get the two
servers to talk?

 

Any help will be most welcome, as usual. 

Please reply privately if you prefer.

 

Many thanks in advance, and have a great 2005!

Pedro
http://www.pedromendes.com  





~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189156
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Including Coldfusion content in an asp page

2005-01-03 Thread Dave Watts
> I have a .cfm that produces some lines of content, from a 
> Database. I want to include this .cfm file in an .asp page. 
> Can this be done with an asp INCLUDE? Or do I need some kind 
> of Web service to get the two servers to talk?

No, I don't think you can do that with an ASP include. You could use HTTP to
invoke the CF URL directly, although this would be pretty inefficient. There
are various ActiveX controls that allow you to do this, although I don't
have much experience with them in production applications.

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!


~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189157
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2005-01-03 Thread mayo
Sorry for not responding earlier. My laptop was stolen. A big mess.

I'm on a shared host so the RAM is somewhat limited. However the client is a
small clothing and jewelry business. They have two stores and this is their
first venture into on-line sales. Currently they get about 200 unique
visitors a week. I don't think they will have over 10 concurrent users of
their shopping site for quite a while.

gil






-Original Message-
From: Martin Parry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 29, 2004 1:26 PM
To: CF-Talk
Subject: RE: shopping cart, session variables - best practices


I think we should really find out the capabilities of Mayo's server/host
before we can truly suggest one method over another. In high traffic
eComm sites I have seen superb performance using the method described.

If, however RAM is not a problem, he isn't experiencing high volumes and
is not on another server with xxx websites who all make excessive use of
session variables, then yes - maybe he should use session variables..

Mayo - please advise.

Martin Parry
Macromedia Certified Developer
http://www.BeetrootStreet.co.uk

-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]
Sent: 29 December 2004 18:02
To: CF-Talk
Subject: RE: shopping cart, session variables - best practices

> Use a structure for storing the basket contents by all means, however
> instead of session.basketContents, convert the structure to a WDDX
> object and store it as client.basketContents - That way you're not
using
> precious RAM but cheap disk space.

Storing application- and user-specific data is what precious RAM is for!

In an application environment with a single application server, you will
typically achieve significantly higher performance under load by storing
things in memory rather than fetching them from the database for each
page
request. You may need to provision your server's RAM adequately to
ensure
you have enough for the number of concurrent users you need to support,
but
RAM is comparatively cheap.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496




~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189159
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: JSP Question (Does query caching existing)

2005-01-03 Thread Dave Watts
> Sorry for asking a JSP question here but I have not been able 
> to find a mailing as good as CFTALK for Java/JSP issues.
> 
> I am in the process of converting a CF application over to 
> JSP running under WebLogic as practice to see how long it 
> takes to do the same coding vs. using CFMX. 
> 
> In my CF application, I cache my queries since the data 
> really changes and to handle this I have a scheduled job that 
> runs to flush and update the cached queries if there are any 
> changes.  Is there a way to cache the query results in a JSP 
> page?  I have to have the page requery the database every 
> time someone goes to page to look up an item.  Basically the 
> items only change once a year, if that.

I don't think there's anything built into JSP to do this directly. I think
that the Hibernate service lets you do this, however, so you might want to
take a look at that:

http://www.hibernate.org/

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!  


~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189160
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Well - I feel like an idiot.

2005-01-03 Thread Larry White
Regarding the original post I can't see any reason to use cflock at all.
Initializing the application variables, I would hope, would not entail using 
user specific values. If the initialization is the same no matter
which user does it, and you won't crash the server anymore, then why 
lock it?



>On Fri, 31 Dec 2004 14:18:07 -0500, Jim Davis
><[EMAIL PROTECTED]> wrote:
>> > http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFusion_MX_Appli
>> > cations_with_CFML/sharedVars6.htm
>> >
>> > http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFusion_MX_Appli
>> > cations_with_CFML/sharedVars8.htm#1154837
>> 
>> Yeah - but they're wrong.  ;^)
>
>And this is not likely to be corrected for Blackstone I'm afraid. The
>docs need a serious going over in terms of locking and that just isn't
>possible in the current timeframe. I suggest you visit the LiveDocs
>pages and add comments about this...
>-- 
>Sean A Corfield -- http://www.corfield.org/
>Team Fusebox -- http://www.fusebox.org/
>Breeze Me! -- http://www.corfield.org/breezeme
>Got Gmail? -- I have 6 invites to give away!
>
>"If you're not annoying somebody, you're not really alive."
>-- Margaret Atwood

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189161
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


How'd www.firstnight.org do over new years?

2005-01-03 Thread Cameron Childress
Jim,

Just following up on the thread from last week.  I'd be interested in
knowing how your site did over new years and to learn anything helpful
you might have to share about your experience with the new years eve
crush on the firstnight site.

-Cameron

-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell:  678.637.5072
aim:   cameroncf
email: [EMAIL PROTECTED]

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189162
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: (ot - admin) advertisers

2005-01-03 Thread C. Hatton Humphrey
> Actually, based on the interest people have brought up, I've got a general
> question for people here. If there was a list that handled SEO, Advertising
> and other site business things, would you both join and post?

I'd join in as well.

Hatton

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189163
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


comma separator

2005-01-03 Thread Greg Morphis
I have a query in which a list (selected from items in a select box)
are searched by. My problem stems from the fact that this list
contains City, St and these are being counted as 2 enteries, not 1. Is
there a way to change the default separator for a select box or does
anyone have any other suggestions? Query follows.

SELECT 
b.CONTRACTMARKET,b.CHANNEL,b.AGENTNAME, 
a.CONTRACTCONTACTNAME,
a.CONTRACTADDRESS, a.CONTRACTCITY, 
a.CONTRACTSTATE, a.CONTRACTZIP, 
b.COMMISSIONTYPE, b.AGREEMENTNAME,
to_char(b.STARTDATE,'mm/dd/') as STARTDATE, c.TERRITORIES,
b.ACCOUNTMANAGER
from agentinfo a, contractinfo b, TERRITORIES c
where a.agentid = b.agentid(+)
AND b.contractid = c.contractid(+)

AND lower(contractmarket) in ()



-- 
Auxilium meum a Domino

~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189164
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: comma separator

2005-01-03 Thread Dawson, Michael
You can't change the comma delimiter from submitted form values, but you
can use your own delimiter, such as the pipe "|", when creating your
select box.

Then, the user selects multiple addresses such as:
French Lick|IN,Evansville|IN,Houston|TX

Then, when you perform the query, you can replace "|" with a comma (and
space) as needed.

M!ke 

-Original Message-
From: Greg Morphis [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 12:45 PM
To: CF-Talk
Subject: comma separator

I have a query in which a list (selected from items in a select box) are
searched by. My problem stems from the fact that this list contains
City, St and these are being counted as 2 enteries, not 1. Is there a
way to change the default separator for a select box or does anyone have
any other suggestions? Query follows.

SELECT 
b.CONTRACTMARKET,b.CHANNEL,b.AGENTNAME,
a.CONTRACTCONTACTNAME,
a.CONTRACTADDRESS, a.CONTRACTCITY,
a.CONTRACTSTATE, a.CONTRACTZIP, 
b.COMMISSIONTYPE, b.AGREEMENTNAME,
to_char(b.STARTDATE,'mm/dd/') as STARTDATE, c.TERRITORIES,
b.ACCOUNTMANAGER

from agentinfo a, contractinfo b, TERRITORIES c
where a.agentid = b.agentid(+)
AND b.contractid = c.contractid(+)

AND lower(contractmarket) in
()



--
Auxilium meum a Domino



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189165
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: comma separator

2005-01-03 Thread Burns, John D
When you're looping over the values you could just increment the list by
2 on each so the first and second values go together, etc. 


John Burns
Certified Advanced ColdFusion MX Developer
AI-ES Aeronautics, Web Developer

-Original Message-
From: Greg Morphis [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 1:45 PM
To: CF-Talk
Subject: comma separator

I have a query in which a list (selected from items in a select box) are
searched by. My problem stems from the fact that this list contains
City, St and these are being counted as 2 enteries, not 1. Is there a
way to change the default separator for a select box or does anyone have
any other suggestions? Query follows.

SELECT 
b.CONTRACTMARKET,b.CHANNEL,b.AGENTNAME,
a.CONTRACTCONTACTNAME,
a.CONTRACTADDRESS, a.CONTRACTCITY,
a.CONTRACTSTATE, a.CONTRACTZIP, 
b.COMMISSIONTYPE, b.AGREEMENTNAME,
to_char(b.STARTDATE,'mm/dd/') as STARTDATE, c.TERRITORIES,
b.ACCOUNTMANAGER

from agentinfo a, contractinfo b, TERRITORIES c
where a.agentid = b.agentid(+)
AND b.contractid = c.contractid(+)

AND lower(contractmarket) in
()



--
Auxilium meum a Domino



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189166
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: comma separator

2005-01-03 Thread Greg Morphis
I added the pipe character at the end of each option value statements.
On the processing page I replaced '|,' with '|' and in my
 wrote:
> When you're looping over the values you could just increment the list by
> 2 on each so the first and second values go together, etc.
> 
> John Burns
> Certified Advanced ColdFusion MX Developer
> AI-ES Aeronautics, Web Developer
> 
> -Original Message-
> From: Greg Morphis [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 03, 2005 1:45 PM
> To: CF-Talk
> Subject: comma separator
> 
> I have a query in which a list (selected from items in a select box) are
> searched by. My problem stems from the fact that this list contains
> City, St and these are being counted as 2 enteries, not 1. Is there a
> way to change the default separator for a select box or does anyone have
> any other suggestions? Query follows.
> 
>SELECT
>b.CONTRACTMARKET,b.CHANNEL,b.AGENTNAME,
> a.CONTRACTCONTACTNAME,
>a.CONTRACTADDRESS, a.CONTRACTCITY,
> a.CONTRACTSTATE, a.CONTRACTZIP,
>b.COMMISSIONTYPE, b.AGREEMENTNAME,
> to_char(b.STARTDATE,'mm/dd/') as STARTDATE, c.TERRITORIES,
>b.ACCOUNTMANAGER
> 
>from agentinfo a, contractinfo b, TERRITORIES c
>where a.agentid = b.agentid(+)
>AND b.contractid = c.contractid(+)
>
>AND lower(contractmarket) in
> ( list="Yes">)
>
> 
> --
> Auxilium meum a Domino
> 
> 

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189167
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Well - I feel like an idiot.

2005-01-03 Thread Sean Corfield
On Mon, 03 Jan 2005 13:03:48 -0400, Larry White <[EMAIL PROTECTED]> wrote:
> Regarding the original post I can't see any reason to use cflock at all.
> Initializing the application variables, I would hope, would not entail using 
> user specific values. If the initialization is the same no matter
> which user does it, and you won't crash the server anymore, then why
> lock it?

It would all depend on what would happen if two threads tried to run
the "long initialization process" at the same time. If the code
creates objects and builds dependencies using application scope, it's
entirely possible you would get an inconsistent data setup.

If you're just setting a bunch of scalar variables, you won't have problems.

In other words, it all depends on whether the initialization code
itself could be subject to race conditions.
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189168
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Default Instance Values in CFC Bean

2005-01-03 Thread Dawson, Michael
Below is a simple component/bean I created to manage a simple database
table.  Please notice that I have a sortOrder which is a numeric type.
I specified "numeric" for the argument type as well as the return type
in the setSortOrder() and getSortOder() methods.

That means I need to specify:

in my pseudo-constructor area or I will get an error about a non-numeric
return type if I call the method with an "empty" CFC.

My final goal is to populate form fields.  If this is a new record, I
want the form fields to be empty.  If I am modifying an existing record,
I want the form fields to display the current record's values.

This is a simple example using a numeric value that I can easily set to
"0" or "-1" or some other non-valid value.  However, how would I
"default" a date/time return type?  I can't imagine any date/time that
would not be a valid date/time value.

Therefore, if I use:

my getDateStart() method will throw an error because "" is not a date.

If I use:

this is a valid date but not semantically correct.

Is the solution so simple as to specify string as the argument type and
return type of all methods?

Thanks
M!ke


* Component Starts Here *











































~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189169
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Default Instance Values in CFC Bean

2005-01-03 Thread Sean Corfield
On Mon, 3 Jan 2005 13:51:23 -0600, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> My final goal is to populate form fields.  If this is a new record, I
> want the form fields to be empty.  If I am modifying an existing record,
> I want the form fields to display the current record's values.

Bear in mind that form data is untyped by definition - it is all
strings. If you are using a bean to "mirror" a form, all of its
setters and getters should traffic in strings, not other data types.
The reason for that is that if user input is invalid, you won't be
able to set the bean values so you're bean won't get a chance to
validate data. The data from the bean will be valid after calling some
sort of validation method, not before.

Form data management is one of those cases where you often need a data
bean separate from your business object - since the business object
should only traffic in valid, typed data but the bean, by definition,
can't since it is dependent on the form.

This is more about user input validation strategies than default
instance variable values.

Hope that helps?
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189170
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Default Instance Values in CFC Bean

2005-01-03 Thread Dawson, Michael
As usual, you have helped tremendously.

I was using in-line, procedural validation (similar to one of Barney B's
example), but I didn't really consider having the bean validate itself.
I'm going to spend the rest of the afternoon building in a validate
method to my bean and see how it makes me feel.  I like how you
explained it.

Thanks, Sean!
M!ke

-Original Message-
From: Sean Corfield [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 2:33 PM
To: CF-Talk
Subject: Re: Default Instance Values in CFC Bean

On Mon, 3 Jan 2005 13:51:23 -0600, Dawson, Michael <[EMAIL PROTECTED]>
wrote:
> My final goal is to populate form fields.  If this is a new record, I 
> want the form fields to be empty.  If I am modifying an existing 
> record, I want the form fields to display the current record's values.

Bear in mind that form data is untyped by definition - it is all
strings. If you are using a bean to "mirror" a form, all of its setters
and getters should traffic in strings, not other data types.
The reason for that is that if user input is invalid, you won't be able
to set the bean values so you're bean won't get a chance to validate
data. The data from the bean will be valid after calling some sort of
validation method, not before.

Form data management is one of those cases where you often need a data
bean separate from your business object - since the business object
should only traffic in valid, typed data but the bean, by definition,
can't since it is dependent on the form.

This is more about user input validation strategies than default
instance variable values.

Hope that helps?
--
Sean A Corfield -- http://www.corfield.org/ Team Fusebox --
http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189171
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


"Proper Use" of Instance Variables

2005-01-03 Thread Dawson, Michael
I have a simple CFC that has a few instance variables in it.






...




In this component, I have the pairs of getters and setters such as:


...



...



I also have a validate method that needs to check the values of the
instance variables.  Which is the "better form" of accessing the
instance varibles?

1. ...
Or
2. ...

At first glance, the second option is shorter and would still
encapsulate any logic even inside its own CFC.  Would there be any
substantial overhead with calling a method over an instance variable?

Thanks
M!ke

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189172
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Default Instance Values in CFC Bean

2005-01-03 Thread Barney Boisvert
In the thread where I gave the inline validation example, I also
described string-based parameters, much like what Sean described.  I
wasn't recommending inline validation (if I recall correctly, I
recommended against it, for many of the same reasons Sean listed),
merely illustrating two different approaches for doing your
validation.  I much prefer a validate() method separate from the
individual getters and setters.

cheers,
barneyb

On Mon, 3 Jan 2005 14:42:38 -0600, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> As usual, you have helped tremendously.
> 
> I was using in-line, procedural validation (similar to one of Barney B's
> example), but I didn't really consider having the bean validate itself.
> I'm going to spend the rest of the afternoon building in a validate
> method to my bean and see how it makes me feel.  I like how you
> explained it.
> 
> Thanks, Sean!
> M!ke
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 9 invites.

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189173
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: "Proper Use" of Instance Variables

2005-01-03 Thread Barney Boisvert
This (or something very similar) has come up before.  I personally
like using the getters and setters everywhere, as they are the 'real'
properties of the CFC, not the instance variables.  At least that's
the theory.  As for overhead, there definitely is some, but it's going
to be quite minimal, and can be safely ignored, IMHO.

cheers,
barneyb

On Mon, 3 Jan 2005 15:17:46 -0600, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> I have a simple CFC that has a few instance variables in it.
> 
> 
> 
> 
> 
> 
> ...
> 
> 
> 
> In this component, I have the pairs of getters and setters such as:
> 
> 
> ...
> 
> 
> 
> ...
> 
> 
> I also have a validate method that needs to check the values of the
> instance variables.  Which is the "better form" of accessing the
> instance varibles?
> 
> 1. ...
> Or
> 2. ...
> 
> At first glance, the second option is shorter and would still
> encapsulate any logic even inside its own CFC.  Would there be any
> substantial overhead with calling a method over an instance variable?
> 
> Thanks
> M!ke
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 9 invites.

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189174
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Access SQL - Strip Spaces?

2005-01-03 Thread Jim McAtee
I have a small app in Access and I need to remove spaces from a field from 
within the SQL.  What is the appropriate function call? 


~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189175
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Default Instance Values in CFC Bean

2005-01-03 Thread Dawson, Michael
I stand corrected.  Sorry I mis-quoted you. 

-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 3:32 PM
To: CF-Talk
Subject: Re: Default Instance Values in CFC Bean

In the thread where I gave the inline validation example, I also
described string-based parameters, much like what Sean described.  I
wasn't recommending inline validation (if I recall correctly, I
recommended against it, for many of the same reasons Sean listed),
merely illustrating two different approaches for doing your validation.
I much prefer a validate() method separate from the individual getters
and setters.

cheers,
barneyb

On Mon, 3 Jan 2005 14:42:38 -0600, Dawson, Michael <[EMAIL PROTECTED]>
wrote:
> As usual, you have helped tremendously.
> 
> I was using in-line, procedural validation (similar to one of Barney 
> B's example), but I didn't really consider having the bean validate
itself.
> I'm going to spend the rest of the afternoon building in a validate 
> method to my bean and see how it makes me feel.  I like how you 
> explained it.
> 
> Thanks, Sean!
> M!ke
> 

--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 9 invites.



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189176
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Access SQL - Strip Spaces?

2005-01-03 Thread Dawson, Michael
UPDATE TableName
SET ColumnName = Replace(ColumnName, " " , "")

NOTE: This will update all records.  If you need to filter, add a WHERE
clause.

-Original Message-
From: Jim McAtee [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 3:48 PM
To: CF-Talk
Subject: Access SQL - Strip Spaces?

I have a small app in Access and I need to remove spaces from a field
from within the SQL.  What is the appropriate function call? 




~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189177
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: "Proper Use" of Instance Variables

2005-01-03 Thread Nathan Strutz
Personally, I like to use the raw instance variables, as it's easier to 
avoid the recursive caller mistake:

function validateName() {
   return yesNoFormat(len(getName()));
}
function getName(str) {
   if (not validateName()) {
 variables.instance.name=retrieveNameFromDB();
   }
   return variables.instance.name;
}

getName calls validateName, and vice versa. of course this is much 
harder to debug when your cfc is doing a lot more.

-nathan strutz


Barney Boisvert wrote:
> This (or something very similar) has come up before.  I personally
> like using the getters and setters everywhere, as they are the 'real'
> properties of the CFC, not the instance variables.  At least that's
> the theory.  As for overhead, there definitely is some, but it's going
> to be quite minimal, and can be safely ignored, IMHO.
> 
> cheers,
> barneyb
> 
> On Mon, 3 Jan 2005 15:17:46 -0600, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> 
>>I have a simple CFC that has a few instance variables in it.
>>
>>
>>
>>
>>
>>
>>...
>>
>>
>>
>>In this component, I have the pairs of getters and setters such as:
>>
>>
>>...
>>
>>
>>
>>...
>>
>>
>>I also have a validate method that needs to check the values of the
>>instance variables.  Which is the "better form" of accessing the
>>instance varibles?
>>
>>1. ...
>>Or
>>2. ...
>>
>>At first glance, the second option is shorter and would still
>>encapsulate any logic even inside its own CFC.  Would there be any
>>substantial overhead with calling a method over an instance variable?
>>
>>Thanks
>>M!ke
>>
> 
> 


~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189178
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Access SQL - Strip Spaces?

2005-01-03 Thread Larry White
Do you want to remove all spaces, or just leading and lagging.
If the latter you can use the trim(fieldname) function instead
of replace()

>I have a small app in Access and I need to remove spaces from a field from 
>within the SQL.  What is the appropriate function call?

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189179
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: "Proper Use" of Instance Variables

2005-01-03 Thread Dawson, Michael
One more quick question...

Should validate() return something (string, array, CFC, whatever)?

Or, should validate() return void and then require me to call
"hasErrors()"?

What is the norm, if there is one?

I guess if validate() returns an error-handler CFC, I can call its
hasErrors() method.  That would seem to be the best way to reuse code
throughout my app.

Thanks
M!ke

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189180
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Default Instance Values in CFC Bean

2005-01-03 Thread Barney Boisvert
No worries at all.  Just don't want an endorsement on my behalf
floating around for the wrong thing.  ;)  I know people respect my
opinion, and I'd hate for anyone to end up wasting time because of an
opinion voiced on my behalf that wasn't accurate.

cheers,
barneyb

On Mon, 3 Jan 2005 15:49:36 -0600, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> I stand corrected.  Sorry I mis-quoted you.
> 
> -Original Message-
> From: Barney Boisvert [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 03, 2005 3:32 PM
> To: CF-Talk
> Subject: Re: Default Instance Values in CFC Bean
> 
> In the thread where I gave the inline validation example, I also
> described string-based parameters, much like what Sean described.  I
> wasn't recommending inline validation (if I recall correctly, I
> recommended against it, for many of the same reasons Sean listed),
> merely illustrating two different approaches for doing your validation.
> I much prefer a validate() method separate from the individual getters
> and setters.
> 
> cheers,
> barneyb
> 
> On Mon, 3 Jan 2005 14:42:38 -0600, Dawson, Michael <[EMAIL PROTECTED]>
> wrote:
> > As usual, you have helped tremendously.
> >
> > I was using in-line, procedural validation (similar to one of Barney
> > B's example), but I didn't really consider having the bean validate
> itself.
> > I'm going to spend the rest of the afternoon building in a validate
> > method to my bean and see how it makes me feel.  I like how you
> > explained it.
> >
> > Thanks, Sean!
> > M!ke
> >
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 9 invites.

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189181
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Including Coldfusion content in an asp page

2005-01-03 Thread amanda l
you could try using xmlhttp (an activex control) - it works well pulling 
content like this into an asp page.

>I have a .cfm that produces some lines of content, from a Database. I
>want to include this .cfm file in an .asp page. Can this be done with an
>asp INCLUDE? Or do I need some kind of Web service to get the two
>servers to talk?

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189182
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Sean Corfield
On Mon, 3 Jan 2005 20:52:42 +1000, Taco Fleur <[EMAIL PROTECTED]> wrote:
> I have tried to get some feedback before on the Singleton design pattern,
> but got not one response, so I am thinking;
> 1. This is not the list to post to for feedback, only problems.
> 2. There is no interest in these type of posts.
> 3. I was so way off that it wasn't even worth replying.
> 4. Fill in..

1. CFCDev is probably a better list for this stuff.
2. Maybe... CFCDev is more likely to be interested
3. Possibly... I seem to recall your solution was overly complex
4. ... :)

> So here is another go at another design pattern..

You're using DataType as both a container and the elements it contains
which seems wrong.

You also aren't explaining what problem you're trying to solve with this.

Again, as with your singleton implementation, it seems unnecessarily complex.
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189183
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: "Proper Use" of Instance Variables

2005-01-03 Thread Sean Corfield
On Mon, 03 Jan 2005 14:56:39 -0700, Nathan Strutz <[EMAIL PROTECTED]> wrote:
> function getName(str) {
>if (not validateName()) {
>  variables.instance.name=retrieveNameFromDB();
>}
>return variables.instance.name;
> }

But why are you validating on a *get* call??

Validation should occur either on a *set* or as a separate operation,
in my opinion.
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189184
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: "Proper Use" of Instance Variables

2005-01-03 Thread Sean Corfield
On Mon, 3 Jan 2005 16:02:15 -0600, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> Should validate() return something (string, array, CFC, whatever)?

I normally have it return boolean (true if valid, false if not).
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189186
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: "Proper Use" of Instance Variables

2005-01-03 Thread Barney Boisvert
I have validate() return boolean, and then have a separate
getValidationErrors() method that can be used to retrieve an array of
structs, one struct per error.  You could use an array of error CFCs,
but since errors are pure state, I don't see the real benefit of using
a CFC over just a struct.

With this usage, it would be more proper to name your validate()
method isValid() instead.

On Mon, 3 Jan 2005 16:02:15 -0600, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> One more quick question...
> 
> Should validate() return something (string, array, CFC, whatever)?
> 
> Or, should validate() return void and then require me to call
> "hasErrors()"?
> 
> What is the norm, if there is one?
> 
> I guess if validate() returns an error-handler CFC, I can call its
> hasErrors() method.  That would seem to be the best way to reuse code
> throughout my app.
> 
> Thanks
> M!ke

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 9 invites.

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189185
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: "Proper Use" of Instance Variables

2005-01-03 Thread Jeff Small
> One more quick question...
> 
> Should validate() return something (string, array, CFC, whatever)?
> 
> Or, should validate() return void and then require me to call
"hasErrors()"?
> 
> What is the norm, if there is one?

Thank God. A part of a thread I can actually contribute to...lol.


...do some stuff...








I like to return structs, and I try to add some error "stuff" in the
struct when I return it.

> I guess if validate() returns an error-handler CFC, I can call its
> hasErrors() method.  That would seem to be the best way to reuse code
throughout my app.

That's precisely why I like to try and use CF's built in TRY/CATCH
mechanism. I wasn't using it for the longest time, and then I just
jumped in and spent a weekend reading about error handling and stuff
like that, and I sort of fell into using it ALL the time. Less code I
have to write that Macromedia already took care of...lol



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189187
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Typesafe enum design pattern (another go)

2005-01-03 Thread Taco Fleur
Hey feedback!

> 3. Possibly... I seem to recall your solution was overly complex

OK, any ideas on how to make it less complex? 
Which part of it did you consider to be complex and why?
Some things that I did notice I could improve in the code is to use the
actual variable scope instead of evaluating a string in the
"getSingletonScope" method, and use some locking. 

> You're using DataType as both a container and the elements it contains
which seems wrong.

When I read up about the design pattern in Java this was the closest I could
get it to the real thing.
(link: http://www.javacamp.org/designPattern/enum.html )

> You also aren't explaining what problem you're trying to solve with this.

I was hoping to get some feedback from people that are familiar with the
design pattern, since I want to stick with the design pattern it would not
be relevant to explain what it should do, as that way I might receive
feedback on how to implement it some other way, but that is not what I am
after. I want to stick to the pattern, thus someone who is familiar with the
pattern could comment and provide feedback better than someone who does not
(also, I did specify that I could provide more details if required).

> Again, as with your singleton implementation, it seems unnecessarily
complex.

You must have had a close look at the code to make this assumption, please
provide details.

But as you said, maybe this is not the list to discuss this..

Thanks ;-)

-- 
Taco Fleur
Senior Web Systems Engineer
http://www.webassociates.com



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189188
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: shopping cart, session variables - best practices

2005-01-03 Thread Donna French
The company I work for is currently still running on CF5 and I am in
the process of building my first custom shopping cart so thought it
would be appropriate to jump into this thread.

We are using CrystalTech for shared hosting, and the new site will be
running on CFMX and SQL 2000. From what I've read on this post the
best practice for my situation would be to use session variables and a
structure for the info on each item.

Any other tips for building a first shopping cart would be greatly
appreciated. Feel free to email me off list!

TIA,
Donna


On Mon, 3 Jan 2005 12:50:33 -0500, mayo <[EMAIL PROTECTED]> wrote:
> Sorry for not responding earlier. My laptop was stolen. A big mess.
> 
> I'm on a shared host so the RAM is somewhat limited. However the client is a
> small clothing and jewelry business. They have two stores and this is their
> first venture into on-line sales. Currently they get about 200 unique
> visitors a week. I don't think they will have over 10 concurrent users of
> their shopping site for quite a while.
> 
> gil
> 
> 
> -Original Message-
> From: Martin Parry [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 29, 2004 1:26 PM
> To: CF-Talk
> Subject: RE: shopping cart, session variables - best practices
> 
> I think we should really find out the capabilities of Mayo's server/host
> before we can truly suggest one method over another. In high traffic
> eComm sites I have seen superb performance using the method described.
> 
> If, however RAM is not a problem, he isn't experiencing high volumes and
> is not on another server with xxx websites who all make excessive use of
> session variables, then yes - maybe he should use session variables..
> 
> Mayo - please advise.
> 
> Martin Parry
> Macromedia Certified Developer
> http://www.BeetrootStreet.co.uk
> 
> -Original Message-
> From: Dave Watts [mailto:[EMAIL PROTECTED]
> Sent: 29 December 2004 18:02
> To: CF-Talk
> Subject: RE: shopping cart, session variables - best practices
> 
> > Use a structure for storing the basket contents by all means, however
> > instead of session.basketContents, convert the structure to a WDDX
> > object and store it as client.basketContents - That way you're not
> using
> > precious RAM but cheap disk space.
> 
> Storing application- and user-specific data is what precious RAM is for!
> 
> In an application environment with a single application server, you will
> typically achieve significantly higher performance under load by storing
> things in memory rather than fetching them from the database for each
> page
> request. You may need to provision your server's RAM adequately to
> ensure
> you have enough for the number of concurrent users you need to support,
> but
> RAM is comparatively cheap.
> 
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> phone: 202-797-5496
> 
> 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189189
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Sean Corfield
On Tue, 4 Jan 2005 08:32:06 +1000, Taco Fleur <[EMAIL PROTECTED]> wrote:
[singleton]
> OK, any ideas on how to make it less complex?
> Which part of it did you consider to be complex and why?

Umm, I don't remember now... beyond just thinking "Wow, that's a
really complex solution to what ought to be a simple problem".

> When I read up about the design pattern in Java this was the closest I could
> get it to the real thing.
> (link: http://www.javacamp.org/designPattern/enum.html )

Right, but that doesn't mean that the same implementation makes sense in CF.

> > You also aren't explaining what problem you're trying to solve with this.
> I was hoping to get some feedback from people that are familiar with the
> design pattern,

Well, some design patterns are language specific and the problems they
solve don't always translate to other languages.

I think it's a mistake to focus on a design pattern in isolation of
how it should be used or, rather, what set of problems it is trying to
solve.

I just posted this in my Breeze room as an example of why code != pattern:

Examine the relative importance of sections in a pattern description
(from the GoF book):

FACTORY METHOD

Intent... (a paragraph)
Also Known As... (one name)
Motivation... (a full page!)
Applicability... (when to use it)
Structure... (one small diagram)
Participants... (a few bullets describing each class)
Collaborations... (one sentence)
Consequences... (almost TWO PAGES!)
Implementation... (describes several implementation options with a few
code fragments - three and a half pages - note that this is a set of
guidelines for implementation, not a *specific* implementation)
Sample Code... (just under two pages of simple code with commentary)
Known Uses... (half a page)
Related Patterns... (a few paragraphs)

The Motivation, Applicability and Consequences sections are the most important.

The (long) implementation section contains a lot of theory and suggestions.

Patterns are generally light on code and heavy on the whys and wherefores.

Example code alone does not teach a pattern!
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189190
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Typesafe enum design pattern (another go)

2005-01-03 Thread Taco Fleur
> Example code alone does not teach a pattern!

Completely agree, which is why I did not provide an explanation, and was
hoping to get feedback from people familiar with the pattern.
The link was just to give an idea of what its all about, I actually read
about the pattern in another book. 

Anyway, I'll go and hide in my corner again and discover the world of design
patterns on my own again, I lost all hope to discuss some of this wonderful
stuff on the cf list and port the patterns to cf for all to enjoy ;-))

-- 
Taco Fleur
Senior Web Systems Engineer
http://www.webassociates.com


-Original Message-
From: Sean Corfield [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 4 January 2005 8:57 AM
To: CF-Talk
Subject: Re: Typesafe enum design pattern (another go)

On Tue, 4 Jan 2005 08:32:06 +1000, Taco Fleur <[EMAIL PROTECTED]>
wrote:
[singleton]
> OK, any ideas on how to make it less complex?
> Which part of it did you consider to be complex and why?

Umm, I don't remember now... beyond just thinking "Wow, that's a really
complex solution to what ought to be a simple problem".

> When I read up about the design pattern in Java this was the closest I 
> could get it to the real thing.
> (link: http://www.javacamp.org/designPattern/enum.html )

Right, but that doesn't mean that the same implementation makes sense in CF.

> > You also aren't explaining what problem you're trying to solve with
this.
> I was hoping to get some feedback from people that are familiar with 
> the design pattern,

Well, some design patterns are language specific and the problems they solve
don't always translate to other languages.

I think it's a mistake to focus on a design pattern in isolation of how it
should be used or, rather, what set of problems it is trying to solve.

I just posted this in my Breeze room as an example of why code != pattern:

Examine the relative importance of sections in a pattern description (from
the GoF book):

FACTORY METHOD

Intent... (a paragraph)
Also Known As... (one name)
Motivation... (a full page!)
Applicability... (when to use it)
Structure... (one small diagram)
Participants... (a few bullets describing each class) Collaborations... (one
sentence) Consequences... (almost TWO PAGES!) Implementation... (describes
several implementation options with a few code fragments - three and a half
pages - note that this is a set of guidelines for implementation, not a
*specific* implementation) Sample Code... (just under two pages of simple
code with commentary) Known Uses... (half a page) Related Patterns... (a few
paragraphs)

The Motivation, Applicability and Consequences sections are the most
important.

The (long) implementation section contains a lot of theory and suggestions.

Patterns are generally light on code and heavy on the whys and wherefores.


--
Sean A Corfield -- http://www.corfield.org/ Team Fusebox --
http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got
Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood



~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189191
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Barney Boisvert
I think what Sean was trying to get at was that an implementation of a
design pattern in isolation of a problem it can solve is nothing more
than a bunch of arbitrary code.  If you have two problems that can
both be solved with the same pattern, and you use the same langauge to
implement each solution, the implementations will very likely be
different.  The design pattern itself is merely a guide as to how to
best approach implementing a solution.  If you go get a book on
patterns, you'll always find a problem description preceeding the
sample implementation, because without that context (the problem) the
implementation is meaningless.

cheers,
barneyb

On Tue, 4 Jan 2005 09:14:36 +1000, Taco Fleur <[EMAIL PROTECTED]> wrote:
> > Example code alone does not teach a pattern!
> 
> Completely agree, which is why I did not provide an explanation, and was
> hoping to get feedback from people familiar with the pattern.
> The link was just to give an idea of what its all about, I actually read
> about the pattern in another book.
> 
> Anyway, I'll go and hide in my corner again and discover the world of design
> patterns on my own again, I lost all hope to discuss some of this wonderful
> stuff on the cf list and port the patterns to cf for all to enjoy ;-))
> 
> --
> Taco Fleur
> Senior Web Systems Engineer
> http://www.webassociates.com

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 9 invites.

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189192
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Access SQL - Strip Spaces?

2005-01-03 Thread Jim McAtee
No luck.  This is for a SELECT statement.  The following threw an 
undefined function error.  The DB is Access 2000.

SELECT name, phone, city,
   Replace(shortname, " ", "") AS sname
FROM areas
WHERE areacode = '#areacode#'

Microsoft][ODBC Microsoft Access Driver] Undefined function 'Replace' in 
expression


- Original Message - 
From: "Dawson, Michael" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Monday, January 03, 2005 2:53 PM
Subject: RE: Access SQL - Strip Spaces?


> UPDATE TableName
> SET ColumnName = Replace(ColumnName, " " , "")
>
> NOTE: This will update all records.  If you need to filter, add a WHERE
> clause.
>
> -Original Message-
> From: Jim McAtee [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 03, 2005 3:48 PM
> To: CF-Talk
> Subject: Access SQL - Strip Spaces?
>
> I have a small app in Access and I need to remove spaces from a field
> from within the SQL.  What is the appropriate function call?


~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189193
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Typesafe enum design pattern (another go)

2005-01-03 Thread Taco Fleur
Ok, so are we discussing how to implement the design pattern specific for
ColdFusion or will we just keep discussing the discussion itself?


-- 
Taco Fleur
Senior Web Systems Engineer
http://www.webassociates.com


-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 4 January 2005 9:27 AM
To: CF-Talk
Subject: Re: Typesafe enum design pattern (another go)

I think what Sean was trying to get at was that an implementation of a
design pattern in isolation of a problem it can solve is nothing more than a
bunch of arbitrary code.  If you have two problems that can both be solved
with the same pattern, and you use the same langauge to implement each
solution, the implementations will very likely be different.  The design
pattern itself is merely a guide as to how to best approach implementing a
solution.  If you go get a book on patterns, you'll always find a problem
description preceeding the sample implementation, because without that
context (the problem) the implementation is meaningless.

cheers,
barneyb

On Tue, 4 Jan 2005 09:14:36 +1000, Taco Fleur <[EMAIL PROTECTED]>
wrote:
> > Example code alone does not teach a pattern!
> 
> Completely agree, which is why I did not provide an explanation, and 
> was hoping to get feedback from people familiar with the pattern.
> The link was just to give an idea of what its all about, I actually 
> read about the pattern in another book.
> 
> Anyway, I'll go and hide in my corner again and discover the world of 
> design patterns on my own again, I lost all hope to discuss some of 
> this wonderful stuff on the cf list and port the patterns to cf for 
> all to enjoy ;-))
> 
> --
> Taco Fleur
> Senior Web Systems Engineer
> http://www.webassociates.com

--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 9 invites.



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189194
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Typesafe enum design pattern (another go)

2005-01-03 Thread Dave Watts
> Ok, so are we discussing how to implement the design pattern 
> specific for ColdFusion or will we just keep discussing the 
> discussion itself?

What problem is your code specifically trying to solve?

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!


~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189196
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Access SQL - Strip Spaces?

2005-01-03 Thread Jim McAtee
>From a little more research I found that Access 2000 only supports a 
subset of the ODBC scalar functions, and REPLACE() isn't supported.  So, 
unless someone knows of another way, I guess I'll just do it in CF after 
the query is executed.


- Original Message - 
From: "Jim McAtee" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Monday, January 03, 2005 4:28 PM
Subject: Re: Access SQL - Strip Spaces?


> No luck.  This is for a SELECT statement.  The following threw an
> undefined function error.  The DB is Access 2000.
>
> SELECT name, phone, city,
>   Replace(shortname, " ", "") AS sname
> FROM areas
> WHERE areacode = '#areacode#'
>
> Microsoft][ODBC Microsoft Access Driver] Undefined function 'Replace' in
> expression
>
>
> - Original Message - 
> From: "Dawson, Michael" <[EMAIL PROTECTED]>
> To: "CF-Talk" 
> Sent: Monday, January 03, 2005 2:53 PM
> Subject: RE: Access SQL - Strip Spaces?
>
>
>> UPDATE TableName
>> SET ColumnName = Replace(ColumnName, " " , "")
>>
>> NOTE: This will update all records.  If you need to filter, add a WHERE
>> clause.
>>
>> -Original Message-
>> From: Jim McAtee [mailto:[EMAIL PROTECTED]
>> Sent: Monday, January 03, 2005 3:48 PM
>> To: CF-Talk
>> Subject: Access SQL - Strip Spaces?
>>
>> I have a small app in Access and I need to remove spaces from a field
>> from within the SQL.  What is the appropriate function call?


~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189195
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Spike
That's pretty much all we can discuss unless you lay out the problem 
that you're trying to solve.

If you explain exactly what it is you're trying to do and why you're 
using the pattern it should be possible to say whether you're 
implementing it the right way.

I think that's the point Barney was making.

Spike

Taco Fleur wrote:
> Ok, so are we discussing how to implement the design pattern specific for
> ColdFusion or will we just keep discussing the discussion itself?
> 
> 

-- 


Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189197
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: JSP Question (Does query caching existing)

2005-01-03 Thread Barney Boisvert
You can just stash the recordset in the application scope, much like
you would in CF.



or if you're not using JSTL

<% application.setAttribute("myRecordSet", recordset) %>

cheers,
barneyb

On Mon, 3 Jan 2005 17:43:57 -, Ciliotta, Mario
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Sorry for asking a JSP question here but I have not been able to find a
> mailing as good as CFTALK for Java/JSP issues.
> 
> I am in the process of converting a CF application over to JSP running under
> WebLogic as practice to see how long it takes to do the same coding vs. using
> CFMX.
> 
> In my CF application, I cache my queries since the data really changes and to
> handle this I have a scheduled job that runs to flush and update the cached
> queries if there are any changes.  Is there a way to cache the query results
> in a JSP page?  I have to have the page requery the database every time
> someone goes to page to look up an item.  Basically the items only change once
> a year, if that.
> 
> Also does anyone know of a good JSP/JAVA equivalent of CFTALK.
> 
> Thanks
> Mario
> 
> 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189198
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Typesafe enum design pattern (another go)

2005-01-03 Thread Taco Fleur
The problem:

I need a class that represents constants
I don't want the public to be able to modify any data
I need to be able to loop over the constants easily

Basically quoting what problems the pattern solves.. 


-- 
Taco Fleur
Senior Web Systems Engineer
http://www.webassociates.com


-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 4 January 2005 11:57 AM
To: CF-Talk
Subject: RE: Typesafe enum design pattern (another go)

> Ok, so are we discussing how to implement the design pattern specific 
> for ColdFusion or will we just keep discussing the discussion itself?

What problem is your code specifically trying to solve?

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!




~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189199
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Aaron DC
Sounds like Taco is reading and learning about patterns and trying to
implement / translate them into CF purely for the exercise or sake of doing
so. Hence he would like to discuss the implementation / code at a purely
theoretical point of view, rather than a specific implementation point of
view. Respondents to date seem to indicate that a pattern is basically
useless without the associated problem it was intended to solve being
present.

In a brain-storm session, Stage 1 is "every idea is good" - I think this is
the space Taco is occupying. Once all the ideas are written down, Stage 2
involves "picking the best / most doable" ideas - looks to me like this is
the space occupied by his respondents.

I think the pattern porting exercise would be interesting and potentially
valuable. This value could be greatly enhanced if a common CF or web-based
programming scenario was also invented, for which the pattern provides a
solution. Without this scenario, it would be like Mach-II or FB3/4 having
base code and documentation, but no example apps.

My gut feeling is that there are only a handful of other developers here who
would be able to discuss pattern templates or implementations. It may be
that another list is better suited, or a new "CF-patterns" / "CF-hardcore"
list would at least show you through its subscription how many others are
interested.

Good luck, Taco, I hope you find others that share your passion.

Aaron

- Original Message -
From: "Spike" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Tuesday, January 04, 2005 12:59 PM
Subject: Re: Typesafe enum design pattern (another go)


> That's pretty much all we can discuss unless you lay out the problem
> that you're trying to solve.



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189200
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Spike
That's not describing the problem. It's describing a solution.

Why do you need constants?

Why do you need them to be in a class/cfc?

Why do you not want the public to be able to modify any data and who do 
you define as the public?

Why do you need to be able to loop over the constants?

Spike

Taco Fleur wrote:
> The problem:
> 
> I need a class that represents constants
> I don't want the public to be able to modify any data
> I need to be able to loop over the constants easily
> 
> Basically quoting what problems the pattern solves.. 
> 
> 

-- 


Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189201
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Aaron DC
Could you use a struct? 

1. It's a built-in CF class
2. Public cant modify data unless you provide a mechanism for them to do so
3. Loop using any CF looping construct

Aaron

- Original Message - 
From: "Taco Fleur" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Tuesday, January 04, 2005 1:06 PM
Subject: RE: Typesafe enum design pattern (another go)


> The problem:
> 
> I need a class that represents constants
> I don't want the public to be able to modify any data
> I need to be able to loop over the constants easily
> 
> Basically quoting what problems the pattern solves.. 



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189202
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Typesafe enum design pattern (another go)

2005-01-03 Thread Taco Fleur
I know what most of you are trying to get at (I read the book too) "Don't
use design patterns just for the sake of it".
I'm not interested in discussing that, a pattern solves certain problems,
lets just say I have all those problems that this particular pattern solves!

Aaron you are spot on. But as Sean already pointed out, this is not the list
to discuss it.
And yes a site dedicated to design patterns for CF would be nice (any
volunteers to help ? ;-)... 


-- 
Taco Fleur
Senior Web Systems Engineer
http://www.webassociates.com


-Original Message-
From: Spike [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 4 January 2005 12:21 PM
To: CF-Talk
Subject: Re: Typesafe enum design pattern (another go)

That's not describing the problem. It's describing a solution.

Why do you need constants?

Why do you need them to be in a class/cfc?

Why do you not want the public to be able to modify any data and who do you
define as the public?

Why do you need to be able to loop over the constants?

Spike

Taco Fleur wrote:
> The problem:
> 
> I need a class that represents constants I don't want the public to be 
> able to modify any data I need to be able to loop over the constants 
> easily
> 
> Basically quoting what problems the pattern solves.. 
> 
> 

-- 


Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189203
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Well - I feel like an idiot.

2005-01-03 Thread Jim Davis
> -Original Message-
> From: Larry White [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 03, 2005 12:04 PM
> To: CF-Talk
> Subject: Re: Well - I feel like an idiot.
> 
> Regarding the original post I can't see any reason to use cflock at all.
> Initializing the application variables, I would hope, would not entail
> using user specific values. If the initialization is the same no matter
> which user does it, and you won't crash the server anymore, then why
> lock it?

Well - that last question kinda of answered it.  With all users running the
code it DID crash the server.  ;^)

The initialization code, in this case, is actually pretty complex but more
importantly it would suffer data issues if run multiple times.  For example
it instantiates a session cache which is stowed in the application scope.

Since the current user's session is then stored in that cache it would be a
Bad Thing if the next request rebuilt the cache.

Sure, I could place 's around all the places that this would matter -
but it's much, much cleaner to just wrap the entire process in a lock.

Jim Davis




~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189204
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: How'd www.firstnight.org do over new years?

2005-01-03 Thread Dana
Hmmm

/me wonders if Jim doesn't want to talk about it :) Seriously, I think
Jim missed this post so I am moving it back up a bit. I'd sort of like
to know too.

Dana


On Mon, 3 Jan 2005 10:12:42 -0800, Cameron Childress <[EMAIL PROTECTED]> wrote:
> Jim,
> 
> Just following up on the thread from last week.  I'd be interested in
> knowing how your site did over new years and to learn anything helpful
> you might have to share about your experience with the new years eve
> crush on the firstnight site.
> 
> -Cameron
> 
> --
> Cameron Childress
> Sumo Consulting Inc
> http://www.sumoc.com
> ---
> cell:  678.637.5072
> aim:   cameroncf
> email: [EMAIL PROTECTED]
> 
> 

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189205
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Spike
I think you could be spot on here Aaron.

There are several difficulties with implementing the typesafe enum 
pattern in CF exactly as it us usually seen in Java.

The first problem is that in the Java world the constructor is declared 
as private so you can't create an instance of the class. You can't do 
that in CF.

Second problem is that the variables are declared as static final, so 
you can't change them except in the constructor of the class that 
declares them. Again, you can't really do that in CF.

Also, in the Java world, a common use of the pattern is to ensure that 
the value passed as a parameter can contain only one of a set of 
pre-defined values. The common example given is a class called Suit that 
has 4 fields. One for each suit in a pack of cards. You can then know 
that when you declare the argument to a function as being of type Suit 
that it must be one of the 4 permitted suits and anything else will fail 
*at compile time* not at runtime.

That may or may not be a requirement for what Taco is doing, but if it 
was, it would affect the implementation in CF.

The other thing about enums is that there are so many ways you could 
possibly use them that it's very difficult to say whether an 
implementation is a good one without knowing more about the specific 
scenario.

Spike

Aaron DC wrote:
> Sounds like Taco is reading and learning about patterns and trying to
> implement / translate them into CF purely for the exercise or sake of doing
> so. Hence he would like to discuss the implementation / code at a purely
> theoretical point of view, rather than a specific implementation point of
> view. Respondents to date seem to indicate that a pattern is basically
> useless without the associated problem it was intended to solve being
> present.
> 
> In a brain-storm session, Stage 1 is "every idea is good" - I think this is
> the space Taco is occupying. Once all the ideas are written down, Stage 2
> involves "picking the best / most doable" ideas - looks to me like this is
> the space occupied by his respondents.
> 
> I think the pattern porting exercise would be interesting and potentially
> valuable. This value could be greatly enhanced if a common CF or web-based
> programming scenario was also invented, for which the pattern provides a
> solution. Without this scenario, it would be like Mach-II or FB3/4 having
> base code and documentation, but no example apps.
> 
> My gut feeling is that there are only a handful of other developers here who
> would be able to discuss pattern templates or implementations. It may be
> that another list is better suited, or a new "CF-patterns" / "CF-hardcore"
> list would at least show you through its subscription how many others are
> interested.
> 
> Good luck, Taco, I hope you find others that share your passion.
> 
> Aaron
> 
> - Original Message -
> From: "Spike" <[EMAIL PROTECTED]>
> To: "CF-Talk" 
> Sent: Tuesday, January 04, 2005 12:59 PM
> Subject: Re: Typesafe enum design pattern (another go)
> 
> 
> 
>>That's pretty much all we can discuss unless you lay out the problem
>>that you're trying to solve.
> 
> 
> 
> 
> 

~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189206
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Typesafe enum design pattern (another go)

2005-01-03 Thread Taco Fleur
> The first problem is that in the Java world the constructor is declared as
private so you can't create an instance of the class. You can't do that in
CF.

Exactly, I have been thinking about that, how about the following?












 


-- 
Taco Fleur
Senior Web Systems Engineer
http://www.webassociates.com



Second problem is that the variables are declared as static final, so you
can't change them except in the constructor of the class that declares them.
Again, you can't really do that in CF.

Also, in the Java world, a common use of the pattern is to ensure that the
value passed as a parameter can contain only one of a set of pre-defined
values. The common example given is a class called Suit that has 4 fields.
One for each suit in a pack of cards. You can then know that when you
declare the argument to a function as being of type Suit that it must be one
of the 4 permitted suits and anything else will fail *at compile time* not
at runtime.

That may or may not be a requirement for what Taco is doing, but if it was,
it would affect the implementation in CF.

The other thing about enums is that there are so many ways you could
possibly use them that it's very difficult to say whether an implementation
is a good one without knowing more about the specific scenario.

Spike

Aaron DC wrote:
> Sounds like Taco is reading and learning about patterns and trying to 
> implement / translate them into CF purely for the exercise or sake of 
> doing so. Hence he would like to discuss the implementation / code at 
> a purely theoretical point of view, rather than a specific 
> implementation point of view. Respondents to date seem to indicate 
> that a pattern is basically useless without the associated problem it 
> was intended to solve being present.
> 
> In a brain-storm session, Stage 1 is "every idea is good" - I think 
> this is the space Taco is occupying. Once all the ideas are written 
> down, Stage 2 involves "picking the best / most doable" ideas - looks 
> to me like this is the space occupied by his respondents.
> 
> I think the pattern porting exercise would be interesting and 
> potentially valuable. This value could be greatly enhanced if a common 
> CF or web-based programming scenario was also invented, for which the 
> pattern provides a solution. Without this scenario, it would be like 
> Mach-II or FB3/4 having base code and documentation, but no example apps.
> 
> My gut feeling is that there are only a handful of other developers 
> here who would be able to discuss pattern templates or 
> implementations. It may be that another list is better suited, or a new
"CF-patterns" / "CF-hardcore"
> list would at least show you through its subscription how many others 
> are interested.
> 
> Good luck, Taco, I hope you find others that share your passion.
> 
> Aaron
> 
> - Original Message -
> From: "Spike" <[EMAIL PROTECTED]>
> To: "CF-Talk" 
> Sent: Tuesday, January 04, 2005 12:59 PM
> Subject: Re: Typesafe enum design pattern (another go)
> 
> 
> 
>>That's pretty much all we can discuss unless you lay out the problem 
>>that you're trying to solve.
> 
> 
> 
> 
> 



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189207
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Spike
I'm not sure what you're trying to achieve with the code below.

Can you provide some explanation of the thinking behind it?

Spike

Taco Fleur wrote:
>>The first problem is that in the Java world the constructor is declared as
> 
> private so you can't create an instance of the class. You can't do that in
> CF.
> 
> Exactly, I have been thinking about that, how about the following?
> 
> 
> 
>   
> 
>  name="main" 
>   access="private" 
>   returntype="string" 
>   output="true">
>   
> 
>  name="init" 
>   access="public" 
>   returntype="any" 
>   output="true">
>   
>   
> 
>  
> 
> 

-- 


Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189208
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Typesafe enum design pattern (another go)

2005-01-03 Thread Michael T. Tangorre
> From: Taco Fleur [mailto:[EMAIL PROTECTED] 
> > The first problem is that in the Java world the constructor 
> is declared as
> private so you can't create an instance of the class. You 
> can't do that in
> CF.
> 
> Exactly, I have been thinking about that, how about the following?
> 
> 
> 
>   
> 
>  name="main" 
>   access="private" 
>   returntype="string" 
>   output="true">
>   
> 
>  name="init" 
>   access="public" 
>   returntype="any" 
>   output="true">
>   
>   
> 
>  


Calling methods in the "constructor" area of a component could lead to
undesired results... As in the CFC being called from the URL as a
webservice.. Your main() would always fire off.. Just a heads up.

Mike


~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189209
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: "Proper Use" of Instance Variables

2005-01-03 Thread Brian Kotek
Back to the idea of using instance variables vs. using getter methods
within the CFC, keep in mind that if the getter method returns an
instance variable that is an array, you're getting a pass-by-value
copy of the array and not a reference to the original array. This can
lead to some bizarre things if you aren't aware of it, like trying to
modify the array returned by the getter but the actual instance
variable doesn't change.


On Mon, 03 Jan 2005 14:56:39 -0700, Nathan Strutz <[EMAIL PROTECTED]> wrote:
> Personally, I like to use the raw instance variables, as it's easier to
> avoid the recursive caller mistake:
> 
> function validateName() {
>return yesNoFormat(len(getName()));
> }
> function getName(str) {
>if (not validateName()) {
>  variables.instance.name=retrieveNameFromDB();
>}
>return variables.instance.name;
> }
> 
> getName calls validateName, and vice versa. of course this is much
> harder to debug when your cfc is doing a lot more.
> 
> -nathan strutz
> 
> 
> Barney Boisvert wrote:
> > This (or something very similar) has come up before.  I personally
> > like using the getters and setters everywhere, as they are the 'real'
> > properties of the CFC, not the instance variables.  At least that's
> > the theory.  As for overhead, there definitely is some, but it's going
> > to be quite minimal, and can be safely ignored, IMHO.
> >
> > cheers,
> > barneyb
> >
> > On Mon, 3 Jan 2005 15:17:46 -0600, Dawson, Michael <[EMAIL PROTECTED]> 
> > wrote:
> >
> >>I have a simple CFC that has a few instance variables in it.
> >>
> >>
> >>
> >>
> >>
> >>
> >>...
> >>
> >>
> >>
> >>In this component, I have the pairs of getters and setters such as:
> >>
> >>
> >>...
> >>
> >>
> >>
> >>...
> >>
> >>
> >>I also have a validate method that needs to check the values of the
> >>instance variables.  Which is the "better form" of accessing the
> >>instance varibles?
> >>
> >>1. ...
> >>Or
> >>2. ...
> >>
> >>At first glance, the second option is shorter and would still
> >>encapsulate any logic even inside its own CFC.  Would there be any
> >>substantial overhead with calling a method over an instance variable?
> >>
> >>Thanks
> >>M!ke
> >>
> >
> >
> 
> 

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189210
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


cfmailpart problems

2005-01-03 Thread Marcus Whitworth
Hi,

I''m having issues with multipart emails using cfmailpart... 


#html_content#
#text_content#


This displays the html version fine with Outlook, but can
only display the text version with html-enabled email clients like Mozilla
Thunderbird, Safari etc.

However, if I just use the plain old cfmail with the type="html" attribute,
and NO cfmailpart tags, the above email clients can view the html just fine.

Suggestions?? Known bug??

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189211
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: cfmailpart problems

2005-01-03 Thread Howie Hamlin
It could be a setting in the mail client.  Most clients have a setting to 
display the preferred part of a multipart email - you could decide to display 
the text portion only in Outlook Express, for example.

HTH,

-- 
Howie Hamlin - inFusion Project Manager
On-Line Data Solutions, Inc. - www.CoolFusion.com
inFusion Mail Server (iMS) - The Award-winning, Intelligent Mail Server
PrismAV - Virus scanning for ColdFusion applications
>>> Find out how iMS Stacks up to the competition: 
>>> http://www.coolfusion.com/imssecomparison.cfm


--- On Monday, January 03, 2005 9:34 PM, Marcus Whitworth scribed: ---
>
> Hi,
> 
> I''m having issues with multipart emails using cfmailpart...
> 
> 
> #html_content#
> #text_content#
> 
> 
> This displays the html version fine with Outlook, but can
> only display the text version with html-enabled email clients like
> Mozilla Thunderbird, Safari etc.
> 
> However, if I just use the plain old cfmail with the type="html"
> attribute, and NO cfmailpart tags, the above email clients can view
> the html just fine. 
> 
> Suggestions?? Known bug??
> 
> 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189212
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: cfmailpart problems

2005-01-03 Thread Marcus Whitworth
> It could be a setting in the mail client.  Most clients have a setting 
> to display the preferred part of a multipart email - you could decide 
> to display the text portion only in Outlook Express, for example.

No, I'm pretty sure thats not it. I am testing at the moment in Thunderbird, 
and other Multipart emails coming through are displaying as html just fine. I 
have also made sure that the email client is selected to display each message 
as html.

I'm assuming at the moment that CFmailpart just doesn't stick to the standards 
for multipart emails...

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189213
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: How'd www.firstnight.org do over new years?

2005-01-03 Thread Jim Davis
> -Original Message-
> From: Cameron Childress [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 03, 2005 1:13 PM
> To: CF-Talk
> Subject: How'd www.firstnight.org do over new years?
> 
> Jim,
> 
> Just following up on the thread from last week.  I'd be interested in
> knowing how your site did over new years and to learn anything helpful
> you might have to share about your experience with the new years eve
> crush on the firstnight site.

Well - that's a sordid, sordid tale full of highs and lows, villains and
heroes and a deeply fulfilling message that will leave your family closer
than ever.

Anyway... since you asked.

The site started getting high traffic late morning on the 29th.  It was,
however sucking up resources and causing all the other sites on the shared
host to slow down so our host (CrystalTech.com) turned it off.

The primary reason, then, for the slow down was that the available database
connections were getting overrun.  The site has a "planner" feature for
visitors that allows them to select events that they've like to go see.  As
built the planner saves selections to the database whenever it's updated.
With so many people using it the application was squeezing out other
applications on the server.

So I switched the app to only save plans for those (relatively few) people
that logged in and cut down on most of the my end-of-session logging (which
sped up the session manager from taking dozens of seconds every 20 minutes
to taking less than 200ms).

This improved the site performance a lot, but did mean we were losing data.
Ah well.

The traffic died down in the evening.  I did some more optimization.  I
cached static versions of all navigation, for example.  This meant that
pages could no longer present navigation consistent with security rules, but
on this site that's only used for administration so no big loss.

I also found a really dumb problem that (I'm nearly positive) caused serious
problems on server start under load.  See the thread called "Well - I feel
like an idiot" posted a few days ago for details on that.

Then I got a call the next morning (the 30th).  The traffic was back up,
much higher than before.  To protect the other customers CrystalTech shut of
the server again.  We attempted to throttle the connection, but that was as
good as having the site disabled (throttling meant that only about a tenth
of the requests were getting through, so even if you DID get the page you'd
miss most of the style sheets, graphics and scripts).

Finally around 2pm the client bit the bullet and let me order a dedicated
server.  CrystalTech graciously pushed our build to the top of the queue.
We went with the second option they offer: a P4 3.06GHz with 1 Gig of RAM
and a 120 Gig disk.

The server wasn't released until after 5pm and I went to work building it.
I had to install CFMX, stats, the site, etc.  One REALLY nice thing was that
I could still connect to the old database - that saved me more than a little
time.

Around 7pm I was done and we (myself and a couple of volunteers) ran through
a regression test.  We were done around 9pm and had some discussion about
how best to transfer traffic.

In the end we decided that a simple redirection on the old server was best
and quickest.  Traffic would originate at the old server and get immediately
located over to the raw IP address.  Not the best solution, but it beat
waiting for DNS updates to server we most likely couldn't afford to keep.

I turned back on all the logging, added some cache-management headers,
turned on "trusted cache" and attempted to tweak the simultaneous threads
and database threads.

I then went to bed (I'd had less than 6 hours sleep in the previous three
days).

However I SHOULD have remembered to install MX 6.1 updater.  That would come
back to bite me.

Anyway I didn't.  The new server ran very well - until about 11:45 when JRUN
pegged the CPU and froze up solid.  This is a pretty classic symptom of the
older database drivers in 6.1 and would have probably been solved by
installing the updater.

I ended up turning off the plan updates again in an attempt to get things
back on track (there was no time to install the updater then).

But I forgot.  Restarting the service got us back on track until about 2:30
when the same thing happened.  After that the server ran great for the rest
of the day (under much less traffic).  I feel pretty confident that had I
installed the updater the server could have quite happily handled the
traffic.

Also SmarterStats indexing service was running every 15 minutes which could
have contributed to the problems (I turned it off as soon as I noticed it).

The morning of the 1st traffic was back to nothing and I moved the site back
to the old server.  We'll most likely be canceling the dedicated server
until next year (but hopefully we'll get it EARLIER next year.)

After that I played lots of "Prince of Persia" and tried Half-Life
deathmatch for the first time (it was great!)  ;^)

RE: How'd www.firstnight.org do over new years?

2005-01-03 Thread Jim Davis
> -Original Message-
> From: Dana [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 03, 2005 9:53 PM
> To: CF-Talk
> Subject: Re: How'd www.firstnight.org do over new years?
> 
> Hmmm
> 
> /me wonders if Jim doesn't want to talk about it :) Seriously, I think
> Jim missed this post so I am moving it back up a bit. I'd sort of like
> to know too.

No - didn't miss it - but I did ignore my real job all last week and didn't
get home today until after nine.  ;^)

I've posted a big long, self-indulgent reply - enjoy!

Jim Davis




~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189215
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: How'd www.firstnight.org do over new years?

2005-01-03 Thread Cameron Childress
> Anything else you'd like to know?

Wow!  Great writeup!  

It's always interesting to me to know what types of challenges people
run into and how they overcome them.  I'm also very interested in how
well different sites (and people) handle load in real world
situations.  I've worked on some high volume sites and try to learn
new strategies whenever I can to prepare for the next time.

Interesting stuff, thanks again for the writeup!

-Cameron

-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell:  678.637.5072
aim:   cameroncf
email: [EMAIL PROTECTED]

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189216
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: cfmailpart problems

2005-01-03 Thread Howie Hamlin
--- On Monday, January 03, 2005 10:22 PM, Marcus Whitworth scribed: ---
>
>> It could be a setting in the mail client.  Most clients have a
>> setting to display the preferred part of a multipart email - you
>> could decide to display the text portion only in Outlook Express,
>> for example. 
> 
> No, I'm pretty sure thats not it. I am testing at the moment in
> Thunderbird, and other Multipart emails coming through are displaying
> as html just fine. I have also made sure that the email client is
> selected to display each message as html.   
> 
> I'm assuming at the moment that CFmailpart just doesn't stick to the
> standards for multipart emails... 
> 

As far as I know, it does.  If you'd like - you can send me an email and I'll 
look at it (just make sure to let me know if/when you do).

Regards,

Howie

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189217
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: "Proper Use" of Instance Variables

2005-01-03 Thread Sean Corfield
On Mon, 3 Jan 2005 22:25:49 -0500, Brian Kotek <[EMAIL PROTECTED]> wrote:
> Back to the idea of using instance variables vs. using getter methods
> within the CFC, keep in mind that if the getter method returns an
> instance variable that is an array, you're getting a pass-by-value
> copy of the array and not a reference to the original array. This can
> lead to some bizarre things if you aren't aware of it, like trying to
> modify the array returned by the getter but the actual instance
> variable doesn't change.

Yup and sort of conversely, if you return a struct remember that it is
by reference so if you do:

obj.getFoo().bar = 3;

you will overwrite the foo.bar inside the object.

Just stuff you need to think about with OO (not a CF issue really
since similar issues exist in Java, C++ etc). How encapsulated does
your object need to be in terms of what it hands out to 'client' code?
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189218
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Sean Corfield
On Tue, 4 Jan 2005 11:41:54 +1000, Taco Fleur <[EMAIL PROTECTED]> wrote:
> Ok, so are we discussing how to implement the design pattern specific for
> ColdFusion

But that doesn't make sense - even in CF, there will be multiple
implementations of pretty much every design pattern and the choice of
implementation will depend on the exact problem you are trying to
solve.
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189219
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Typesafe enum design pattern (another go)

2005-01-03 Thread Sean Corfield
On Tue, 4 Jan 2005 13:20:03 +1100, Aaron DC
<[EMAIL PROTECTED]> wrote:
> Sounds like Taco is reading and learning about patterns and trying to
> implement / translate them into CF purely for the exercise or sake of doing
> so.

But that makes no sense - a pattern is *not* an implementation
therefore there is nothing to translate. A pattern is a concept. Each
pattern has multiple implementations regardless of which language you
are using.

> I think the pattern porting exercise would be interesting and potentially
> valuable.

I think it completely misses the point of what patterns are about.

> Without this scenario, it would be like Mach-II or FB3/4 having
> base code and documentation, but no example apps.

Not really - those are examples that use a framework, they are not
implementations of the framework. But then frameworks aren't patterns
either (since a framework is, by definition, code whereas a pattern
is, by definition, not code).
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189220
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54