The trend toward domain-specific languages leads to an ever-growing plethora of highly specialized languages. Developers of such languages focus on their specific domains rather than on technical challenges of language design. Generic features of languages are rarely included in special-purpose languages. One very important feature is the ability to formulate partial programs in separate encapsulated entities, which can be composed into complete programs in a well-defined manner. This paper presents a language-independent approach for adding useful constructs for defining components. We discuss the underlying concepts and describe a composition environment and tool supporting these ideas