Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: reordering a stack with little effort

by Zaxo (Archbishop)
on Mar 11, 2005 at 00:44 UTC ( [id://438479]=note: print w/replies, xml ) Need Help??


in reply to reordering a stack with little effort

Leave out the question number as a property of the question. In OO terms, it is not related to the question, but to a collection of questions. Call that a questionaire or a quiz, I guess.

After Compline,
Zaxo

  • Comment on Re: reordering a stack with little effort

Replies are listed 'Best First'.
Re^2: reordering a stack with little effort
by Anonymous Monk on Mar 11, 2005 at 15:09 UTC
    That just depends on ones point of view. If you think it's important to have "global" information, use a "collection" and define the other there. But there's no need for global information - the entire sequence of questions can be retrieved by looking at the data locally: as long as each question knows its neighbour(s), the entire collection and its order can be retrieved as well.

    Of course, if you want to create multiple collections, you can't store the information locally as easily, as a question can belong to more than one collection.

    Having said that, even with collections, you haven't solved, or even side-stepped the problem. You will still have a sequence of numbers somewhere in a table that indicates the order in your collection - and you know have to insert a question.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://438479]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found