Pull Request: Requiring a Name for Actions

86 views
Skip to first unread message

Kevin Swiber

unread,
Aug 9, 2012, 7:02:23 PM8/9/12
to siren-hy...@googlegroups.com
I've been using the class attribute of actions where I really should be using a single identfier (e.g., "Select the 'add-item' action of the order.").  I've added a name attribute to support this.

As usual, I'm open to feedback.  Thanks!


--
Kevin Swiber
Projects: https://github.com/kevinswiber
Twitter: @kevinswiber

Matthew Bishop

unread,
Sep 14, 2012, 3:17:46 PM9/14/12
to siren-hy...@googlegroups.com
I like this change. The name makes more sense because it can be used as a key to identify what the action is for. Class is still pretty fuzzy to me.

David Eriksson

unread,
Sep 24, 2012, 3:48:56 AM9/24/12
to siren-hy...@googlegroups.com
Having name as a unique identifier for actions sounds good. But I also like the consistency between entity and action. 

If action has a name, I find it likely that the entity also should have a name and class made optional? That way the class array actually is more like tags that can be used to categorize the entity or action.


Cheers,

David

Kevin Swiber

unread,
Oct 7, 2012, 2:07:43 PM10/7/12
to siren-hy...@googlegroups.com
Sorry I missed this.  It's been a crazy 60 days.

How would an entity's name be used?

So, in my brain, entities are linked by relations.  To navigate an entity graph, one would use link relations.  If I navigate to the order item link relation from the order, I know what's being returned when the response comes back from the href.

The reason I'm not using a link relation to describe an action on an entity is because they're conceptually different.  There might be an argument to kill the name property and start using link relations instead.  I don't like this approach because I feel it muddies the interaction model.

Thoughts?
Reply all
Reply to author
Forward
0 new messages