Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Re: Databound Control : Generic Base Class Versus Specific Implementation


Message #1 by "Chris Kersey" <ckersey@m...> on Mon, 17 Jun 2002 15:49:41 -0700
> IMO the correct way to implement what you're doing is to make the
> general level control like you have, and then derive classes from the
> general level and focus them towards a specific target (i.e. a
> OleDbDataReader and a NamedCollection for example).


^^^^^^^^^^^
>However, this method
> ends up with a multitude of classes that all do the same thing, but look
for
> specific data types and may or may not use [slower] Reflection depending
on
> what you're targeting.
^^^^^^^^^^^

My general level control as it stands is using GetPropertyValue and
therefore using reflection.  Isn't it true then that any classes that derive
from it will necessarily use reflection because of inheritance?

Sorry for my denseness :)  I do appreciate your input immensly.




Message #2 by Feduke Cntr Charles R <FedukeCR@m...> on Tue, 18 Jun 2002 09:10:02 -0400
> My general level control as it stands is using GetPropertyValue and
> therefore using reflection.  Isn't it true then that any classes that
derive
> from it will necessarily use reflection because of inheritance?

	Not if you inherit from your class and add whatever new properties
and methods are required to access your underlying data type (i.e.
SqlDataReader for example) directly.  The option would still be there to use
GetPropertyValue, unless you somehow hide this, and it might prove useful to
keep anyway.

- Chuck

-----Original Message-----
From: Chris Kersey [mailto:ckersey@m...]
Sent: Monday, June 17, 2002 6:50 PM
To: ASP+
Subject: [aspx] Re: Databound Control : Generic Base Class Versus
Specific Implementation


> IMO the correct way to implement what you're doing is to make the
> general level control like you have, and then derive classes from the
> general level and focus them towards a specific target (i.e. a
> OleDbDataReader and a NamedCollection for example).


^^^^^^^^^^^
>However, this method
> ends up with a multitude of classes that all do the same thing, but look
for
> specific data types and may or may not use [slower] Reflection depending
on
> what you're targeting.
^^^^^^^^^^^

My general level control as it stands is using GetPropertyValue and
therefore using reflection.  Isn't it true then that any classes that derive
from it will necessarily use reflection because of inheritance?

Sorry for my denseness :)  I do appreciate your input immensly.






  Return to Index