About Event-Based Components Event-Based Components (EBC) bring software development on par with mechanical engineering and electrical engineering in that they describe how software components can be made truely composable. (From the description at codeplex) Read more about ebc: Changelog Recent development news can now be found here. Screenshot of the designer How the designer works This extension provides a graphical designer that generates ebc.xml files to be compiled to c# code with the ebc compiler. The designer, the compiler and some other ebc tools are available atcodeplex. First of all you have to define some ebc-components. You can choose an ExistingPart (means using an existing c# class) or a PartContract (means the compiler should generate an interface) from the toolbox. Then you combine these parts with connections. For each connection in the designers diagram a wire Element is generated in ebc.xml, that tells the compiler to register a method of one component to handle an event of another component. Finally the designer lets you define in- and out-pins that define methods or events the class generated from the diagram (board) shares with its environment, so the board itself can be used as an ebc component again in another board. Sample Assume you have the EBC-repository that can find a Customer by name from the Overview above and an EBC-client that wants to use this functionality. The repository is defined that way: C# Edit|Remove csharppublic class CustomerRepo{ public void Input_FindCustomerByName(string customerName) { Output_CustomerFound(...); } public event Action<Customer> Output_CustomerFound;} public class CustomerRepo { public void Input_FindCustomerByName(string customerName) { Output_CustomerFound(...); } public event Action<Customer> Output_CustomerFound; } The client fires out an event hoping to get an answer on the input method: C# Edit|Remove csharppublic class RepoClient{ public event Action<string> Output_FindCustomerByName; public void Input_CustomerFound(Customer customer) { //... }} public class RepoClient { public event Action<string> Output_FindCustomerByName; public void Input_CustomerFound(Customer customer) { //... } } Now we have to connect this two ebc components, so we create a new ebc designer board:
After that we can add the two existing parts we have and two connections (one for each direction) from the toolbox: Selecting the types of the existing parts can be done in the property grid, using a type browser: The last thing we have to do, is selecting the methods/events for the connections. This is again done in the property grid by a nice drop-down box: The result should look like this |