Skip to content

Use URL as duck types, refer to W3C. #5

@huan

Description

@huan

Centralization in social systems can apply to concepts, too. For example, if we make a knowledge representation system which requires anyone who uses the concept of "automobile" to use the term "http://www.kr.org/stds/industry/automobile" then we restrict the set of uses of the system to those for whom this particular formulation of what an automobile is works. The Semantic Web must avoid such conceptual bottlenecks just as the Internet avoids such network bottlenecks.
Source: Principles of Design, Tim Berners-Lee, 1998

Current, we are using the ${NPM_NAME}/${TYPE} to identify the Duck Type, like this:

export const GET_CONTACT_PAYLOAD_QUERY = 'cqrs-wechaty/GET_CONTACT_PAYLOAD_QUERY'  // contactPayload

In the future, we should use ${URL}/${TYPE} instead of NPM_NAME because the system might run with different languages, which will have some possibility of hitting the type conflicting.

Using URL will eliminate potential problems like this:

export const GET_CONTACT_PAYLOAD_QUERY = 'https://wechaty.js.org/cqrs/GET_CONTACT_PAYLOAD_QUERY'  // contactPayload

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions