Design pattern -- using the correct one...?

I'm in need of some advice regarding design patterns in general.
I have a prototype whereby Objects B, C and D observe Object A's attribute (let's call it theAttribute -- imaginative, eh? )
In my system, every time theAttribute is changed, I've implemented the Gang's Observer pattern so that the observer objects are notified (...and do something with the information that Object A has changed in some way... they basically update a theTimestamp attribute when the subject's updated... but that really is beside the point right now).
However, only ONE observer will ever be created for each observable subject.
To my dismay, I've just been reading on the IBM Research site that the memory implications of this are horrendous (that for potentially a great many subjects only having a few observers each is bad practice) -- d'oh.
I've looked at other ways I could achieve what I need to without the above practice, but the only things I can come up with are the Mediator pattern or the State pattern, neither of which I'm sure are ideal (the former because of I'm worried that it'd be total overkill, the latter because I don't really need dynamic reclassification if the truth's told, I think).
Anyone got any thoughts on this? (I've considered referencing observers with their observables using a hash table but don't really wish to go down that route unless absolutely neccesary... it seems a bit like putting electrical tape over a sparking wire :) I'd rather just do it properly).
Sarah.

However, only ONE observer will ever be created for each observable subject.If you can absolutely, positively, definitely, mathematically, logically, legally
and morally prove that fact, indeed, you're wasting some resources here,
a couple of hundred bytes mayhap ...
In the mean time, keep your Observer/Observable pattern/implementation
or have a look at the PropertyChangeSupport class ...
kind regards,
Jos

Similar Messages

  • After 6 months of iPad bliss....My iPad has the incorrect apple ID how do I get it to use the correct one?

    After 6 months of iPad bliss....My iPad has the incorrect apple ID how do I get it to use the correct one?

    Settings > Store > Apple ID.  Sign out and sign in with the correct one.  Note that all apps are forever tied to the account they are purchased under.

  • I changed a password to a frequesntly used site. Firefox has not asked me if I want to save this new password and I have to keep changing the saved one to the correct one. How do I get it to save the new password?

    I have websites I use for my employer that require a password. The employer requires these be changed periodically. Always before, if I changed the password, about the second or third time I tried to log in and changed the saved password to the correct one, Firefox would ask if I wanted to save the new password. It is not doing this now. How can I get it to save a new password? It keeps putting in the old one.

    Make sure that you do not run Firefox in permanent Private Browsing mode.
    *https://support.mozilla.com/kb/Private+Browsing
    *You enter Private Browsing mode if you select: Tools > Options > Privacy > History: Firefox will: "Never Remember History"
    *To see all History and Cookie settings, choose: Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    * Deselect: [ ] "Permanent Private Browsing mode"
    The website may be using autocomplete=off to prevent Firefox from saving the name and password.
    *http://kb.mozillazine.org/User_name_and_password_not_remembered

  • My password is not working and I can not change it or use my Apple ID. I know it is the correct one because I have used the same one for a while and keep it locked in a safe.

    My password no longer works, I have tried to change it but can not. I know it is the correct one because I have not changed it and keep a verification in a safe. It works a few weeks ago.

    Had similar issue calling Apple seems to be the only way to resolve the problem.  The issue can be resolved when you get to iTunes, since they are the ones that keep  this info. They will ask you your security questions and your purchases software, music etc. Once they are happy with your answers they will get you back up. If you choose you could go the route of forgot my password etc. but I never had any luck with that. Just my 2 cents.
    Steve

  • HT1349 my mac installer will not accept my correct password despite changing it to ensure i was using the right one  I am trying to download microsoft office

    I am trying to install microsoft suite on my macbook pro.  the installer program will not accept my password. what am i doing wrong
    i changed my apple password and my microsoft password to make sure that i was using the correct password and the system will still not accept the password
    HELP

    You don't need an Adobe password to download Adobe Reader.  However, during the installation you may be prompted you for your system's Administrator password.
    See https://forums.adobe.com/thread/1619850

  • My mac mail is asking for my password and its the correct one, but it still does not want to connect to the mail? how do i fix this?

    It's asking for a password, i'm putting in the correct one and it's still not working. it says mail cant connect to the account "...."
    please help!

    If you've activated 2-step verification, you need to generate an application-specific password in your Google account and enter it instead of the login password you use on the website.

  • How do I remove an incorrect apple ID from an iPad and replace it with the correct one?

    How can I remove an incorrect Apple ID from my ipad and replace it with the correct one?

    Hello Shy guy,
    You can try this:
    1. Go to the iTunes Store or App Store
    2. Scroll down, there you will see Apple ID: "your email" (below Redeem and Send Gift)
    3. Tap on that button
    4. Tap on Sign Out
    Now you should be able to use another Apple ID.
    Cedric

  • Overwrite mapping in design repository with the last one deployed

    Hi
    We have a Single Design Environment with 2 runtime environnment (Dev, Prod). When I log in the Dev Control Center, I see there is a mapping "changed". It has been changed by an employee who don't work here anymore and I have no clue what have been changed.
    There is no specific request or obvious reason for that change, and since it's a huge and conplex mapping, I would like to overwrite (or "rollback") the mapping in the design environnment with the last one deployed in Production.
    But I don't know how or if it's possible..! At least if I could compare the 2 version, I could tell if the change is good or not.
    To me, it's a showstopper for incoming modifications..
    There is no Snapshot and i'm using OWB 10gr2 since 1 month now, so all of these is new to me.
    I really need help on this one...!
    Thanks!

    one onerous way to do this is
    take the mdl exports of the mapping from both envs. Try opening them in an xml/html text editor(notepad++ for eg)
    If they look like they are encrypted, try renaming the .mdl file to .zip( I can do this in 11g and what this gives me is a .xml file and a .mdx file which can be viewed in an xml editor)
    You can then possibly do a text comparison to find if anything is obviously different.
    Another good option is something our friend Oleg developed.
    http://owbeg.blogspot.co.uk/2012/05/release-005-of-mapreconstruct-script.html
    This script extracts the mapping as an OMB script. You can then compare both mapping tcl outputs.

  • In the new IOS 7, my IMessage and FaceTime won't let me log in using the correct Apple ID and password. How can I fix this?

    In the new IOS 7, my IMessage and FaceTime won't let me log in using the correct Apple ID and password. How can I fix this?

    Other users have reported same problem with 4G iPod/iOS 6.1.6 and I have not seen a solution. One user reported yesterday or the day before that it just started working again.

  • Anyone use the Eye-One Display 2 to Calibrate their monitors?

    Just wondering if anyone on the forum today has used the Eye-One to calibrate their monitors and if you like it?

    The best way to view DV video output is on a monitor that is designed for that format. Computer monitors are progressive and run in a different color space than NTSC/PAL monitors. If you want to really see how your video slide show displays, you should monitor it on an NTSC display. Keep in mind that LCD and plasma TVs still do not have the dynamic range of good ol' crt TVs. The sony PVM-14L2 (now discontinued) is a great choice for monitoring DV.
    How to calibrate a NTSC monitor:
    http://www.synthetic-ap.com/tips/calibrate.pdf
    http://www.bluesky-web.com/colorbars.html
    http://www.videouniversity.com/tvbars2.htm
    http://www.mediacollege.com/video/calibration/
    You need some device between the computer and the TV to convert the firewire out DV into analog to be fed to the TV. The A/DV converter can be your camcorder, a DV deck or a dedicated device such as those made by Canopus (the ADVC series).
    S-video should yield a better signal than composite. Component would be better yet but most simple a/dv converters don't offer that as an i/o option.
    If you want to work in HDV, all of the above is meaningless. HDV does not monitor via firewire. You need a 3rd party card (eg Kona LH) or an external DVI box (Matrox MXO) to convert the signal to a displayable format. And, you need an HD monitor or, with the Matrox, you can use a 23" Apple display.
    Good luck.
    x

  • Finding which source is the correct one for a compiled class file

    I have a compiled class (myclass.class) and 3 source files for it (myclass.java). Is there any method, utility, or software that will let me find which source file is the correct one?
    I have about a 100 of these classes which have a lot of copies of the source and we don't know which source is the correct one. The compiled classes are deployed and working and cannot be replaced.
    Thank you for your time!

    Thank you all for your suggestions but..
    1. Recompiling the existing sources and checksum the compiled classes is not a full solution. In addition to finding the version of the compiler that was used and the version of the JDK libraries that were used, I do not know which switches were used when the class was compiled (e.g. -g will output debug info, etc.)
    2. Decompiling: I could not find a good enough decompiler I tried jad which failed with some of the classes; I tries JDec which I did not feel I can fully trust the output (format was less accurate than jad). I tried jode which is limited to java 1.3.
    3. Versioning: our project now is actually to move all the source to Subversion.
    If there is a better decompiler or a way to ensure that a given source file matches the compiled class, please let me know.
    Thanks in advance!

  • Am I using the correct tools ?

    I need to edit a series of images for a product cataloge and would need these images cut out so that the back ground is transparent. I've been using magic extractor am I using the correct tool ? I also need the lines to be more precise are there any other tools I can use to make the lines cleaner on cutting out ? I just need it looking more cleaner and straighter ?

    Use Magic Eraser tool changes all similar pixels when you drag within a photo. If you’re working in a layer with locked transparency, the pixels change to the background color; otherwise, the pixels are erased to transparency. You can choose to erase contiguous pixels only, or all similar pixels on the current layer.
    Original image (left), and after erasing the clouds (right) 
    In the Layers panel, select the layer containing the areas you want to erase.Note: If you select the Background, it automatically becomes a layer when you use the Magic Eraser.
    Select the Magic Eraser tool in the toolbox. (If you don’t see it in the toolbox, select either the Eraser tool or the Background Eraser tool , and then click the Magic Eraser tool icon in the options bar.)
    Set options in the options bar, as desired, and then click the area of the layer you want to erase.You can set any of the following Magic Eraser tool options:
    Tolerance Defines the range of colors that will be erased. A low tolerance erases pixels within a range of color values very similar to the pixel you click. A high tolerance erases pixels within a broader range.
    Anti‑alias Smoothes the edges of the area you erase, making the edge look more natural.
    Contiguous Erases only pixels that are adjacent to the one you click. Deselect this option to erase all similar pixels in the image.
    Sample All Layers Samples the erased color using combined data from all visible layers. Deselect the option if you want to erase only the pixels on the active layer.
    Opacity Defines the strength of the erasure. An opacity of 100% erases pixels to complete transparency on a layer and to the background color on a locked layer. A lower opacity erases pixels to partial transparency on a layer and paints partially with the background color on a locked layer.

  • We have 4 iphones in our family and an Ipad.  When we purchase music I would like for the entire family to be able to use it.  Should each of us use a different apple account or should we use the same one.

    We have 4 iphones and an Ipad in our family. When we purchase music, I would like for the entire family to be able to use it and then back it up to Icloud. What is the best and cheapest way for this to happen.  Should we all have a different apple id or should we use the same one.

    You will all need to be on the same itunes account ID.
    You can however all have seperate icloud accounts aswel.

  • Error while saving a workflow via sharepoint designer: Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities.

    While saving a workflow using SharePoint designer on a SharePoint site, I get the following error: 
    Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities.
    Steps to recreate error:
    Login to the WFE server hosting IIS and workflow manager, open SharePoint Designer 2013 and login to a SharePoint site.
    Access the list using SharePoint Designer 2013, in the workflow section, click new workflow. 
    In the new workflow dialog, enter workflow details, click save (see screenshot below).
    Error message is displayed as below:
    After restarting SharePoint Designer, the saved workflow is not seen in the site/workflows or list/workflow section.
    Workaround
    When the above steps are repeated while accessing the site via SPD from any other box besides the WFE/Workflow manager host server, the error is not encountered and its possible to save/publish workflows.
    Notes
    Workflow Manager 1.0 is installed.
    The site has been registered with Workflow manager using Register-SPWorkflowService
    cmdlet.
    Any clue on why is this happening?

    Hi Vivek,
    Please close your SharePoint Designer application, clear/delete the cached files and folders under the following directories from your server installed SharePoint Designer, then check results again.
    <user profile>\appdata\roaming\microsoft\SharePoint Designer\ProxyAssemblyCache
    <user profile>\appdata\local\microsoft\websitecache\<sitename>
    http://www.andreasthumfart.com/2013/08/sharepoint-designer-2013-server-side-activities-have-been-updated/
    Thanks
    We are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • I can't activate my iPad and I'm sure i am using the correct apple id and password but when i press net it says it cannot be used to unlock this iPad

    i can't activate my iPad and I'm sure i am using the correct apple id and password but when i press net it says it cannot be used to unlock this

    You can try to figure out which Apple ID/email address and/or password you used to activate it by going to http://iforgot.apple.com
    If you can't, you'll need to contact Apple Account Security with your proof of purchase. 

Maybe you are looking for