3 tier design AND data binding?

Z

zc2468

I am new to dot net and would like to write an application using a
solid 3 tier design because I expect the app to require a lot of
updates and maintenance over time.

I am creating my own data objects to interact with the database but the
more I understand the DataAdapter classes, the more confused I get. It
seems that all I really need my data access classes to do is return a
dataset, then accept it back again for updating the database, but this
functionality already exists.

It seems that writing my own individual data access classes is really
unnecessary. In fact, when taking into account the ease of using
visual studio form designer to drag data classes onto my forms, I am
starting to reconsider my design. Since I am using stored procedures,
these are starting to look like a legitimate data tier in their own
right as they are encapsulating the underlying database tables and
preventing direct access.

I can't be the only person struggling through these design decisions.
What is the best solution? My goals are quick development AND
maintainability. The application will be used by a small number of
users - under 20, but I'd like it scalable anyway as this could change.

Is encapsulating the native data classes in my own class even
necessary?

Thanks in advance,

D
 
J

Jonas

Hi!

Just a couple of reason for a dedicated data tier:

* can be easier to re-use functionality, eg a data tier object fetching an
address can be used in multiple places where an address is needed
* enable support for different databases by "just" swapping the data tier.
* If you get data from other sources than the database and want a common way
of accessing data, regardless of its storage.

But I agree, in a small application, it can feel a bit overambitious with a
full scale three-tier solution.

Brgds

Jonas
 
Z

zc2468

Can you be more specific as to how this data tier should work? That is
my confusion. If it exposes a DataSet, then do I allow the user to
manipulate (add/edit/delete) with this dataset, then call a method on
the data tier class to perform the database updates? Do I use a
DataAdapter class at all (within my data tier class) or is this
unnecessary?

I think the subtleties are where I am confused. Anyone have an example
of a data tier class that can properly interact with a GUI? If it
takes a little longer to do it right that is fine with me, my app does
not have too many data objects necessary anyway.

Thank you,

D
 
Z

zc2468

Can you be more specific as to how this data tier should work? That is
my confusion. If it exposes a DataSet, then do I allow the user to
manipulate (add/edit/delete) with this dataset, then call a method on
the data tier class to perform the database updates? Do I use a
DataAdapter class at all (within my data tier class) or is this
unnecessary?

I think the subtleties are where I am confused. Anyone have an example
of a data tier class that can properly interact with a GUI? If it
takes a little longer to do it right that is fine with me, my app does
not have too many data objects necessary anyway.

Thank you,

D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top