|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Articles
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'
|
|
|
|
|
|
#2 |
|
SitePoint Zealot
![]() ![]() 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
|
|
|
|
|
|
#3 |
|
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 |
|
|
|
#4 |
|
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 |
|
|
|
#5 |
|
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.
|
|
|
|
#6 |
|
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.
|
|
|
|
|
|
#7 |
|
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 |
|
|
|
#8 |
|
SitePoint Community Guest
Posts: n/a
|
Seems to be not quite as good as code generation for the ADO.NET layer.
|
|
|
|
#9 |
|
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. |
|
|
|
#10 |
|
SitePoint Member
Join Date: Mar 2004
Location: cArlington, Va
Posts: 4
|
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. |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 14:46.








Linear Mode
