|Version 1 (modified by MaksimS, 5 years ago)|
FDO RFC 15 – FDO PropertyValueConstraintDictionary? Class
This page contains a request for comments document (RFC) for the FDO Open Source project. More FDO RFCs can be found on the RFCs page.
|RFC Template Version||(1.0)|
|Submission Date||February 9, 2008|
|Last Modified||Maksim Sestic |
|Implementation Status||Not Applicable|
|Assigned PSC guide(s)||none|
Presently, PropertyValueConstraintList may contain only plain list of predefined values forced upon particular PropertyValue (minus null value). In my opinion, it somehow beats sole purpose of Constraints in a view of overall datastore consolidation. Therefor, suggestion is to create new class named PropertyValueConstraintDictionary (or whatever) that will keep pairs of [object,string] values, where object is a key dictionary member (an item in present PropertyValueConstraintList), while associated string represents localized description of the value itself.
RoadTypePropertyValueConstraintDictionary: null , "n/a" 0 , "Highway" 1 , "Main road" 2 , "Street" ...
Therefor enforcing sound "rules" for data types and saving lots of storage - it's not clever to keep underlying RoadTypePropertyValue? as String since it takes too much space, it's not possible to change associated meaning of data once the data is in the store, while schema user from different country may not understand "by default" what Main road means, etc.
On the client side, developers may build more robust UIs to deal with FDO-based data. I.e. a ComboBox? instead of plain text field, where combo has it's values set to predefined PropertyValueConstraintDictionary object range and displayed members consist of associated string values. In that way users will be able to pick between "Highway", "Main road" or "Street", while underlying datastore keeps it's short or boolean (or any other) universal representation.
- Major storage saver
- Splits data value from data representation (0 = "Highway" or True = "Yes")
- Enables creating of flags via binary math (1+2 = 3 = "Main road" AND "Street")
- Resolves data Localization issues
- Enables more advanced UI solutions on client side