Status and messaging for systems with a large number of classes

Very common dilemma we coders face when creating
systems involving a large number of classes:
Any standard framework to take care of the global status of the whole application and of gui subsystems
for both status handling and report messages to users?
Something light if possible...and not too much threads.

Ah, I see,
I found JPanel with CardLayout or a JTabbedPane very good for control of several GUI in an application - as alternative organization tool I use a JTree, which is used for both, selecting and organizing certain tasks or data in the application - tasks are normally done with data associated with them (that is, what an object is for), so basically a click onto a node in this JTree invokes an interface method of that object (the userObject), which is associated with this node.
Event handling should be done by the event-handling-thread only as far as possible - it is responsible for it so leave this job to it. This will give you control over the order in which the events are handled. Sometimes it needs a bit more work to obey this rule - for example communication coming from the outside (think of a chat channel for example) must be converted to an event source driven by a thread normally. As soon as it is an event source, you can leave it's event handling to the event handling thread again and problems with concurrent programming are minimized again.
It is the same with manipulating components or models of components - leave it to the event handling thread using a Runnable and SwingUtilities.invokeLater(Runnable). This way you can be sure that each manipulation is done after the other in the order you have transferred it to the event handling thread.
When you do this consequently most of your threads will idle most of the time - so give them a break using Thread.sleep(...) - not all platforms provide preemptive multitasking and this way it is garanteed, that the event handling thread will get a chance to run most of the time - which results in fast GUI update and fast event handling.
Another thing is, that you should use "divide and conquer" also within a single GUI panel - place components in subpanels and transfer the responsibility for the components in this panel to exactly these subpanels - think of a team manager which makes his employees work together. He reports up to his super manager and transfers global order from his boss into specific tasks by delegation to the components, he is managing. If you have this in mind, when you design classes, you will have less problem - each class is responsible for a certain task - define it clearly and define to whom it is reporting (its listeners) and what these listeners may be interested in.
When you design the communication structure within your hierarchy of classes (directors, managers, team managers and workers) have in mind, that the communication structure should not break the management hierarchy. A director gives global orders to a manager, which delegates several tasks to the team managers, which make their workers do what is needed. This structure makes a big company controlable by directors - the same principles can also keep control within an application.
greetings Marsian

Similar Messages

  • Possible bug for emails with a large number of recipients

    When receiving emails which was also sent to a large number of people (more than can fit in two lines), it then displays the text 'and 10 more..." or however more there are. Clicking on this text is supposed to then display all the email addresses the email was sent to. However clicking on this is for some reason doing nothing. Is this a bug, or am I the only one having this problem?

    When receiving emails which was also sent to a large number of people (more than can fit in two lines), it then displays the text 'and 10 more..." or however more there are. Clicking on this text is supposed to then display all the email addresses the email was sent to. However clicking on this is for some reason doing nothing. Is this a bug, or am I the only one having this problem?

  • HT3529 Is there a way to create, store and use preset messages for use with "Messages"?

    Is there a way to create, store and use preset messages for use with "Messages". I often have a recurrinig message to send, after a repeating event, and need to enter the same short message each time. It would be nice to have this short message stored and selectable so that I do not need to enter each time.

    found an answer that seems to work:
    https://discussions.apple.com/message/17997300#17997300

  • Why is that when I downloaded the iOS 7 for my iphone 5 that it changed my send and receive for imessages to a random number but my SMS messages are still linked to my phone number?

    Why is that when I downloaded the iOS 7 for my iphone 5 that it changed my send and receive for imessages to a random number but my SMS messages are still linked to my phone number?

    I just encountered this problem for the first time and stumbled upon this forum to find a solution.  I played around with it a bit and it seems that if you slide your finger from the bottom up, you will come upon that new screen that will allow you to do various functions with your phone (put it in airport mode, lock, etc.), you can select your Airport from this screen and play your music wirelessly from your phone; at least this was my experience. Hope this helps!

  • How can I pass value in status and reason for rejection using BAPI_LEAD_CREATEMULTI when creating multiple lead

    Hello,
    I want pass value in STATUS and Reason for rejection according to requirement when i am creating multiple lead using BAPI_LEAD_CREATEMULTI. Please help me how can i pass value. Please give some sample code that in which table i have to pass values and please also tell me INPUT_FIELDS values. Please help me
    Regards,
    Kshitij Rathore

    Hello,
    Please help me for solve this problem. I am trying to solve problem from last 4 days but i didn't get any solution.
    Regards,
    Kshitij Rathore

  • Oracle Error Code and Message for Query Timeout

    Hi,
    I need to catch the oracle error code and message for query timeout.
    I am using Oracle 9i and could not find any relevant error code/message
    for query timeout in Oracle Error Messages.
    If anyone has encountered such error messages, please let me know the
    Oracle Code or Error message.
    Thanks & Regards,
    Kanjana

    Fly is correct in that Oracle will normally let a query run forever in the absense of a user profile or dbms_resource setting that limits a users (query) resouce usage.
    The errors returned for these condition would probably vary but errors ORA-02092 "exceeded session limit on CPU usage, you are being logged off" and ORA-02093 "exceeded call limit on CPU usage" might be of interest.
    But for distributed queries Oracle does impose a time limit. See Oracle error ORA-02049 "timeout: distributed transaction waiting for lock"
    HTH -- Mark D Powell --

  • My brother gave me his iphone and i activated it with my phone number but i can not receive any message and i notice that  on iMessage stills appears his phone number, what do i have to do?

    my brother gave me his iphone and i activated it with my phone number but i can not receive any message and i notice that  on iMessage stills appears his phone number, what do i have to do?

    Launch iTunes on your computer, plug the phone in & on the "Summary Pane", select "Restore". This will restore the phone to factory settings with all of your son's stuff gone. You can now use it as an iPod touch. To do this REQUIRES the deactivated sim card be still installed in the phone.

  • Hi we setup ISE in our lab and planning for prodution with 2000 user endpoints. We have SNS appliance but confused with ISE lice

    Hi we setup ISE in our lab and planning for prodution with 2000 user endpoints. We have SNS appliance but confused with ISE license bt plus and advanced..Please advise.

    Plus:
        Bring Your Own Device (BYOD)
        Profiling
        Endpoint Protection Service (EPS)
        TrustSec SGT
    Advanced :
        Bring Your Own Device (BYOD)
        Profiling
        Endpoint Protection Service (EPS)
        TrustSec SGT
        Mobile Device Manager (MDM)
        Health Compliance and Remediation
        Posture
    Base license is Perpetual

  • I have MacBook Pro Retina, but dint get pages, numbers and keynote for free with it, but others did. What to do?

    I have MacBook Pro Retina, but dint get pages, numbers and keynote for free with it, but others did. What to do?

    Solved the problem- I contacted apple on their support line found on this page... http://www.apple.com/uk/support/mac/ and they were really helpful and talked me through what to do on the phone, I now have all three productivity apps. Hope this helps

  • Setup and configuration for system monitoring and IT Reporting for Java sys

    Hi all,
    How to setup and configuration for system monitoring and IT Reporting for Java system ?
    How to connect Java system to Solman system?
    Regards,
    Neni

    HI,
    What is your OS? You can use SAPCCMSR.exe to monitoring  IT Reporting Java system on Solman.
    Go to solman rz21 create a csmreg user. and configuration fil for agent. copy configuration fil on usr/sap/ccms/..
    Go to comman line cd ../user/sap/xxx/sys/exe/.../ wite SAPCCMSR.00 -R pf=< ...../sys/profile/instans profile> .
    You can se agent on rz10 and use this connaction on rz20 to monitoring and IT Reporting Java system on Solman.
    I hope this help

  • Old files with a large number of comments no longer work properly in either Adobe Acrobat DC or or Acrobat Reader

    I made a series of interactive ebooks wiith Adobe Acrobat Pro. They worked fine in the old Adobe Reader. But now the commenting feature does not work properly either in Adobe Reader DC or Adobe Acrobat DC.  When I open the comments, everything slows down or else I get blank pages. The tools are not usable. There seems to be some compatibility issue between what was done in these books with the commenting tools and the new applications. Has anybody experienced the same?

    Hi Anubha,
    Thanks for your reply. With the new Acrobat Reader DC, I have the same problem on two computers, one with Windows 7 and one with Windows 8.1. I downloaded a trial version of Adobe Acrobat DC on the computer with 8,1. Then I found out that I had the same problem with Acrobat DC as I did with Reader DC.
    I made these e-books with Acrobat Adobe Pro 11. I never had a problem with Pro 11 or with previous Readers. Also I have sent these e-books out to other people who had Reader 11 and they had no problems. Now it seems that the books are not usable – at least in the fullest way -- for me or for anyone else using the latest version of Reader.
    Any help would be appreciated. I have put a lot of work into these e-books.
    De : Anubha Goel 
    Envoyé : April-21-15 12:47 AM
    À : michael jaegermeister
    Objet : You have been mentioned by Anubha Goel in Re: old files with a large number of comments no longer work properly in either Adobe Acrobat DC or or Acrobat Reader in Adobe Community
    You have been mentioned
    by Anubha Goel <https://forums.adobe.com/people/Anubha+Goel?et=notification.mention>  in Re: old files with a large number of comments no longer work properly in either Adobe Acrobat DC or or Acrobat Reader in Adobe Community - View Anubha Goel's reference to you <https://forums.adobe.com/message/7456900?et=notification.mention#7456900>

  • I have Creative Suite Design and web premium 6 -with a serial number. I have reinstalled my computer

    I have Creative Suite Design and web premium 6 - with a serial number. I have reinstalled my computer, AFter installing the CS6, from direct download from my Adobe, again it will not accept my serial code, and the information is: " the serial you provided is valid, but a qualifying produkt could not be found on this computer."

    Pat
    thank you for replying.
    Yes - I have upgraded to cs6  / Creative Suite Design and web premium
    It directs me to this page - Choose the product you own -
    The Design web 6 is not in the provided list - SO do I have to install the earlier version first?

  • Problem in compilation with very large number of method parameters

    I have java file which I created using WSDL2Java. Since the actual WSDL has a complex type with a large number of elements(around 600) in it, Consequently the resulting java file(from WSDL2Java) has a method that takes 600 parameters of various types. When I try to compile it using javac at command prompt, it says "Too many parameters" and doesn't compile. The same is compiling successfully using JBuilder X . The only way I could compile successfully at command prompt is by reducing the number of parameters to around 250 but unfortunately that it's not a workable solution. Does Sun specify any upper bound on number of parameters that can be passed to a method?

    ... a method that takes 600 parameters ...Not compatible with the spec, see Method Descriptors.
    When I try to compile it using javac at
    command prompt, it says "Too many parameters" and
    doesn't compile.As it should.
    The same is compiling successfully using JBuilder X .If JBuilder produces a class file, that class file may very well be invalid.
    The only way I could compile
    successfully at command prompt is by reducing the
    number of parameters to around 250Which is what the spec says.
    but unfortunately that it's not a workable solution.Pass an array of objects - an array is just one object.
    Does Sun specify
    any upper bound on number of parameters that can be
    passed to a method?Yes.

  • Need IDOC and segment for mappping the sales order number

    Hi,
    we need the IDOC name and segment for mapping the sales order number created by oracle in sap for transaction VA01.
    Whether the sales order number created by Oracle can be used to create the sales order in sap using the idoc ACC_SALES_ORDER01?
    . If we can do,then what is the segment and field for the sales order number in the idoc ?
    Please reply asap it's very urgent
    Thanks
    Edited by: suresh kumar nandhagopal on May 16, 2008 12:07 PM

    Hi,
    IDOC for sales order is ORDERS05. Segment E1EDKA1, for field go to SE11 and enter E1EDKA1 to find field for sales order.
    Cheers.
    ...Reward if useful.

  • DB table to get system status and text for PO.

    Hi All,
    I need the table to get system status for a production order and system status text .Please help.

    Hi Prem,
    JEST table is for system status for a production order and TJ02T table is for system status text.
    Try with these fields in the above tables.
    u2022     OBJNR   like JEST-OBJNR object number
    u2022     STAT      like JEST-STAT  Object status
    u2022     INACT    like JEST-INACT indicator status inactive
    u2022     TXT04    like TJ02T-TXT04 individual status of an object
    u2022     TXT30    likeTJ02T-TXT30 object status.
    Hope it helps you.
    Regards,
    Anusha V.
    Edited by: Anusha on May 26, 2009 10:22 AM

Maybe you are looking for

  • Forget a WiFi Network without Connecting to It?

    Is there a way to tell the iPhone to "Forget this Network" for a network you haven't connected to? Or perhaps I should phrase the question differently: Is there a way to keep asking me if I want to join networks in general, but stop asking me about t

  • Graphic bullets don't show when site is live

    Hello all who know a lot more than I do, and thanks in advance for your help. I'm using DW CS (old version) to build a site with lots of bullet lists. I've created a list style (see below) that utilizes a graphic rather than a circle, square, etc. Wh

  • ECM- Total Compensation Statement

    Hi, Is it possible to have multiple TCS? For example a different TCS for Bonus and Salary. Or a different TCS for Executives and other employees. Thank You!

  • [Messages] Ability to Unblock

    In the new Messages tab (in v0.9.8+ which has rolled out to some users, if you don't have it yet it should make it out to you sometime in the future) it is possible to block people from sending you messages. When you block someone you get a confirmat

  • Safari will not open pop ups

    Hi All First time here and hope you can help out. I'm new to MACs, I bought one a couple of days ago and I absolutely love it. I bought it for a home laptop and for word processing. I am in the middle of the Comptia A+ course and the course runs on J