Skip to content

Benefits of this over POJO for client-side #3

@gobengo

Description

@gobengo

Big AS fan here. Pardon my ignorance with these questions.

What use cases do you have in mind for this library on the client?

What benefits would I get from modeling activities I'm consuming with this instead of just plain old JS Objects? I see that it creates objects with all of the valid AS fields pre-defined on the instance. But usually the value is undefined still. So is that any more valuable than never assigning to the key? And wouldn't the latter be more memory efficient?

I see in some of the demos that things like activity.verb.id is defined even if you just construct with verb as post. What is the guarantee about what .id is and when it will and won't be defined?

It's also not obvious to me what this is for activity.object.content['*']

Finally, I tried the node example from the README and got 'toString is not a function' exceptions on this line in node 0.10 and 0.11. Oddly, typeof Object.getPrototypeOf(activity).toString === 'function' was true, but the accessor wasn't working right..

console.log(activity.toString());

Metadata

Metadata

Assignees

No one assigned

    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