Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - mbc

Pages: 1 ... 13 14 [15] 16
Uml Process / Re: How to structure a project when using packages
« on: June 03, 2005, 07:40:44 am »
Mike, I can select the icon myself, when I add a new view. I remember this feature was added some time ago. Which version are you using?

phaase, it is also possible to rename "Views" to something else, if the name is bothering you.

Best regards,

Uml Process / Re: generate code from opt, alt fragment
« on: April 07, 2005, 07:44:20 am »

Yes, I agree with everything you wrote in your last post.

Normally there is no need for a sequence diagram to be an exact definition of an algorithm in order for the sequence diagram to be useful. And normally it is not necessary to specify exactly which method calls your particular signalling mechanism uses. The most useful sequence diagrams are actually as abstract as possible showing only the information that they are intended to convey.

However, if you are to automatically generate code from a sequence diagram, then there is such a need. The algorithm that is to be generated must be described unambiguously.


Uml Process / Re: generate code from opt, alt fragment
« on: March 29, 2005, 02:30:56 am »

I agree that code could be generated from sequence diagrams that were drawn for that purpose. I also agree that it would be useful to have in EA - especially reverse engineering to sequence diagrams. But it would be difficult to make it work well in practice.

However, I would be less absolute than you are in several of your statements.

What sequence diagrama represent - work algorithm, of course!

No, not so. True, they can represent algorithms, but that is not the generalized purpose of a sequence diagram. A sequence diagram describes one way an interaction may occur. There is no requirement for a sequence diagram to completely describe all possible paths through an algorithm.

code of asynchronous calls doesn't differ from the synchronous calls/signals - just calling other thread/process method

That is your implementation-specific view of things. In my world, asynchronous communication takes place as signals, not method calls.

In short, code generation from sequence diagrams is possible, but it involves making some decisions that specialize the meaning of a sequence diagram compared to the general UML meaning. Therefore it is very difficult to implement a solution that satisfies everyone's needs.


Uml Process / Re: generate code from opt, alt fragment
« on: March 21, 2005, 03:48:23 am »
As far as I am aware, EA can't generate any code from sequence diagrams.

Best regards,

Uml Process / Re: drag and drop auto instance not working
« on: September 20, 2004, 01:49:38 am »
If you wrote correctly that you are trying to create an instance of an *object*, then that is the problem. You can't instance objects, only classes. Objects are already instances.


Uml Process / Re: Modelling Global Functions
« on: September 16, 2004, 09:03:51 am »
Ok, I would model that it one of these ways:

1. Create an active class to represent the thread and add your function to that class. Give the class a stereotype of your own choosing, such as <<global_thread>>.

2. Create a class to represent the global namespace (call it something like "Globals") and assign all your global functions (and perhaps variables) to that.

Still, in your situation I would prefer to implement the threads as classes, because in my world "global" and "clean" are mostly contradictory terms. By making the functions global you are granting access to them to everything. Therefore you have no easy way of determining what impact a change in one of those functions might have on the rest of the system (anyone might be calling them). Encapsulation in a class helps in that respect. If the threads have things in common, you might also benefit from creating a parent class, CWorkerThread, and deriving each of the thread classes from that.


Uml Process / Re: Modelling Global Functions
« on: September 16, 2004, 06:34:32 am »
Threads are normally modelled as active classes (IsActive = true), regardless of how they are implemented.

If you want to do code generation and make it work with your implementation of threads it presents some other issues, of course.

But you also make me a bit curious as to why you want global functions. In my experience, it gives a lot of advantages to implement each thread as a class. What platform is your code going to run on?


Uml Process / Re: Aggregation overload! - in domain model
« on: March 26, 2004, 03:38:38 am »
Hi all

I would like to have a go at explaining aggregation and composition too.

This is the way I see it:

An aggregate is something that consists of parts. It cannot exist without its parts.
To associate the aggregate with its parts an aggregation association is used, either strong (composition) or weak (aggregation). A composition is a special case of aggregation.
If the nature of the aggregate is such that the parts cannot be parts of another aggregate at the same time, then a strong aggregation (composition) is needed.

Example of Composition:
A brick house consists of bricks. It is an aggregate of bricks. Without the bricks, it would not exist. Furthermore, those bricks cannot possibly be part of another house at the same time. There is a strong aggregation relationship between the house and its bricks.

Example of weak aggregation:
A physics class in a school consists of students. It is an aggregate of students. Without the students, it would not exist. However, the students may also be part of a mathematics class as well. Therefore there is a weak aggregation relationship between the physics class and the students (shared aggregation).

Example of normal association:
The physics class is taught by a teacher. However, even if the teacher is sick, the physics class (a group of students) still exists. The teacher is not a part of the class. Therefore the relationship between the class and the teacher is not an aggregation, just a plain association.

What does this mean in code?
The difference between aggregation and association in code is slight. Normally it is not visible in the class declaration. Both aggregation and association would have to include the parts by reference (normally a pointer in C++). However, an aggregate class should implement some way of ensuring that its parts exist, since it cannot exist without them.

A composition is more obvious. A composite class would normally just implement its parts as members by value. That way there is no way around creating the parts when the composite is created.

To conclude:
Composition has a direct effect on code, and is therefore a very useful element in classes for code generation.
Aggregation has no direct effect on code except through the mind of the programmer who is implementing the class. It is a matter of choice whether you like to add this extra information to your model or not.

I hope this little story might be of use to someone.


Uml Process / Re: Using 'Page' or 'Screen' in use case descripti
« on: March 19, 2004, 04:30:18 am »
In my opinion, the important thing is not to make design decisions in the Use Cases. Use Case writing should be requirements definition, not user interface design.

In your example, if your door to the other world is already given by external factor before you start your design - then you can mention the handle. BUT if the door is part of the system you are designing, and you write "door handle" then you have already excluded other options. Later in the design phase you will not have the freedom to decide on a button or infrared device to activate automatic opening of the door.
A more abstract text would give you more freedom in the design: e.g. "The user activates the door-opening mechanism" or even simpler: "The user opens the door".

I hope this wasn't too obscure   ???


Uml Process / Re: please help me? i am confused..mix up
« on: September 18, 2003, 05:15:48 am »
Bugs fixed in 2 weeks? In my experiences, Sparks fixes serious problems within 24 hours!!!!


Uml Process / Re: Use Case Diagram question
« on: August 01, 2003, 08:52:44 am »
I have a little comment for the diagrams too.
"Load user data" and "Save user data" is (as far as I can tell) not actually something that the user does but rather the internal workings of the program. It seems to me that you are describing implementation in your use case diagram, which should be avoided.
Also, I don't see any text at all, no scenarios, in the model that you linked to. The use case diagram itself is not really important. It just serves to give an overview of your use cases. The really useful part of a use case is in its textual description or scenarios. Try not to get lost in include and extend relationships. Most of the time it is better to just describe it in the use case text.


Uml Process / Re: Proposed Product Oriented Nature of This Forum
« on: July 28, 2003, 04:56:03 am »
I would rather that the forum is more goal-oriented. After all, I don't start out by saying to myself "I want to make a sequence diagram - now what can I show in a sequence diagram?".
No, my question would be something like: "How can I model the interaction between the different parts of my software?" and the answer would be "You may use a sequence diagram or a collaboration diagram. The advantages and disadvantages are....".
I think this forum should be process-oriented, not notation-oriented. There are many different processes (ways of utilizing the UML notation and EA tool) out there, and this should be a place to discuss them all.


Uml Process / Re: How to show calls from derived class to ancest
« on: July 07, 2003, 01:19:08 am »
Thank you very much for your ideas, they are very helpful.
You are right that my example doesn't require a very detailed diagram, but I kept it simple intentionally to make my question understandable. The actual case has a longer chain of derivations, and some classes aggregates other classes, which are themselves derivations.
I have ended up doing something like what you suggest in your Method 2.

Uml Process / How to show calls from derived class to ancestor?
« on: July 03, 2003, 10:38:00 am »
How should I illustrate calls from a derived class to the overridden functions of its ancestors?

For example: consider 2 classes CTextButton and CBitmapTextButton where CBitmapTextButton is derived from CTextButton. CTextButton is a button with text, CBitmapTextButton is a button with both text and a bitmap.

When I call the Paint function of CTextButton, it will paint the text on the screen. When I call Paint of CBitmapTextButton it will paint the bitmap on the screen and then call Paint of its ancestor (CTextButton) in order to paint the text.

How can I illustrate this flow in UML? In a sequence or collaboration diagram with classes instead of the usual instances?

Thanks in advance

Uml Process / Re: The best way to write use cases?
« on: January 23, 2003, 01:14:46 am »

yes, I expected (and hoped for!) a lively discussion. And so far I have not been disappointed.

Your point about developers doing functional decomposition already in the use case stage is exactly the cause of my scepticism about breaking use cases down too much.

All that is needed to do what you require of the tool, is a documentation generator that is a little more flexible. I have some plans in my head about implementing something that works through the EA automation interface, but I can't promise that I'll ever have the time to finish it.

And I would like to add another question to this topic:
What about when the user interface design is part of the project? How do you avoid making design decisions in the use cases, when scenarios often sound like "step 117: User clicks the GO button". My approach to this, at the moment, is to write a set of less detailed use cases before user interface design and then refine them by incorporating user interface details before moving on to the design model.

I am eagerly awaiting more posts, although I wont be checking the forum as much the next 2 weeks due to travelling.

Best regards

Pages: 1 ... 13 14 [15] 16