Component v.s. Class

  • Thread starter Thread starter Ellis Yu
  • Start date Start date
E

Ellis Yu

Hi All,

I'm not so clear between component and class. After reading from
help, component can also be said a class but implement icomponent interface.
But what's scenario I should use component and what's scenario I should use
class. I'm so confused on it. Anyone could help? Thanks

Best Rdgs
Ellis
 
Hi Cor,

Thanks for you help first. If I want to create my data access object
which can access my database, so that I can manage the data through this
data access object. For example, I want to create a data access object
called "LoginUserObj" which can manage the UserAccount table such as adding
a new user or changing the password. And also business rule may attach into
it like checking the authenication etc. And now, I just create a class to
handle it. Is it better to change it to component for future? Would you
kindly give me some advice? Thanks

Best Rdgs
Ellis
 
Ellis Yu said:
I'm not so clear between component and class. After reading from
help, component can also be said a class but implement icomponent
interface.
But what's scenario I should use component and what's scenario I should
use
class.

Components are classes.

If you want to know where using components is useful, take a look at the
derived classes in the .NET Framework:

..NET Framework Class Library -- Component Hierarchy
<URL:http://msdn.microsoft.com/library/e...stemcomponentmodelcomponentclasshierarchy.asp>
 
Ellis,

All the "data" classes derive already from "component", in the way you write
it I don't see any reason.

Just my thought,

Cor
 
Back
Top