Important Aspects about Components

Components are an implementation of certain abstract ideas.

Some important aspects.

Encapulation: Hide the data and its behaviors is known as encapsulation.

Interface: A component allows access to its data and behavior only through its programming interface.

The interface to a component is made up of the following:

  • Properties : Properties enable the user of component to configure it in a declarative fashion.
  • Methods : All Components technologies have methods.
  • Events : Component module should be ready to receive and generate events as per action.

Inheritance: Its very valuable to be able to declare a class that has component as its base class. We can use
it if we are going to enhance existing control behavior.

Introspection: Its way to integrate components into the IDE.

State: Instantiate a component keeps state for your instance, and you can manipulate the state through the interface.

Persistence: Save the state of the component, can perform using object serialization.

Pluggability: Separate the interface from implementation, so at run time you can identify component to work with.

Packaging and Distribution: Components made up of class , images etc so component technology must have a infrastructure for packaging a completed component and distributing it to other developers.

Licensing: Licensing is a technology to control intellectual property.

Distributability: Major Advantage of using component to decide component running state process, can be same machine or remote. To create remote object and its access we use marshaling in .net.

  • Marshaled By value : A serialized copy of object is sent to destination.
  • Marshaled By reference : Proxy access the object using remote calls.

Security: If we want to control certain aspects of security, we should use components. CLR runtime security applies code access security permission at assembly level.