Go Back   SitePoint Forums > Forum Index > Program Your Site > .NET
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Jun 1, 2004, 02:46   #1
ArticleBot
SitePoint Articles
 
ArticleBot's Avatar
 
Join Date: Apr 2001
Posts: 0
Discussion thread for Use XML Query Definitions in .NET Applications

This is a dedicated thread for discussing the SitePoint article 'Use XML Query Definitions in .NET Applications'
ArticleBot is offline   Reply With Quote
Old Jun 1, 2004, 02:46   #2
Nova
SitePoint Zealot
 
Nova's Avatar
 
Join Date: Sep 2002
Location: Netherlands
Posts: 127
I love to see this post i was thinking last week to do the same only then with php
Nova is offline   Reply With Quote
Old Jun 7, 2004, 07:35   #3
Anonymous
SitePoint Community Guest
 
Posts: n/a
The idea of keeping the queries in XML is good, but most of the changes made by developers are not really those queries it's the logic. So this adds another layer on application to process and some tiny performance hit.

Rgds,
Sada
  Reply With Quote
Old Jul 25, 2004, 07:54   #4
Tim
SitePoint Community Guest
 
Posts: n/a
In the section of the article where it states:
Hard-coding the Command configuration into a program means that every time you need to make the slightest change (maybe to change a database object name, increase the maximum length of a string parameter, fix a bug in a JOIN, etc.) you must modify your code, recompile, and redeploy -- a process that's not to be taken lightly.

This is plainly not true if stored procedures are used. This is yet another good reason to use stored procedures as they are capable of addressing all the problems identified above:
- maybe to change a database object name
- increase the maximum length of a string parameter
- fix a bug in a JOIN

Except for the maximum length of a string parameter issue.

In other words, I think there are far fewer instances where the above would provide a useful technique to address changes that are encountered in the software lifecycle.

Tim
  Reply With Quote
Old Aug 8, 2004, 11:44   #5
RB new developer
SitePoint Community Guest
 
Posts: n/a
I have been searching for reasons to use XML, and this article gave the answer others couldn't, in a straight forward way. Thanks.
  Reply With Quote
Old Aug 9, 2004, 22:35   #6
ChaCha
SitePoint Addict
 
Join Date: Mar 2003
Location: CA
Posts: 211
yeah, I don't see what this accomplishes that a stored procedure doesn't accomplish. It's not compiled like a store procedure either. I like the idea of separating the db query logic like this, but the xml is just over the top. IF you do this you should also probably encrypt it, so as not to risk giving away info about the db structure.
ChaCha is offline   Reply With Quote
Old Nov 24, 2004, 13:15   #7
Chetan
SitePoint Community Guest
 
Posts: n/a
Hi David - How does this piece of code actually help. I feel SP would still be better than the XML above.

Would appreciate your reply at webchetan@gmail.com
  Reply With Quote
Old Feb 15, 2005, 04:38   #8
Phil
SitePoint Community Guest
 
Posts: n/a
Seems to be not quite as good as code generation for the ADO.NET layer.
  Reply With Quote
Old Sep 4, 2005, 07:07   #9
sundararaman
SitePoint Community Guest
 
Posts: n/a
My problem is this,

How to pass a Query from vb.Net to ASP page

we are not employing any component in between,

It is very urgent.


  Reply With Quote
Old Mar 12, 2007, 08:07   #10
Columbiapike
SitePoint Member
 
Join Date: Mar 2004
Location: cArlington, Va
Posts: 4
Thumbs up Helpful for Developers like us.

I think this makes sense for developers like me, who don't have permissions to create a stored procedure in the DB even in development environment. For me, I have to convince several people for creating a new stored procedure, that too, I can't create it directly. It has to be the DBA who is extremely bureaucratic and 'red-tape friendly'.

This XML based approach cuts all that BS.

Thanks for the article.
Columbiapike is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 14:46.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved