CX-Studio is DAT's drag-and-drop component assembly tool for Component-X. CX-Studio implements the OMG "Component Collaboration Architecture" as it's component architecture, but is specialized for XML. Before looking at CX-Studio, lets explore some of the basic concepts.
There are many kinds of components � software and otherwise. A component is simply something capable of being composed into a composition � or part of an assembly. There are very different kinds of compositions and very different kinds of components. For every kind of component there must be a corresponding kind of composition for it to assemble into. Therefore any kind of component should be qualified as to the type of composition. CX does not claim to be �the� component model, it is a component model implemented with XML and Java using a corresponding component assembly model.
CX components are processing components, ones that collaborate with other CX components to do some kind of processing. CX components can be used to build other CX components or to implement application services � such as a vendor in a buy-sell process.
There are other forms of software and design components, including UML components, EJBs, COM components, Corba components, etc. CX components and composition are orthogonal to these concepts. A technology component, such as an EJB may be the implementation platform for a CX component or may be something that can be wrapped as a CX component.
Some forms of components and compositions allow components to be built from other components, this is a recursive component architecture. CX is such a recursive component architecture.
Within these documents, "component" means Component-X components.
They subscribe to the Component-X architecture based on UML-CCA.
They can be used within CX-Studio
They have ports which produce and consume XML carried by Java events
They can can have properties which can be configured in Cx-Studio and are stored in XML configuration files
They have a base implementation in Java and expose specific Component-X interfaces
They are executable
CX-Components communicate with other components using ports. Ports provide a connection point on a component that will produce and/or consume XML documents carried by events. Every component can be thought of as a "mini server", sitting and waiting for XML document to arrive so it can do it's work and send out XML documents on the same or other ports. Some ports send or receive a single document type, others can implement a complex protocol using many documents. A component may have any number of ports.
Ports are configured as providing or using a particular document or interface.
- When a port provides a document type, it sends that document
- When a port uses a document type, it receives that document
- When a port provides an interface it is a "server" of that interface
- When a port uses an interface, it is a "client" of that interface
In Cx-Studio ports can be added to a component using the "Add Component" icon, the menu item or dropping an element type onto the edge of the components. When you drop an element type onto the left edge CX-Studio will create a "provider" (receiver or server) port. When you drop an element type onto the right edge CX-Studio will create a "uses" (sender or client) port.
To be useful in a variety of conditions, components can be configured with properties. A property defines how a component will behave in some particular circumstance. For example, a "decision" component may have an expression property to decide if it's input document should flow out of one of two output ports. Components with sophisticated configuration, such as a DBMS mapping component, can have custom user interfaces for configuration. Each kind of component has it's own set of properties.
XML and Component-X are strongly based on Element Types. An element type defines the information that will be sent between or acted on by CX Components. Element types may be imported from an XML DTD or defined within CX-Studio. Once CX-Studio knows about an element type it can be processed by CX Components. Element types can be primitive types (like strings, numbers and dates) or composite types like addresses, customers and purchase orders. Component-X implements the full XML document model.
Once an element type is defined, it can be used immediately to create a port, interface or variable.
One of the most powerful capabilities of Component-X is the ability to build components from components. When a component is created within Cx-Studio, other components can be dragged from the component library pallet and dropped into the component being built. This use of a component can then be connected to other components by "wiring" their ports together. When you wire ports together you are telling CX-Studio that document messages (or events) produced by one side will be consumed by the other, thus making these two components work together. You can only wire ports if their element types are compatible.
You can also configure a component for a particular use, either by right clicking on the component and selecting "properties" or by opening a custom editor for the component, if available. Highly configurable components, such as the DBMS mapping component, have custom editors.
The three things described; Dragging and dropping, wiring and configuring are the only things you need to learn to build components out of other components using CX-Studio.
Component assembly isn't much good without components to assemble. The "starting point" is some primitive component implemented in Java (Note that Component-X is not limited to Java, However, this version of Cx-Studio is Java only). Primitive components can be big or small, standard or custom - there is no limit to the library of components to build on.
A number of small "data processing" components are built-into Cx-Studio as a starting point, and some simple applications may be built with these. However, it is expected that enterprise applications will require complex functionality and integration with legacy systems. This type of capability may best be done as a primitive Java component. So, to Cx-Studio, anything "outside" is a primitive component - even if it is a huge legacy application.
By making it easy to create new primitive components in Java, Cx-Studio embraces Java's capabilities rather than trying to replace them. Developers are encoraged to implement new primitive components in Java.
Pins, like ports, allow connections between components. But, unlike ports, pins are only control signals. Pins are used to tell components things like "start" or "clear" and allow components to signal events such as "done".
Work is done within a Cx-Studio project. A project is a particular set of components, their wires ad configurations. A project is what you work with to create a particular set of component services and can also be executed as an application server by Cx-Studio. As with most systems, components can be loaded and saved and additional components may by loaded into a project using CX-Studio.
Projects may be included into other projects. By including a project all components defined in the include projects become availabe for use in the current project. Included components are immediately execting and available for drag and drop into new composite components.
The Component-X distribution provides its native Java components in a set of projects that are to be included in the current project as needed.
A Component Archive, .car file, is a Java Jar file packaging a set of projects together with any needed artifacts such as the class files of any native Java components and image files.
A Component Archive provides easy distribution and deployment of ComponentX projects.
During development an operating system directory may serve as a Component Archive. The directory and any of its subdirectory are places where ComponentX projects can be stored and loaded.
After development any directories serving as Component Archives can be turned into real Component Archives (.car files) using the Java Jar utility.
CX-Studio is not a "dead" design tool, but a living breathing application server. At any time you can send XML documents to any CX-Component within your project and see it execute. Since all interactions in CX-Studio use XML documents it is easy to see what components do, why and when. Debugging and tracing is as natural as dragging and dropping. Once the Component-X service is complete, the same project can be deployed on a commercial application server (this functionality is not yet complete). Today, CX-Studio can directly and immediately expose a light-weight application server on the internet.