- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Differentiate between Component and Object.
Let us learn the concept of object and component.
Object
It is defined as a concept, thing or abstract with meaning.
Features
The features associated with object are as follows −
- State
- Operation
- Attributes
- Represent something real
- Provides an abstraction
- Self-contained
- Clearly defined.
Component
It can be defined as a collection of objects which provides a set of services to other systems.
For example − components include code which provides graphic facilities, network services, and a search set of tables in the database.
A component is a self-contained entity which provides functionality to its environment and also imports functionality from its environment using well defined and open interfaces.
The components that differ from objects are as follows −
- Components are self-contained.
- Provides service to other systems.
- Use interfaces to interact with other systems.
Differences
The major differences between component and object are as follows −
A component is business-oriented (or) application-oriented. But an object is technology-oriented.
A component is Standard-Based (or) Architecture-Based. But an object is Language-Based.
A component provides services, whereas an object provides operations and methods.
A component can be understood by everyone, whereas an object can be understood only by the developers.
Component's main focus is on Abstraction and its secondary focus is on Encapsulation. An object's main focus is on Encapsulation and its secondary focus is on Abstraction.
Components can be implemented in any programming language. Objects use only object-oriented programming language.
Components have more static frequency of changing implementation. Object has a dynamic frequency changing implementation.
Components depend on other components. Class depends on other classes using inheritance.