Building an ECOEnabled User Interface

It is assumed that you have a model with two classes, with a master/detail relationship between them. A common example of this relationship includes Customer and Order classes, where one Customer can have zero or many Orders. The procedure demonstrates the creation of two grids: one that displays records on the master side of the association, and a second grid that displays the associated detail records. The grids will be linked so that the detail grid always shows the objects associated with the current selection in the master grid. It is also assumed that you have configured your application's ECO Space with either an RDBMS persistence component, or an XML file persistence component. For more information on using the integrated class diagramming tools, and on configuring the application's ECO Space, please refer to the links at the end of this document.

In the ECO framework, the term "handle" means a value. A handle could represent a single value, such as the value of one attribute of an object. Or, it could represent a collection of values, such as a list of objects returned by an OCL expression. Handles implement the System.ComponentModel.IListSource interface, making them suitable for use as data sources in user interface components.

The ECO Enabled Windows Form wizard creates a basic Windows Form with two additional properties: A RootHandle (default name rhRoot), and an ExpressionHandle (default name ehRoot). The form's constructor is written to take a reference to your application's ECO Space as a parameter, and it includes code to set the ECO Space property of the RootHandle.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment