Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spend at most a day researching higher-level publication pattern for Event system #9

Closed
aeschylus opened this issue May 1, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@aeschylus
Copy link
Collaborator

Objects (such as the workspace) may need to communicate with a third, higher-level object that affects objects horizontally in the hierarchy. How can we namespace events to allow this level of control?

@aeschylus aeschylus added size 2 and removed size 2 labels May 1, 2014
@aeschylus aeschylus added this to the Sprint 1 milestone May 1, 2014
@rsinghal
Copy link
Collaborator

rsinghal commented May 5, 2014

We could do something similar to OSD and structure our events like this:

var events = {
    'NS1' : {
        'handlers' : [NS1handler1, NS1handler2],
        'events' : {
            'event1' : [eventhandler1, eventhandler2],
            'event2' : []
        }
    },
    'NS2' : {
        'handlers' : [NS2handler1, NS2handler2],
        'events' : {
            'event3' : [],
            'event4' : []
        }
    }
}

Which allows us to handle events for an entire namespace.

And you can raise events like 'NS1:event2'.

@aeschylus
Copy link
Collaborator Author

Here is the article on which I based the annotation layer event system, after reading this little library, and the backbone events source code. And then there's the jQuery "custom" events, that, in theory, can use namespacing on objects

@rsinghal
Copy link
Collaborator

rsinghal commented May 6, 2014

I like the tiny pub/sub you link to since it includes the namespacing we want. I'm happy to go with that. I think it'll nicely address our issues.

@aeschylus
Copy link
Collaborator Author

Okay. I pushed what I have for the workspaces this morning. I don't think
it will be especially helpful, as it represents several false starts. It
also have come to accept that a great deal on what we do with the event
mixin, as the workspaces and windows should be propagated from changes in
their parent models anyway. I think the pubSub plugin will work for us, we
just need to come up with a way to mix it in with a getter and setter
pattern à la issue #3 #3, so that that
behaviour can be "baked in", so to speak, for objects that need it. I am
finding it counterproductive to continue on this without doing a bad
first-pass, in order to then pick out the pieces that are abstractable and
generalise them. The workspaces idea is probably the most complicated place
to do that "make a first concrete example, then generalise" approach, so I
wonder if we could pair today on the Load Menu (which doesn't rely on any
of the workspace code until it needs to place something there), which seems
more straightforward as a first concrete application of the event system
code. Hopefully the outcome of that will be a finished mixin with an
established pattern for us to use for interface objects by the end of today.

On 6 May 2014 12:57, rsinghal notifications@github.com wrote:

I like the tiny pub/sub you link to since it includes the namespacing we
want. I'm happy to go with that. I think it'll nicely address our issues.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42350926
.

@rsinghal rsinghal added the events label May 7, 2014
@cbeer cbeer added the Mirador 2 Mirador 2 label Jun 24, 2021
geourjoa pushed a commit to SCENE-CE/mirador-video that referenced this issue Feb 12, 2024
Fix VideoViewer component tests

Closes ProjectMirador#9

See merge request iiif/mirador-video-annotation!7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants