Adobe Dreamweaver Forums



Last 10 THreads :         Dumb CSS question re: graphic alignment (Last Post : meinmichigan - Replies : 0 - Views : 1 )           »          Burn to a CD (Last Post : vodesjardins - Replies : 3 - Views : 4 )           »          Format numbers with leading zeros (Last Post : NedWebs - Replies : 1 - Views : 2 )           »          Event listener (Last Post : NedWebs - Replies : 3 - Views : 4 )           »          mouseover slide menu! ... help! (Last Post : openspark - Replies : 1 - Views : 2 )           »          Trouble with SQL Query Tool on Leopard (Last Post : Daverms - Replies : 8 - Views : 9 )           »          Re: Cannot paste text from MS Publisher into Dreamweaver (Last Post : Tim G - Replies : 8 - Views : 9 )           »          action script for button (Last Post : NedWebs - Replies : 5 - Views : 10 )           »          403 error from my domain? (Last Post : Ken Ford - *ACE* - Replies : 1 - Views : 4 )           »          Adding database RDS Login Dreamweaver 8 Coldfusion 8 (Last Post : ClubbyJMC2008 - Replies : 4 - Views : 5 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Cold Fusion
 
Tags:



Reply
  #1 (permalink)  
Old 10-10-2008, 11:24 PM
ProjectedSurplus
 
Posts: n/a
Diggs:
Default Coldfusion Login

This might be a stooooopid question but all the Coldfusion/Dweaver LOGIN
examples/tutorials/code wizards seem to entail:

FORM.CFM page >>> submits to ACTION.CFM >>> <CFQUERY> to
database >>>

whereas I understand that for coldfusion 7/8 (with mysql 5 fwiw) cfcs and
stored procedures offer benefits from security to code organization. Is true??
Or am I not understanding a necessary step (ie before I try converting these
examples to the aforementioned).

On a related note, what are the performance implications of say <cfinsert> vs.
say <cfquery> with INSERT INTO . . . (and/or vs. stored procedures though from
what I understand the stored proc will have greater speed due to database
cacheing etc -- thus should it not be used for non-cache needed commands?)





Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-10-2008, 11:41 PM
Ian Skinner
 
Posts: n/a
Diggs:
Default Re: Coldfusion Login

ProjectedSurplus wrote:
> This might be a stooooopid question but all the Coldfusion/Dweaver LOGIN
> examples/tutorials/code wizards seem to entail:
>
> FORM.CFM page >>> submits to ACTION.CFM >>> <CFQUERY> to
> database >>>
>
> whereas I understand that for coldfusion 7/8 (with mysql 5 fwiw) cfcs and
> stored procedures offer benefits from security to code organization. Is true??


Yes there are benefits to using CFCS and Stored Procedures. But there
is also, usually, more complexity. Thus most examples and tutorials
take a simpler approach to not overwhelm the person being exposed to the
concepts for the first time.

Especially since many of these examples,tutorials and wizards have
existed longer then ColdFusion has had CFCS, though probably not longer
then it has had stored procedures.

>
> On a related note, what are the performance implications of say <cfinsert> vs.
> say <cfquery> with INSERT INTO . . . (and/or vs. stored procedures though from
> what I understand the stored proc will have greater speed due to database
> cacheing etc -- thus should it not be used for non-cache needed commands?)


Well for <cfinsert...> versus <cfquery...> it is usually convienance
over capability. If one gets right down to it, there must be some
microscopic performance hit while ColdFusion runs some code deep in its
heart to build the SQL string to send the database with <cfinsert...>.
But other then that, the main difference is that it usually does not
take long before a developer is doing code that is too complex to handle
with <cfinsert...> and thus learns to write his own SQL code. Once
learned there is little need to switch back to <cfinsert...> when it is
just as easy to write ones own simple SQL code as have ColdFusion do it.

As for ad hock SQL in <cfquery...> tags over Stored Procedures. There
is again a complexity image here. Stored Procedures are perceived as
being more complex, though again, they really aren't. There is the
complexity of having code in more places, which usually is not a bad
thing. But for very simple projects may be overkill. Also, the CF
developer may be a junior position that does not have permissions to
create Stored Procedures in the database, so just uses what access he
has until such a time as a project is important enough to refactor into
using procedures.

But none of this has any bearing on what is or is not cached. And there
is not correlation between using ad hock SQL with <cfquery...> or Stored
Procedures based on the 'non-cache' need of database code.



Reply With Quote
  #3 (permalink)  
Old 10-11-2008, 12:37 AM
ProjectedSurplus
 
Posts: n/a
Diggs:
Default Re: Coldfusion Login

Thanks, it's much as I figured but fwiw, with my (albeit limited) knowledge of
sql I'd rather write <cfqueries> and even stored procs. As you say, they are
more complex in theory but IMHO much better for implementing an MVC type of
architecture/organization (not that I am expert in either).

I did think that stored proc offer performance benefits vs. ad hoc sql but
perhaps this is more to do with the sql tranaction being pre-compiled vs it
being cached (now that I think about it -- though I might be mislabelling some
of the terms.)

Thanks again though

Reply With Quote


  #4 (permalink)  
Old 10-14-2008, 02:40 PM
Ian Skinner
 
Posts: n/a
Diggs:
Default Re: Coldfusion Login

ProjectedSurplus wrote:
> I did think that stored proc offer performance benefits vs. ad hoc sql but
> perhaps this is more to do with the sql tranaction being pre-compiled vs it
> being cached (now that I think about it -- though I might be mislabelling some
> of the terms.)


Possibly, or a misunderstanding the nature of pre-compiled versus
cached. SQL code can be written so that it takes full advantage of
pre-compilation using the <cfquery...> tag. Just as stored procedures
can be written so that they do not.

Albeit if one is thinking in terms of stored procedures, one is probably
developing code in a manner that facilitates pre-compilation. Just that
it is not *guaranteed* just by slapping CREATE OR REPLACE PROCEDURE
around any old SQL code.
Reply With Quote
  #5 (permalink)  
Old 10-15-2008, 04:11 AM
ProjectedSurplus
 
Posts: n/a
Diggs:
Default Re: Coldfusion Login

Thanks, I will research a bit more on stored procs you describe.

Do you have any thoughts on this issue I ran into:


http://www.adobe.com/cfusion/webforu...=3&threadid=13
98834

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 01:42 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk