Technical support This forum is closed.
Version 1.x > Technical support > Custom DataSets View modes: 
User avatar
Member
Member
wtijsma - 1/3/2005 11:01:52 AM
   
Custom DataSets
Hi,

I would like to be able to pass my own datasets to the TreeProvider.SelectNodes, because I have generated strictly typed datasets in a seperate project (for all your CMS.types too) for all metadata XSD's.

You have coupled the providers and datasets tightly together, wich means that all flexibility regarding custom datasets is lost:

public DataSet SelectNodes(string path, TreePathTypeEnum pathType)

Could it be implemented something like this:

public void SelectNodes(string path, TreePathTypeEnum pathType, DataSet data)

to remove this coupling?

User avatar
Member
Member
wtijsma - 1/3/2005 1:15:31 PM
   
Re: Custom DataSets
I've created a new class inherited from your TreeProvider and other classes, but can't override your methods properly because they are not declared 'virtual' (in C#, don't know this in VB.NET)

User avatar
Guest
admin - 1/4/2005 11:22:16 AM
   
Re: Custom DataSets
Hi Wiebe,

could you please write me more details on this issue? I'm not sure how you want to use those custom DataSets and why.

Thank you.

User avatar
Member
Member
wtijsma - 1/4/2005 12:38:54 PM
   
Re: Custom DataSets
Well, first of all I'm less familiar with your CMS tree structure, so I've created strictly typed datasets for all your CMS related tables. It will prevent errors, and I can use intellisense to retrieve and set the field values. Because you call the New DataSet() constructor already very deeply into the CMS structure, while this isn't necessary at all, and get rids of all the nice things of strictly typing

I think it's usually bad practice to combine the datasets and ADO.NET database provider classes into the same class (good object orientation = high coherence, low coupling, remember?) preferably, try to encapsulate only 1 or 2 specific generic actions (patterns) in a class, that depends on only 1 or 2 other classes. Did you guys do C++ or Java or Delphi or any other OO language before .NET?

User avatar
Guest
admin - 1/4/2005 2:40:52 PM
   
Re: Custom DataSets
Wiebe, I'm sorry, but if the goal is only to have strictly typed DataSets, I'm not sure how to do that in the current system. Unfortunately, we cannot rewrite this part of the system due to the backward compatibility with existing installations of other customers...

User avatar
Member
Member
wtijsma - 1/4/2005 4:13:53 PM
   
Re: Custom DataSets
I've already rewritten it (with backwards compatibility) in a derived class. The only change I ask of you is to make all the fields protected instead of private and methods virtual so I can override them...

I'm still testing, but I'll send it to you as soon as it's finished

Thanks!

User avatar
Guest
admin - 1/4/2005 6:00:14 PM
   
Re: Custom DataSets
OK, we will do that.