Re: Designing my finite state machine
From: Robert C. Martin (unclebob_at_objectmentor.com)
Date: 03/14/05
- Next message: Alfredo Novoa: "Re: Application logic and Business logic"
- Previous message: Robert C. Martin: "Re: Designing my finite state machine"
- In reply to: Remi Bastide: "Re: Designing my finite state machine"
- Next in thread: H. S. Lahman: "Re: Designing my finite state machine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 14 Mar 2005 16:54:54 -0600
On Mon, 14 Mar 2005 12:58:27 +0100, Remi Bastide
<FirstName.LastName@irit.fr> wrote:
>Robert C. Martin <unclebob@objectmentor.com> wrote:
>
>>On Thu, 10 Mar 2005 21:37:14 +0100, "Matthias Hofmann"
>><hofmann@anvil-soft.com> wrote:
>>
>>Matthias,
>>
>>It is generally a good idea to separate event identification from the
>>finite state machine itself. The firing of a transition is a boolean
>>event. That event can be given a name (e.g. start, done, complete).
>>
>>What you have described are a set of flags and conditions that have to
>>be boiled down into single events. I strongly suggest you do this
>>boiling outside of the FSM proper, so that the FSM sees only the
>>boolean events.
>>
>>As an aid, I suggest you download SMC from:
>>http://www.objectmentor.com/resources/downloads/index
>>
>
>I'm surprised that you suggest to transform these "flags and
>conditions" into events. To me, it appears that they would better be
>modelled as (sub-)states. A boolean flag to me is just one part of the
>state space, that should be modelled as a state as much as it remains
>convenient.
I quite agree. As much as is possible I like to eliminate all the
flags and conditions and collapse them down into raw states. However,
this is not always possible. When it's not, I connive to get the
extra conditions and flags represented as events. Often by using
activity states.
-----
Robert C. Martin (Uncle Bob) | email: unclebob@objectmentor.com
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716
"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
- Next message: Alfredo Novoa: "Re: Application logic and Business logic"
- Previous message: Robert C. Martin: "Re: Designing my finite state machine"
- In reply to: Remi Bastide: "Re: Designing my finite state machine"
- Next in thread: H. S. Lahman: "Re: Designing my finite state machine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|