Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li>There is no "limit" to what you can store in a player class. As long as it is concerning him and him only, it should be in his class. But one thing you should consider is to make several player classes. The idea is : if you don't need is, don't query it. You may have <code>PlayerView_Small</code>, <code>PlayerBuying</code>, <code>PlayerFighting</code>, <code>PlayerSettings</code> (depending on your game, they may not be fulfilling the exact same purpose)... This way for each "need" of info on a player, you only load the player data you need, and can handle it properly. Also, you may use inheritance if some class is only a more detailed version of the other.</li> <li>If you are talking about the class, it may be in a sub-class <code>PlayerAttributes</code> of which an instance is contained into <code>PlayerFighting</code> and <code>PlayerView_Detailed</code>. In the database, it might be interesting to store it as a string (conveniently outputted by our class, and accepted in constructor), to avoid having too much fields, but <em>you will lose the sorting ability</em>. That's probably not a problem in our case, but might be in some others.</li> <li>Blank for now, I don't understand where there is synchronization, will edit when informed.</li> <li>In your <code>PlayerViewDetailInfo</code>(or in your <code>PlayerAllData</code> depending what you need), you place some methods such as <code>ToXmlClient1()</code>, <code>ToJson()</code>, <code>ToHumanReadableString()</code> (although that might be a bit confusing to the eye, you should consider HTML^^). The class having the method should be the class with the least (but sufficient to provide the answer) data. When requested, you load the <code>Player...</code> which has the method giving the correct output, and you write it directly in the response.</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload