470,635 Members | 2,236 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,635 developers. It's quick & easy.

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 1991
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Dalibor Kusic | last post: by
2 posts views Thread by A Traveler | last post: by
3 posts views Thread by Brian H | last post: by
3 posts views Thread by MTmace | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.