I had leave before the concepts and definitions of the EBC in the Wiki by Ralf Westphal at CodePlex. I shall continue to do even when I'm done with this blog here and then can be read at CodePlex - ebclang. but until I can formulate the description in English, I need only the German version, which can be read here.
impetus
Many proposals were discussed, especially the indications that it has been around for solutions and concepts similar or identical approaches. But over the posts turned out that the previous terms are too abstract or the meaning behind it all can not be developed. So here is the attempt is iteratively the EBC paradigm to introduce and implement, in which the most important and simplest concepts and definitions will be written down.
I would also advance the suggestions are always welcome.
definitions of EBC First
be necessary to define what has been achieved should be. What to do with the EBC paradigm to be improved, which is easier and where it can be used?The goal of EBC
Event Based Components represent the next step of software development is the coupling of components is not more than injection, but through links and news. In this way the components are decoupled and thus more flexible. The aim is therefore to create flexible independent components.The area of application
There is no definition of the application area, as it is now expected by the event-driven unit. These were previously reserved for the UI area, but that does not make sense if it is only limited.EBC can be used throughout all areas of a system solution.
Important conclusions
- on a board (Board) will only wired components and parts (Components, Parts) (wired)
- events are an effective way of messages (messages) to send
- There are no basic types of news
- EBC can be used in component diagrams and schematics (wiring diagram) graphically
- A component can be 0-n input and / or outputs have
The concepts of EBC
The components of EBC are very simple. As a basis for finding the term is used in electrical, because in this area many terms are finished, you can easily understand.the EBC paradigm provides the following terms available:
- Component, Part
- ,
- Board
- Pins
- message,
- Wiring and Wiring Diagram
Component
Everything contains logical elements is a Component . It is the umbrella term for single or compound elements. Each component is described by its diagram in the form of contracts / interfaces. EBC Component Contract
- interface IFoo {
- void In_ReciveMessage (inmessages message);
- event OutPin \u0026lt;OutMessage> Out_XYZ;}
assembly or composite component requires
This special form of the component to intense scrutiny even if it is taken as a term. A composite is a group of parts, that is, therefore, a classic component pins (see below). However, since the parts would be in turn connected in the composite, we have the case where a composite does the job of a board, as well as functional elements.pin A pin is the connection point between the Components. These compounds are set up on the board. They therefore form the basis of communication. Pins vary in their direction of communication. There are In and Out pins, which in turn can be freely defined.
In
In Pin
- void In_ReciveMessage (inmessages message);
Out
Out Pin
- event OutPin \u0026lt;OutMessage> Out_XYZ;
trigger
I could imagine to describe the pins without the message as a trigger. You start a process only, but will need a message.Message
is the case of a message is the message that the data that is sent to a Component. The message has no specific definition or is from a particular type. That has not time to define basic types.Wiring
This term describes the process when the pins are wired to the board connected to each other. It is a tangible and easily understood term and fits well with the circuit diagrams, the wiring diagrams.
Wiring Diagram
the documenting of EBC are created so-called wiring diagrams. Show them on different levels of abstraction, the wiring from the Components. Wiring Diagrams may form the basis for generators to generate code from EBC formulated. EBC syntax (C #)
see the code chart to wire it like this:definition of the components, ie the description of the pins for each component.
EBC Contracts
- interface IBoard {
- void In_ProcessMessage( int message);
- event OutPin < DateTime > Out_BoardMessage;
- }
-
- interface IFoo {
- void In_ReciveMessage( int message);
- event OutPin < string > Out_XYZ;
- }
-
- interface IBar {
- void In_ReciveOtherMessage( string message);
- event OutPin < DateTime > Out_ABC;
- }
EBC Components
- class Foo : IFoo {
- public event OutPin < string > Out_XYZ = delegate { };
-
- public void In_ReciveMessage( int message) {
- throw new NotImplementedException ();
- }
- }
-
- class Bar : IBar{
- public event OutPin < DateTime > Out_ABC = delegate { };
-
- public void In_ReciveOtherMessage( string message) {
- throw new NotImplementedException ();}
- }
EBC Board
- class Board : event iBoard {
- public OutPin \u0026lt; DateTime > = Out_BoardMessage delegate {};
- ; private Action < int > _startSequence;
-
- public Board( IFoo foo, IBar bar) {
- this ._startSequence = foo.In_ReciveMessage;
- foo.Out_XYZ += bar.In_ReciveOtherMessage;
- bar.Out_ABC + = this Out_BoardMessage;.
- }
- public void In_ReciveBoardMessage ( int message) {
- ; this _startSequence (message);.
- }}
Conclusion This is the beginning, be sure other terms and Definitions are added, but there should be a foundation be laid.
January