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

J

John Dalberg

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
 
J

John Dalberg

Karl Seguin said:
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/default.aspx?pull=/library/en-us/dnaspp
/html/CustEntCls.asp

Karl

What's your take on this person's reply to your article?
http://jelle.druyts.net/PermaLink.aspx?guid=61676665-06a7-443a-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
 
K

Karl Seguin

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
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top