Voi ragazzi potete sopportare il maggior numero di dinieghi che volete. Mentre riordinare gli attributi non ha significato per il programma, ha un significato per il programmatore/utente.
Per Fredrick era importante avere l'ordine RGB poiché è così che l'ordine dei colori è. Per me è l'attributo name in particolare.
Confronta
<field name="url" type="string" indexed="true" stored="true" required="true" multiValued="false"/> <!-- ID -->
<field name="forkortelse" type="string" indexed="true" stored="true" required="false" multiValued="false" />
<field name="kortform" type="text_general" indexed="true" stored="true" required="false" multiValued="false" />
<field name="dato" type="date" indexed="true" stored="true" required="false" multiValued="false" />
<field name="nummer" type="int" indexed="true" stored="true" required="false" multiValued="false" />
<field name="kilde" type="string" indexed="true" stored="true" required="false" multiValued="false" />
<field name="tittel" type="text_general" indexed="true" stored="true" multiValued="true"/>
Contro
<field indexed="true" multiValued="false" name="forkortelse" required="false" stored="true" type="string"/>
<field indexed="true" multiValued="false" name="kortform" required="false" stored="true" type="text_general"/>
<field indexed="true" multiValued="false" name="dato" required="false" stored="true" type="date"/>
<field indexed="true" multiValued="false" name="nummer" required="false" stored="true" type="int"/>
<field indexed="true" multiValued="false" name="kilde" required="false" stored="true" type="string"/>
<field an_optional_attr="OMG!" an_optional_attr2="OMG!!" indexed="true" name="tittel" stored="true" type="text_general"/>
Mentre non è impossibile leggere non è così facile. Il nome è l'attributo importante. Nascondere il campo del nome non è buono. Cosa succede se il nome era 15 attributi a sinistra, dove 7 degli attributi di fronte era facoltativo?
Il punto è che il riordino è un problema più grande di quello che fornisce l'ordine in entrata. Ha problemi con il modo in cui il programmatore pensa o come dovrebbe funzionare la funzionalità. Almeno l'ordine dovrebbe essere configurabile/facoltativo.
Scusa il mio povero inglese. Non è la mia lingua principale.
per fare un esempio, si veda [questo post] (http: // StackOverflow. it/a/34560411/540510) – thdox