473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

N-Tier architecture with .NET typed Datasets

I've been attempting to design an n-tiered framework leveraging .NET's
strongly typed Dataset. My Framework will serve as the foundation to
several client apps from Windows applications to web sites and web
services.

The architecture consists of a business rules tier, a data tier, and a
common tier. The common tier contains my typed Datasets while the
business rules and data tiers contain functions to populate and save the
common Datasets. Pretty standard n-tier design; however, I'm having
quite the time determining what database tables my typed Datasets should
contain.

I've read several articles, books, and newsgroups in an attempt to find
some best practices regarding this issue; however, my inquiries thus far
illustrate that no best practices have yet evolved.

My research and experience has led me to 2 possible solutions.

--PROBLEM DOMAINS -----------------------------------
The first solution is to use "problem domains" when designing the Dataset
schema. The key to problem domains is that they encapsulate all needed
tables within the Dataset. The issue I find with this approach is that
it requires one to make a judgment early in the development lifecycle as
to what problem domains exist and what tables fall within them, leaving a
high probability for mistakes and either missing tables that should have
been included or including tables that really weren't needed. The
probability of getting it wrong increasing with the size and complexity
of your database. Not to mention any unknown requirements that will be
placed on the framework 6 months from now. The other issue I find with
problem domains is that they are driven by features. This means that its
highly likely that a problem domain could exist for every feature in the
application. No code reuse, and the framework simply becomes unneeded
complexity.

--BUILDING BLOCKS------------------------------------
The second solution is to use a very granular approach when defining the
Dataset schema; meaning, we only include a parent table and all of its
children 1 level deep in the Dataset. I have spent the most time
experimenting with this solution, and while it addresses the issues posed
by problem domains, this solution has its shortcomings as well.

The first issue is the sheer number of objects required. Basically any
table that is a parent table becomes an object (typed Dataset). The
second issue that has met with resistance on my team is that management
of these objects is now pushed to the client. The client code may need
to create 2 or 3 of these granular objects for a given feature or
"problem domain". Which illustrates another issue... transactions. If
client code is working with 3 of these granular objects and needs to
update the database, how do I wrap the update of all 3 objects within a
single transaction if the data layer treats these objects as separate and
distinct (each have individual save methods within the data layer)?

One though I had was to make the data objects very granular and then wrap
them within a problem domain object at the business rules layer. That
way we end up with a very flexible and reusable data layer and common
layer. If we happen to be short sited when designing the business rules
objects or "problem domains", the impact will be much less on framework
development.

To over simplify, I'll use the object of a car.

If we are making Volkswagen Beetles, the problem domain solution is to
define the domain around that specific vehicle. When a new vehicle is
required, we create an entirely new vehicle. No reuse, but we get
everything we need in one object which is easily managed in the business
rule layer or data layer.

The granular approach is to first define the wheels, engine, seats,
etc... And then let either the client code or business rule layer build
the needed car with the components.

Obviously you can tell that I am leaning toward a more granular approach;
however, I was hoping to hear from someone who may be using either
technique or even something else with success.

Thanks in advance for any feedback and/or advice. Keep in mind that what
I'm really after is best practices.
-- Nate

-----------------------------------------------------------
"...touch a solemn truth in collision with a dogma...
though capable of the clearest proof, and you will find
you have disturbed a nest, and the hornets will swarm
about your eyes and hand, and fly into your face and eyes."
------------------------------------------------ John Adams
Jul 21 '05 #1
0 1666

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Natehop | last post by:
I've been attempting to design an n-tiered framework leveraging .NET's strongly typed Dataset. My Framework will serve as the foundation to several client apps from Windows applications to web...
0
by: Bj?rn Mor?n | last post by:
I am consuming a web service that returns arrays of classes which can contain other classes (a hierarchy of data). Is there a simple way to move the data into a typed DataSet without writing too...
7
by: Tim Smith | last post by:
Hi, Is it possible to create a progam to mimic the following action a) drag oledbadapter to form1.cs b) select my oracle ole connection c) enter 'select * from mytable' d) create adapter for...
3
by: Rob Thomas | last post by:
Hi, I've been tasked to come up with a new architecture for a large application at one of my customer's sites. In the past, I have developed multi-tier applications whereby the business...
2
by: pabloch2 | last post by:
Why the data access layer should use untyped datasets? and Why the business layer should use strongly typed datasets? Is this applicable to the 3 layered architecture in general or is it related...
0
by: Annie | last post by:
hello guys, I have created the BLL and DAL using the microsoft strongly typed datasets. There are couple of problems here: 1- The table adaptor object Insert method accepts arguments for all...
21
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
4
by: Rachana | last post by:
Hi, I have understood Data Sets but what is meant by typed/untyped/ strongly typed datasets. Can any one explain me or suggest any site/ article, to get these concepts (and their ...
12
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.