SqlDataSource TSQL vs Procs

  • Thread starter Thread starter David Lozzi
  • Start date Start date
D

David Lozzi

I'm fairly new to ASP.Net 2.0 SQLDatasource objects. It defaults using TSQL
statments for the SELECT, INSERT, UPDATE, DELETE commands, which is great
and it works. However, I've always been taught that all SQL work should be
completed by the SQL server, therefore use stored procedures even for the
simplest of select statements. Does this still hold true for sqldatasources?
Should I use procs instead of the default tsql??

Thanks,

David Lozzi
 
Whether or not you use
TSQL or "inline" sql, I would suggest you create a datalayer.

The SqlDataSource is NOT a datalayer.


The base argument is really:

Rapid Code Development VS Good Code Development.

Unless I'm whipping up a demo that needs to be done by yesterday,
I would avoid tags (of which SqlDataSource is one ) 99.9% of the time.

Rapid <> Good most of the time.

Good development means it is maintainable (among other things), and the
<tags> approach is cumbersome in that regard.


See
6/5/2006
Custom Objects and Tiered Development II // 2.0
http://sholliday.spaces.live.com/blog/

for what a datalayer object is ( among many others sites out there )
 
Rapid Code Development VS Good Code Development.

Unless I'm whipping up a demo that needs to be done by yesterday,
I would avoid tags (of which SqlDataSource is one ) 99.9% of the time.

Rapid <> Good most of the time.

I couldn't agree more!

In fact, once I've added my DAL to a new project, it's actually quicker and
easier to use that rather than any of the new data objects...
 
Yeah, once you get used to doing good DataLayer objects, its at least as
fast or not faster than the gui/wizards.

And for maintenance, you can't ever compare.

SqlDataSource ........ youch, its the most non maintable thing I've ever
seen.
 
SqlDataSource ........ youch, its the most non maintable thing I've ever
seen.

LOL! When I first saw it back in the beta days, my first thought was the
Microsoft was trying to woo FrontPage users... :-)
 
THANK YOU THANK YOU THANK YOU

I've been wondering about this for a long time and finally decided to ask.
I'm glad to see your converstations back and forth, I agree with you. I just
finished a project using DAL and decided to try to use the quick and easy
sqldatasource object.... and I'm glad I asked now, i'm only 3 pages into a
40 hour project, i'm sticking with my DAL.

THANKS AGAIN!!!

David Lozzi
 
Back
Top