OT: Freelance Designers

2006-03-14 Thread Baz
Anyone know some EXCELLENT freelance graphic designers/illustrators they
could refer me to?

 

Thank you,

Baz

 

(perhaps email me off list)

 

 




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235291
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: Flex 2 and Ben Forta

2006-03-12 Thread Baz
I definitely don't think limiting features is the way to go. In fact I would
like to see the opposite happen. Right now we have CFStandard and
CFEnterprise, which are 2 totally different products, with different
installs, paths and administration. Adding a CFFree to the mix with more
limitations and idiosyncrasies is just going to make things more confusing.
There should only be one CFServer that has ALL functionality including
gateways. The pricing should perhaps be more granular, such as:
 
-0$: limited to 3 IPs (like developer edition today)
-  500$: max of 1 instance/sandbox (similar to CF Standard is today)
- 1000$: max of 2-5 instances/sandboxes
- 2000$: max of 5-20 instances/sandboxes
- 3000$: max of 20-50 instances/sandboxes
- 4000$: unlimited instances/sandboxes (like CF Enterprise is today)

At least like this small shops will be more encouraged to implement secure
environments using sandboxes without having to dish out 5K.

Perhaps a free version could be limited to 3 concurrent connections (rather
than 3 IPs) so that small sites who can't pay can get up and running. When
they start to get popular and grow, it will be a no-brainer to dish out 500$
or 1000$ to upgrade, instead of recoding the whole site in PHP to avoid it:

- 0$: limited to 3 concurrent connections

Just some thoughts,
Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235129
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: dynamic ms-word files

2006-03-12 Thread Baz
Is there an RTF counterpart for excel?

Baz


-Original Message-
From: Srinivasa Teja Palla [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 09, 2006 8:36 AM
To: CF-Talk
Subject: Re: dynamic ms-word files

THANKS A LOT guys, lots of pointers. I will definitely look at each one and
get back to y'all. I was also looking at DynamicMS2.0/1.0 which is not free.
Once again, thanks for all your tips.

 Like we have htmldoc, is there a way to dynamically generate word 
 files with content supplied by coldfusion?



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235130
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: Flex 2 and Ben Forta

2006-03-12 Thread Baz
I actually did not know that. Things just got a lot nicer...

 
-Original Message-
From: Ryan Guill [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 12, 2006 2:42 PM
To: CF-Talk
Subject: Re: Flex 2 and Ben Forta

Right, the only difference really is that and what serial number you
put in.  You can install cf standard and then put in a new enterprise
serial number and it just starts working as enterprise, with no
reinstall.

On 3/12/06, Dave Watts [EMAIL PROTECTED] wrote:
  Right now we have CFStandard and CFEnterprise, which are
  2 totally different products, with different installs,
  paths and administration.

 This isn't quite accurate. The primary difference between installs isn't
 between CF Standard and Enterprise, but between a J2EE and a standalone
 server install, both of which can be done with Enterprise.

 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!


 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235146
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: dynamic ms-word files

2006-03-12 Thread Baz
CSV is to XLS as TXT is to DOC - it's not rich enough.


-Original Message-
From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 12, 2006 9:36 PM
To: CF-Talk
Subject: Re: dynamic ms-word files

Yeah, .CSV

On 3/12/06, Baz [EMAIL PROTECTED] wrote:
 Is there an RTF counterpart for excel?

 Baz


 -Original Message-
 From: Srinivasa Teja Palla [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 09, 2006 8:36 AM
 To: CF-Talk
 Subject: Re: dynamic ms-word files

 THANKS A LOT guys, lots of pointers. I will definitely look at each one
and
 get back to y'all. I was also looking at DynamicMS2.0/1.0 which is not
free.
 Once again, thanks for all your tips.

  Like we have htmldoc, is there a way to dynamically generate word
  files with content supplied by coldfusion?



 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235169
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: SQL-generated primary keys

2006-03-11 Thread Baz
Is MySQL's last_inserted_id thread-safe too?



-Original Message-
From: Andy [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 10, 2006 11:52 PM
To: CF-Talk
Subject: RE: SQL-generated primary keys

You chose wisely, my son. 

-Original Message-
From: Chris Mueller [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 10, 2006 7:11 AM
To: CF-Talk
Subject: Re: SQL-generated primary keys

Thanks everyone for all your help! 

I am using SQL server, and have reworked my queries to use SCOPE_IDENTITY().

Chris

If it is SQL Server, do this

cfquery
   Insert into () Values ();
   SELECT  SCOPE_IDENTITY() AS id
/cfquery
That will give you the correct identity id

Sandra Clark
-Original Message-
From: Chris Mueller [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 09, 2006 4:35 PM
To: CF-Talk
Subject: SQL-generated primary keys

Here's a question I've been wrestling wtih.

Suppose that there is an HTML form to create a new user. When the form 
is submitted, that user's information is added to the 'user' table.
The table uses an auto-increment integer for its primary key/user id, 
so I'd like to grab that value for the newly created user.

I've been using queries like this one: SELECT MAX(user_id) FROM 
users, but I worry that if two users are created at the same time, 
then my query might give me the user id of the wrong user.

Is there a better way to do this? Or maybe I shouldn't even worry about 
this?

Thanks.
Chris





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235128
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


Should I submit a website with 2 languages twice to search engines?

2006-03-08 Thread Baz
Should I submit a website with 2 languages twice to search engines, once for
each language? 

i.e.
- www.domain.com
- www.domain.com?lang=fr

What about to DMOZ and other such directories? They have different
categories for non-english sites...

Cheers,
Baz



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234710
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: Should I submit a website with 2 languages twice to search engines?

2006-03-08 Thread Baz
Thanks for all the tips... it was my understanding too that search engines
play nice with URL vars - I'm not too sure why SES safe URLs are still
being talked about so often.

Also, just to be sure, I should translate all META keywords and descriptions
to each language, correct? You can have more than one set of META data per
domain, right?

Speaking of which, are there any advantages/disadvantages to customizing
your META data for each page of your site? So if one page focuses on cars,
but another focuses on racing, you put car-related keywords on one page and
race-related keywords on the other.  Is this good/bad/ineffective? 

Cheers,
Baz



-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 08, 2006 3:31 PM
To: CF-Talk
Subject: Re: Should I submit a website with 2 languages twice to search
engines?

Yep, Google indexes them pretty exactly the same as sites with SES
url's... which is why I'm glad I never bothered with the whole SES url
nonsense... A whole lot of hair-pulling for bupkiss. Plus if you want
SES url's, use mod rewrite or isapi rewrite. It's infinitely easier to
implement it there than it is to reverse engineer the query string in
CF.

 This may well start a big war here, but are dynamic URLs
 really a big
 problem anymore for todays modern search engine?  I have
 no evidence
 either way, but it seems to me that they must have come up
 with some
 kind of a workaround by now


s. isaac dealey 434.293.6201
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234728
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: GMail manipulation remotely

2006-03-03 Thread Baz
Thanks gang,

As an extension to the question, can I pop a gmail account, get a list of
file attachments, and then provide a link to download the attachemts without
them ever having gone through my webserver? (if not POP some other way)

So for example, you go to a site that shows the contents of a gmail account,
then u click on a file and it goes right from gmail to you.

Cheers,
Baz




-Original Message-
From: Jochem van Dieten [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 03, 2006 11:52 AM
To: CF-Talk
Subject: Re: GMail manipulation remotely

Baz wrote:
 Is it possible to write an app that can send email through GMail? For
 example, if I wanted to send a 5mb attachment to a list of 10 users, could
I
 instruct the GMail server to forward the email to each user, or send CCs
to
 each user. The primary objective being not to duplicate the bandwidth for
 the attachement locally.

Yes, just put all recipients in the To, CC or BCC of one email.

Jochem



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234067
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: GMail manipulation remotely

2006-03-03 Thread Baz
How would I login a user?


-Original Message-
From: Jochem van Dieten [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 03, 2006 1:10 PM
To: CF-Talk
Subject: Re: GMail manipulation remotely

Baz wrote:
 
 As an extension to the question, can I pop a gmail account, get a list of
 file attachments, and then provide a link to download the attachemts
without
 them ever having gone through my webserver? (if not POP some other way)
 
 So for example, you go to a site that shows the contents of a gmail
account,
 then u click on a file and it goes right from gmail to you.

Yes. But you have to log that visitor in to the GMail account, so 
he would be able to change the password of that account. And I am 
pretty sure it is against some part of the TOS of GMail.

Jochem



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234073
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: Fatal windows crash

2006-03-03 Thread Baz
Another thing to look into is the motherboard. Motherboards are notorious
for giving inconsistent errors. It might work once but not again in the same
situation. If you're out of options, try switching it and see what happens.

Baz


-Original Message-
From: Munson, Jacob [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 03, 2006 3:22 PM
To: CF-Talk
Subject: RE: Fatal windows crash

If it's WinXP, you could try a system restore.  Often times I see an
event in the restore list that I wasn't aware of, or forgot about, and
that could be your culprit.  Also, you could try removing services
and/or startup items (in msconfig).  Regardless of what others say,
software does sometimes cause a BSOD.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 03, 2006 1:08 PM
 To: CF-Talk
 Subject: Re: Fatal windows crash
 
 Yep and it doesn't crash (which discounts the hardware 
 question). Someone 
 said it might be the registry but I don't have any good 
 registry repair 
 tools. It's definitely linked to something with logging into 
 something, but 
 what that something is is a question. Network in or out it 
 still crashes. :(
 
 
  did ya try safe mode yet?
 
  Bryan Stevenson B.Comm.
  VP  Director of E-Commerce Development
  Electric Edge Systems Group Inc.
  phone: 250.480.0642
  fax: 250.480.1264
  cell: 250.920.8830
  e-mail: [EMAIL PROTECTED]
  web: www.electricedgesystems.com
 
  
 
 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234121
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


Compare data within 2 CFCs

2006-03-02 Thread Baz
Is there an easy way to compare the data within 2 CFCs? For example these 2
CFC instances contain different data:

 

CFC1=createObject('Customer').Read(ID=10)

CFC2=createObject('Customer').Read(ID=99)

 

Baz

 




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233871
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: Compare data within 2 CFCs

2006-03-02 Thread Baz
Thanks Bob but that wouldn't work in this case:

CFC1=createObject('Customer').Read(ID=10)
CFC2=duplicate(CFC1)
CFC2.setName('kakapipi')

I was thinking of perhaps some hash type function that would convert each
CFC into some 64-bit string that you could compare. Perhaps invoked like
this: isDuplicateCFC(CFC1,CFC2)

Baz



-Original Message-
From: Robert Everland III [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 02, 2006 8:37 AM
To: CF-Talk
Subject: Re: Compare data within 2 CFCs

You would need a function that would return the ID.

cffunction getID()
cfreturn variables.id
/cffunction


Then you do a compare outside of the cfcs.



Bob




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233886
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: Compare data within 2 CFCs

2006-03-02 Thread Baz
That's a decent suggestion too Tango, but some of the CFCs I want to compare
have other CFCs in them. So I could return one mother of a struct that
contains other structs for each internal CFC, but that's the part I'm trying
to avoid. 

One advantage is that I actually don't need to know what the differences
are, just that there are differences.

Baz


-Original Message-
From: Michael T. Tangorre [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 02, 2006 9:41 AM
To: CF-Talk
Subject: RE: Compare data within 2 CFCs

 From: Baz [mailto:[EMAIL PROTECTED] 
 Is there an easy way to compare the data within 2 CFCs? For 
 example these 2 CFC instances contain different data:
 CFC1=createObject('Customer').Read(ID=10)
 CFC2=createObject('Customer').Read(ID=99)

Provide a method in the Customer CFC that returns the instance data
(getInstance()). Then use this UDF to see the differences:
http://www.cflib.org/udf.cfm?ID=1136

Tango.





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233889
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


GMail manipulation remotely

2006-03-02 Thread Baz
Is it possible to write an app that can send email through GMail? For
example, if I wanted to send a 5mb attachment to a list of 10 users, could I
instruct the GMail server to forward the email to each user, or send CCs to
each user. The primary objective being not to duplicate the bandwidth for
the attachement locally.

 

Baz

 

 




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234019
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: RecordCount of query group

2006-02-28 Thread Baz
You could create a counter:

cfset OuterRecordcount=0 /
cfoutput query=getReord group=Name
   cfset OuterRecordcount=OuterRecordcount+1 /
   #Name#, #RecordCount#
cfoutput
   #SubName#, #RecordCount#
/cfoutput
/cfoutput

Baz


-Original Message-
From: j s [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006 11:11 AM
To: CF-Talk
Subject: RecordCount of query group

Is it possible to get the RecordCount of cf query group?

cfoutput query=getReord group=Name
   #Name#, #RecordCount#
cfoutput
   #SubName#, #RecordCount#
/cfoutput
/cfoutput

what is returned it the total RecordCount of the query and not the count of
SubNames in each group.

Total RecordCount: 4

Name1
  SubName1
  SubName2
(total SubName count 2 what is returned is 4)



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233645
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


SERVER scope

2006-02-19 Thread Baz
Hi,

I have a CFC that I use across all applications. It's basically a global UDF
library that stores no data. 

Is it ok to store this CFC in the SERVER scope rather than the application
scope? Is using a named lock for this ok:

cflock name=ServerUtils type=exclusive
   cfset Server.Utils=createObject('Component','SystemUtils') /
/cflock

Cheers,
Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232876
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: SERVER scope

2006-02-19 Thread Baz
Thanks guys,

Why is it frowned upon by the way? I've heard such talk before, that's why I
ask, but I'm not sure of the reasons.

Baz


-Original Message-
From: Mark A Kruger [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 19, 2006 5:41 PM
To: CF-Talk
Subject: RE: SERVER scope

If as you say this library is server wide then I say go for it :) But make
sure and check to see if it already exists and only instantiate it once -
othewise whats' the point?

-mark


-Original Message-
From: Baz [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 19, 2006 4:25 PM
To: CF-Talk
Subject: SERVER scope


Hi,

I have a CFC that I use across all applications. It's basically a global UDF
library that stores no data.

Is it ok to store this CFC in the SERVER scope rather than the application
scope? Is using a named lock for this ok:

cflock name=ServerUtils type=exclusive
   cfset Server.Utils=createObject('Component','SystemUtils') /
/cflock

Cheers,
Baz








~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232884
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 would I write this query...

2006-02-19 Thread Baz
SELECT *
FROM XYZ
WHERE ColumnName like 'A%'



-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 19, 2006 9:43 PM
To: CF-Talk
Subject: How would I write this query...

What I'm after would be a list
of the company names that
match the letters in the form field
that start with the first letter of
the company name...not with the
form field letters just anywhere in the
name...

E.g

Search for the letter A would bring up

Allstate
AIM

Not:

Hartford
Allstate
AIM

or

if the search was for  All...

Allstate

would match...

???

Rick




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232886
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


Has anyone successfully CFPOP'ed gmail?

2006-02-17 Thread Baz
Has anyone successfully CFPOP'ed gmail?

Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232682
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: Has anyone successfully CFPOP'ed gmail?

2006-02-17 Thread Baz
 At $60, it's one of those things you get if you have need for it but if
 you just want to play around

Michael, I *am* still in play-around mode, and you're right, it's not quite
worth it in that case. It's too bad they don't have a demo because I'd
definitely pay for it if it works as expected.

 Yes. Just offload the SSL encryption to stunnel:

Jochem, it looks like I will be experimenting with your (hopefully not too
complicated) solution.

Thanks everyone,
Baz



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232737
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: Suggestion for the list

2006-02-17 Thread Baz
So far it seems like we're stuck with the same 2 options:
 
A. Remove MessageID from header so people can safely reply to start a new
thread.

B. Keep MessageID in header so that people can change the subject slightly
and have the message stay in the same thread.

I would vote for option A because it seems like that would make things run
better even if it's not correct.

Jochem, I'm not sure how removing the MessageID would:

- Screw up charsets
- put mail in junk
- influence line-wrapping

Cheers,
Baz


-Original Message-
From: George Abraham [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 17, 2006 2:24 PM
To: CF-Talk
Subject: Re: Suggestion for the list

Why not? I learnt a heck of a lot from it!

George


On 2/17/06, Aaron Roberson [EMAIL PROTECTED] wrote:

 I can't beleive you guys are still talking about this...

 -Aaron

 On 2/17/06, Dave Watts [EMAIL PROTECTED] wrote:
   I haven't read through the entire thread, but I though the
   problems were mostly not because people start talking about
   something irrelevant in the same thread (which you can't
   solve by programming), but when people reply to an old thread
   to start a completely new thread (with a brand new subject).
   The issue was that the same messageid is kept in the headers,
   and some programs would think it's the same thread.
   Therefore the message id needs to be stripped out for threads
   like this and started anew.
 
  That sounds somewhat reasonable - I haven't read through the entire
 thread
  either. People do, however, legitimately change thread subject line on
  occasion without changing the actual topic of the thread.
 
  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!
 
 
 

 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232747
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: Suggestion for the list

2006-02-16 Thread Baz
Until reading all your comments, I actually didn't know there was secret
code in the header to identify threads - I thought it was ok to reply and
change subject. I bet a lot of the 'lazy' people are in the same boat.

Now I know, and that's half the battle.

Baz


-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 16, 2006 3:20 PM
To: CF-Talk
Subject: Re: Suggestion for the list

 Message has a reply id but different subject. result: thread it.

I don't see your point.
If it has a new subject, it should start a new thread, wether it is a 
physical reply to any other message, no?

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232588
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


Languages, accents, tags, xml

2006-02-14 Thread Baz
Hi,

I currently store a sites's content in XML files to handle different
languages. This means that I have to escape tags, accents, etc. like so:

lt;pgt;
With R#233;no-pr#234;t, you are secured! R#233;no-pr#234;t offers you a
triple guarantee: accessibility, quality and security.
lt;/pgt;

Is there some tool that can do this automatically for me? Perhaps in
eclipse? I would like to just write this:

pthis is some text/p

And have it automatically converted with some tool to this:

lt;pgt; this is some text lt;/pgt;

Cheers!

Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232283
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


CFPop Gmail

2006-02-09 Thread Baz
Hi,

I am having trouble CFPOP'ing my gmail account. I think it may have to do
with the fact that an SSL connection is required. Has anyone got it to work?

Cheers,
Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231767
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


MG VS. Mach - No holds barred

2006-02-04 Thread Baz
Frameworks get brought up a lot on this list - but we have yet to see an
honest and ruthless direct comparison between them. Would anyone who has had
experience in both MG and Mach provide a *specific* point where one
framework is better than the other? 

Examples: (none are true)
- MG processes faster pages faster than Mach
- Mach uses less code to complete the same tasks
- MG allows the use of multiple factories, Mach doesn't
- Mach breaks on linux
(again, none are true)

Cheers,
Baz

P.S. If this interests you, the cfpetmarket.com project is a goldmine. It
shows the same app built in different frameworks.




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231350
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: SQL Encapsulation?

2006-02-03 Thread Baz
Hi Gang,

Found your messages in my Junk Mail - was wondering why no-one responded!

Brian you're right on all fronts. The example I gave was a paging one, but
it's only an example, the real issue is re-using *portions* of SQL code in
other queries - and not the query result itself. Here is a way that I have
re-used *portions* of SQL code in 1 CFC:

** Search() **
cfquery
SELECT COUNT(OrderID) as TotalRows
FROM #getFrom()#
WHERE CustomerName like '%Keywords%'
/cfquery

** Count() **
cfquery
SELECT #getSelect()#
FROM #getFrom()#
WHERE StatusID  5
/cfquery

** getSelect() **
DISTINCT OrderID, CustomerID, BillingAddressID, ShippingAddressID,
OrderDate, OrderFile, OrderPrescriptionFile, OrderInvoicePrintedDate,
OrderAgreementSigned, OrderShippingPrice, OrderDiscount, OrderComment,
OrderProblem, OrderCancelled, StatusID, Status, StatusPhrased, CustomerID,
CustomerName

** getFrom() **
Order INNER JOIN
OrderStatus ON `Order`.OrderID = OrderStatus.OrderID INNER JOIN
Status ON OrderStatus.StatusID = Status.StatusID INNER JOIN
Customer ON `Order`.CustomerID = Customer.CustomerID

The preceding methods all live in the same CFC. You will notice that the
Search() method and Count() method share the same FROM clause by getting it
from another method.  But they have a different SELECT, WHERE, GROUP BY, and
so forth, so the query results will be very different. Other methods may
share the same WHERE but not the same SELECT and even more methods may SHARE
different parts. So you see, it's not a matter of caching queries, but
building queries using encapsulated SQL.  

I am finding that my gateways CFCs (those that return queries) are generally
using the same SQL for each method in the CFC. And that makes sense because
if you want a COUNT it usually is for a record-set you want I the future.
Same for SUM, GROUP, etc... These are all different representations of the
same base.

So SQL being a form of code like any other, should be re-used and
encapsulated like any other. It doesn't seem proper to have to find and
paste the same changes in 15-20 methods just because a little logic in the
SQL changes.
 
Thoughts?

Baz





-Original Message-
From: Brian Peddle [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 03, 2006 9:07 AM
To: CF-Talk
Subject: RE: SQL Encapsulation?

I was basing my assumptions on writing these same things over and over from
job to job for past 10 years.

I assumed with the top 50 he is paging.  I am also assuming he built up his
where clause using a series of 'if' or 'case' statements so it won't always
be the same.  So if someone has 50 dropdowns for a report generator the
person could pick no options or pick all 50.  

But it seems as though he has disappeared from our discussion so your are
right, its us guessing what he want.

-Original Message-
From: Deanna Schneider [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 03, 2006 8:08 AM
To: CF-Talk
Subject: Re: SQL Encapsulation?

Well, first of all, I didn't read his initial question to be one of
pagination, which is what you're implying. I read it as one of reusing query
results in multiple ways. In that scenario, you could very easily cache your
object, either in the application or the session scope. So, you'd be storing
more in memory, but only making a single trip to the database. It's all
trade-offs. Obviously, if you're working with millions of rows of data, this
might not be the best approach. But, it seemed reasonable to me that if he's
indicating that the where clause could have hundreds of lines of complex
logic based on passed in arguments that he'd ultimately be returning a
relatively small result set.

Honestly, I'd be doing my best not to design an app that has hundreds of
lines of complex logic for a single query, as I'd find that seriously
unmaintainable. But, without knowing more specifics about what he's actually
trying to acomplish, we're just tossing out potential solution scenarios. We
don't really know the paramaters of the problem we're trying to solve.


On 2/2/06, Brian Peddle [EMAIL PROTECTED] wrote:

 Using this method you would be bringing back potentially hundreds of
 thousands of records.

 He only needs 50 at a time.  Why pass 100,000 or more maybe when you can
 send 50 records back to ColdFusion.

 -Original Message-
 From: Deanna Schneider [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 02, 2006 2:39 PM
 To: CF-Talk
 Subject: Re: SQL Encapsulation?

 pseudo-code...
 cfcomponent displayname=mystuff hint=Get's all my stuff

 cfset variables.allrows = 


 cffunction access=public name=init returntype=mystuff
 output=false hint=Initializes the object.
  !--- Do big complex query here  and set it to the
 variables.allrows var ---
  cfquery
  Select blah blah
  From Blah blah
  WHERE blah blah
  /cfquery

  cfset variables.allrows = myquery
 cfreturn this /
 /cffunction

 cffunction access=public name=getTotal output

RE: SQL Encapsulation?

2006-02-03 Thread Baz
I'm not such a big fan of that method either - that's why I wrote the post! 

:)

Maybe I should just make better use of views... In any case, I appreciate
the time you spent giving it thought.

Cheers,
Baz

 

-Original Message-
From: Deanna Schneider [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 03, 2006 11:25 AM
To: CF-Talk
Subject: Re: SQL Encapsulation?

Well, we were both interpreting your request a bit incorrectly then.

But, I'm not sure I have an answer for you on this one. It's not something
I'd do. I'd be more apt to make a view that encapsulated the generic
joined data, and then pull the columns (selects) under the conditions
(wheres) that I wanted. I find the method you're using below to be difficult
to read, and while I understand the concept, it's one of those places where
I fail to see the benefit of doing it that way.

On 2/3/06, Baz [EMAIL PROTECTED] wrote:

 Hi Gang,

 Found your messages in my Junk Mail - was wondering why no-one responded!

 Brian you're right on all fronts. The example I gave was a paging one, but
 it's only an example, the real issue is re-using *portions* of SQL code in
 other queries - and not the query result itself. Here is a way that I have
 re-used *portions* of SQL code in 1 CFC:

 ** Search() **
 cfquery
 SELECT COUNT(OrderID) as TotalRows
 FROM #getFrom()#
 WHERE CustomerName like '%Keywords%'
 /cfquery

 ** Count() **
 cfquery
 SELECT #getSelect()#
 FROM #getFrom()#
 WHERE StatusID  5
 /cfquery

 ** getSelect() **
 DISTINCT OrderID, CustomerID, BillingAddressID, ShippingAddressID,
 OrderDate, OrderFile, OrderPrescriptionFile, OrderInvoicePrintedDate,
 OrderAgreementSigned, OrderShippingPrice, OrderDiscount, OrderComment,
 OrderProblem, OrderCancelled, StatusID, Status, StatusPhrased, CustomerID,
 CustomerName

 ** getFrom() **
 Order INNER JOIN
 OrderStatus ON `Order`.OrderID = OrderStatus.OrderID INNER JOIN
 Status ON OrderStatus.StatusID = Status.StatusID INNER JOIN
 Customer ON `Order`.CustomerID = Customer.CustomerID

 The preceding methods all live in the same CFC. You will notice that the
 Search() method and Count() method share the same FROM clause by getting
 it
 from another method.  But they have a different SELECT, WHERE, GROUP BY,
 and
 so forth, so the query results will be very different. Other methods may
 share the same WHERE but not the same SELECT and even more methods may
 SHARE
 different parts. So you see, it's not a matter of caching queries, but
 building queries using encapsulated SQL.

 I am finding that my gateways CFCs (those that return queries) are
 generally
 using the same SQL for each method in the CFC. And that makes sense
 because
 if you want a COUNT it usually is for a record-set you want I the future.
 Same for SUM, GROUP, etc... These are all different representations of the
 same base.

 So SQL being a form of code like any other, should be re-used and
 encapsulated like any other. It doesn't seem proper to have to find and
 paste the same changes in 15-20 methods just because a little logic in the
 SQL changes.

 Thoughts?

 Baz





 -Original Message-
 From: Brian Peddle [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 03, 2006 9:07 AM
 To: CF-Talk
 Subject: RE: SQL Encapsulation?

 I was basing my assumptions on writing these same things over and over
 from
 job to job for past 10 years.

 I assumed with the top 50 he is paging.  I am also assuming he built up
 his
 where clause using a series of 'if' or 'case' statements so it won't
 always
 be the same.  So if someone has 50 dropdowns for a report generator the
 person could pick no options or pick all 50.

 But it seems as though he has disappeared from our discussion so your are
 right, its us guessing what he want.

 -Original Message-
 From: Deanna Schneider [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 03, 2006 8:08 AM
 To: CF-Talk
 Subject: Re: SQL Encapsulation?

 Well, first of all, I didn't read his initial question to be one of
 pagination, which is what you're implying. I read it as one of reusing
 query
 results in multiple ways. In that scenario, you could very easily cache
 your
 object, either in the application or the session scope. So, you'd be
 storing
 more in memory, but only making a single trip to the database. It's all
 trade-offs. Obviously, if you're working with millions of rows of data,
 this
 might not be the best approach. But, it seemed reasonable to me that if
 he's
 indicating that the where clause could have hundreds of lines of complex
 logic based on passed in arguments that he'd ultimately be returning a
 relatively small result set.

 Honestly, I'd be doing my best not to design an app that has hundreds of
 lines of complex logic for a single query, as I'd find that seriously
 unmaintainable. But, without knowing more specifics about what he's
 actually
 trying to acomplish, we're just tossing out potential solution scenarios.
 We
 don't really know the paramaters of the problem we're trying

RE: Query a mySQL View?

2006-02-03 Thread Baz
The best thing to do with 
the MySQL site is search it
through google: 

views site:http://dev.mysql.com/doc/refman/5.1

Then it becomes awesome 
again ;-)

Baz



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231288
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


Migrating app version 2.0

2006-02-02 Thread Baz
Hi,

We just finished V2.0 of one of our client's apps, which included a complete
re-factoring of code from procedural to CFC, upgraded functionality, and a
significantly modified DB.

Since the changes are major, we will be deploying the new app on a new
domain, and, once we're ready, we will switch the dns to there. (rather than
just overwriting existing files on the existing domain)

Everything seems easy enough except for the database part of it. Since it
was majorly changed, we will create a new MySQL5 DB on the new domain, and
migrate all the data from the current MS-SQL server.

Does anyone have any tips, suggestions, gotchas for doing this? Should I do
it through CF by creating scripts that query the old DB and insert in the
new?  How do I access a remote DB in CF? Are there better ways, tools?

Thanks for any help,

Baz





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231079
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


SQL Encapsulation?

2006-02-02 Thread Baz
Like any other code, there are times when portions of your SQL queries need
to be re-used or duplicated. A common example is having a method that
returns a COUNT of a query based on some conditions, and having another
method that returns some rows from that query. For instance:

*** getCount() ***
SELECT 
Count(OrderID) as OrderIDCount
FROM 
OrderTable INNER JOIN 
StatusTable ON (OrderTable.OrderID= StatusTable.OrderID)
WHERE 
(whatever)

*** getRows() ***
SELECT TOP 50
   OrderID, StatusID
FROM 
OrderTable INNER JOIN 
StatusTable ON (OrderTable.OrderID= StatusTable.OrderID)
WHERE 
(whatever)

In the preceding code, the FROM clause is repeated in both methods, as is
the WHERE clause. 

Now in a real-world complex app, that FROM would actually be 10-15 lines
long, and the WHERE could have hundreds of lines of complex logic based on
passed in arguments. Plus you may need not 2, but 5, 10, 20 methods using
the same FROM and/or WHERE and/or SELECT.

So my question is how do people handle this? If you had 15 methods with
complex WHERE and FROM clauses that are repeated intermittently, and then
something changes, it's an error-prone hassle to copy paste all the affected
sections.

Thoughts?

Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231101
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: Password Strength Graphic

2006-01-31 Thread Baz
Here is a UDF on cflib.org that checks complexity:
http://cflib.org/udf.cfm?ID=1072

Cheers,
Baz


-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 31, 2006 11:39 AM
To: CF-Talk
Subject: Re: Password Strength Graphic

Should be easy to do.  You check the password for various criteria,
and then do a JS rollover to change the image out.  Some basic
criteria are the number of character classes (uppercase, lowercase,
numbers, punctuation) the password uses, the length of the password,
whether it has dictionary words in it (apple), whether it's based on
dictionary words (4pp13).  You can probably figure out what
Hotmail's algorithm is by some simple trial and error, or maybe even
looking at the source.

cheers,
barneyb

On 1/31/06, Eric J. Hoffman [EMAIL PROTECTED] wrote:
 I was just signing up for a Hotmail account (yikes) because someone
 mentioned the password strength graphic on it and I wanted to see it.

 It is a graphical representation of how strong of a password you are
 creating.  Low Medium Strong

 Has anyone created something like this before?  Any pointers on where to
 start?

 Thanks.
 


 Eric J. Hoffman

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

Got Gmail? I have 100 invites.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230853
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: CFEclipse Vs Dreamweaver

2006-01-27 Thread Baz
I second that... remote access in general is weak in Eclipse. Also bad, is
not being able to double-click a file in windows explorer and have it open
in the same instance of Eclipse. Spike has a plug-in for that I think, but
it seems heavy for something so trivial. Eclipse likes you to create
projects.

Baz


-Original Message-
From: Sean Corfield [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 27, 2006 8:09 PM
To: CF-Talk
Subject: Re: CFEclipse Vs Dreamweaver

On 1/27/06, Peter Bell [EMAIL PROTECTED] wrote:
 I find
 Dreamweaver to be a little buggy if/when the FTP connection runs slowly

Which version of Dreamweaver? FTP support was overhauled for DW8 and
now runs in the background so it doesn't even stop you working on
files while FTP operations execute.

 I can't find a similar feature in CFEclipse. Is there
 an easy way to see an explorer view with a list of FTP servers so I can
edit
 various remote files easily in CFEclipse?

FTP support is pretty poor in Eclipse, in my opinion.
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

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



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230659
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: Coldfuion Life Spam

2006-01-26 Thread Baz
Here's some ammunition: http://www.tiobe.com/index.htm?tiobe_index

That link ranks the most used programming languages in the world. Notice the
9 green arrows next to CF! Moven' on up...

Cheers,
Baz


-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 26, 2006 3:44 PM
To: CF-Talk
Subject: Re: Coldfuion Life Spam

 So you're saying they change their plans at least once a month?  :)

 ~Brad

Congrats...you win the prize for most obvious joke Brad ;-)

I was waiting for that one to showthanks for not making me wait too 
long...hehe

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230533
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


Application variables default timeout iin CFAdmin

2006-01-26 Thread Baz
Hi,

In the CFAdmin, under 'Memory Variables', there's a default application
variables timeout setting. I personally don't want my application variables
to ever timeout, is it common practice to just put 999 days? Are there any
issues to this? Is there any reason to want your app variables to timeout
often?

Thanks,
Baz



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230564
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


CF Gateways GoogleTalk

2006-01-22 Thread Baz
Hi,

Are there any more requests from Google Talk that CF can listen to besides
these default ones:
 
 - onIncomingMessage()
 - onAddBuddyRequest()
 - onAddBuddyResponse()
 - onBuddyStatus()
 - onIMServerMessage()
 - onAdminMessage()

For example, a listener to detect the Baz is Typing a Message function
(i.e. onBuddyTyping())

Or any others?

Thanks,
Baz



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230202
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: Fusebox / Google Tracking and Adsense

2006-01-20 Thread Baz
I could test, but I don't use fusebox.

Baz

-Original Message-
From: Josh Carrico [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 20, 2006 9:18 AM
To: CF-Talk
Subject: Re: Fusebox / Google Tracking and Adsense

Does anyone use adsense in their applications that may be interested in beta
testing this?



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230109
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


Wanna help test a GoogleTalk gateway?

2006-01-20 Thread Baz
Hi,

If anyone has google talk installed on their machine and can spare a moment
to help test a gateway, please try this:

1. Add the user: groupchat
2. Type this command: /join coldfusion
3. Type any message

Thanks,
Baz





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230131
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: Using CreateObject with init correctly

2006-01-18 Thread Baz
Hi Richard,

To init() on create you need to make sure that the init() method returns THIS 
(cfreturn this /) In your example it seems that you are returning VOID.

Cheers,
Baz

-Original Message-
From: Richard East [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 18, 2006 8:36 AM
To: CF-Talk
Subject: Using CreateObject with init correctly

I have seen code where an object was created like this:
cfset userInfo=CreateObject(component, 
objects.player).init(REQUEST.id) /

The method I had been using that works is like this:
cfset REQUEST.id = 1 /
cfset userInfo=CreateObject(component, objects.player) /
cfset userInfo.init(datasource) /
cfset REQUEST.qryUserDetails = userInfo.getUserDetails(REQUEST.id) /
cfdump var=#REQUEST.qryUserDetails#cfabort /

I have tried the method of initiating the Object as it is created, but when I 
do I get an error:

cfset userInfo=CreateObject(component, 
objects.player).init(REQUEST.id) /
cfset REQUEST.qryUserDetails = userInfo.getUserDetails(REQUEST.id) /
cfdump var=#REQUEST.qryUserDetails#cfabort /

This fails with the error message, “Variable userInfo is 
undefined.” Would someone clarify how I can do this correctly and what 
would be best practice?

Thank you for your help and opinions,

Richard



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229859
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


CFCs, TAGs, Locking

2006-01-18 Thread Baz
Let's say you have a display TAG called DisplayOrder.cfm that accepts as an
argument OrderObj.cfc. Basically the TAG displays the contents of the CFC.

Let us also say that in 1 particular case you are passing an OrderObj that
is stored in the application scope to the TAG.

Where do you employ locking to avoid race conditions? It can't be within the
TAG because sometimes locking is not necessary. So do you lock the entire
call to the tag like so:

cflock
   Order:Display OrderObj=#application.OrderObj#
/cflock

Does that even lock everything that happens within the tag and stop race
conditions? Isn't it extremely inefficient to lock a potentially huge chunk
of code when only a couple of lines really need to be locked? How do people
generally handle this?

Cheers,
Baz





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229873
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


Factory, Coldspring for Tags?

2006-01-18 Thread Baz
Using a Factory (or Coldspring) to create my objects has changed my life.
Instead of having code like this all over the place:

cfset OrderObj=
createObject('Component','Mapping.OrderObj')
.init(createAnotherObject, andAnother, andAnother) /

I simply do this:

cfset OrderObj=Factory.Load('OrderObj') /

The code is clean, all dependencies are taken care of, and in case the CFC
changes I only have to reflect those changes in the factory.

I was wondering if any similar patterns, methodologies or frameworks existed
for managing TAGs, a TAG factory so-to-speak? Basically something to simply
this:
 
Payment:Form 
PaymentObj=#PaymentObj# 
CustomerObj=#CustomerObj#
Utils=#Utils#

Is it even logically feasible?

Cheers,
Baz





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229876
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: CFCs, TAGs, Locking

2006-01-18 Thread Baz
Hi Michael,

There are a couple of issues with copying my persistent variable to the
request scope. 

First of all, in this particular case, the main reason for persisting the
object is purely performance. Its an object that gets extremely often and
persisting it saves a lot of milliseconds. So copying it on every request
would defeat the whole purpose of persisting it. 

Secondly, it's not so easy to clone CFCs. You would need to write a custom
function that again would be killer to performance.

Thanks for the suggestion anyhow,
Baz



-Original Message-
From: Michael Traher [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 18, 2006 11:42 AM
To: CF-Talk
Subject: Re: CFCs, TAGs, Locking

maybe you could make a copy of your object in the request scope
onRequestStart and then work with
request.OrderObj


On 1/18/06, Baz [EMAIL PROTECTED] wrote:

 Let's say you have a display TAG called DisplayOrder.cfm that accepts as
 an
 argument OrderObj.cfc. Basically the TAG displays the contents of the CFC.

 Let us also say that in 1 particular case you are passing an OrderObj that
 is stored in the application scope to the TAG.

 Where do you employ locking to avoid race conditions? It can't be within
 the
 TAG because sometimes locking is not necessary. So do you lock the entire
 call to the tag like so:

 cflock
   Order:Display OrderObj=#application.OrderObj#
 /cflock

 Does that even lock everything that happens within the tag and stop race
 conditions? Isn't it extremely inefficient to lock a potentially huge
 chunk
 of code when only a couple of lines really need to be locked? How do
 people
 generally handle this?

 Cheers,
 Baz





 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229878
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: CFCs, TAGs, Locking

2006-01-18 Thread Baz
Very good point Ben, I was waiting for such a comment. But what if the TAG
*does* update itself? Perhaps it allows you to choose an ID and gets some
info from the DB based on it? 

Plus there are no guarantees as to what's happening inside the CFC. Perhaps
to return data it must update an internal variable first. You don't really
know and you shouldn't have to, that's one of the beauties of CFCs. 

There must be a more secure, robust way of making TAGs scope agnostic. TAGs
shouldn't have to know how the CFCs they are passed work or where they are
stored. 

One bad solution would be to have a second trimmed down version of the CFC,
that you use specifically to pass to TAGs. This CFC would contain only the
methods that are safe no matter what scope the CFC is in. The problems with
this are infinite though.

Cheers,
Baz



-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 18, 2006 11:51 AM
To: CF-Talk
Subject: RE: CFCs, TAGs, Locking

If you are just displaying information, I would say that in like 99.9% of
the time, even with race conditions, you wouldn't have to lock. Think about
what the worst case scenario is here? Is it possible that you could display
corrupt data, and if so, is it mission criticle?


Ben Nadel 
Web Developer
Nylon Technology
350 7th Ave.
Suite 1005
New York, NY 10001
212.691.1134 x 14
212.691.3477 fax
www.nylontechnology.com

Sanders: Lightspeed too slow?
Helmet: Yes we'll have to go right to ludacris speed.
-Original Message-
From: Baz [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 18, 2006 11:33 AM
To: CF-Talk
Subject: CFCs, TAGs, Locking

Let's say you have a display TAG called DisplayOrder.cfm that accepts as an
argument OrderObj.cfc. Basically the TAG displays the contents of the CFC.

Let us also say that in 1 particular case you are passing an OrderObj that
is stored in the application scope to the TAG.

Where do you employ locking to avoid race conditions? It can't be within the
TAG because sometimes locking is not necessary. So do you lock the entire
call to the tag like so:

cflock
   Order:Display OrderObj=#application.OrderObj#
/cflock

Does that even lock everything that happens within the tag and stop race
conditions? Isn't it extremely inefficient to lock a potentially huge chunk
of code when only a couple of lines really need to be locked? How do people
generally handle this?

Cheers,
Baz









~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229899
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


Dual Xeon 3.06 GHz - 120 GB IDE HD - 2 GB RAM

2006-01-18 Thread Baz
If I installed:
   - CFMX7 Enterprise
   - MySQL 5.0

On the following machine:
   - Dual Xeon 3.06 GHz - 120 GB IDE HD - 2 GB RAM

Am I making good use of the hardware? Can both technologies fully utilize
the CPU and RAM? Any obvious bottlenecks, perhaps add another GB of ram?

Cheers,
Baz



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229913
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: CFCs, TAGs, Locking

2006-01-18 Thread Baz
The first suggestion! Thanks. It seems like it would work but coding locking
stuff in EVERY tag just in case it *might* need it seems like a lot of
overhead. Maybe the only solution is to never pass in objects and only pass
in local structs to TAGs. That way you can be sure no weird modifications
occur. Maybe its bad practice to have a TAG do anything besides display.

Baz
 

-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 18, 2006 2:24 PM
To: CF-Talk
Subject: RE: CFCs, TAGs, Locking

What about having an attirubte of the tag (LOCK) that defaults to false?
When there are race conditions, are you going to know when they happen?
Like, if the timing is contextual, you could put lock=true in the
appropriate call to the tag?

Never done that, but an idea


Ben Nadel 
Web Developer
Nylon Technology
350 7th Ave.
Suite 1005
New York, NY 10001
212.691.1134 x 14
212.691.3477 fax
www.nylontechnology.com

Sanders: Lightspeed too slow?
Helmet: Yes we'll have to go right to ludacris speed.
-Original Message-
From: Baz [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 18, 2006 1:10 PM
To: CF-Talk
Subject: RE: CFCs, TAGs, Locking

Very good point Ben, I was waiting for such a comment. But what if the TAG
*does* update itself? Perhaps it allows you to choose an ID and gets some
info from the DB based on it? 

Plus there are no guarantees as to what's happening inside the CFC. Perhaps
to return data it must update an internal variable first. You don't really
know and you shouldn't have to, that's one of the beauties of CFCs. 

There must be a more secure, robust way of making TAGs scope agnostic. TAGs
shouldn't have to know how the CFCs they are passed work or where they are
stored. 

One bad solution would be to have a second trimmed down version of the CFC,
that you use specifically to pass to TAGs. This CFC would contain only the
methods that are safe no matter what scope the CFC is in. The problems with
this are infinite though.

Cheers,
Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229914
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: Dual Xeon 3.06 GHz - 120 GB IDE HD - 2 GB RAM

2006-01-18 Thread Baz
Good call.



-Original Message-
From: Russ [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 18, 2006 3:06 PM
To: CF-Talk
Subject: RE: Dual Xeon 3.06 GHz - 120 GB IDE HD - 2 GB RAM

The hd is an obvious bottleneck.  That's usually the slowest point in your
system.  I would use a SCSI or at least a SATA drive, and then probably for
good measure set it up a mirror RAID array (that way you get better
performance. 

Russ

 -Original Message-
 From: Baz [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, January 18, 2006 2:49 PM
 To: CF-Talk
 Subject: Dual Xeon 3.06 GHz - 120 GB IDE HD - 2 GB RAM
 
 If I installed:
- CFMX7 Enterprise
- MySQL 5.0
 
 On the following machine:
- Dual Xeon 3.06 GHz - 120 GB IDE HD - 2 GB RAM
 
 Am I making good use of the hardware? Can both technologies fully utilize
 the CPU and RAM? Any obvious bottlenecks, perhaps add another GB of ram?
 
 Cheers,
 Baz
 
 
 
 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229917
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: Significant Performance Hit on Recursive Custom Tags?

2006-01-18 Thread Baz
Barney,

 if you have execution times enabled in the debugging output

That's only if you have debugging enabled right?

Baz



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229954
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: Gmail thinks cf-talk is spam (since January 11th)?

2006-01-15 Thread Baz
I get the same problem in Outlook... lot is marked as spam everyday.



-Original Message-
From: Tony [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 15, 2006 7:30 PM
To: CF-Talk
Subject: Re: Gmail thinks cf-talk is spam (since January 11th)?

there is a Not Spam button when i go into my Gmail Spam Filtered Box.

tony


On 1/15/06, James Holmes [EMAIL PROTECTED] wrote:
 I'm seeing the same thing as some of the others - cf-talk messages
 being marked as spam in reasonable numbers for no reason. Over a day,
 perhaps 5-10 from various people will get marked.

 On 1/16/06, Dana [EMAIL PROTECTED] wrote:
  for what it is worth -- I have had a couple of Mike's messages wind up
  in spam, but no others. I had a similar problem with community a while
  back and realized I had marked a whole bunch of messages as spam
  instead of deleting them.

 --
 CFAJAX docs and other useful articles:
 http://jr-holmes.coldfusionjournal.com/

 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229639
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


Coldfusion Licensing, why?

2006-01-14 Thread Baz
Wouldn't it be smarter if Coldfusion were licensed based on number of
instances and nothing else? Basically everyone would get enterprise, but you
would only be able to run as many instances/sandboxes as you pay for. So
pricing would be something like:

- 1000$: max of 1 instance/sandbox (like CF Standard is today)
- 2000$: max of 2-5 instances/sandboxes
- 3000$: max of 5-20 instances/sandboxes
- 4000$: max of 20-50 instances/sandboxes
- 5000$: unlimited instances/sandboxes (like CF Enterprise is today)

Benefits
- No matter which CF you buy, it is installed identically, rather than
having to learn the differences between Standard and Enterprise (paths,
administration, etc.)

- Upgrading becomes just a matter of updating the license, no new install or
re-configuration or re-boots. This is a web server after-all.

- More money for Adobe: A lot of people who pay 1000$ for Standard would
choose to pay more for the added security, while most of the people who pay
for Enterprise now would still pay the same, since they probably already
have many sites.

- Encourage security: Instead of making sandbox security out of reach for a
small shop, encourage them to get it and improve CF's overall reputation and
stability.

- Allowing gateways to be available to all would make CF more valuable and
sought after. Plus is it fair to pay a 4000$ premium for casual gateway use?
Why box out all the interesting gateway applets that could be developed and
expanded?

It seems like this would generate more money for Adobe and make people
happier.

Just a rant,
Baz










~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229585
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: what kind of forms do you all use out there?

2006-01-13 Thread Baz
I also use standard forms... flash forms are WAY too slow and unnecessary
unless you are really doing something complex or building a HUGE form. And
even then, everything ends up looking the same and generic. 

I dabbled with XML forms for a while but wasn't happy with the results
either. I found it difficult, and sometimes impossible, to get the exact
layout I needed.

With that said, if you find any good examples of xml-forms in use, or some
good XSL templates, post em!

It would be cool if someone made a site a la cflib with a databank of nice
XSLs Ray...

Cheers,
Baz


-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 13, 2006 7:45 AM
To: CF-Talk
Subject: Re: what kind of forms do you all use out there?

We are on CF 6.1; I use standard forms, so I can control the JS and
format completely and I can use AJAX without breaking anything. When
we upgrade to 7 I'll look at the new options and see how well they
work with AJAX (if at all).

On 1/13/06, Sebastian Mork [EMAIL PROTECTED] wrote:
 Hi,

 as I wrote in my last mail, I used cfforms flash-forms in my last
 projekt, but now in the new one (onlineshop) I'm trying to use xml-forms
 generated by cfform, but... I've some problems getting started (dont
 know much about xsl .. and the styles form-elements are handled)

--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229436
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: Encrypt CC number and store in DB

2006-01-13 Thread Baz
Thanks Mark.


-Original Message-
From: Mark A Kruger [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 13, 2006 8:47 AM
To: CF-Talk
Subject: RE: Encrypt CC number and store in DB

Baz,

This blog post has some good info...

http://mkruger.cfwebtools.com/index.cfm?mode=aliasalias=cc.secure

The comments below give a lot of insight on various approaches as well.

-Mark


-Original Message-
From: Baz [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 12, 2006 5:20 PM
To: CF-Talk
Subject: RE: Encrypt CC number and store in DB


I have to store credit card numbers for an internal order processing system.
Orders come by fax and the credit card number must be written to DB for
later viewing/charging by another employee.

Where can I see these regulations?

Cheers,
Baz


-Original Message-
From: Jordan Michaels [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 12, 2006 6:13 PM
To: CF-Talk
Subject: Re: Encrypt CC number and store in DB

Dave Watts wrote:

What's the best way to encrypt a CC number and store it in DB?

Ideally, it's best not to store it at all.


Couldn't have said it better myself.

Also, keep in mind that CC storage is highly regulated. Non-compliance
could lead to heavy fines and, in most cases, cancellation of your
merchant account.

--
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
[EMAIL PROTECTED]







~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229455
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: Encrypt CC number and store in DB

2006-01-13 Thread Baz
Those are good points bobby, but I'm sure you could think of at least 1
valid scenario where CC numbers are required for later charging...

What about using a CC number to see if that CC has enough funds and then
doing the charging it later? Or better yet, what if you have customers who
purchase very frequently? They DEMAND to have their number stored instead of
typing it in each time.

These are already 2 valid cases.

Baz


-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 13, 2006 9:23 AM
To: CF-Talk
Subject: RE: Encrypt CC number and store in DB

Do you actually get people to give you their credit card information without
them even knowing:
a) how much they are going to be charged
b) whether or not you charge them more for shipping because of where they
live
c) if what they WANT to order is even in stock?

If so, you must have one user friendly, warm and fuzzy feeling generating
site to make people feel that comfortable. (is it basket basics dot com?)

Why would any of that information (in stock, shipping cost, shipping
location, etc..., and a FINAL price) not be obtainable BEFORE getting the
credit card number? If any of it IS unobtainable without a Credit Card
number, it sounds like a flawed system to me.

 
...:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
 

-Original Message-
From: Stephens, Larry V [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 13, 2006 8:44 AM
To: CF-Talk
Subject: RE: Encrypt CC number and store in DB

The best way is DO NOT DO IT.

No I'm not just being sarcasticbut there should be no reason to do 
this

[snip]

Except - we don't know the final cost until the items purchased are packaged
and postage/freight is figured. (And we make sure the items are actually in
stock and not on order, etc.) The configuration (i.e., number of boxes) can
vary a great deal depending on what is ordered (some things will pack inside
others, etc.) and, of course, the actual charge depends on where you are
shipping it (and keeping up with UPS and USPS shipping tables is no trivial
matter).

Larry Stephens
[EMAIL PROTECTED]





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229456
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: Encrypt CC number and store in DB

2006-01-13 Thread Baz
I read a bit about PCI Data Security Standard and it doesn't seem to be a
big deal. This article summarizes it:
http://mkruger.cfwebtools.com/index.cfm?mode=aliasalias=cc.secure


The standard doesn't even ask that you encrypt stored values - just the
transmission of values (SSL)

It really defines minimums.

Baz



-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED] 
Sent: Friday, January 13, 2006 10:05 AM
To: CF-Talk
Subject: RE: Encrypt CC number and store in DB

Just ensure you are 100% compliant with the PCI Data Security Standard, or
you can pay the consequence.



-Original Message-
From: Baz [mailto:[EMAIL PROTECTED] 
Sent: 13 January 2006 15:11
To: CF-Talk
Subject: RE: Encrypt CC number and store in DB

Those are good points bobby, but I'm sure you could think of at least 1
valid scenario where CC numbers are required for later charging...

What about using a CC number to see if that CC has enough funds and then
doing the charging it later? Or better yet, what if you have customers who
purchase very frequently? They DEMAND to have their number stored instead of
typing it in each time.

These are already 2 valid cases.

Baz


-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 13, 2006 9:23 AM
To: CF-Talk
Subject: RE: Encrypt CC number and store in DB

Do you actually get people to give you their credit card information without
them even knowing:
a) how much they are going to be charged
b) whether or not you charge them more for shipping because of where they
live
c) if what they WANT to order is even in stock?

If so, you must have one user friendly, warm and fuzzy feeling generating
site to make people feel that comfortable. (is it basket basics dot com?)

Why would any of that information (in stock, shipping cost, shipping
location, etc..., and a FINAL price) not be obtainable BEFORE getting the
credit card number? If any of it IS unobtainable without a Credit Card
number, it sounds like a flawed system to me.

 
:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
 

-Original Message-
From: Stephens, Larry V [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 13, 2006 8:44 AM
To: CF-Talk
Subject: RE: Encrypt CC number and store in DB

The best way is DO NOT DO IT.

No I'm not just being sarcasticbut there should be no reason to do 
this

[snip]

Except - we don't know the final cost until the items purchased are packaged
and postage/freight is figured. (And we make sure the items are actually in
stock and not on order, etc.) The configuration (i.e., number of boxes) can
vary a great deal depending on what is ordered (some things will pack inside
others, etc.) and, of course, the actual charge depends on where you are
shipping it (and keeping up with UPS and USPS shipping tables is no trivial
matter).

Larry Stephens
[EMAIL PROTECTED]









~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229460
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


Encapsulate persistent variables

2006-01-12 Thread Baz
Hi,

Is there a way to encapsulate and hide the cflocking of persistent
variables? For example, in my app I would like to do:

 PersistentVariables.CustomerObj.Update()

Instead of:

 cflock
Session.CustomerObj.Update()
 /cflock

Basically the PersistentVariables CFC stores and manages all persistent
variables and locking.

Thanks,
Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229338
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: Encapsulate persistent variables

2006-01-12 Thread Baz
I'm on MX7, so it should be fine, but what about race conditions? Those can
easily occur no? People don't lock their shopping carts in MX7? What about
application scope vars, that's race-condition central..

Baz


-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 11:43 AM
To: CF-Talk
Subject: Re: Encapsulate persistent variables

Bazlocking is not required on version 6 or higherin CF Admin you can
set 
CF to auto-lock those scopes.

Hope you're on 6 or higher ;-)

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229351
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: Encapsulate persistent variables

2006-01-12 Thread Baz
Good example Jochem,

I'm a bit surprised about how many people think that locking is unnecessary.
The need to do it is definitely less noticeable nowadays because your server
won't crash, but it's still essential. Imagine charging your customer too
little or too much because s/he was accessing your session scoped shopping
cart with 2 browsers... not fun.

Locking is still required! (albeit in fewer cases)
 
The solution of auto-locking in the CFAdmin is not optimal because, as
Charlie Griefer mentioned, the performance impact could be catastrophic -
especially if you were locking the application scope on every request! That
would likely be your #1 bottleneck.

It is in fact could practice to only use named locks. You should almost
never lock an entire scope, except, perhaps, at app startup or some other
rare case, but definitely not on every request.
 
So this brings us back to the original question of how to manage all this.
It would be nice to be able to encapsulate all locking somehow, and not have
the developer worry about which variable was in what scope, and what's that
lock name again? The developer would only reference the new custom scope
called AppName (a CFC), that manages and contains all persistent vars.

Oh, how that would be great...

Baz



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229380
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: Encapsulate persistent variables

2006-01-12 Thread Baz
Sir Robert Everland the III,

You would have to know the name of the lock you set up.

I agree.  That's a downfall of using named locks, but another great reason
to encapsulate all locking in 1 place!

 Named locks on application scope are not needed

I disagree. If you were to update the application scope and not just read
from it, you need to lock.

 Someone pointed out that they don't lock the entire box, only the 
 application, then the scope.

I agree. If you lock the session scope, I think it's only that specific
session that's locked and not all sessions on the box - same with
application scope, only a specific application is locked and not all
applications on a box.

Baz


-Original Message-
From: Robert Everland III [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 2:37 PM
To: CF-Talk
Subject: Re: Encapsulate persistent variables

I have an issue with using name locks. 

I think that becomes very unmanigable unless you set up a dynamic name based
on session. Named lockes on application scope are not needed. It's only
going to be a one hit and that's it. The only place would be session.
Someone pointed out that they don't lock the entire box, only the
application then the scope.




Bob



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229383
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: Encapsulate persistent variables

2006-01-12 Thread Baz
Let's say you have a display TAG for Customer.CFC. And since we all know
that TAGs should never access outside variables, we pass in Customer.CFC.
All the TAG does is update some part of customer, and then displays its
values. 

Now let's say instead of passing in a new instance of Customer.CFC you pass
in session.CustomerObj. You've passed in a session scoped instance of
Customer, but the TAG doesn't know it, nor should it. So where do you lock?
 
Baz





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229388
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


Encrypt CC number and store in DB

2006-01-12 Thread Baz
What's the best way to encrypt a CC number and store it in DB?



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229398
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: Encrypt CC number and store in DB

2006-01-12 Thread Baz
I was expecting an answer like: put encrypt() in your setter method and
decrypt() in your getter... heh. Or better yet, a link to a function on
cflib... looks like this is going to be a big one.

Baz



-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 5:59 PM
To: CF-Talk
Subject: RE: Encrypt CC number and store in DB

 What's the best way to encrypt a CC number and store it in DB?

The best way is really a business question - what's the best way for one
company may not be best for another. My answers below emphasize security
above convenience, but that might not be the choice you want to make.

Ideally, it's best not to store it at all.

If you must store it, you shouldn't allow the same application to encrypt
and decrypt the number. For example, using PKI you could have your ecommerce
application encrypt the number, and a private internal application on a
separate machine could then decrypt it.

Choosing an algorithm is much less important than figuring out how you'll
manage keys. It doesn't matter how strong your encryption algorithm is, if
an attacker can get all the keys from one place. This is the big problem
with symmetric encryption, of course.

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!




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229402
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: Encrypt CC number and store in DB

2006-01-12 Thread Baz
I have to store credit card numbers for an internal order processing system.
Orders come by fax and the credit card number must be written to DB for
later viewing/charging by another employee. 

Where can I see these regulations?

Cheers,
Baz


-Original Message-
From: Jordan Michaels [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 6:13 PM
To: CF-Talk
Subject: Re: Encrypt CC number and store in DB

Dave Watts wrote:

What's the best way to encrypt a CC number and store it in DB?

Ideally, it's best not to store it at all.
  

Couldn't have said it better myself.

Also, keep in mind that CC storage is highly regulated. Non-compliance
could lead to heavy fines and, in most cases, cancellation of your
merchant account.

-- 
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
[EMAIL PROTECTED] 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229403
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: Encrypt CC number and store in DB

2006-01-12 Thread Baz
Hmm... I'm going to look into that Bryan. I didn't know processors generally
gave functionality to store and query CC nums by customer - I'll see if mine
does it.

Baz


-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 7:17 PM
To: CF-Talk
Subject: Re: Encrypt CC number and store in DB

The best way is DO NOT DO IT.

No I'm not just being sarcasticbut there should be no reason to do 
thisif it's for recurring billing or for future orders...this can all be

setup with your CC processing company...they store the CC Cnum and give you
a 
customer ID to store and use for future Txs.they spend all the $$ on 
security and liability insurancewhy should you ;-)

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229416
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: Professional Opinions on HostMySite.com

2006-01-11 Thread Baz
Hi Jenny,

I don't have an account with HMS but I do have very recent quotes:

- www.thinkloop.com/filez/ThinkLoop1server.pdf
- www.thinkloop.com/filez/ThinkLoop2servers.pdf

Hope this helps,

Baz


-Original Message-
From: Jennifer Gavin-Wear [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 11, 2006 3:58 AM
To: CF-Talk
Subject: RE: Professional Opinions on HostMySite.com

Hi Casey, how much are they charging for a dedicated server, no details on
the site .. ?

Thanks, Jenny

-Original Message-
From: Casey Dougall [mailto:[EMAIL PROTECTED]
Sent: 11 January 2006 01:02
To: CF-Talk
Subject: Re: Professional Opinions on HostMySite.com


We have a bunch of sites on HMS and now just picked up a second dedicated
server. Service has been good but the JRun errors we were receiving on some
of our sites were enough for us to pickup a second dedicated box so we can
manage our sites better. your at the mercy of the other sites on your box
when it comes to those JRun errors. Shit might even have been ours but
atleast now we'll before it happens.







~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229141
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


Searching in dreamweaver

2006-01-11 Thread Baz
Hi,

If I wanted to search in Dreamweaver for: set('')

Where  is variable, I can use the RegEx features of Dreamweaver's
Find/Replace

Once I find my string, however, how do I replace it to: setXXX()?

Basically I need to be able to reference the variable portion of my
result...

Is this even possible?

Thanks,
Baz





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229144
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: Professional Opinions on HostMySite.com

2006-01-11 Thread Baz
I host at Superb Servers (superb.net).

I have a dedicated, self-managed server running a DB, Mail, IIS  CF. VERY
CHEAP. You can build a price here: http://order.superb.net/ss_order/

Everything is very inexpensive - even the extras that usually nail you. They
have good hardware, fast, consistent bandwidth, and they own their
datacenter hooked directly into the internet backbone.

Keep in mind though, it's self-managed. So you're basically doing most of
everything. I installed my own CF and MySQL. They just give you windows, IIS
and plesk (if u want). You'll pay more if you want access to HostMySite
style service, which I don't even think they could achieve. And anyway they
don't know CF.

I've been generally happy.

If you do get an account let me know - I can get you a better price than
advertised and they'll give me freebies!!

Good luck,

Baz


-Original Message-
From: Jennifer Gavin-Wear [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 11, 2006 11:54 AM
To: CF-Talk
Subject: RE: Professional Opinions on HostMySite.com

Hi Baz,

Thanks for the price info, bit expensive I'd say, youch!

If anyone has input on low cost good quality dedicated server packages
(windows based) I'd be glad to hear of it :-)

Jenny

-Original Message-
From: Baz [mailto:[EMAIL PROTECTED]
Sent: 11 January 2006 11:18
To: CF-Talk
Subject: RE: Professional Opinions on HostMySite.com


Hi Jenny,

I don't have an account with HMS but I do have very recent quotes:

- www.thinkloop.com/filez/ThinkLoop1server.pdf
- www.thinkloop.com/filez/ThinkLoop2servers.pdf

Hope this helps,

Baz


-Original Message-
From: Jennifer Gavin-Wear [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 11, 2006 3:58 AM
To: CF-Talk
Subject: RE: Professional Opinions on HostMySite.com

Hi Casey, how much are they charging for a dedicated server, no details on
the site .. ?

Thanks, Jenny

-Original Message-
From: Casey Dougall [mailto:[EMAIL PROTECTED]
Sent: 11 January 2006 01:02
To: CF-Talk
Subject: Re: Professional Opinions on HostMySite.com


We have a bunch of sites on HMS and now just picked up a second dedicated
server. Service has been good but the JRun errors we were receiving on some
of our sites were enough for us to pickup a second dedicated box so we can
manage our sites better. your at the mercy of the other sites on your box
when it comes to those JRun errors. Shit might even have been ours but
atleast now we'll before it happens.











~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229204
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


Big Gateways

2006-01-10 Thread Baz
Hi,

I have a gateway CFC that returns queries for medications. Medications are
complex things that have many properties and require many tables to store
all the info. As well, there are hundreds of different ways to query the
meds.

My question is how do people break up their methods in these cases? 

In one extreme you can have 1 method that accepts many arguments, does some
conditional processing and returns a query based on your arguments. In the
other extreme you can have hundreds of methods that take no arguments and
return a specific query for your specific situation. The advantage of the
former case is that it's easy to maintain and make updates since there is
only one query. But because of all the conditional processing, every query
will run slower. In the latter case, your queries run very fast and serve
one simple, logical purpose, but you have hundreds to write and maintain
with a lot of code duplication. Like if I needed to change the FROM clause,
I'd have to do it for every single one.

Does anyone have a good rule of thumb of how to break up their queries?

Cheers,
Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228999
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


good old CFLOCK question

2006-01-10 Thread Baz
I know locking questions have come up before... but it's a quickie...

Is there ever a reason to lock an entire scope instead of using named locks?
It seems that locking an entire scope just causes extreme inefficiency
without any advantages...

Thanks,
Baz





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229005
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: Big Gateways

2006-01-10 Thread Baz
Dov,

You bring up a lot of good points.

Here is a trimmed down example of one of my queries in a method:
 
cfquery name=local.ReturnStruct.Query
SELECT DISTINCT MedicationID, Medication, MedicationC
   cfif not arguments.DistinctMedication
  , BrandNameID, BrandNameManufacturer, BrandName
   /cfif

FROM (long from statement)

WHERE 1=1
   cfif isDefined('arguments.MedicationID')
  AND MedicationID in (cfqueryparam value=#arguments.MedicationID# )
   /cfif

   cfloop index=local.Keyword list=#arguments.Keywords# delimiters= 
  AND (Medication like '%#local.Keyword#%'
  OR BrandNameManufacturer like '%#local.Keyword#%'
  OR BrandName like '%#local.Keyword#%')
   /cfloop

   cfif arguments.DistinctMedication
  ORDER BY Medication
   cfelse
  cfif len(arguments.OrderBy)
 ORDER BY #arguments.OrderBy#
 /cfif
   /cfif

   LIMIT #local.ReturnStruct.StartRow-1#,#local.ReturnStruct.MaxRows#
/cfquery

Now keep in mind that the real query is much longer with more IF's and
arguments. But in this case, for example, I could break up the method so
that it only takes a MedicationID and make another method to search the
keywords. But then I would duplicate 90% of the query...

Thoughts?

Baz



-Original Message-
From: Dov Katz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 6:39 AM
To: CF-Talk
Subject: Re: Big Gateways

I'd say there's one issue with your logic If all you mean by conditional
processing is a bunch of extra IF's and CFSWITCH's etc, then the speed
impact of those compared to database queries should be negligible.

For example, if you have 10 different paths through your big cfc method,
based on your arguments, but each path is as tight as it can be (no
redundant queries, file access etc... only what you need for that path, etc)
then you wouldnt be adding any speed by breaking it up.

That said, however, the larger and more complex your single method becomes,
the less maintainable it will be, and more difficult to debug.  In fact, my
last resort for long debugging sessions in cases like this IS to break a
large method up.

So, the answer is, no it probably won't speed things up if there are no
steps you can eliminate (plain IFs and Switches are not speed killers
compared to extra redundant query or file I/O), but YES, you should split
things up in certain places...

Example:  let's say you have something like this:

function bigMethod(arg1, arg2,  argn){
  set sql=;
  if (this or that) sql+=something;
  else { more stuff } 
  switch (arg3){
  case a: 
 sql+= something else...
   ...
   ...
  }
  if (arg4){ return QUERY x with sql string}
  if (arg5) Return query y with sql string...
}


To break things up, you should think about 2 things. The methods you are
offerring consumers of your CFC , as well as private utility methods, etc.  

First break up internal processing into private methods a little bit. This
will help you create building blocks.  For example 

If you always need to format your query results, make a private method
called formatResults(Qry).  

If you always need to build dynamic sql (Even if the FROM tables might
differ) create buildDynamicColumnList(arg-list) and
buildDynamicCriteria(arg-list)

If you need to add session/application/permissions, create a
addPermissions(userid) to return custom SQL to append to any query.  (Ex:
and UserID=#session.userid#)

If you always need to dynamically select tables, make a selectTables(args)
function

Then your complicated function will look like this:

bigFunction (args) {
set sql= SELECT   buildDynamicQuery(args)   FROM 
selectTables(args) 
  WHERE   buildDynamicCriteria(args)   AND 
addPermissions(session.userid);

CFQUERY name=foo #sql...#/cfquery
  
return #formatResults(foo)#

   }

This is just an example off the top of my head. Something along these lines
will make the internal code easier to follow, easy to maintain, and also
allow you to have multiple smaller public methods which dont have code that
needs lots of changes when a database table is renamed, etc.

Hope this makes some sense (Too early for what I wrote to make complete
sense, I'm sure)
-Dov

Hi,

I have a gateway CFC that returns queries for medications. Medications are
complex things that have many properties and require many tables to store
all the info. As well, there are hundreds of different ways to query the
meds.

My question is how do people break up their methods in these cases? 

In one extreme you can have 1 method that accepts many arguments, does some
conditional processing and returns a query based on your arguments. In the
other extreme you can have hundreds of methods that take no arguments and
return a specific query for your specific situation. The advantage of the
former case is that it's easy to maintain and make updates since there is
only one query. But because of all the conditional processing, every query

RE: Big Gateways

2006-01-10 Thread Baz
Dov,

Great stuff! Gonna implement it..

Cheers,
Baz



-Original Message-
From: Katz, Dov B (IT) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 9:14 AM
To: CF-Talk
Subject: RE: Big Gateways

OK, so if this is what the query looks like (but larger), its probably
pretty efficent, but if you want to break things up, I'd say to do it by
grouping ideas together...

Group 1:
   Brand, Manufacturer, and Medication name

Group 2: 
   Types of Medical Conditions

Group 3: 
   Active Ingredients, Allergy concerns

Group 4: 
  Price, Generic Equivalents, or something..

Your private variables/methods  could be:

Private variable selectStatement=select   FROMx join y
Everything in the from statement WHERE 1=1

Private function runQuery(String queryString){
CFQUERY name=foo #local.SelectStatement#  #queryString#
/CFQUERY
return foo;
}

Private _GetMedsByName(keywords){
cfset qryString=
CFIF./CFIF
return qryString;
}

Private _GetMedsByCondition(keywords){
cfset qryString=
CFIF./CFIF
return qryString;
}

Private _GetMedsByIngredients(keywords){
cfset qryString=
CFIF./CFIF
return qryString;
}

Private _GetMedsByPrice(keywords){
cfset qryString=
CFIF./CFIF
qryString;
}

Then you can make public methods like:

GetMedsByName(keywords){
return runQuery(_GetMedsByName(keywords);

GetMedsByCondition(keywords){
return runQuery(_GetMedsByCondition(keywords);
}

GetMedsByIngredients(keywords){
return runQuery(_GetMedsByIngredients(keywords);
}

GetMedsByPrice(keywords){
return runQuery(_GetMedsByIngredients(keywords);
}

Stuff like this helps you make a rich API for users to query...

Then you can make your existing method be:

GetMedsByKeywords(keywords){
cfset qryString=_GetMedsByName(keywords)
 _GetMedsByCondition(keywords)
 _GetMedsByIngredients(keywords)
 _GetMedsByPrice(keywords)

return runQuery(qryString);
}


This is all assuming you still want to break it up...  No redundancy if
you do it this way, since everything reusable is reused.
dov




-Original Message-
From: Baz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 8:41 AM
To: CF-Talk
Subject: RE: Big Gateways

Dov,

You bring up a lot of good points.

Here is a trimmed down example of one of my queries in a method:
 
cfquery name=local.ReturnStruct.Query SELECT DISTINCT MedicationID,
Medication, MedicationC
   cfif not arguments.DistinctMedication
  , BrandNameID, BrandNameManufacturer, BrandName
   /cfif

FROM (long from statement)

WHERE 1=1
   cfif isDefined('arguments.MedicationID')
  AND MedicationID in (cfqueryparam
value=#arguments.MedicationID# )
   /cfif

   cfloop index=local.Keyword list=#arguments.Keywords#
delimiters= 
  AND (Medication like '%#local.Keyword#%'
  OR BrandNameManufacturer like '%#local.Keyword#%'
  OR BrandName like '%#local.Keyword#%')
   /cfloop

   cfif arguments.DistinctMedication
  ORDER BY Medication
   cfelse
  cfif len(arguments.OrderBy)
 ORDER BY #arguments.OrderBy#
 /cfif
   /cfif

   LIMIT #local.ReturnStruct.StartRow-1#,#local.ReturnStruct.MaxRows#
/cfquery

Now keep in mind that the real query is much longer with more IF's and
arguments. But in this case, for example, I could break up the method so
that it only takes a MedicationID and make another method to search the
keywords. But then I would duplicate 90% of the query...

Thoughts?

Baz



-Original Message-
From: Dov Katz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 10, 2006 6:39 AM
To: CF-Talk
Subject: Re: Big Gateways

I'd say there's one issue with your logic If all you mean by
conditional processing is a bunch of extra IF's and CFSWITCH's etc, then
the speed impact of those compared to database queries should be
negligible.

For example, if you have 10 different paths through your big cfc method,
based on your arguments, but each path is as tight as it can be (no
redundant queries, file access etc... only what you need for that path,
etc) then you wouldnt be adding any speed by breaking it up.

That said, however, the larger and more complex your single method
becomes, the less maintainable it will be, and more difficult to debug.
In fact, my last resort for long debugging sessions in cases like this
IS to break a large method up.

So, the answer is, no it probably won't speed things up if there are no
steps you can eliminate (plain IFs and Switches are not speed killers
compared to extra redundant query or file I/O), but YES, you should
split things up in certain places...

Example:  let's say you have something like this:

function bigMethod(arg1, arg2,  argn){
  set sql=;
  if (this or that) sql+=something;
  else { more stuff }
  switch (arg3){
  case a: 
 sql+= something else

RE: Get last inserted ID

2006-01-09 Thread Baz
MySQL5... someone mentioned to append: ?MultipleQuery=True (or something
like that) to my connection string in the DB... but it didn't work.


-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 09, 2006 9:26 AM
To: CF-Talk
Subject: RE: Get last inserted ID

What version of MySQL was this?
 
...:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
 

-Original Message-
From: Baz [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 09, 2006 1:00 AM
To: CF-Talk
Subject: RE: Get last inserted ID

Thanks for the info guys - all this makes me really sad... I remember
researching this a long, long time ago and was recommended using
cftransaction - so I did - for EVERY insert for all my apps. Now it seems I
have major changes ahead of me... 

If I don't post for a while you'll know why...

Baz

P.S. 

Bobby, the query returned this error: 

You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near '; Select
LAST_INSERT_ID() as newid' at line 2

This is the exact test query I used:

cfquery NAME='myqry' datasource=mydsn
Insert into customer (customerdate,customeruserid) 
Values (cfqueryparam value=#now()#
cfsqltype=CF_SQL_TIMESTAMP,cfqueryparam value=1
cfsqltype=CF_SQL_INTEGER); Select LAST_INSERT_ID() as newid; 
/cfquery

My DB is MySQL 5


-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 09, 2006 12:45 AM
To: CF-Talk
Subject: Re: Get last inserted ID

It happens because Oracle and most other DBs do not default to
serializable transactions; Oracle, for example, defaults to read
committed, which means that your transaction can read other committed
data even if it happened during your transaction (although in Oracle
this level does provide statement-level consistency). MySql defaults
to repeatable read as far as I could tell from a quick google.

Info on Oracle:
http://www.oracle.com/technology/oramag/oracle/05-nov/o65asktom.html

and MySQL
http://dev.mysql.com/doc/refman/4.1/en/innodb-transaction-isolation.html


On 1/9/06, Baz [EMAIL PROTECTED] wrote:
 What does cftransaction do then?

 The livedocs say that it can be used to group multiple queries that use
 CFQUERY into one business event. How do other events occur in between
one
 event?

--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/







~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228825
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


Get last inserted ID

2006-01-08 Thread Baz
Is this the best way to do this:

cftransaction
  cfquery name=InsertAddress datasource=#DSN#
INSERT INTO Address (City)
VALUES (cfqueryparam value=#City# cfsqltype=cf_sql_integer /)
  /cfquery

  cfquery name=getInsertedID datasource=#DSN#
SELECT MAX(AddressID) as MaxID
FROM Address
  /cfquery
/cftransaction

I'm using MySQL.

Cheers,
Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228784
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: Problem with Alagad Image Component

2006-01-08 Thread Baz
If you have a CFC within another CFC you could save it as either:
   
   1. variables.InsideCFC OR
   2. this.InsideCFC

I am fully aware the differences between the 2 scopes and I'm sure most
people would say that it is better to save it in the variables scope.

However I see a lot of people doing this:

   - OutsideCFC.getInsideCFC().PerformMethod()

A method is defined in the OutsideCFC to return the entire InsideCFC thereby
exposing all its methods.  Is that not the same thing as just having it
directly accessible in the THIS scope? Not to mention that your calls would
look nicer:

   Nicer: OutsideCFC.InsideCFC.PerformMethod()
   Uglier: OutsideCFC.getInsideCFC().PerformMethod()

Cheers,
Baz




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228788
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


THIS or that

2006-01-08 Thread Baz
Oops, forgot to change the subject before...

If you have a CFC within another CFC you could save it as either:
   
   1. variables.InsideCFC OR
   2. this.InsideCFC

I am fully aware the differences between the 2 scopes and I'm sure most
people would say that it is better to save it in the variables scope.

However I see a lot of people doing this:

   - OutsideCFC.getInsideCFC().PerformMethod()

A method is defined in the OutsideCFC to return the entire InsideCFC thereby
exposing all its methods.  Is that not the same thing as just having it
directly accessible in the THIS scope? Not to mention that your calls would
look nicer:

   Nicer: OutsideCFC.InsideCFC.PerformMethod()
   Uglier: OutsideCFC.getInsideCFC().PerformMethod()

Cheers,
Baz






~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228789
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: Get last inserted ID

2006-01-08 Thread Baz
James, in which cases is it not 100% reliable? Are the CF-Talk archives
searchable?

Ryan, your method seems ideal... but I think it would take me a month to do
it... what DB datatype is your UUID?

Cheers,
Baz


-Original Message-
From: Ryan Guill [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 08, 2006 8:08 PM
To: CF-Talk
Subject: Re: Get last inserted ID

What I usually do is have a column that just holds a specific
timestamp or uuid of some sorts.  I create a variable to hold the
timestamp or uuid right before the insert query, then I select against
the table looking for that timestamp or uuid.  If you are using a db
that stores a pretty detailed timestamp, especially down to the
millisecond (not sure how mysql does it), that would work very well. 
And if you can use a uuid for the primary key instead of an
autonumber, then you will have the id before you enven to the insert
statement.

Just some ideas.
On 1/8/06, James Holmes [EMAIL PROTECTED] wrote:
 It's only 100% reliable if you use a serializable transaction, as far
 as I remember. This is certainly the case with Oracle.

 There is an extensive thread on this in the archives somewhere.

 On 1/9/06, Baz [EMAIL PROTECTED] wrote:
  Is this the best way to do this:
 
  cftransaction
cfquery name=InsertAddress datasource=#DSN#
  INSERT INTO Address (City)
  VALUES (cfqueryparam value=#City# cfsqltype=cf_sql_integer /)
/cfquery
 
cfquery name=getInsertedID datasource=#DSN#
  SELECT MAX(AddressID) as MaxID
  FROM Address
/cfquery
  /cftransaction
 
  I'm using MySQL.

 --
 CFAJAX docs and other useful articles:
 http://jr-holmes.coldfusionjournal.com/

 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228790
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: THIS or that

2006-01-08 Thread Baz
Brian, that's the correct answer - thanks.

Baz

-Original Message-
From: Brian Kotek [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 08, 2006 10:08 PM
To: CF-Talk
Subject: Re: THIS or that

If you used THIS, some other bit of code could do:

cfset OutsideCFC.InsideCFC =  

and completely overwrite the CFC at any time with no warning. Using a getter
method and a private instance variable prevents this.


On 1/8/06, James Holmes [EMAIL PROTECTED] wrote:

 It's not quite the same, because if it's in the THIS scope it can be
 modified (changed, deleted, generally messed up) by code outside the
 CFC. Also, using a getter method makes it possible to do other things
 before returning the object (e.g. security checks).

 On 1/9/06, Baz [EMAIL PROTECTED] wrote:
  Oops, forgot to change the subject before...
 
  If you have a CFC within another CFC you could save it as either:
 
 1. variables.InsideCFC OR
 2. this.InsideCFC
 
  I am fully aware the differences between the 2 scopes and I'm sure most
  people would say that it is better to save it in the variables scope.
 
  However I see a lot of people doing this:
 
 - OutsideCFC.getInsideCFC().PerformMethod()
 
  A method is defined in the OutsideCFC to return the entire InsideCFC
 thereby
  exposing all its methods.  Is that not the same thing as just having it
  directly accessible in the THIS scope? Not to mention that your calls
 would
  look nicer:
 
 Nicer: OutsideCFC.InsideCFC.PerformMethod()
 Uglier: OutsideCFC.getInsideCFC().PerformMethod()

 --
 CFAJAX docs and other useful articles:
 http://jr-holmes.coldfusionjournal.com/

 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228803
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: Get last inserted ID

2006-01-08 Thread Baz
James,

CFTransaction doesn't take care of that?
 
Baz


-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 08, 2006 8:39 PM
To: CF-Talk
Subject: Re: Get last inserted ID

(This is based on Oracle defaults; ymmv with MySql). It's essentially
what Mike said, but only if the other insert is committed first. It's
like this:

1) My transaction is started
2) My INSERT is done
3) Someone else's transaction starts
4) Their INSERT is done
5) Their SELECT is done
6) Their transaction ends and is committed
7) My SELECT is done (and I get the wrong ID).
8) My transaction ends and is committed.

It's unlikely, since both transactions are doing the same thing and if
I start first I should finish first, but it can happen. Make this
serializable and it can't happen (but then you risk transaction can't
be serialized errors and performance decreases).

The best way is to select the ID first, from a sequence or some other
thing that guarantees a unique value (this is why a UUID is so good
for this) and use that in the insert. It can be done in a Stored Proc
to keep it all within the DB if you like.

You can google the CF-Talk archives from the site.

On 1/9/06, Mike Soultanian [EMAIL PROTECTED] wrote:
 What if someone were to insert another city just before the SELECT
 statement executed?

 Mike

 Baz wrote:
  James, in which cases is it not 100% reliable? Are the CF-Talk archives
  searchable?
 


  On 1/9/06, Baz [EMAIL PROTECTED] wrote:
  Is this the best way to do this:
 
  cftransaction
cfquery name=InsertAddress datasource=#DSN#
  INSERT INTO Address (City)
  VALUES (cfqueryparam value=#City# cfsqltype=cf_sql_integer
/)
/cfquery
 
cfquery name=getInsertedID datasource=#DSN#
  SELECT MAX(AddressID) as MaxID
  FROM Address
/cfquery
  /cftransaction
 
  I'm using MySQL.
  --
  CFAJAX docs and other useful articles:
  http://jr-holmes.coldfusionjournal.com/
 
 
 
 
 
 

 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228804
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: Get last inserted ID

2006-01-08 Thread Baz
What does cftransaction do then? 

The livedocs say that it can be used to group multiple queries that use
CFQUERY into one business event. How do other events occur in between one
event?


-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 08, 2006 11:19 PM
To: CF-Talk
Subject: Re: Get last inserted ID

Not without the serializable isolation level, no.

On 1/9/06, Baz [EMAIL PROTECTED] wrote:
 James,

 CFTransaction doesn't take care of that?

--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228808
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: Get last inserted ID

2006-01-08 Thread Baz
Using UUIDs does seem good but they are quite unfriendly. For example lets
say you have ORDERS... It's much easier to tell your colleague to look into
OrderID: 155000 rather than OrderID: hagfhdvklchjcvadj...



-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 08, 2006 10:32 PM
To: CF-Talk
Subject: RE: Get last inserted ID

This should insert your record and return the new primary key as 'newid'

cfquery NAME='myqry'
Insert into address (city) Values (cfqueryparam value=#City#
cfsqltype=cf_sql_integer /); Select LAST_INSERT_ID() as newid;
/cfquery

Primary keys that you control would probably be the better solution though.
CF generated UUID's sound like a great solution.

cfset mynewid = createuuid()

cfquery...
Insert into address
(id, city)
Values
(#mynewid#, #city#)
/cfquery

So you always know what the new records ID is...

It not only keeps you from having to worry about the ids getting crossed
when you use max() and 2 or more people insert something at the same time.
(or worrying about transactions to stop that from happening)

AND... if the data gets moved to another datasource down the road... all the
relations can be maintained since the IDs aren't autoincrements. That alone
is enough to use your own defined IDs over autoincrementing ones.

...:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
 
-Original Message-
From: Baz [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 08, 2006 7:24 PM
To: CF-Talk
Subject: Get last inserted ID

Is this the best way to do this:

cftransaction
  cfquery name=InsertAddress datasource=#DSN#
INSERT INTO Address (City)
VALUES (cfqueryparam value=#City# cfsqltype=cf_sql_integer /)
  /cfquery

  cfquery name=getInsertedID datasource=#DSN#
SELECT MAX(AddressID) as MaxID
FROM Address
  /cfquery
/cftransaction

I'm using MySQL.

Cheers,
Baz








~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228809
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: Get last inserted ID

2006-01-08 Thread Baz
Thanks for the info guys - all this makes me really sad... I remember
researching this a long, long time ago and was recommended using
cftransaction - so I did - for EVERY insert for all my apps. Now it seems I
have major changes ahead of me... 

If I don't post for a while you'll know why...

Baz

P.S. 

Bobby, the query returned this error: 

You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near '; Select
LAST_INSERT_ID() as newid' at line 2

This is the exact test query I used:

cfquery NAME='myqry' datasource=mydsn
Insert into customer (customerdate,customeruserid) 
Values (cfqueryparam value=#now()#
cfsqltype=CF_SQL_TIMESTAMP,cfqueryparam value=1
cfsqltype=CF_SQL_INTEGER); Select LAST_INSERT_ID() as newid; 
/cfquery

My DB is MySQL 5


-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 09, 2006 12:45 AM
To: CF-Talk
Subject: Re: Get last inserted ID

It happens because Oracle and most other DBs do not default to
serializable transactions; Oracle, for example, defaults to read
committed, which means that your transaction can read other committed
data even if it happened during your transaction (although in Oracle
this level does provide statement-level consistency). MySql defaults
to repeatable read as far as I could tell from a quick google.

Info on Oracle:
http://www.oracle.com/technology/oramag/oracle/05-nov/o65asktom.html

and MySQL
http://dev.mysql.com/doc/refman/4.1/en/innodb-transaction-isolation.html


On 1/9/06, Baz [EMAIL PROTECTED] wrote:
 What does cftransaction do then?

 The livedocs say that it can be used to group multiple queries that use
 CFQUERY into one business event. How do other events occur in between
one
 event?

--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228812
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: Get last inserted ID

2006-01-08 Thread Baz
So James, just this: cftransaction isolation=SERIALIZABLE

And problem solved? 

I will load test as you suggest, but I don't think it should be a problem -
inserts are so rare relative to everything else...

Thanks!



-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 09, 2006 1:14 AM
To: CF-Talk
Subject: Re: Get last inserted ID

You can just modify your cftransaction tags to use the serializable
isolation level if you want, but do some load testing first because
there will be locks-a-plenty if you do...

On 1/9/06, Baz [EMAIL PROTECTED] wrote:
 Thanks for the info guys - all this makes me really sad... I remember
 researching this a long, long time ago and was recommended using
 cftransaction - so I did - for EVERY insert for all my apps. Now it seems
I
 have major changes ahead of me...

--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228814
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: ColdFusion Cookbook

2006-01-07 Thread Baz
Very nice Ray, congrats... I like your search functionality - what methods
did you use to show the relevant portion of the article in your search
results? Is this verity?

Cheers,
Baz



-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 07, 2006 1:38 AM
To: CF-Talk
Subject: Re: ColdFusion Cookbook

Saw it, loved it, added to it. I like the site design too - so simple.

On 1/7/06, Raymond Camden [EMAIL PROTECTED] wrote:
 So hopefully this won't' spawn another 100 message thread on food, but
 the ColdFusion Cookbook is launched: www.coldfusioncookbook.com. It is
 still in beta I suppose, but I'd love feedback. I have a lot of
 content thanks to Rob Brooks-Bilson and Jeremy Petersen. More content
 should continue to flow in as time goes by.

--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228687
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


User, Permission Management

2006-01-07 Thread Baz
Hi,

I'm curious how people are handling session/user/permission/login management
these days...

Have most of you implemented your own custom solutions? Do a lot of people
use cflogin? Are people using CFC roles?

How are people handling checking permissions for each page? Do you check
against data stored in memory? Do you query on each request? Let's say that
there are regular users and admins, how verify which one they are?
 
Just curious,

Cheers,
Baz





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228688
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: User, Permission Management

2006-01-07 Thread Baz
Hey Matt,

Where can we take a look at this product?

Cheers,
Baz


-Original Message-
From: Matt Robertson [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 07, 2006 12:18 PM
To: CF-Talk
Subject: Re: User, Permission Management

disclaimer:  I'm describing a commercial product I sell.

I have users, permissions, groups and profiles.

Anything you want can be assigned a permission.  This could be a whole
template, a single snippet of code or perhaps a number of snippets spread
out amongst a variety of templates.  Depending on how you apply them they
could also be anti-permissions.

What I call groups are something I am probably going to phase out with a
recent upgrade I did to the system, and will only keep for legacy support.
They were basically intended to serve the same role as permissions, except a
given resource could belong to any number of groups, and a user could belong
to any number of groups.  If there was one match between them the user was
granted permission to the resource.  Since now I can have a single resource
allow access to more than one permission this takes away a lot of the need
for 'groups'.

A profile is a collection of permissions and group memberships that can be
applied in bulk to a user.  The profile can then be customized individually.

The user has their groups and permissions stored in memory after login.
Resources either have their permissions hardcoded into the code (if
protecting at the snippet level) or pulled from a database record (if
building into something like page access for a cms).

I wrap permission management in with application security in general.  Its
not just the assiggnment of permissions you have to worry about, but the
circumvention of those permissions as well.  cross-site scripting, SQL
injection, proper storage of the user password, hint and answer, secure
method of self-service password reset... I really prefer to drop in a
complete security/permission system in toto.  The trouble is clients always
want to dumb the thing down so they don't need strong passwords etc.



On 1/7/06, Dawson, Michael [EMAIL PROTECTED] wrote:

 Maybe I'm a bit daft, but I never really understood the logic of using
 CFC roles.

 Let's say I use CFLOGIN and I assign a user to a normal role, but not
 to an admin role.

 Then, I have a function with the roles attribute set to admin.

 When the user calls a page that uses the function, it's going to throw
 an exception.

 So, I then need to wrap it in a CFTRY/CFCATCH block and then determine
 what to do when the exception occurs.

 If the normal user is not allowed to call an admin function, why
 would I just not use application logic to determine what functions a
 user can actually call?

 I have never really understood this functionality of CF:

 cftry
   cfset result = myAdminFunc()
   cfcatch type=any
 cfset result = myNormalFunc()
   /cfcatch
 /cftry

 When I could do:

 cfif myUser.roles contains admin
   do admin stuff here
 cfelse
   do normal stuff here
 /cfif

 Am I missing the actual reason for CFC roles?

 M!ke

 -Original Message-
 From: James Holmes [mailto:[EMAIL PROTECTED]
 Sent: Saturday, January 07, 2006 6:18 AM
 To: CF-Talk
 Subject: Re: User, Permission Management

 I use CFLOGIN with CFC roles. This provides for the user/admin/etc
 scenario and generally suffices for most of our security needs. The
 authentication is done via LDAP and everything is secured via SSL.
 Security checking for each page is done with IsUserInRole(), which
 therefore works with memory.

 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228735
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: User, Permission Management

2006-01-07 Thread Baz
Good points in favor of Roles James.

To extend M!ke's previous cftry/cfcatch example for handling roles, what
happens when many roles exist - maybe 5, 10 or 100... Does people's code
actually end up looking like this:

!--- admins ---
cftry
  cfset result = myAdminFunc()
  cfcatch type=any
  
!--- power users ---  
cftry
  cfset result = myAdminFunc()
  cfcatch type=any

!--- users ---
cftry
  cfset result = myAdminFunc()
  cfcatch type=any

!--- guests ---
cftry
  cfset result = myAdminFunc()

  !--- anonymous ---
  cfcatch type=any
cfset result = myNormalFunc()
  /cfcatch
/cftry
  /cfcatch
/cftry
  /cfcatch
/cftry
  /cfcatch
/cftry

Cheers,
Baz


-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 07, 2006 7:35 PM
To: CF-Talk
Subject: Re: User, Permission Management

They are great when sharing a CFC with another developer. They add a
level of self-documentation and prevent someone who doesn't read
documentation from incorrectly providing people access to the wrong
things. It'a about keeping the CFC self-contained and ensuring the
integrity of the app in the business logic rather than hoping the
developer gets it right in the interface logic or elsewhere.

On 1/8/06, Dawson, Michael [EMAIL PROTECTED] wrote:
 Maybe I'm a bit daft, but I never really understood the logic of using
 CFC roles.

--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228746
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: User, Permission Management

2006-01-07 Thread Baz
I implement a template based permission infrastructure where basically 
users can either access a page or not. 

I've personally never bumped into a case that required CFC level permission
control... In what kind of situations do people find this valuable?
 
Some non-cfc in-page granular permission control I HAVE needed:

- Displaying links on a page to sections that a specific user has access to.
But I wouldn't write a new method for every possible role, I just check each
link to see if the user has perm to it or not.

- Limiting returned recordsets: Again, I wouldn't write a new method for
EVERY role, there are too many, I would just pass in some arguments and use
them to filter. Especially since it seems like 99% of your CFC would be the
same besides some WHERE clause or a couple of conditions.

- There are several others, but I have to go pick up my friend from the
airport.

Cheers,
Baz


-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 07, 2006 7:35 PM
To: CF-Talk
Subject: Re: User, Permission Management

They are great when sharing a CFC with another developer. They add a
level of self-documentation and prevent someone who doesn't read
documentation from incorrectly providing people access to the wrong
things. It'a about keeping the CFC self-contained and ensuring the
integrity of the app in the business logic rather than hoping the
developer gets it right in the interface logic or elsewhere.

On 1/8/06, Dawson, Michael [EMAIL PROTECTED] wrote:
 Maybe I'm a bit daft, but I never really understood the logic of using
 CFC roles.

--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228749
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: 'safe' filename UDF

2006-01-06 Thread Baz
 

 

Well here she be: http://thinkloop.com/filez/almostalphanumeric.zip

 

Cheers,

Baz

 

 

 

-Original Message-
From: Ray Champagne [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 06, 2006 9:09 AM
To: CF-Talk
Subject: Re: 'safe' filename UDF

 

That is exactly what I'm looking for.

 

Baz wrote:

 I have a UDF that removes any chars besides letters, numbers, underscore
and

 any additional good chars you specify to keep.

 

 USAGE

 AlmostAlphaNumeric(FileName); // returns all letters, numbers and
underscore

 AlmostAlphaNumeric(FileName,'@()'); // returns the same plus these
chars:@()

 

 Is that something u are looking for?

 

 Baz

 

 -Original Message-

 From: Ray Champagne [mailto:[EMAIL PROTECTED] 

 Sent: January 5, 2006 11:34 AM

 To: CF-Talk

 Subject: Re: 'safe' filename UDF

 

 Actually, that *is* what I do, too.  But, this app was written long ago, 

 by someone else, and has been running this way for a while.  Somehow, an 

 issue never came up until someone uploaded an image file named Lot 

 #31.jpg, which caused an error when displaying a popup image window. 

 Changing the way the whole thing works at this point just isn't going to 

 fly.  Wish I knew how to write RegExp's, prolly wouldn't be that hard to 

 do, if I don't hear anything here today, I'll prolly just figure out how 

 to do it myself.  It's about time I learned how to use RegExp's anyways.

 

 Thanks

 

 Ray

 

 Bobby Hartsfield wrote:

 

I don't, but what I usually do is save the original file name as is just

 

 for

 

display purposes so the person who uploaded it can spot it easily. Then

rename the file according to some other things... like and ID in the

database, a category, etc... 

 

So a link to a file might look like...

 

a href=0001.pdfOld File Name.pdf/a

 

Just an idea...

 

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.

Bobby Hartsfield

http://acoderslife.com

 

 

 

-Original Message-

From: Ray Champagne [mailto:[EMAIL PROTECTED] 

Sent: Thursday, January 05, 2006 11:02 AM

To: CF-Talk

Subject: 'safe' filename UDF

 

Anyone have a good UDF to replace bad characters in a filename with 

safe ones?  ie, replace # signs with blanks, spaces with '_', commas, 

periods, etc?  I just looked on cflib and found nothing.

 

 

 

 

 

 

 

 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228650
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: 'safe' filename UDF

2006-01-05 Thread Baz
I have a UDF that removes any chars besides letters, numbers, underscore and
any additional good chars you specify to keep.

USAGE
AlmostAlphaNumeric(FileName); // returns all letters, numbers and underscore
AlmostAlphaNumeric(FileName,'@()'); // returns the same plus these chars:@()

Is that something u are looking for?

Baz

-Original Message-
From: Ray Champagne [mailto:[EMAIL PROTECTED] 
Sent: January 5, 2006 11:34 AM
To: CF-Talk
Subject: Re: 'safe' filename UDF

Actually, that *is* what I do, too.  But, this app was written long ago, 
by someone else, and has been running this way for a while.  Somehow, an 
issue never came up until someone uploaded an image file named Lot 
#31.jpg, which caused an error when displaying a popup image window. 
Changing the way the whole thing works at this point just isn't going to 
fly.  Wish I knew how to write RegExp's, prolly wouldn't be that hard to 
do, if I don't hear anything here today, I'll prolly just figure out how 
to do it myself.  It's about time I learned how to use RegExp's anyways.

Thanks

Ray

Bobby Hartsfield wrote:
 I don't, but what I usually do is save the original file name as is just
for
 display purposes so the person who uploaded it can spot it easily. Then
 rename the file according to some other things... like and ID in the
 database, a category, etc... 
 
 So a link to a file might look like...
 
 a href=0001.pdfOld File Name.pdf/a
 
 Just an idea...
  
 ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
 Bobby Hartsfield
 http://acoderslife.com
  
  
 
 -Original Message-
 From: Ray Champagne [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 05, 2006 11:02 AM
 To: CF-Talk
 Subject: 'safe' filename UDF
 
 Anyone have a good UDF to replace bad characters in a filename with 
 safe ones?  ie, replace # signs with blanks, spaces with '_', commas, 
 periods, etc?  I just looked on cflib and found nothing.
 




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228585
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: Smallest, coolest function I ever wrote: Struct()

2006-01-04 Thread Baz
Another nice one is:

QuerySetRow(Query=Users,Name='Foo',Password='Bar',Date=now(),RowNumber=2);

To replace:

querySetCell(Users,'Name','Foo',2);
querySetCell(Users,'Password','Bar',2);
querySetCell(Users,'Date',now(),2);

Baz


-Original Message-
From: Brendan Baldwin [mailto:[EMAIL PROTECTED] 
Sent: January 4, 2006 6:12 PM
To: CF-Talk
Subject: Re: Smallest, coolest function I ever wrote: Struct()

You know, what I'd REALLY like is for CFScript to adopt the JavaScript
convention of allowing the creation of Structs like:

person = {id=1,name=Brendan,occupation=Thumb-Twiddler};

Of course, they could throw in an Array constructor too:

people = [Brendan,Ray,Andy];

I can dream...  or switch to Ruby ;-) ?

Come on Macromedia!!! Make my dreams come true!!!

--Brendan
  http://www.brendanbaldwin.com

On 1/4/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 That's a nice function Brendan. Good job.

 andy
  Here's the actual function in cfscript:
 
  function Struct() { return arguments; }
 
  I posted about its use here:
  http://www.brendanbaldwin.com/post/structfunction/
 
  Basically though, it lets you do this:
 
  customer=Struct(id=1,name=Brendan,occupation=Web-Lackey);
 
  Which does the equivalent of:
 
  customer=StructNew();
  StructInsert(customer,id,1);
  StructInsert(customer,name,Brendan);
  StructInsert(customer,occupation,Web-Lackey);
 
  Pass it on! :-)
 
  --Brendan Baldwin
http://www.brendanbaldwin.com
 
 

 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228414
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: cleaning text that doesn't display well

2006-01-03 Thread Baz
Hi Daniel,

Here's a UDF off of cflib.org that specifically cleans weird chars from
WORD: http://cflib.org/udf.cfm?ID=319

It removes these chars: chr(145), chr(146), chr(147), chr(148)

If you expand this to clean a lot more maybe you should post it - I've seen
others ask about such functionality.

Cheers,
Baz


-Original Message-
From: Daniel Kessler [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 03, 2006 2:01 PM
To: CF-Talk
Subject: cleaning text that doesn't display well

I have a form where people enter information into a database and it's  
displayed on a web page.  We all do, I'm sure.  Often times people  
paste the text in from whatever source they receive it from, often MS  
Word docs, but really anything.  Because of this, I often receive  
characters that don't display well and are either a box or a box with  
an X in it.  I'd like to clean this text on the way in.

I'd like some advice on how to go about this.  Should not allow any  
ascii values above 127 or try and gather a list of bad characters and  
change them into known good characters (curly quotes into straight  
quotes for example)?  I'm sure this isn't a new question, so how do  
you go about it?  I didn't see anything in the archives but I am not  
a good searcher.  Is there maybe a CFC that already does this (and is  
free!)?

thanks for any assistance.

_

Daniel Kessler

College of Health and Human Performance
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
Phone: 301-405-2545
http://hhp.umd.edu






~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228286
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


Adding Multiple Objects

2006-01-03 Thread Baz
Hi,

If I had a USER cfc and a CONTACTINFO cfc and no user should exist without
having contact info - whats a good way to add a user to the DB?

Should I call AddUser() which in turn calls AddContactInfo()?

OR, should I call AddContactInfo() first, then take the ContactID and pass
it into AddUser()?

Cheers,
Baz




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228296
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: Adding Multiple Objects

2006-01-03 Thread Baz
Hi Matthieu, Bobby,

The USER table has a 1-1 relationship with the CONTACTINFO table. So 1 user,
may have no more, and no less, than 1 set of contact info. To add a USER, I
have no choice but to add the CONTACTINFO first, get the new autogenerated
ID, and use that to add a User. In the case of an error, the new CONTACTINFO
is deleted - so no orphans.

Keep in mind that CONTACTINFO is used for more than just USERs. So while
there are ATLEAST as many CONTACTINFO records as there are USER records,
there are actually more CONTACTINFO records.

For that reason, each of those tables needs to have its own CFC as well.

The question is: How much coupling should go on between those 2 cfcs? Where
should I call the CONTACTINFO methods? Here are 3 different ways to
accomplish the same thing:

!--- Example A: Index.cfm with no dependencies between CFCs ---
cfscript
// Add Contact to DB
ContactObj=createObject('ContactInfo');
ContactObj.setFullName('Matthieu');
ContactObj.AddToDB();

// Add User to DB
UserObj=createObject('User');
UserObj.setRelatedContactID(ContactObj.getContactID());
UserObj.AddToDB();
/cfscript

!--- Example B: Index.cfm is aware of dependencies between CFCs ---
cfscript
UserObj=createObject('User');

// Add Contact to DB through User
UserObj.getContactObj().setFullName('Matthieu');
UserObj.getContactObj().AddToDB();

// Add User to DB
UserObj.setRelatedContactID(ContactObj.getContactID());
UserObj.AddToDB();
/cfscript

!--- Example C: Index.cfm is NOT aware of existing dependencies ---
cfscript
// Add Contact AND User
UserObj=createObject('User');   
UserObj.setFullName('Matthieu');
UserObj.AddToDB();
/cfscript

PROS  CONS

Example A: Index.cfm with no dependencies between CFCs
PRO: No coupling between CFCs
CON: Dependencies are not hidden, app has to be very aware of them
CON: Not always possible, sometimes you HAVE TO define a dependency

Example B: Index.cfm is aware of dependencies between CFCs
PRO: MINOR coupling between CFCs
PRO: Easier, everything for USER get handled through USER
CON: You must be aware of the complex structure of the cfc
CON: You still have to know to add CONTACTINFO before u add USER

Example C: Index.cfm is NOT aware of existing dependencies
PRO: Complex dependencies are hidden! You just have to AddUser() and
this will take care of CONTACTINFO
CON: High coupling between components, especially if you duplicate
getter/setter methods. Changes in CONTACTINFO.cfc will
necessitate changes in USER.cfc.

To me it seems like the valid choices are Example A and Example C, because
why even introduce a non-required dependency if it doesn't significantly
simplify matters...

Thoughts?

Baz



-Original Message-
From: Cornillon, Matthieu (Consultant)
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 03, 2006 3:56 PM
To: CF-Talk
Subject: RE: Adding Multiple Objects

Well, I would say that you can add contact info without adding a user
(multiple contacts, right?) but you can't add a user without adding
contact info.  So, it seems to me that you first instantiate the user
and then instantiate the contact info entry, not the other way around
(i.e., AddUser() first).

Some reasons why:

1) What if you want to add a second contact later?  Your class may not
support this now, but if you want to add the ability to do it, you would
have to rework things significantly if you called AddContactInfo()
first.

2) If you call AddContactInfo() first and it calls AddUser()
automatically, what if AddUser() throws an error?  Then you are stuck
with an orphaned contact entry.

HTH,
Matthieu


-Original Message-
From: Baz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 03, 2006 3:37 PM
To: CF-Talk
Subject: Adding Multiple Objects


Hi,

If I had a USER cfc and a CONTACTINFO cfc and no user should exist
without having contact info - whats a good way to add a user to the DB?

Should I call AddUser() which in turn calls AddContactInfo()?

OR, should I call AddContactInfo() first, then take the ContactID and
pass it into AddUser()?

Cheers,
Baz








~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228316
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