> Simon,
>
[quoted text clipped - 8 lines]
>
> Cor
Thanks Cor
A bit more background ... it's fundamentally an architecture issue which
I don't think I've got my head round (that may be an understatement!).
There seem to be a fair amount of debate about whether to opt for custom
collections or datasets, when passing data across n-tiered apps. It
seems that a common (preferred?) practice, for enterprise-type apps at
least, is to convert the dataset via data transfer objects into business
objects. This is fine, istm, when the business object can be predefined.
However, the app I'm working on is a querying app. So the user can
specify and retrieve whatever they want. A dataset is the obvious way to
transfer data from the back-end to the UI, wrapped up in a business
object and then, for example, being a binding source or whatever. I was
wondering about the possibility of constructing classes (and their
collections) on-the-fly[1] and using the collection as a binding source
- the SQLs SELECT clause effectively providing the template to the class
structure.
It strikes me that the typed-dataset is still fundamentally oriented
toward the underlying RDMBS structures rather than the business. Further
because all the processing is being done behind the scenes, I can't see
that the typing aspect of the dataset really offers any benefit in this
scenario (unless there's someway to transpose the dataset structure into
a class structure). The other thing is that I'm using a third party
framework which effectively encapsulates the network, but to do this my
business objects need to inherit certain classes from that framework.
The only way I could see this being facilitated is by having a
predefined business object which both inherits the framework class, and
also holds a property to which the dataset can be assigned.
But perhaps I'm way off beam! Interested in any advice or thoughts though.
Simon
1. I was experimenting with the CodeDom - there's an earlier post on
this ng - to see if it was possible, but the more I've played around
with it, the less convinced I was that it is a good way to go. I wonder
whether dotnet would need to be more dynamic i.e. Ruby-like - or perhaps
there are other aspects of dotnet I'm unware of which would make this
easy for me?
guy - 30 Oct 2007 13:31 GMT
Simon,
do you ***have*** to use DataSets?
if not have a look at LLBLGen(www.llblgen.com)
cheers
Guy
> > Simon,
> >
[quoted text clipped - 50 lines]
> there are other aspects of dotnet I'm unware of which would make this
> easy for me?
Simon Woods - 30 Oct 2007 13:56 GMT
Thanks Guy ... I'll have a look.
> Simon,
>
[quoted text clipped - 59 lines]
>> there are other aspects of dotnet I'm unware of which would make this
>> easy for me?
Cor Ligthert[MVP] - 30 Oct 2007 21:29 GMT
Simon,
As you can see using LLBGen there are more solutions. However be aware that
the reflection of a dataset to a database is not a matter of how it has to
do with the business. It is the true limitation of a SQL based database
servers. You cannot make complex types in that. It exist from related tables
with fields and that it is, whatever magical they write about it.
The advance from ADONET and the Dataset is, is that it is probably the
maximum reaching the off line handling of that. (If you have complex
datatypes in an XML file it makes from it by instance more tables in a
Dataset).
Be aware that there is in my idea a very big retro group who is still
talking about Multi Tier application. However, that are not real multi tier
applications as they were ever designed in past. It are just datalayers
however it sounds nice to call them Tiers. Tiers work in my opinion
assynchroon as they did in MultiUser computers. However in a nice client
server concept as the Windows OS systems is there in most normal situations
not any need for that.
(Before you understand me wrong, I like multilayer solutions, however that
is not a goal for me. The goal is a good working and maintanable solution).
About your wish to make data and type independent classes, you are really
not the first who is wanting to create an MS Office Access solution, however
better, and then be disapointed that in the end the users will ask you why
it is not like MS Access. The change that your solution ends in spaghetti is
difficult to prevent.
As last and not only to prevent that Frans get angry on me. I have seen in
this dotNet newsgroups only very positive reactions about the use of LLBGEN.
So despite my message for sure worth to investigate.
Just my opinion.
Cor