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

  • Home
  • SEARCH
  • 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 4332592
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:16:40+00:00 2026-05-21T10:16:40+00:00

I have a user interface with multiple sections (say, 9 UI sections in a

  • 0

I have a user interface with multiple sections (say, 9 UI sections in a 3×3 grid). The content of a section (i.e. its UI components) are instantiated differently at runtime according to some conditions. So I guess I would use Strategy pattern for each section. Besides simple conditions, the states of instantiated sections are also used as entrance condition to instantiate or re-instantiate other sections.

For example, if condition X is true, section (1,1) is instantiated to a text box and a submit button. If X is false, S(1,1) will contain a table and a submit button. When the button is clicked, if S(1,1) has a table, S(1,2) will contain a form which details the selected record in the table of S(1,1). If S(1,1) is instantiated with a text box when the button is clicked, S(1,2) will contain a table. And so it goes; the interaction gets complex.

What design pattern can help me coordinate this complex interaction and stay away from a messy nested ifs code? 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-21T10:16:41+00:00Added an answer on May 21, 2026 at 10:16 am

    It’s best if you can keep each component decoupled from each other using pure events – that would be the Observer pattern. Otherwise Mediator comes to mind.

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

Sidebar

Related Questions

I have a fairly large application that uses WPF for its user interface. I
I have a client-side interface that allows the user to perform multiple edits against
A lot of JavaScript libraries have user interface widgets. Usually they are created after
I have been developing an user interface with Java Swing, and I have met
I have to make a graphical user interface application using the language of my
I always have trouble designing the user interface when it come to manage a
I have a bunch of XML files I'm using for user interface and string
Is it good idea to have application engine written in c++ and user interface
I have an interface like this: public interface IUser{ //some properties here T ToDerived(User
If use MongoRepository, You can have following code: @Repository public interface UserRepo extends MongoRepository<User,

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.