Re: Pros n Cons - One class to hold all Data Access Method?
From: Jeremy (thevisualcore_at_hotmail.com)
Date: 03/17/04
- Next message: Jeremy: "Re: Pros n Cons - One class to hold all Data Access Method?"
- Previous message: Steven Cheng[MSFT]: "RE: Machine.config file no longer likes App"
- In reply to: Charlie Smith: "Re: Pros n Cons - One class to hold all Data Access Method?"
- Next in thread: Jeremy: "Re: Pros n Cons - One class to hold all Data Access Method?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Mar 2004 03:38:10 GMT
> > What are the Pros n Cons of having ONE and ONLY ONE class to hold all
Data
> > Access Method? Or
>
> I do this in both small and large apps, but there is an issue that I
> don't see mentioned here much. I do not mix sql code and .net code.
> I was told many years ago to let the database do what it does best, so
> I never allow a database to accept sql code. Everything is done with
> stored procedures. That makes my DAL class very simple and my db code
> very secure and effecient. I even do this with access database apps,
> even though they aren't as effecient as sql server when executing
> stored procedures.
Pros:
- Built-in Security
- Modular design (for SQL code anyway)
- No recompile for query mods
Cons:
- Monolithic & inflexable
- Heavy dependancy on data engine
- Non-modular design for data access components (the .NET side)
- Must re-sync SQL procs when queries change
- Negates some of the preformance advantages of using DataSets and Views
> A small bonus to this is that you can protect your business logic to
> some degree by having it locked away in a database where it is
> inaccessable without the proper credentials.
This is true, but it also means that you can't effect logic from .NET code,
which causes a proliferation of stored procs for every little nuance in the
logic. Or, you get procs with 8 million parameters, which complicates the
query and the ability to understand what it does.
~
Jeremy
- Next message: Jeremy: "Re: Pros n Cons - One class to hold all Data Access Method?"
- Previous message: Steven Cheng[MSFT]: "RE: Machine.config file no longer likes App"
- In reply to: Charlie Smith: "Re: Pros n Cons - One class to hold all Data Access Method?"
- Next in thread: Jeremy: "Re: Pros n Cons - One class to hold all Data Access Method?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|