What is the difference between a “service” and a “component”?

I am a bit confused about the difference between a service and a component. Can someone explain with an example what is the difference between a service and a component?

+7
source share
2 answers

A service can consist of several components. Usually a service provides one complete function, which consists of combining various components.

The user of the service does not need to know anything about the basic components. The user will only work directly with the service, while the service will interact internally with the components.

+9
source

Services are applications that (as a rule) are designed for continuous operation, are tied to system operations, and not to the user, and provide usefulness to other applications. Databases, SMTP, Active Directory are examples of "Services".

Components are pre-formed fragments that can be included in other applications and are not intended to work independently. An application that refers to a database uses the data component (SQLClient) to communicate with the database (MS SQL Server).

+4
source

All Articles