473,385 Members | 1,536 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.

Advantages of using custom collections over datatables to bind to a datagrid?

I noticed the starterkits timetracker & issue tracker load data from a
database into custom collections (arraylists) which bind to a datagrid.

What are the advantages of using custom collections over simpler objects
like datareaders or datatables?

John Dalberg
Dec 8 '05 #1
4 2099
In my mind it's because you actually get a business layer htat way (not
automatically, but it's the first right step), and thus get the potential
for greater reuse.

http://msdn.microsoft.com/asp.net/de...CustEntCls.asp

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"John Dalberg" <no****@nospam.sss> wrote in message
news:20*******************@newsreader.com...
I noticed the starterkits timetracker & issue tracker load data from a
database into custom collections (arraylists) which bind to a datagrid.

What are the advantages of using custom collections over simpler objects
like datareaders or datatables?

John Dalberg

Dec 8 '05 #2

give this a read:
http://msdn.microsoft.com/asp.net/de...CustEntCls.asp

Article is by Karl Seguin frequent contributor here and is very well
written. Really helped me out w/ custom collections which i use all the time
now.
"John Dalberg" <no****@nospam.sss> wrote in message
news:20*******************@newsreader.com...

I noticed the starterkits timetracker & issue tracker load data from a
database into custom collections (arraylists) which bind to a datagrid.

What are the advantages of using custom collections over simpler objects
like datareaders or datatables?

John Dalberg


Dec 8 '05 #3
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote:
In my mind it's because you actually get a business layer htat way (not
automatically, but it's the first right step), and thus get the potential
for greater reuse.

http://msdn.microsoft.com/asp.net/de...y/en-us/dnaspp
/html/CustEntCls.asp

Karl


What's your take on this person's reply to your article?
http://jelle.druyts.net/PermaLink.as...a-9462-71dae71
3539e

I am working on a new project. It's not complicated and performance and
scalability are non issues because few users are using it and on a limited
basis. While custom entities and collections are valid, it seems they will
need more time for me to code, debug and test.

Now I am interested in looking at sample apps which use datasets or
datatables between the layers. Any good dessigned sample apps out there
which favor datasets/tables?

John Dalberg
Dec 8 '05 #4
I plan on readdressing the issue in the future.

To summarize here for you however, the greatest complaints about my article
was that I compared custom entities/collections to UNTYPED datasets, as
opposed to Typed Dataset. I think those are totally valid complaints,
however, they missed the point of the article. In fairness, I think I wrote
it in such a way that it was _very_ easy to miss the point. I was trying to
make people think of their domain model, that is, creating a model in their
code that represents the particular domain they are working on. I don't
care what mechanism people use to do this, but I strongly feel that _a lot_
of developers still need to THINK about their code that way. That was my
goal, to try and change how they look at programming.

There are differences between typed datasets and custom entities (and the
other solutions) I have my preference, which is obvious :) But I'm a
happy guy if I got people thinking about a new dimension of their code, and
a VERY happy guy if I ever have to maintain/fix code that was built with
that viewpoint in mind - whatever specific implementation was used.

If you understand both implementations, and more important understand what
they are trying to do (which is the same thing), then you have all the
knowledge to pick the right one for your project/team!

As far as example, I actually don't know of any great example. As far as I
can remember, none of the start kits I've looked at use Typed DataSets (I'm
not saying there aren't any, but the 3 or 4 I've gone through didn't).

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"John Dalberg" <no****@nospam.sss> wrote in message
news:20*******************@newsreader.com...
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote:
In my mind it's because you actually get a business layer htat way (not
automatically, but it's the first right step), and thus get the potential
for greater reuse.

http://msdn.microsoft.com/asp.net/de...y/en-us/dnaspp
/html/CustEntCls.asp

Karl


What's your take on this person's reply to your article?
http://jelle.druyts.net/PermaLink.as...a-9462-71dae71
3539e

I am working on a new project. It's not complicated and performance and
scalability are non issues because few users are using it and on a limited
basis. While custom entities and collections are valid, it seems they will
need more time for me to code, debug and test.

Now I am interested in looking at sample apps which use datasets or
datatables between the layers. Any good dessigned sample apps out there
which favor datasets/tables?

John Dalberg

Dec 8 '05 #5

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

Similar topics

5
by: Dalibor Kusic | last post by:
The DataTable contains, for example, only one column of lets say Person class. Person class has three fields, and a constructor that takes a single string and parses it over those three fields. ...
2
by: A Traveler | last post by:
Hi, I have a custom collection class i wrote, LineItemsCollection, which is a strongly typed collection of objects of my LineItem class. The LineItem class is a simple class with just a couple...
1
by: Luis Esteban Valencia | last post by:
Please everybody participate in this question. Hello my applicacion has many layers and classes and I think its well structured. PLease let me know if you disagree and why. 1. I have the user...
3
by: Brian H | last post by:
I am looking for working examples of making use or 2 datagrids and one dataset Grid 1 master Display minimul info Grid 2 slave. Disply detail info When the user clicks a row on the master I...
3
by: MTmace | last post by:
I have a dataset that was created from an xml file. That dataset has two tables. I would like to create a third datatable that brings some of the fields from each datatable together. Then I need...
3
by: Scottie_do | last post by:
I have a 20meg in-memory stack-based array and I'd like to normalise in the client's memory... then add foriegn keys, and display results on a datagrid. I discovered that converting the stack to a...
1
by: Mark Olbert | last post by:
Has anyone else noticed that the design-time support for databinding in custom controls in ASPNET2 sucks? At least for GridViews? So far I've spent going on two days trying to get the following...
0
by: w31chang | last post by:
Hi, I create custom entity objects, a custom collections for the entity objects and a custom object that acts like a collection of the custom entity collections which I called EntitySet Object. The...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...
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...

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.