Likewise, from the data server point of view, never trust any entry point to
do the job properly.
Future developers may not follow your practice.
--
Arnie Rowland
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." -Ben Franklin
-----Original Message-----
From: brian@xxxxxxxxxxxx [mailto:brian@xxxxxxxxxxxx]
Sent: Wednesday, December 08, 2004 2:44 PM
To: padnug@xxxxxxxxxxxxxxx
Subject: RE: [padnug] Elegant place to TRIM strings
My thoughts are:
Look at all the entry points to your system. How can data get in?
Validate at every entry point.
So, I would validate data on the UI layer before it is sent to my business
layer. I would also validate in my business layer because I have input
from a UI layer as well as a web service layer. Two or more points of
entry, to me, equals time for validation.
I don't know if those are good thoughts, but I think it is always good
practice to prove the data is in the correct format before it gets to
processing or the datastore areas of your application.
Brian
Original Message:
-----------------
From: Liz Gee lizgeee@xxxxxxxxx
Date: Wed, 8 Dec 2004 12:44:14 -0800 (PST)
To: padnug@xxxxxxxxxxxxxxx
Subject: [padnug] Elegant place to TRIM strings
<html><body>
<tt>
SITUATION:<BR>
I'm building an N-Tier app with both Win Forms and Web front ends.<BR>
<BR>
In my middle tier, I hold my classes<BR>
<BR>
In the DAL I call SQL Server. Some data will be imported into SQL Server
directly over time.<BR>
<BR>
ELEGANT place to TRIM strings:<BR>
I am starting to move my TRIMS to my classes in the Sets...<BR>
<BR>
Public Property Note() As String<BR>
Get<BR>
<BR>
Return m_Note<BR>
End Get<BR>
Set(byVal Value as string)<BR>
m_Note = Value.Trim<BR>
End Set<BR>
End Property<BR>
<BR>
QUESTION:<BR>
Is anyone else doing anything like this, and what are your thoughts? I'd
like to do my TRIMS in an elegant way. I could do them on the Front Ends
which is traditional. Not all data that gets inot our database will be
from the Front End. Some will be IMPORTED from an HP3000.<BR>
<BR>
Thanks in Advance<BR>
Elizabeth Gee<BR>
Information Architect<BR>
<a href="http://www.nwtd.com">http://www.nwtd.com</a><BR>
<BR>
<BR>
[Non-text portions of this message have been removed]<BR>
<BR>
</tt>
<br>
<!-- |**|begin egp html banner|**| -->
<table border=0 cellspacing=0 cellpadding=2>
<tr bgcolor=#FFFFCC>
<td align=center><font size="-1" color=#003399><b>Yahoo! Groups
Sponsor</b></font></td>
</tr>
<tr bgcolor=#FFFFFF>
<td align=center width=470><table border=0 cellpadding=0 cellspacing=0>
<tr> <td align=center><font face=arial size=-2>ADVERTISEMENT</font><br><a
href="http://us.ard.yahoo.com/SIG=129ra1jq5/M=298184.5639630.6699735.3001176
/D=groups/S=1705007709:HM/EXP=1102625059/A=2434971/R=0/SIG=11eeoolb0/*http:/
/www.netflix.com/Default?mqso=60185400" alt=""><img
src="http://us.a1.yimg.com/us.yimg.com/a/ne/netflix/111704_1104_g_300250a.gi
f" alt="click here" width="300" height="250"
border="0"></a></td></tr></table> </td>
</tr>
<tr><td><img alt="" width=1 height=1
src="http://us.adserver.yahoo.com/l?M=298184.5639630.6699735.3001176/D=group
s/S=:HM/A=2434971/rand=119925012"></td></tr>
</table>
<!-- |**|end egp html banner|**| -->
<!-- |**|begin egp html banner|**| -->
<br>
<tt><hr width="500">
<b>Yahoo! Groups Links</b><br>
<ul>
<li>To visit your group on the web, go to:<br><a
href="http://groups.yahoo.com/group/padnug/">http://groups.yahoo.com/group/p
adnug/</a><br>
<li>To unsubscribe from this group, send an email to:<br><a
href="mailto:padnug-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe">padnug-
unsubscribe@xxxxxxxxxxxxxxx</a><br>
<li>Your use of Yahoo! Groups is subject to the <a
href="http://docs.yahoo.com/info/terms/">Yahoo! Terms of Service</a>.
</ul>
</tt>
</br>
<!-- |**|end egp html banner|**| -->
</body></html>
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
Yahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/dpFolB/TM
--------------------------------------------------------------------~->
|