Can OCL assist in describing Design Pattern?



Date view Thread view Subject view Author view

Shunxiang Yang (ysx@process.buaa.edu.cn)
Thu, 28 Dec 2000 23:49:09 +0800


Hi, Is there any feasible way to describe Design Pattern both with ease and accuracy? I have an idea, but I do not know whether it's feasible or not. Here it is: 1. model the design patterns using UML. 2. add necessary description for the constraints in Design Patterns uing OCL or something like this. This is necessary because UML model is far from enough to describe a design pattern. 3. record these 2 in a pattern lib. 4. user can select a 'pattern' from the pattern lib, and when CASE tool trying to instantiate a design pattern, it refer both to the UML model and the OCL description. But there're some problems: 1. Is there any extension of UML that support design pattern description? 2. Is OCL ideal for this task? Or just a subset of it is enough? How to apply OCL description to the UML model of design pattern? for example, how to describe Abstract Factory in GoF pattern book? 3. Is there any way to use OCL visually? 4. Is there any other way to realize the goal I described above? I put forward this question in order to get the solution for this problem: Currently, the CASE tools supporting design patterns are hard to extend. For example, togetherJ is a nice UML tool supporting Design pattern. But to add new patterns to the pattern lib, users have to program in java. If togetherJ can support the way I described above, it will be much more convinient for users to add his/her new patterns to the pattern lib, and reuse them later. Is there any CASE tool that support the method I described above by now? Thank you for your great advice! Best wishes, yours, Yang Shunxiang


Date view Thread view Subject view Author view