|
I think that's a good point, but I'd like to add that in a
scenario where all you're doing is reporting, and you're supporting ad-hoc
queries, filtering, and sorting, DataSet makes a lot of sense as a legitimate
member of your application's domain model. I've encountered a couple of
situations where I ended up modeling something that basically duplicated the
concept of a DataSet.
I'm open to using types other than DataSet for reporting,
and I am now, but it doesn't seem to be ideal. If not DataSet, then
what? From: Alexandre Grenier [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 11:08 AM To: [email protected] Subject: RE: Creating a DataTable from an IList returned from the data mapper Although I understand
the situation, I wonder if adding support for datasets would defeat the purpose
of ibatis by breaking down the model it is
promoting. My understanding is
that ibatis is a base for building a good “Persistence Ignorance” domain model.
In the current case you
send in a “query” and retrieve “Plain Old CLR Objects”, so the input is aware of
persistence, but the output can be 100% focused on the
model. In the case you
propose, the output being a datatable maintains the concept of persistence after
the fact and is not desirable in a model. Maybe that’s not your
case, but I feel in most cases it may lead to bad design and in the long run
injecting Non-PI features will blur ibatis’
intention. One way around this
would be to enable the user to provide a mechanism to process the data and build
something else than an IList. Alex From: Riccardo
d'Errico [mailto:[EMAIL PROTECTED] I understand this... Unfortunately not all the components I use accepts a
direct binding to an IList. As an example some time ago I asked Telerik support if
it was possible to bind directly to their panel bar with an
IList. The answer was at that time (2 months ago) that it
was not possible but it could be done iterating the ilist and building the
panelbar items programmatically. Plus I considered that the datatable was a superset of
an IList as it direcly exposed other features (like sorting and
filtering). It would be possible to add to the wishlists
a QueryForDataSet or QueryForDataTable methods for the data
mapper? |
- Creating a DataTable from an IList returned from the... Riccardo d'Errico
- Re: Creating a DataTable from an IList returned... Ron Grabowski
- Re: Creating a DataTable from an IList returned... Gilles Bayon
- Re: Creating a DataTable from an IList returned... Riccardo d'Errico
- RE: Creating a DataTable from an IList retu... Alexandre Grenier
- RE: Creating a DataTable from an IList ... Ron Grabowski
- Re: Creating a DataTable from an IList retu... Peter Mills
- RE: Creating a DataTable from an IList returned... Shawn Hinsey
- RE: Creating a DataTable from an IList returned... Shawn Hinsey
- Re: Creating a DataTable from an IList retu... Rahul Singh ( Anant )
- Re: Creating a DataTable from an IList retu... Gilles Bayon
- RE: Creating a DataTable from an IList ... Alexandre Grenier
- RE: Creating a DataTable from an IList returned... Shawn Hinsey
- RE: Creating a DataTable from an IList returned... Douglas Smith

