Large software systems are modularized in order to improve manageability. The parts of the software system communicate in order to achieve the desired functionality. To better understand, develop, manage, and maintain the resulting complexity, this paper presents a framework of ontologies. The ontologies range from very general, foundational ones to ontologies that elucidate the specificities of particular modularization and communication paradigms. We support two specific paradigms. First, we define an ontology for software components that may be used in traditional middleware architectures, e.g., application servers. Second, we specify an ontology for Web services. Through the reuse of existing foundational ontologies and our new Core Software Ontology, our proposal offers several advantages. In particular, it avoids the typical shortcomings related approaches exhibit and it allows for the concise definition of commonalities and differences of the two paradigms.