For a simple, basic start I would move the database check to a CFC.  You would create a CFC that has a method with your query in it that checks the database.  This method would expect at least two parameters, username and password that you would pass in from your login code that collected the form values, run the appropriate query and then return some usefully value.  Could be as simple as pass/fail string or integer to a structure or query of rolls to whatever you want.


The advantage of this is that now your login code in your applications is not dependent in the database structure.  If somewhere down the road you needed to change the table name, DSN, database, or move to ldap.  You would make this change to the code in the CFC.  But none of your applications calling it would know or care of the change.  They continue to pass in the expected parameters and get the expected results back.


This is just the beginning of what you could do to this, but it's a start.

--------------
Ian Skinner
Web Programmer
BloodSource
<file:///C:\Documents%20and%20Settings\iskinner\Application%20Data\Microsoft\Signatures\www.BloodSource.org> www.BloodSource.org <http://www.BloodSource.orgSacramento>
Sacramento, CA

"C code. C code run. Run code run. Please!"
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to