Posts

What is ECO?

This question has been asked so many times. Jesper (one of the developers) recently explained it like this... ECO, Enterprise Core Objects, is a model driven framework. In essence, it allows you to specify your application using a UML class model. This model is then transformed to source code, decorated with enough information to re-create the model information at run time. The framework uses the model information (as contained in and re-created from the source code) to drive persistence, presentation, maintain the technical integrity of the business objects, manage bi-directional relations, derived associations and attributes, maintain constraints, offer services like undo/redo, object versioning and quite a bit more. The value added proposition for you is that you can design your application on a 'higher level', without worrying about implementation details. Use the model not only for communication of ideas, but also as a part of your application. You can code your business

Adding runtime error messages to page validation

One of the requirements when writing a website I once created was the ability to model object constraints in OCL and then validating the current page against those constraints. The problem with normal validators is that they are designed to validate individual controls rather than a list of constraints on an object. The approach I took was to create a validator which I can place on any web form and add as many errors to as I required. The first step was to create a WebControl which supported IValidator public class MultiValidator : WebControl, IValidator { } I then added a list of strings to hold the error strings, and a method to add an error. private List Errors = new List (); public void AddError(string message) { Errors.Add(message); }//AddError When ASP .net validates a page it enumerates all IValidators within its own Validators property, and called IValidator.Validate(). To determine if the page is valid or not it then checks IValidator.IsValid. To add cu

Reverse derived columns

The focus of this post will be "Event derived columns". Jan Nordén (Borland) pointed me in the direction of these things recently when I asked him how to solve a GUI problem I had. When I used Bold for Delphi there was this really nice GUI component called a BoldSelectionListBox. This component would let me show a list of items with a CheckBox next to each row, ticking / unticking a box would add / remove an association between the object selected and some other object of my choice. Using this BoldSelectionListBox I would be able to specify a User (for example) as the context and then have a list of all Groups in a kind of CheckListBox. Ticks would appear in all CheckBoxes where the User is belongs to the group listed, and no tick where they are not part of the group. The extra clever part of course is that by ticking a CheckBox Bold would create the link object required to tie the User to the Group, and add it to User.Groups (and of course Group.Users). Seeing that ECO

Moving home

This is my first blog entry on this site. I'm moving from my previous blog address over to here. At first I'll be reposting some of my more interesting entries from my old blog.