Difference between revisions of "Components and Interfaces"

From CDOT Wiki
Jump to: navigation, search
Line 1: Line 1:
== Short Description ==
+
== What are Components and Interfaces? ==
  
 
Components and Interfaces define and/or implement small pieces of modular code that can be reused in the codebase.
 
Components and Interfaces define and/or implement small pieces of modular code that can be reused in the codebase.
  
 
=== Component ===
 
=== Component ===
A component is a small piece of reusable code.
+
*A component is a small piece of reusable code.
 
+
*It is usually one of several in a module.
It is usually one of several in a module.
+
*A module is a binary library that groups components that provide some functionality.
 
 
A module is a binary library that groups components that provide some functionality.
 
  
 
=== Interface ===
 
=== Interface ===
A interface defines the communication channels between components.
+
*A interface defines the communication channels between components.
 
+
*These interfaces are reused to define unique components with the same characteristics and communication channels.
These interfaces are reused to define unique components with the same characteristics and communication channels.
 
  
== Long Description ==
+
== Components and Interfaces in Mozilla ==
  
 
=== Component ===
 
=== Component ===

Revision as of 16:57, 4 October 2006

What are Components and Interfaces?

Components and Interfaces define and/or implement small pieces of modular code that can be reused in the codebase.

Component

  • A component is a small piece of reusable code.
  • It is usually one of several in a module.
  • A module is a binary library that groups components that provide some functionality.

Interface

  • A interface defines the communication channels between components.
  • These interfaces are reused to define unique components with the same characteristics and communication channels.

Components and Interfaces in Mozilla

Component

In Mozilla, XPCOM is used to break up the software projects into components.

For example, Necko is the network library which is made up of several components such as HTTP, FTP, and other network protocol implementations.

Interface

Related Links

Examples