A domain vocabulary for scheduling classes.
Date |
January 2013 |
Author |
Mike Amundsen, Principal API Architect for Layer 7 Technologies |
Status |
Version 1.0 |
This document defines data elements, actions, and link identifiers for a simple class scheduling domain. The material in this document is independent of any Web protocol (HTTP, WebSockets, etc.) and any media type (XML, JSON, HTML, etc.) used to create client-server interactions.
The initial application of this problem domain is to a custom media type design named "Class Scheduling" with the IANA identifier of application/vnd.apiacademy-scheduling+xml. However, there may be other applications of this vocabulary in the future.
Creating valid client requests for this problem domain requires applying the Link Identifer, the Action value, and the Data Elements to a specific media type. For example, below is a response representation that can be used to create a new <<course>> resource using the application/vnd.apiacademy-scheduling+xml media type:
<!-- application/vnd.apiacademy-scheduling+xml example --> <template name="course" action="add" href="{uri}"> <data name="courseCapacity" value="15" /> <data name="courseName" value="Hypermedia 101" /> <data name="courseDescription" value="An introduction to hypermedia programming." /> </template>
A possible HTML5 representation of the same action might look like this:
<!-- HTML5 example --> <form name="course" class="add" action="{uri}" method="POST"> <input type="text" name="courseCapacity" value="15" /> <input type="text" name="courseName" value="Hypermedia 101" /> <input type="text" name="courseDescription" value="An introduction to hypermedia programming." /> <input type="submit" /> </form>
Note
|
The rules for applying domain details may differ from one media type to the next. The example given here applies to the "Class Scheduling" media type intially defined for this domain. |
Below is a list of the Actions for this problem domain along with the Data Elements associated with each action. Server implementors can Use this as a guide when representing hypermedia transitions within a target media type. Client implementors can use this as a guide when coding clients to recognize, parse, and execute client-server interactions.
Add a new resource to the server.
LinkID | Data Elements |
---|---|
<<course>> |
<<courseCapacity>>, <<courseDescription>>, <<courseName>> |
<<schedule>> |
<<courseId>>, <<scheduleSlot>>, <<teacherId>> |
<<student>> |
<<studentName>>, <<studentStanding>> |
<<teacher>> |
<<teacherName>> |
Update an existing resource on the server.
LinkID | Data Elements |
---|---|
<<course>> |
<<courseCapacity>>, <<courseDescription>>, <<courseName>> |
<<student>> |
<<studentName>>, <<studentStanding>> |
<<teacher>> |
<<teacherName>> |
Remove an existing resource from the server.
LinkID | Data Elements |
---|---|
<<course>> |
NONE |
<<schedule>> |
NONE |
<<student>> |
NONE |
<<teacher>> |
NONE |
Retreive a single resource.
LinkID | Data Elements |
---|---|
<<course>> |
NONE |
<<home>> |
NONE |
<<schedule>> |
NONE |
<<student>> |
NONE |
<<teacher>> |
NONE |
Retrieve a list of resources.
LinkID | Data Elements |
---|---|
<<course>> |
NONE |
<<schedule>> |
NONE |
<<student>> |
NONE |
<<teacher>> |
NONE |
Retrieve a filtered list of resources.
LinkID | Data Elements |
---|---|
<<course>> |
<<courseName>> |
<<student>> |
<<studentName>> |
<<teacher>> |
<<teacherName>> |
Assign a student to an existing scheduled course.
LinkID | Data Elements |
---|---|
<<schedule>> |
<<studentId>> |
<<student>> |
<<scheduleId>> |
Below is a list of the link and template identifiers for this problem domain.
Below is the list of data elements currently defined for this problem domain.
This document describes the Class Scheduling domain vocabulary. Domain details from other vocabularies ("foreign domains") can be used in a Class Scheduling document. Any extensions to the this vocabulary MUST not redefine any actions, identifiers, or data elements defined in this document. Clients that do not recognize extensions to this vocabulary SHOULD ignore them.
Warning
|
It is possible that future forward-compatible modifications to this specification will include new elements, attributes, attribute values, and data types. Extension designers should take care to prevent future modifications from breaking or redefining those extensions. |
This work was done with the support of Layer 7 Technologies as part of a series of articles for the InfoQ Web site.