Re: Do you use the new datasource controls?
- From: Alan Silver <alan-silver@xxxxxxxxxxxx>
- Date: Tue, 29 Nov 2005 16:53:13 +0000
>Well, I cringe when I see a button's click event open op a connection, create a command and populate a dataset. The code because totally un-reusable. It's fine for my dad's website, but not for the enterprise architecture I'm building, which will eventually need to have a web service. The code in the button click should be quite deeper, it should be encapsulated in a data access layer and exposed via a rich business layer. By doing so, I've increased my testability (unit tests on business and data layers are easier than presentation layers), my reusability and maintainability (oh geez, who would have though saving a product begins in the Product class!).
Instead of promoting rich tiering, the XXXDataSource actually thin the tiers even more. I thought doing database work in the button's click was bad, now people are doing it in HTML.
OK, that all makes sense, but let's assume for a moment that the stuff actually works properly. If so, then why do you need to have the data access code buried deep in the data access layer (DAL)? You don't actually need a DAL anymore, you just set properties of the data source and the framework does the dirty work for you.
I agree with your argument when you still have to write code to do some of the work, but this is supposed to give you code-free data access. What's more, the underlying code was (hopefully) written and tested by a team of enterprise programmers. You don't have to develop your own DAL anymore.
Note that I am not necessarily saying I hold of this point of view, I'm putting it forward in order to hear your views on it. I'm trying to understand the deeper issues here, so am playing devil's advocate.
I don't consider the features themeselves to be marketting, but the way they are talked about is. It's all about saving you 70% time. The truth is that while it might save you time in some projects (prototyping), it'll cost you much much more in others
Ah, but why? That's what I want to know. I agree with you completely in theory, I have seen exactly this in VB6 as I explained earlier. Great features for simple jobs, but no good for Real World(TM) applications.
What is it about data sources that makes them a problem for real applications?
- no one ever says that. There needs to be more guidance about prudent usage, otherwise it IS marketting. Arm developers with unbiased and real information, build up their knowledge and they'll be able to understand a problem and find the right solution. Teach a man how to fish as it were...
Give a man a fish and you'll feed him for a day. Teach him to use the Internet and you won't hear from him for weeks!!
Thanks for the reply. Any further comments welcome.
-- Alan Silver (anything added below this line is nothing to do with me) .
- References:
- Do you use the new datasource controls?
- From: Alan Silver
- Re: Do you use the new datasource controls?
- From: Alan Silver
- Do you use the new datasource controls?
- Prev by Date: How to read Forms LoginURL?
- Next by Date: Caching
- Previous by thread: Re: Do you use the new datasource controls?
- Next by thread: Re: Do you use the new datasource controls?
- Index(es):
Loading