Book a Demo

Author Topic: using Design Patterns in EA  (Read 2755 times)

Jumbik

  • Guest
using Design Patterns in EA
« on: November 26, 2002, 10:11:35 am »
Hi,

I  played with EA Design Patterns for the first time, very nice!  :)

But I think, some problems are in approach:

The first "hot" problem: When I use some pattern, the concrete participants in my solution must be identified, but not only by editing. I strongly need to select some of them from existing elements in my model to establish them into pattern .But EA create new elements "again and again". I think, the best approach is: "Identifying concrete participants is choose select or create", because some of them must be created, some of them selected (at time creating pattern I don't know it).

The second "hot" problem:  Some pattern needs collection of participants with the same role but with unknown count of items at this role. For instance pattern Abstract Factory (example in Help) can have one, two or more factory methods and one, two or more subclasses implementing them. For instance if I register pattern Abstract Factory with  2 operations, I have Abstract Factory only for 2 operations, but I need it generally for  N operations. I see the solution in "multiple participants". User can add the (N+1). concrete participant to this multiple participant. With creating pattern I must mark the participant if it is single or multiple. The second case means possible adding (removing) to collection more participants at the same role  when applying pattern.

Example of the first and second problem at Abstract Factory: I need to select Products from my existing elements in model, I need to create one MyAbstractFactory and create multiple participants N subclasses and M operations. Participants Products, Subclasses, Operations will be defined as multiple, Abstract Factory as single participant. User can choose select or create concrete participant with applying pattern how is needed at his situation.

The 3. problem - not hot, only possible improvement :  If I have some Note (Description) in text connected to participant in pattern, it should be good replacing the names of roles also in this text. Some of text can be "tagged" as possible input variable with the same meaning as roles of pattern. Inputting concrete participants  will be inputted not only as template parameters of pattern, but also at this positions in text. Reading texts in completed solution made by pattern will be consistent with given situation (maybe grammar funny things). But it is only "improvement". I think first and second problems are more important…

Jumbik
« Last Edit: November 26, 2002, 10:19:33 am by Jumbik »

Jumbik

  • Guest
Re: using Design Patterns in EA
« Reply #1 on: November 29, 2002, 11:59:29 pm »
I specify this problem to concrete questions to authors of EA:

1. Is it possible in next versions of EA to instate the participants of design pattern also by selecting them from existing elements of the same type in my model and not only by inputting new elements to model (it is so done now) ?

I think without this feature using of design patterns is practically impossible when my elements already exist in model and I want to apply any design pattern on them...

2. Is it possible in next version to define multiple participants where the count of occurence is not known and is not predeterminated in design pattern?

I think without this featerue I must declare design pattern for specific number of occurencies, what is unusable. Desing patterns are opened at these counts (example: in design pattern are defined  participants ProductA, ProductB, ProductC etc., and count is opened (not known) and it is specified at time of applying desing pattern, for instance by selecting from existing classes).

Jumbik