Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3630280
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:14:59+00:00 2026-05-19T00:14:59+00:00

I have implemented GUIs using Swing and always tried to follow the MVC pattern

  • 0

I have implemented GUIs using Swing and always tried to follow the MVC pattern as much as I could.
I was wondering though, if MVC is not the only part of the puzzle.
Are FSMs used in GUI’s design as well?
I have never used an FSM in a GUI and my approach was: on action, the corresponding method of the controller was called, to endup updating the model, finishing with updating the view.
Usually upon a request triggered by a user’s action I used some simple checks to make sure that the user should be able to do the action of the kind:is a specific component enabled? or is the label visible of this kind? etc.
This seems to work so far, but I have to admit that I was “lucky” and did not have to build too complicated-sophisticated or elaborate GUIs.
I have build FSMs before (in different kind off applications -mainly in C++) and I started to wonder if FSMs in GUIs is actually used as a pattern and my approach i.e. to make checks on ActionListeners code, on what the user sees plus what components are enabled or disabled etc. to determine if the user should see some error message instead of being able to do the specific action that e.g. the button promises is actually a bad idea for full-fledged GUI apps.
So when starting to design a GUI besides how to implement the MVC do you fit/associate an FSM in your design?
UPDATE:
After reviewing Dhruv Gairola article in his comment, I am still puzzled on this.
The article mentions building an FSM which is though actually bind to the calculator implementation, meaning that even if the calculator was implemented getting user input without a GUI but via the command line, the FSM would still be needed.
I am still not sure if FSMs to validate user’s action on each point in time, is a popular or valid design.
It seems that it could be too much effort and requires that the GUI has been designed completely in advance and all the possible user’s action have been mapped to specific results depending on specific states.
Given the fact that there has no been any comments just a one reply, I am tending to think that may be FSM’s (to validate a user’s actions on controls) are actually not used.

Any input on this is highly welcome.
Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:15:00+00:00Added an answer on May 19, 2026 at 12:15 am

    lets put it this way- design patterns are mainly elaborations of the different design principles e.g. encapsulate what varies, program to an interface, not an implementation, etc. so its not that you HAVE to use a pattern or anything, basically make sure that the way you program conforms to good design principles. if using FSM for a particular design makes design sense, id advice you to go for it. usually patterns are encouraged so that other programmers are able to understand your logic and expand on it easily based on what they know about the pattern. theres no rigid rule saying that you HAVE to use MVC, you HAVE to use blah blah blah.. conclusion: as long as the pattern you’re applying conforms to good design principles, (or even if you’re not using a specific pattern), make sure its designed well and well enough for others to expand and understand it easily. thats my two cents worth..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented a simple Composite pattern using SplObjectStorage, like the example above: class
I have implemented what I thought was a pretty decent representation of MVC in
I have implemented tracing based on System.Diagnostics. I am also using a System.Diagnostics.TextWriterTraceListener, and
We have implemented a popup window as a modal dialog using the IE method:
I have implemented changing the brightness of an image using uislider in iPhone without
I have implemented vibration using vibrator .In my application, when the user press the
I have implemented audio playback using AVPlayer, playing a remote mp3 url. I want
I have implemented a view-based NSOutlineView in my project. I am using floating group
I have implemented web service using rails server. The server uses rails default authentication
I have implemented a Webservice using Apache CXF . The flow is this way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.