Table of Contents
Artificial Class
Meaning 1
Alternative Terms
Definition
An artificial class is a class solely created for technical reasons.
Description
Artificial classes are not meaningful concepts outside the software.
Note that it's not merely the identifier which makes a class artificial. A class DatabaseQuerySender
is artificial. The name tells that this is an abstraction on code which sends queries to a database. The abstraction comes from the code, from the solution instead of the problem. Classes Query
, Database
and also DatabaseConnection
are natural classes. They are meaningful concepts outside the software. However, relabeling DatabaseQuerySender
to Database
does not make it a natural class if the abstraction it stands for is not changed accordingly. A solution which is ML-compliant would rather distribute the functionality of the DatabaseQuerySender
to the classes Database
, DatabaseConnection
and Query
.
Examples
ActionListener
, ConnectionAdapter
, BeanFactory
, InvocationHandler
, ApplicationController
…
Alternative Definitions
See Also
Further Reading
Other Meanings
Discussion
Discuss this wiki article and the term on the corresponding talk page.