<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Technimusings</title>
	<atom:link href="http://kevinlawry.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://kevinlawry.wordpress.com</link>
	<description>Technology and such nonsense</description>
	<lastBuildDate>Sun, 12 Aug 2012 19:29:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Why I Avoid Stored Procedures (And You Should Too) by kevinlawry</title>
		<link>http://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/#comment-89</link>
		<dc:creator><![CDATA[kevinlawry]]></dc:creator>
		<pubDate>Sun, 12 Aug 2012 19:29:26 +0000</pubDate>
		<guid isPermaLink="false">http://kevinlawry.wordpress.com/?p=253#comment-89</guid>
		<description><![CDATA[Hey Rob - Thanks for writing again.  It&#039;s always interesting to hear from other professional software developers.  About 90% of the apps I develop are web-based (ASP.NET), so that experience guides most of my software architecture biases.  If I were developing a desktop (or mobile) app [which I have certainly done], I would use web services or WCF for all communication (side note:  PLINQO can generate &lt;a href=&quot;http://www.codesmithtools.com/product/frameworks/plinqo/tour/wcf&quot; title=&quot;LINQ data services and WCF&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Data Services and WCF&lt;/a&gt; in seconds).  I would further use SSL to encrypt all of that communication.  In really sensitive cases (if the app is for internal use only), I would put the web service under a VPN.

I personally avoid allowing any application to communicate directly with SQL Server unless it is a web application.  Otherwise an employee can try to get direct access to your SQL Server by figuring out the connection string and/or doing packet sniffing.  With the web services approach, the database server can be firewalled with no direct access from workstations.  Yes, a web service adds a little bit of overhead, but it also adds (1) stronger security (2) a single place to fix query or business logic bugs [you can fix the web service as opposed to re-deploying the desktop app] (3) a reusable data service layer that can be consumed by multiple client types [desktop, mobile, web app server-side, JavaScript/AJAX, oData] (4) the ability to implement caching and performance enhancements at the web service level and (5) the option to implement redundancy via web farms.

For other readers&#039; sake, I did want to clarify that my article is about stored procs versus object relational mappers, not stored procs versus ad-hoc SQL strings.  Plain-text (ad-hoc) SQL commands have the highest risk of SQL injection attacks.  If I did not have a good ORM available to me, I would always choose stored procs over plain-text SQL commands.  However, ORMs use parameterized SQL commands which are essentially &quot;dynamic stored procedures&quot; which offer the same SQL injection protection as stored procedures.]]></description>
		<content:encoded><![CDATA[<p>Hey Rob &#8211; Thanks for writing again.  It&#8217;s always interesting to hear from other professional software developers.  About 90% of the apps I develop are web-based (ASP.NET), so that experience guides most of my software architecture biases.  If I were developing a desktop (or mobile) app [which I have certainly done], I would use web services or WCF for all communication (side note:  PLINQO can generate <a href="http://www.codesmithtools.com/product/frameworks/plinqo/tour/wcf" title="LINQ data services and WCF" target="_blank" rel="nofollow">Data Services and WCF</a> in seconds).  I would further use SSL to encrypt all of that communication.  In really sensitive cases (if the app is for internal use only), I would put the web service under a VPN.</p>
<p>I personally avoid allowing any application to communicate directly with SQL Server unless it is a web application.  Otherwise an employee can try to get direct access to your SQL Server by figuring out the connection string and/or doing packet sniffing.  With the web services approach, the database server can be firewalled with no direct access from workstations.  Yes, a web service adds a little bit of overhead, but it also adds (1) stronger security (2) a single place to fix query or business logic bugs [you can fix the web service as opposed to re-deploying the desktop app] (3) a reusable data service layer that can be consumed by multiple client types [desktop, mobile, web app server-side, JavaScript/AJAX, oData] (4) the ability to implement caching and performance enhancements at the web service level and (5) the option to implement redundancy via web farms.</p>
<p>For other readers&#8217; sake, I did want to clarify that my article is about stored procs versus object relational mappers, not stored procs versus ad-hoc SQL strings.  Plain-text (ad-hoc) SQL commands have the highest risk of SQL injection attacks.  If I did not have a good ORM available to me, I would always choose stored procs over plain-text SQL commands.  However, ORMs use parameterized SQL commands which are essentially &#8220;dynamic stored procedures&#8221; which offer the same SQL injection protection as stored procedures.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why I Avoid Stored Procedures (And You Should Too) by kevinlawry</title>
		<link>http://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/#comment-88</link>
		<dc:creator><![CDATA[kevinlawry]]></dc:creator>
		<pubDate>Sun, 12 Aug 2012 18:25:17 +0000</pubDate>
		<guid isPermaLink="false">http://kevinlawry.wordpress.com/?p=253#comment-88</guid>
		<description><![CDATA[Hi Joe - Thanks for your response.  Most ORMs use parameterized queries for all data access.  These are essentially &quot;dynamic stored procedures&quot; where all of the parameters obey data type rules.  If the parameter expects an integer and the person attempted a SQL injection string, it would be rejected by SQL server.  In reality, it wouldn&#039;t even get that far in the pipeline - the ORM wouldn&#039;t allow such a value to be passed to an integer parameter.  Even in the case of a string parameter, SQL would only use the parameter for string comparison.  The ORM will properly escape the string parameter, so it is not possible to break the SQL syntax to start a malicious command.

Honestly, a stored procedure can be more vulnerable to SQL injection than an ORM.  Some stored procedures use dynamic SQL commands (exec @someSqlCommand), and this is very susceptible to SQL injection attacks.  With an ORM, no plain text SQL commands are executed (string input is only passed via parameters, not appended to a SQL command).  In short, there are lots of ways to prevent SQL injection, and an ORM is actually your ally in this effort, not a hindrance.  Please read my response to Rob Kraft regarding database security.]]></description>
		<content:encoded><![CDATA[<p>Hi Joe &#8211; Thanks for your response.  Most ORMs use parameterized queries for all data access.  These are essentially &#8220;dynamic stored procedures&#8221; where all of the parameters obey data type rules.  If the parameter expects an integer and the person attempted a SQL injection string, it would be rejected by SQL server.  In reality, it wouldn&#8217;t even get that far in the pipeline &#8211; the ORM wouldn&#8217;t allow such a value to be passed to an integer parameter.  Even in the case of a string parameter, SQL would only use the parameter for string comparison.  The ORM will properly escape the string parameter, so it is not possible to break the SQL syntax to start a malicious command.</p>
<p>Honestly, a stored procedure can be more vulnerable to SQL injection than an ORM.  Some stored procedures use dynamic SQL commands (exec @someSqlCommand), and this is very susceptible to SQL injection attacks.  With an ORM, no plain text SQL commands are executed (string input is only passed via parameters, not appended to a SQL command).  In short, there are lots of ways to prevent SQL injection, and an ORM is actually your ally in this effort, not a hindrance.  Please read my response to Rob Kraft regarding database security.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why I Avoid Stored Procedures (And You Should Too) by Rob Kraft</title>
		<link>http://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/#comment-87</link>
		<dc:creator><![CDATA[Rob Kraft]]></dc:creator>
		<pubDate>Sun, 12 Aug 2012 18:15:36 +0000</pubDate>
		<guid isPermaLink="false">http://kevinlawry.wordpress.com/?p=253#comment-87</guid>
		<description><![CDATA[Hi Kevin, thanks for taking the time to reply, but I continue to disagree in my case.  I think each development environment has a different definition of what is best, and I would even agree that at the moment, perhaps it would be best to use SQL in 70% of environments, and stored procs in 30%.  I would certainly never claim that any approach is best 100% of the time.
I agree with your point that a &quot;web&quot; hacker, going through your application, is equally limited by stored procs as by a strong ORM.  But if the hacker can interact with your desktop code (look at the Gray Wolf hacking tool), then they can rewrite your source code on the fly in a compiled .Net application.  Also, if the hacker can connect to your database without going through your application, perhaps with SQL Enterprise Manager or an Access front end, then they have more power if not forced to use stored procedures.
I think abstractions offer benefits in every layer.  I would not rewrite an app to add an abstraction layer at this level, but I also would not begin dismantling such an abstraction layer if it exists.  I think it is difficult to identify when an abstraction layer provides value until the need arises.
Our stored procs are probably less brittle than the ones you are used to working on.  If we change table structures the stored procs will automatically be re-genned to reflect that, as will the code that uses them.  We don&#039;t even need to take the time to use a refactoring tool, so, in OUR case, we don&#039;t have any code generation penalties.  In fact, we find it valuable if we can modify only the stored proc at a client to solve a problem, as that update is easier to deploy at the client that recompiling, versioning, and redistributing code.
I&#039;m not trying to produce strong arguments against using SQL instead of stored procedures, I&#039;m just saying that there is not a single solution that is always best in every solution.  Also, as you alluded to, everything keeps evolving, so it is possible that the wheel turns again and we find some great benefits of using stored procs over SQL.]]></description>
		<content:encoded><![CDATA[<p>Hi Kevin, thanks for taking the time to reply, but I continue to disagree in my case.  I think each development environment has a different definition of what is best, and I would even agree that at the moment, perhaps it would be best to use SQL in 70% of environments, and stored procs in 30%.  I would certainly never claim that any approach is best 100% of the time.<br />
I agree with your point that a &#8220;web&#8221; hacker, going through your application, is equally limited by stored procs as by a strong ORM.  But if the hacker can interact with your desktop code (look at the Gray Wolf hacking tool), then they can rewrite your source code on the fly in a compiled .Net application.  Also, if the hacker can connect to your database without going through your application, perhaps with SQL Enterprise Manager or an Access front end, then they have more power if not forced to use stored procedures.<br />
I think abstractions offer benefits in every layer.  I would not rewrite an app to add an abstraction layer at this level, but I also would not begin dismantling such an abstraction layer if it exists.  I think it is difficult to identify when an abstraction layer provides value until the need arises.<br />
Our stored procs are probably less brittle than the ones you are used to working on.  If we change table structures the stored procs will automatically be re-genned to reflect that, as will the code that uses them.  We don&#8217;t even need to take the time to use a refactoring tool, so, in OUR case, we don&#8217;t have any code generation penalties.  In fact, we find it valuable if we can modify only the stored proc at a client to solve a problem, as that update is easier to deploy at the client that recompiling, versioning, and redistributing code.<br />
I&#8217;m not trying to produce strong arguments against using SQL instead of stored procedures, I&#8217;m just saying that there is not a single solution that is always best in every solution.  Also, as you alluded to, everything keeps evolving, so it is possible that the wheel turns again and we find some great benefits of using stored procs over SQL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why I Avoid Stored Procedures (And You Should Too) by kevinlawry</title>
		<link>http://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/#comment-86</link>
		<dc:creator><![CDATA[kevinlawry]]></dc:creator>
		<pubDate>Sun, 12 Aug 2012 18:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://kevinlawry.wordpress.com/?p=253#comment-86</guid>
		<description><![CDATA[Cade - Thanks for your reply.  If you read my article closely you will find that I am advocating better system design principles by enforcing clear separation of concerns.  In my experience, it is best to keep business logic in a strongly-typed managed-code Business Logic Layer.  The BLL belongs in the middle of the application.  

I know stored procedures can be written as &quot;dumb queries&quot; (CRUD) without any business logic, but such CRUD-based stored procedures are unnecessary when you use a good ORM.  In other words, business logic does not belong in the database, and if your stored procedures don&#039;t have any business logic, then they are just doing simple CRUD that can be handled with an ORM, therefore those stored procedures reflect wasted effort and extra future maintenance.  As for code re-use, this is done by separating your Business Logic Layer into a separate library that can be consumed by multiple projects (web app, desktop app, web service, etc).

By the way, good ORMs understand and take advantage of database relationships (foreign keys), primary keys, constraints and other data model attributes.  They can &lt;a href=&quot;http://www.codesmithtools.com/product/frameworks/plinqo/tour/rules&quot; title=&quot;LINQ data rules engine&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;enforce size limits&lt;/a&gt; on varchar/nvarchar data types so that users can be prompted about the issue instead of sending oversized input to the stored proc and throwing an error.  Using an ORM does not throw away the benefits of an RDBMS; rather it supports and enforces the rules set forth by your RDBMS.]]></description>
		<content:encoded><![CDATA[<p>Cade &#8211; Thanks for your reply.  If you read my article closely you will find that I am advocating better system design principles by enforcing clear separation of concerns.  In my experience, it is best to keep business logic in a strongly-typed managed-code Business Logic Layer.  The BLL belongs in the middle of the application.  </p>
<p>I know stored procedures can be written as &#8220;dumb queries&#8221; (CRUD) without any business logic, but such CRUD-based stored procedures are unnecessary when you use a good ORM.  In other words, business logic does not belong in the database, and if your stored procedures don&#8217;t have any business logic, then they are just doing simple CRUD that can be handled with an ORM, therefore those stored procedures reflect wasted effort and extra future maintenance.  As for code re-use, this is done by separating your Business Logic Layer into a separate library that can be consumed by multiple projects (web app, desktop app, web service, etc).</p>
<p>By the way, good ORMs understand and take advantage of database relationships (foreign keys), primary keys, constraints and other data model attributes.  They can <a href="http://www.codesmithtools.com/product/frameworks/plinqo/tour/rules" title="LINQ data rules engine" target="_blank" rel="nofollow">enforce size limits</a> on varchar/nvarchar data types so that users can be prompted about the issue instead of sending oversized input to the stored proc and throwing an error.  Using an ORM does not throw away the benefits of an RDBMS; rather it supports and enforces the rules set forth by your RDBMS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why I Avoid Stored Procedures (And You Should Too) by kevinlawry</title>
		<link>http://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/#comment-85</link>
		<dc:creator><![CDATA[kevinlawry]]></dc:creator>
		<pubDate>Sun, 12 Aug 2012 17:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://kevinlawry.wordpress.com/?p=253#comment-85</guid>
		<description><![CDATA[Hi Rob - Thanks for your reply.  I understand all of the arguments for the use of stored procedures.  I expect that most of the responses I receive supporting stored procedures will come from DBAs and/or developers who have been writing stored procs for 10+ years as the &quot;standard industry convention.&quot;  I used to be on your side of the fence.  The point of my article is that this convention is changing, and developers should &quot;get with the times.&quot;  Back in the day, I programmed with Classic ASP, then I moved on to ASP.NET WebForms, then MVC, then MVVM design practices (example: Knockout JS).  As newer better technologies and design practices emerge, I try to keep moving forward and growing instead of stagnating in the old familiar way of doing things.

For web, desktop, web service and mobile applications, ORMs are usually the best technology choice.  ORMs can replace 90%+ of the stored procedures written resulting in an application that is (1) more easily maintainable (2) less fragile in refactoring and (3) helps enforce clear separation of concerns of application layers.  Business logic belongs in strongly typed managed code, not in brittle plain-text untyped T-SQL.

In response to your concerns:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Developer Access&lt;/strong&gt; - This is a whole other topic that I should write about.  You don&#039;t need to give everyone on your development team direct access to your live production database (or any shared database for that matter).  A good development practice is for each developer to have their own local database instead of everyone connecting to one central database server.  The local database would be cleansed of any sensitive data (SSNs, credit card #s) so it could be distributed to the development team.  Developers should submit SQL change scripts via a source code repository.  SQL change scripts should only be applied to a production (or staging) database server by a designated &quot;build master&quot; (generally the technical lead).  Following this practice completely eliminates access by &quot;untrusted developers.&quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hacker Access&lt;/strong&gt; - Most ORMs use parameterized queries which are essentially &quot;dynamic stored procedures.&quot;  These have the same exact SQL injection protection that a stored procedure does.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Abstraction&lt;/strong&gt; - Abstraction really doesn&#039;t belong in the Persisence Layer of an application.  Your main abstractions (domain model) should be in the Business Layer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Code Generation&lt;/strong&gt; - I know there are code generators that will develop stored procedures to handle CRUD for all of your tables.  However, (1) this leaves an unorganized mess of stored procedures in the database [sure, there is a naming convention, but no way to organize into folders/groups] and (2) 100% of these CRUD stored procedures would be unnecessary with a good ORM.  Stored procedure code generation leaves a mess of extra brittle code to maintain.  The real tedium comes when your data model changes and you have to change all of those stored procedures.  With managed code and a refactoring tool (ReSharper) this is fast and easy.  With stored procedures, this is a big effort with higher chance of mistakes.&lt;/li&gt;
&lt;/ul&gt;]]></description>
		<content:encoded><![CDATA[<p>Hi Rob &#8211; Thanks for your reply.  I understand all of the arguments for the use of stored procedures.  I expect that most of the responses I receive supporting stored procedures will come from DBAs and/or developers who have been writing stored procs for 10+ years as the &#8220;standard industry convention.&#8221;  I used to be on your side of the fence.  The point of my article is that this convention is changing, and developers should &#8220;get with the times.&#8221;  Back in the day, I programmed with Classic ASP, then I moved on to ASP.NET WebForms, then MVC, then MVVM design practices (example: Knockout JS).  As newer better technologies and design practices emerge, I try to keep moving forward and growing instead of stagnating in the old familiar way of doing things.</p>
<p>For web, desktop, web service and mobile applications, ORMs are usually the best technology choice.  ORMs can replace 90%+ of the stored procedures written resulting in an application that is (1) more easily maintainable (2) less fragile in refactoring and (3) helps enforce clear separation of concerns of application layers.  Business logic belongs in strongly typed managed code, not in brittle plain-text untyped T-SQL.</p>
<p>In response to your concerns:</p>
<ul>
<li><strong>Developer Access</strong> &#8211; This is a whole other topic that I should write about.  You don&#8217;t need to give everyone on your development team direct access to your live production database (or any shared database for that matter).  A good development practice is for each developer to have their own local database instead of everyone connecting to one central database server.  The local database would be cleansed of any sensitive data (SSNs, credit card #s) so it could be distributed to the development team.  Developers should submit SQL change scripts via a source code repository.  SQL change scripts should only be applied to a production (or staging) database server by a designated &#8220;build master&#8221; (generally the technical lead).  Following this practice completely eliminates access by &#8220;untrusted developers.&#8221;</li>
<li><strong>Hacker Access</strong> &#8211; Most ORMs use parameterized queries which are essentially &#8220;dynamic stored procedures.&#8221;  These have the same exact SQL injection protection that a stored procedure does.</li>
<li><strong>Abstraction</strong> &#8211; Abstraction really doesn&#8217;t belong in the Persisence Layer of an application.  Your main abstractions (domain model) should be in the Business Layer.</li>
<li><strong>Code Generation</strong> &#8211; I know there are code generators that will develop stored procedures to handle CRUD for all of your tables.  However, (1) this leaves an unorganized mess of stored procedures in the database [sure, there is a naming convention, but no way to organize into folders/groups] and (2) 100% of these CRUD stored procedures would be unnecessary with a good ORM.  Stored procedure code generation leaves a mess of extra brittle code to maintain.  The real tedium comes when your data model changes and you have to change all of those stored procedures.  With managed code and a refactoring tool (ReSharper) this is fast and easy.  With stored procedures, this is a big effort with higher chance of mistakes.</li>
</ul>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why I Avoid Stored Procedures (And You Should Too) by Joe</title>
		<link>http://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/#comment-84</link>
		<dc:creator><![CDATA[Joe]]></dc:creator>
		<pubDate>Sun, 12 Aug 2012 15:34:21 +0000</pubDate>
		<guid isPermaLink="false">http://kevinlawry.wordpress.com/?p=253#comment-84</guid>
		<description><![CDATA[stored procs also avoid you having to give direct table access to users.  LINQ/ORM/or whatever that doesn&#039;t use procs will require direct table level permissions, I have yet to see any anti-proc blogs address this.  Table level access is where SQL injection comes in and it allows users to bypass the app and directly access tables (assuming they know how, some are very savvy).]]></description>
		<content:encoded><![CDATA[<p>stored procs also avoid you having to give direct table access to users.  LINQ/ORM/or whatever that doesn&#8217;t use procs will require direct table level permissions, I have yet to see any anti-proc blogs address this.  Table level access is where SQL injection comes in and it allows users to bypass the app and directly access tables (assuming they know how, some are very savvy).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why I Avoid Stored Procedures (And You Should Too) by Cade Roux</title>
		<link>http://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/#comment-83</link>
		<dc:creator><![CDATA[Cade Roux]]></dc:creator>
		<pubDate>Sun, 12 Aug 2012 14:33:39 +0000</pubDate>
		<guid isPermaLink="false">http://kevinlawry.wordpress.com/?p=253#comment-83</guid>
		<description><![CDATA[ORMs used with tables or views require you to have SELECT/UPDATE permissions on all those, and interferes with being able to refactor the database design without affecting the interface to the application.  Like other parts of software development, a layer of stored procedures allows you to control security, data-hiding and abstraction and is a responsible way to build decoupled and properly designed systems.  I&#039;m not opposed to ORMs but am opposed to abandoning all your layered software principles as soon as you see a database and simply treating the database as a dumb table repository.  For an app tightly coupled to a database schema, it&#039;s fine (but I would question why you choose a RDBMS if you aren&#039;t going to use any actual R, B, M, or S features).  But for a system, perhaps with multiple apps, with a full lifecycle, it&#039;s irresponsible.

Why would you abandon all your system design principles as soon as you hit some arbitrary layer boundary?  It&#039;s like saying, &quot;we&#039;ll hit this web service and build a great system around it, but for the web service component we are going to just internally abandon those design principles we hold so dear and write it in procedural COBOL because we just feel like that&#039;s easier&quot;]]></description>
		<content:encoded><![CDATA[<p>ORMs used with tables or views require you to have SELECT/UPDATE permissions on all those, and interferes with being able to refactor the database design without affecting the interface to the application.  Like other parts of software development, a layer of stored procedures allows you to control security, data-hiding and abstraction and is a responsible way to build decoupled and properly designed systems.  I&#8217;m not opposed to ORMs but am opposed to abandoning all your layered software principles as soon as you see a database and simply treating the database as a dumb table repository.  For an app tightly coupled to a database schema, it&#8217;s fine (but I would question why you choose a RDBMS if you aren&#8217;t going to use any actual R, B, M, or S features).  But for a system, perhaps with multiple apps, with a full lifecycle, it&#8217;s irresponsible.</p>
<p>Why would you abandon all your system design principles as soon as you hit some arbitrary layer boundary?  It&#8217;s like saying, &#8220;we&#8217;ll hit this web service and build a great system around it, but for the web service component we are going to just internally abandon those design principles we hold so dear and write it in procedural COBOL because we just feel like that&#8217;s easier&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why I Avoid Stored Procedures (And You Should Too) by Rob Kraft</title>
		<link>http://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/#comment-82</link>
		<dc:creator><![CDATA[Rob Kraft]]></dc:creator>
		<pubDate>Sun, 12 Aug 2012 13:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://kevinlawry.wordpress.com/?p=253#comment-82</guid>
		<description><![CDATA[We use stored procs for all data modifications, but sql for queries.  The stored procs are more secure because the account used to connect to the database only requires execute permissions on the stored procs and this eliminates the chance a developer or hacker could write their own custom data modification SQL.  Another advantage of stored procs is that they provide a layer of abstraction between the code and the database.  Finally, we generate all of our stored procs, so no one is bothered by the tedium of their use.]]></description>
		<content:encoded><![CDATA[<p>We use stored procs for all data modifications, but sql for queries.  The stored procs are more secure because the account used to connect to the database only requires execute permissions on the stored procs and this eliminates the chance a developer or hacker could write their own custom data modification SQL.  Another advantage of stored procs is that they provide a layer of abstraction between the code and the database.  Finally, we generate all of our stored procs, so no one is bothered by the tedium of their use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why I Avoid Stored Procedures (And You Should Too) by Dennis van der Stelt</title>
		<link>http://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/#comment-81</link>
		<dc:creator><![CDATA[Dennis van der Stelt]]></dc:creator>
		<pubDate>Sat, 11 Aug 2012 11:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://kevinlawry.wordpress.com/?p=253#comment-81</guid>
		<description><![CDATA[About the LINQ vs Stored Proc. SQL Server caches the execution plan for both, there&#039;s no difference in speed there. However, every time you add an &quot;IF&quot; statement in a stored procedure and the outcome of that IF statement differs, SQL throws away the execution plan and regenerates it. And I already didn&#039;t like IF statements in sprocs! :)]]></description>
		<content:encoded><![CDATA[<p>About the LINQ vs Stored Proc. SQL Server caches the execution plan for both, there&#8217;s no difference in speed there. However, every time you add an &#8220;IF&#8221; statement in a stored procedure and the outcome of that IF statement differs, SQL throws away the execution plan and regenerates it. And I already didn&#8217;t like IF statements in sprocs! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why I Avoid Stored Procedures (And You Should Too) by Dennis van der Stelt</title>
		<link>http://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/#comment-80</link>
		<dc:creator><![CDATA[Dennis van der Stelt]]></dc:creator>
		<pubDate>Sat, 11 Aug 2012 11:52:50 +0000</pubDate>
		<guid isPermaLink="false">http://kevinlawry.wordpress.com/?p=253#comment-80</guid>
		<description><![CDATA[If that&#039;s the only thing you have to say, why bring it in? There isn&#039;t a one way solution for anything, there are always multiple solutions and everything has trade-offs. Webservices can be extremely fast, maybe you&#039;re just doing it wrong.

What I didn&#039;t get from the security part is that people like to set authorization on sprocs. If that&#039;s the case, use views. Done.]]></description>
		<content:encoded><![CDATA[<p>If that&#8217;s the only thing you have to say, why bring it in? There isn&#8217;t a one way solution for anything, there are always multiple solutions and everything has trade-offs. Webservices can be extremely fast, maybe you&#8217;re just doing it wrong.</p>
<p>What I didn&#8217;t get from the security part is that people like to set authorization on sprocs. If that&#8217;s the case, use views. Done.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
