DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Michael Welch Guest

    OT: Software implementation of Finite State Machine


    My last experience with finite state machines was over a decade ago in my
    electrical engineering courses. And as far as I can remember I've never implemented
    one in software (just on paper using models of flip flops and the like).

    It seems very simple, but I keep running into snags. I thought about using
    the State pattern presented by GOF, but my initial searches in the newsgroups
    and Google seem to suggest that the State pattern is not really about finite
    state machines: (http://groups.google.com/groups?q=im...tt.net&rnum=12)

    And anyway for my needs it does seem overly complex.

    Does anyone have some recommendations or good links on how to approach the
    problem. I know I'll be able to implement it, but I'd like to read up a
    little bit on the theory. Primarily because I want to make the code easy
    to maintain as the requirements change and events and states are added to
    the state machine.

    I'm also concerned that even for my simple requirements, my code is already
    getting messy and unclear.

    Thanks,
    Michael





  2. #2
    Michael Welch Guest

    Re: OT: Software implementation of Finite State Machine



    >It seems very simple, but I keep running into snags. I thought about using
    >the State pattern presented by GOF, but my initial searches in the newsgroups
    >and Google seem to suggest that the State pattern is not really about finite
    >state machines: (http://groups.google.com/groups?q=im...tt.net&rnum=12)
    >
    >And anyway for my needs it does seem overly complex.
    >


    Well, MSDN (online) has an article that recommends using State pattern for
    finite state machines. In addition, one of the pros of this pattern is that
    adding new states later on is very simple. http://msdn.microsoft.com/library/de...l/PATTERNS.asp

    What do you all think?

    Michael


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links