Developing a Carbon Feature
As explained here, the process of extending a Carbon product involves adding the functionality into the product as JARs/OSGI bundles. In this topic, we will look at how these JARs/OSGI bundles come together to constitute a complete Carbon product feature. A Carbon feature is a list of components and/or other features, whereas a component in the Carbon platform is a single OSGi bundle or a collection of OSGi bundles. The diagram given below illustrates the structure of a Carbon component/composite feature:
As shown in this diagram, a Carbon component or composite feature may consist of three elements:
- The UI component, which exposes the feature from the management console.
- The server component, which does the processing from the back end.
- The service stub, which communicates between the UI and the back end components.
Note that each of these components consist of at least one OSGi bundle/JAR file. In order to deploy this feature in your server, you can either add these OSGi bundles into the relevant directory in the OSGi repository of your product, or you can add this feature to the p2 repository and deploy it in your server using the management console of your product.
Developing a new Carbon feature
Users of WSO2 products can extend the features by developing new components and deploying them in the server. These components can later be used to develop features, which are deployable through the management console. This will be illustrated in this documentation by developing the following sample feature from scratch and by deploying it in the Carbon server.
Sample Feature: In this sample, we will develop a feature for Student Management. This feature will consist of a back end component, which is an object database storing details of students, and a UI component, which will expose these student details in the management console of your Carbon server. Once you have developed and deployed this feature in your Carbon server, it will show on the management console as depicted in the following diagram.
The following topics will guide you through the steps of implementing this feature: