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 7745855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:07:41+00:00 2026-06-01T10:07:41+00:00

I am working on a project. I am trying to implement the core as

  • 0

I am working on a project. I am trying to implement the core as independent jar file which can be run from command line or even a windows service. The core would be responsible to keep track couple of files and send some notification emails. The question is, what would be the best idea to keep GUI totally independent?

The GUI needs following interation with the core

  • send list of files
  • receive notifications from core regarding how much those files has been processed
  • receive status notifications regarding files i.e. SEND/Processing/Failed etc to be displayed in GUI
  • receive information if there is incoming messages from core

I had this software developed in Delphi and C. C was used to code the core logic and using Windows Messages and Callbacks, i registered Delphi GUI on C dll/service. I am confused how to implement it in java.

  • Observer pattern?
  • Small client/server communication between core and gui?

P.S:
The reason i am discussing it here is to learn and explore better design for such softwares when coded in Java. I ain’t asking for Observer Pattern documentation or client server architecture. There could be other possible means which i am not aware of. So I am looking forward to any idea, design or framework.

  • 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-06-01T10:07:42+00:00Added an answer on June 1, 2026 at 10:07 am

    Oberserver Pattern is really the correct answer for three out of your 4 use cases.

    On the level of your description you might have the following interface implemented by your core:

    public interface Core {
    
        sendFiles(List<File> files);
        registerProgressListener(ProgressListener listener);            
        registerStatusListener(StatusListener listener);
        registerMessageListener(MessageListener listener);
    }
    

    The listeners interfaces will look really similar to this one

    public interface ProgressListener{
        madeProgress(ProgressEvent)
    }
    

    ProgressEvent (and the other Event classes) should be value objects, e.g.

    public class ProgressEvent {
        public final double progress;
        public final String fileName;
        public ... // constructor
    }
    

    You probably want your core and your gui to run in different threads. Otherwise your GUI would not react to any events while the core is running. Since the core shouldn’t know anything about the GUI the handover between threads should be done by the GUI, i.e. the listeners should take care to use SwingUtilities.invokeLater or invokeAndWait in order to update the GUI.

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

Sidebar

Related Questions

I'm currently working on a ASP.Net 3.5 project and trying to implement session timeout
I'm working on a project that's trying to implement some editing features using a
I'm working on a project right now where I'm trying to implement the NEAT
I'm working with an MVC project, trying to implement IoC and DI. Both these
I am currently working on a project, and I am trying to implement Protocol
I'm not currently working on a coding project that is trying to implement this,
I'm trying to implement single instance application using mutex. the application can run only
I am working on a VB.Net project and trying to get it to pull
So I just finished working the project at http://msdn.microsoft.com/en-us/data/gg685489 . I am trying to
I'm trying to get MSBuild working on a project that has just been moved

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.