Genral architecture question.
-
I have a module that accepts a datatable as a parameter. It performs some operations on that datatable to return some useful information. The problem is that my datatable provided to this module as parameter has to be in a specific format. i.e for start it needs to have 3 columns for it to be usable by my module. So what and where and how will be the best way to specify the format required. so that any module , service, application or layer is only able to provide the datatable in correct format to this module. hope i made my self clear. thanks a lot regards joysnlove
-
I have a module that accepts a datatable as a parameter. It performs some operations on that datatable to return some useful information. The problem is that my datatable provided to this module as parameter has to be in a specific format. i.e for start it needs to have 3 columns for it to be usable by my module. So what and where and how will be the best way to specify the format required. so that any module , service, application or layer is only able to provide the datatable in correct format to this module. hope i made my self clear. thanks a lot regards joysnlove
Could you use a class structure instead of a datatable? That way you could specify what type you needed passing in. eg
class Foo { int col1; int col2; string col3; //rest of class (properties etc) } public bool myfunc(List<foo>,......)
modified on Wednesday, March 5, 2008 7:04 AM
-
I have a module that accepts a datatable as a parameter. It performs some operations on that datatable to return some useful information. The problem is that my datatable provided to this module as parameter has to be in a specific format. i.e for start it needs to have 3 columns for it to be usable by my module. So what and where and how will be the best way to specify the format required. so that any module , service, application or layer is only able to provide the datatable in correct format to this module. hope i made my self clear. thanks a lot regards joysnlove
joysnlove wrote:
So what and where and how will be the best way to specify the format required. so that any module , service
The key thing here is service. If you look at exposing your method so that it can be used in an SOA scenario then you shouldn't use a DataTable or a DataSet. These are cumbersome objects that aren't natively recognised by other technologies (such as Java). You've already found typing issues with the dataset, so now you need to consider whether or not this really is the way forward.
Deja View - the feeling that you've seen this post before.