473,406 Members | 2,377 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,406 software developers and data experts.

ObjectDataSource and DataSets

Hi all,

I'm investigating the best approach for building an n-tier web
application with ASP.NET 2.0. I want to separate my data access layer,
so an ObjectDataSource seems the natural choice, but I can't decide
whether to supply it data from a custom business object, or a DataSet
created with the DataSet designer.

Any thoughts?

Chris

Apr 19 '06 #1
4 1287

I had this same choice .... a few months back.
On one screen, where I have 3 items to do a Sort (lets say I have 3
comboboxes where each box has 3 items... LastName , FirstName, BirthDate )
and I want to give the user the option of selecting the order they want...
by making choices.

I used a dataset here, because I could use the DataSet.Table.Select("")
method .. and then rebind to the ObjectDataSource.

However, I only switched out to the DataSet because of this one tricky
little item. I preferred to have used a CollectionBase... populated by a
IDataReader.

If you only need simple sorting .. (like clicking the header of the
GridView) then you probably can by pass the DataSet.

...

One other consideration.. if you have related data., lets say you have 1000
emps and 10 depts they work in. Sometimes I pick the dataset over the
custom collection...since I can "reuse" the single list of depts (aka, I
don't have to assign each Employee object ... a property/collection of 10
depts ... thus keep a record of 1000x10 depts).

Ok.. that's probably not the clearest post I've ever made, but hopefully
there is something in there.

I usually pick custom collection....custom business objects... over
DataSets, unless I have a specific reason not to.
PS

I am not crossposting this to
microsoft.public.dotnet.framework.adonet

I am only posting it to .aspnet


"Chris Fulstow" <ch**********@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Hi all,

I'm investigating the best approach for building an n-tier web
application with ASP.NET 2.0. I want to separate my data access layer,
so an ObjectDataSource seems the natural choice, but I can't decide
whether to supply it data from a custom business object, or a DataSet
created with the DataSet designer.

Any thoughts?

Chris

Apr 19 '06 #2
Chris,

I would use the business layer to indirectly supply me with data, depending
on your security needs.
If you are dealing with secure data then let the security section of the
business layer deal with it since you might not want to fully trust the
front end developers.
if you want n-tier then use it.
At times you might mix but it all depends.

SA
"Chris Fulstow" <ch**********@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Hi all,

I'm investigating the best approach for building an n-tier web
application with ASP.NET 2.0. I want to separate my data access layer,
so an ObjectDataSource seems the natural choice, but I can't decide
whether to supply it data from a custom business object, or a DataSet
created with the DataSet designer.

Any thoughts?

Chris

Apr 19 '06 #3
Thus wrote Chris,
Hi all,

I'm investigating the best approach for building an n-tier web
application with ASP.NET 2.0. I want to separate my data access
layer, so an ObjectDataSource seems the natural choice, but I can't
decide whether to supply it data from a custom business object, or a
DataSet created with the DataSet designer.

Any thoughts?


It really depends on your requirements. If your applicaton more or less offers
simple CRUD functionality for some underlying database tables, DataSets can
save you a lot of work. See also http://msdn.microsoft.com/practices/...tml/boagag.asp
for a thorough discussion of this topic.

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Apr 19 '06 #4
Thanks for the feedback everyone. I also found a couple of articles on
the subject that were quite useful:

http://www.theserverside.net/article...ataSetDesigner
http://weblogs.asp.net/scottgu/archi...15/435498.aspx

I also came across the Microsoft Data Access Application Block for
helping to build data access components, does anyone have any
experience of using this?

Cheers,
Chris

Apr 20 '06 #5

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

Similar topics

0
by: Scott R | last post by:
I have a data layer that is set up to pass datasets to and from the presentation layer. In migrating to 2.0, I would like to use the objectdatasource. The problem I am having is that it seems...
0
by: Spotnick | last post by:
When I found out about the detailsview control, I thought it would save me a lot of time when doing basic table updates. All my business logic layer uses strongly-typed datasets, and I did plug a...
1
by: MTomov | last post by:
Hi fellas, has anyone managed to get ObjectDataSource to work Datasets where the Dataset is used as BusinessEntity class? What I mean is the following architecture: 1.WebPage with...
0
by: mofsoft | last post by:
Visual Studio 2005/ ASP.Net 2.0 DAL in C# exclusively using XSD (strongly typed datasets) WEB in C# references the DAL as needed via ObjectDataSources My app has about 5 or 6 "reference" tables...
11
by: Norbert Ruessmann | last post by:
Hello group, I have a problem with ObjectDataSource and ITypedList. At the end of this entry you find the implementatiopn of my List class, derived from ArrayList and implementing ITypedList....
3
by: Doug Salomon | last post by:
Hi, Recently, my site has been generating errors which say: "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled...
3
by: =?Utf-8?B?SmFu?= | last post by:
I have this problem and I am not able to find clear and good solution. I have 2 tables, Order and OrderItems with relation 1:N. I want to have 1 aspx page for editing, which will contain FormView...
4
by: ajmastrean | last post by:
Folks, What are the best practices, pros/cons, performance, scalability considerations in choosing the source/type for an object's ObjectDataSource (consider a GridView that needs to display a...
0
by: rote | last post by:
I have a project i created using TableAdapters(Datasets with .xsd) and everything works well on my PC. But when i create a websetup project and deploy it to another server. I keep getting Error...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.