Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
From a OO design point of view, it is not "ideal" to drop the list and create a new list. Your OO code similates the real world. In the real world, when new articles added to a news group, some of the attributes of the news group changed, but the news group is still the same entity as it was. In your OO design, why should you drop and create new objects? all what you want is to update some arributes.
I think maybe I didn't explain myself very well. I'm not talking about dropping the list of articles. I'm talking about dropping the list of newsgroups. The list of groups is somewhat harder since groups can be removed.

At the root of my hierarchy is a list of servers. Each server has a list of different newsgroups that you can subscribe to. This list of groups can change, either because groups or added or because they are removed. Each group the user subscribes to then contains a list of messages in that group.

When I refresh the list of groups from each server, I need to find a way to keep the list of messages in the groups the user has subscribed to.

Also, you tell me not to create a new list of objects, but then you tell me that copying message lists (and other properties) from the old list to the new list is a good solution. Which is it?

I just want to find the best solution for this type of problem. If writing a search method is the best way to do it, I'll write a search method. But if there's a simpler way, why would I want to?

In reply to Re: Re: Refreshing Objects by elusion
in thread OT: Refreshing Objects by elusion

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (1)
As of 2023-05-28 10:16 GMT
Find Nodes?
    Voting Booth?

    No recent polls found