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

Document & Feature Complete app2app scenarios and examples both v1 & v2 #581

Open
NakulManchanda opened this issue Jan 22, 2021 · 0 comments

Comments

@NakulManchanda
Copy link
Member

NakulManchanda commented Jan 22, 2021

Current app2app examples:

zlux-editor:
v1, supports opening folder, file, dataset query, or dataset
v1, supports requesting jes explorer to set a filter

sample-apps, all:
v1, supports being opened with fields populated
v1, supports opening anything else, giving them a json object "data" that can contain anything typed into the sample app

jes-explorer:
v1, supports filtering by jobname, user, etc

terminals:
v1, supports being opened with specific parameters
v1, supports disconnecting when open

There is no v2 example as of yet. @1000TurquoisePogs have some sample app example in his sandbox.

Future Plans:
There may be future plan to experiment with swagger doc-like specification for documenting above commands

Differences, & general info about v1 & v2

  • an app can simultaneously support v1 and v2 app2app.
  • v2 is much simpler because it's based on Browser Custom Event with a name that is standardized by the framework. (pending iframe compatibility research)

v1

  • Callers request to ZoweZLUX.dispatcher that you want to contact an app (org.zowe.editor) and give it data.
  • Recognizers allow it to be "any" app rather than a specific one, because the recognizers find the specific one.
  • Receivers on the app side,
    for non-iframe it's a function call either by constructor arg or keyword function of the framework.
    for iframe, it's a window.onmessage listener but you get the same data.

v2

  • Callers will contact ZoweZLUX.dispatcher to request a command type, (org.zowe.datasets.open) and pass data.
  • Receivers in constructor of app, you register Custom Event listeners, given a special string by the framework that makes it unique.

Sample Demo:
zowe/sample-angular-app#49

Interfaces:
v1
https://github.com/zowe/zlux-platform/blob/v1.18.0/interface/src/index.d.ts#L47-L55
https://github.com/zowe/zlux-platform/blob/v1.18.0/interface/src/index.d.ts#L62-L65 are
v2
https://github.com/zowe/zlux-platform/blob/v1.18.0/interface/src/index.d.ts#L56-L61

@NakulManchanda NakulManchanda changed the title Document app2app scenarios and examples both v1 & v2 Document & Feature Complete app2app scenarios and examples both v1 & v2 Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant