OpenF2 / F2

Redefining web integration for the financial services community
Apache License 2.0
130 stars 62 forks source link

Multiple AppManifests instead of a single combined? #161

Open montlebalm opened 10 years ago

montlebalm commented 10 years ago

I think it could be simpler if we changed the spec so that multiple AppManifests would be returned from a response instead of a single combined one.

Here's what we have today when requesting 2 apps:

{
    "inlineScripts": [],
    "scripts": ["one.js", "two.js"],
    "styles": ["one.css", "two.css"],
    "apps": [{ 
        "html": "...", "data": { "one": true } 
    }, { 
        "html": "...", "data": { "one": true } 
    }]
}

Here's what I'm proposing:

[{
    "inlineScripts": [],
    "scripts": ["one.js"],
    "styles": ["one.css"],
    "html": "<div></div>",
    "data": { "one": true }
}, {
    "inlineScripts": [],
    "scripts": ["two.js"],
    "styles": ["two.css"],
    "html": "<div></div>",
    "data": { "two": true }
}]

I think it would help with a few things:

  1. Easier response caching: currently it's very difficult for a container to cache a single app if it was with any others.
  2. Simpler backend: it's easier for someone to generate an F2 response on the server per app rather than combining portions into a single object. This will come into play even more if #160 is implemented.
  3. Easier to attribute errors to apps: currently we don't have a good way to exclude the scripts/styles of an app that failed during the request.
brianbaker commented 10 years ago

:+1:

markhealey commented 10 years ago

Ditto. Let's implement this.

ilinkuo commented 10 years ago

Good idea. I'd like to point out, however, that the the specs only document the batch request, not the batch response. That will have to be added.

markhealey commented 10 years ago

Agreed, and thanks.

-Mark

-----Original Message----- From: I-Lin Kuo [notifications@github.commailto:notifications@github.com] Sent: Monday, April 07, 2014 08:24 AM Central Standard Time To: OpenF2/F2 Cc: Mark Healey Subject: Re: [F2] Multiple AppManifests instead of a single combined? (#161)

Good idea. I'd like to point out, however, that the the specs only document the batch request, not the batch response. That will have to be added.

— Reply to this email directly or view it on GitHubhttps://github.com/OpenF2/F2/issues/161#issuecomment-39728750.


This e-mail, including accompanying communications and attachments, is strictly confidential and only for the intended recipient. Any retention, use or disclosure not expressly authorised by Markit is prohibited. This email is subject to all waivers and other terms at the following link: http://www.markit.com/en/about/legal/email-disclaimer.page

Please visit http://www.markit.com/en/about/contact/contact-us.page? for contact information on our offices worldwide.