Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 2.02 KB

bestpractices.md

File metadata and controls

28 lines (19 loc) · 2.02 KB

Frozen, now outdated document!

This document was used to develop the Simple Definition Format (SDF) for One Data Model definitions. With the publication of SDF version 1.0, that development has now moved to:

https://github.com/one-data-model/sdf

The old /language repository, of which this document forms part, is an archive of what happened before that.

Best practices

ODM Data Type Definitions

JSON schema fundamental data types should be used for properties that map directly to those data types. This would be captured using the "type" quality in a property. For any property that does not map to a JSON schema fundamental date type, a reusable data type definition should be created that can then be used with the "odmType" quality for a property.

Text Conventions

SDF Keywords

SDF Keywords are defined in the SDF language, for example, odmProperty. The preferred pattern for these identifiers is starting with lower case "odm" followed by camel case construction, e.g. "odmInputData".

SDF Quality Names

SDF Quality names are extensions to the SDF language that are used to constrain definitions. Some of these are inherited from other language definitions, for example JSON Schema. The preferred construction for these identifiers is camel case, initial lower case, e.g. "widthInBits".

Application-defined Terms

Application-defined terms are those names given to definitions in SDF. Preferred construction for these identifiers is camel case with initial upper case, e.g. "CurrentLevel".

SDF full names

SDF full names are derived from path expressions that point to definition elements. SDF full names consist of an explicit or default namespace prefix, followed by a path expression, starting with "/" and followed by path segment names which alternate between SDF Keywords and Application-defined terms, and terminating with an SDF Quality name. For example, "zcl:/odmObject/LevelControl/odmProperty/CurrentLevel/widthInBits SDF full names resolve to URIs