Pierre Hébert I’m just curious: Why do you save the containers default tag in an extra field “tag”, but items…
Pierre Hébert I’m just curious: Why do you save the containers default tag in an extra field “tag”, but items default tag is in the list of tags assigned with “_”?
]]>
« A very quick a dirty idea of what I had in mind as far as a generic template that would be very easy to theme. (Previous Post)
(Next Post) Hi :) »
< ![CDATA[
For compatibility and historical reason: the container config is stored with a reflective method (it analyses Java field name and build a JSON object with these names), whereas items are stored using a manual method (field names are mapped to minified keys). This was a tradeoff: there are a lot of items so better to use a custom and fast serialization process, whereas there are few containers so an automated and easier to use but less efficient serialization is ok.
The consequence it is easy to migrate fields in the item because it is custom code (if field “a” is there, then populate “b” with the value “_” for instance). That’s more difficult in the generic method where it parses field names automatically.
]]>