Lesson 1: What is CAR?

=Lesson 1: What is CAR? =

Overview

 * What is CAR?
 * Features of CAR
 * Programming Paradigms of CAR

Component-oriented Programming
Component-oriented programming allows components to be loaded dynamically at runtime. Thus, different components provided by different developers can call each other to communicate. Components are interchangeable at runtime, and use a standard protocol for communication between each other. Component technology is typically represented by COM technology.

What is CAR?
CAR stands for the Component Assembly Runtime, which is developed by Kortide with independent intellectual property rights of component technology. It's like Java, but with access to machine code. It's like COM, but with metadata. CAR is a component-oriented programming model as well as a programming idea. It is described by special standards divided into two parts: specification and implementation. The specification part describes how to define components and how to communicate among components. It does not depend on any particular language or operating system. Following the specification, any language can be used. Therefore, CAR can be implemented in many ways, making it more accessible to develop with.

CAR components provide service by using interfaces. Every component interface contains metadata to describe the component (so that other users can know how to use the service) and the relationship between services and calls. With this description, calling between different components becomes possible, and long-range, inter-process communication can be properly carried out. CAR component technology solves several major problems:
 * 1) Components from different sources can inter-operate
 * 2) Components upgrade but affect no other component
 * 3) ComponentS are independent of the programming language
 * 4) Provides transparency for the component operating environment

CAR component technology simplifies the development process. After writing a car file, the CAR compiler automatically generate a basic code framework for developers. All developers need to fill in the generated framework and add functonality to client, simplifying the process and improveing the speed and quality of coders.

The programming idea of CAR is the essence of Elastos, running through the entire technology system implementation. In Elastos, both the operating system kernel and the component library provided by the Elastos platform are implemented using CAR technology. The Close integration between the kernel and the CAR technology runtime environment creates a strong support for the Elastos architecture.

As a component-oriented programming language, CAR is only responsible for the framework. The specific implementation logic will be achieved through the C/C++ or some other programming language.

CAR and COM
CAR component technology is derived from COM technology, and was originally compatible with COM. It deleted some old rules in COM and provided better extensions compared to COM.

Now, CAR has become an independent technology and is no longer compatible with COM. CAR utilizes its own grammar instead of a .cdl file, and contains a metadata description which allows components to describe themselves. It also has its own toolset now; for instance, CAR uses its own CAR compiler rather than Microsoft's IDL Compiler.

CAR in Elastos
The Elastos platform provides a set of API and services that meet CAR standards. It has helped the CAR programming model to improve over the years. At the same time, CAR component technology simplifies the development process for the Elastos platform. The CAR compiler can generates the framework code from the car files written by users, so developers just have to fill in the code to implement the CAR service.

CAR provides ways to develop dynamic applications (e.g., the plug-in system – add or remove parts of code on demand on the mobile phone). It also allows applications to be updated periodically, pushed to or pulling from end users automatically.

Features of CAR

 * Metadata: Self-describing components
 * Dynamically linked at runtime
 * Component-oriented Programming, Binary inheritance
 * Cross-platform
 * Java can access CAR as native code more easily in a controllable way.
 * Developing software in multiple language, such as Java,Script, HTML, C/C++.
 * Compatibility support: Reuse your existing code.

Programming Paradigms

 * Seamless Support for traditional C/C++ programming
 * Elastos program main function: ElastosMain
 * Elastos Component Services
 * Callback on Events Mechanism
 * Regime Programming
 * Generic Programming
 * Reflection

Back