Looking for the right pattern.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Looking for the right pattern.

  1. #1
    Ken Guest

    Looking for the right pattern.


    Hi,

    I知 looking for an OO pattern that synchronizes two arrays, something like
    an event. Thus when the first array deletes an element the second would
    also needs to delete the same element.

    Thanks in advance.
    Ken

  2. #2
    JN Guest

    Re: Looking for the right pattern.


    hi,
    from what i understand of your requirement . you need to use the observer
    pattern as described in the GOF book. this pattern takes care of any changes
    in the publisher and notifies all the subscribers of this change.

    i hope this helps.

    Regards
    JN

    "Ken" <terryken@erols.com> wrote:
    >
    >Hi,
    >
    >I知 looking for an OO pattern that synchronizes two arrays, something like
    >an event. Thus when the first array deletes an element the second would
    >also needs to delete the same element.
    >
    >Thanks in advance.
    >Ken



  3. #3
    Ken Guest

    Re: Looking for the right pattern.


    Thanks for you help.
    I was looking up the Command pattern as a possibility.

    Later
    Ken

    "JN" <vb@127.0.0.1> wrote:
    >
    >hi,
    > from what i understand of your requirement . you need to use the observer
    >pattern as described in the GOF book. this pattern takes care of any changes
    >in the publisher and notifies all the subscribers of this change.
    >
    >i hope this helps.
    >
    >Regards
    >JN
    >
    >"Ken" <terryken@erols.com> wrote:
    >>
    >>Hi,
    >>
    >>I知 looking for an OO pattern that synchronizes two arrays, something like
    >>an event. Thus when the first array deletes an element the second would
    >>also needs to delete the same element.
    >>
    >>Thanks in advance.
    >>Ken

    >



  4. #4
    Milind Guest

    Re: Looking for the right pattern.


    consider using "Observer"





    "Ken" <terryken@erols.com> wrote:
    >
    >Hi,
    >
    >I知 looking for an OO pattern that synchronizes two arrays, something like
    >an event. Thus when the first array deletes an element the second would
    >also needs to delete the same element.
    >
    >Thanks in advance.
    >Ken



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center