开发者

3rd party applications inside iFrames?

开发者 https://www.devze.com 2023-01-22 00:36 出处:网络
I am about to build a web application and I want to allow other developers extend it with their own applications.

I am about to build a web application and I want to allow other developers extend it with their own applications.

Should I do this with iFrames like Facebook?

Is this a good practice?

Are there othe开发者_如何转开发r alternatives that let other developers extend my application (that is for the user it looks like it's from my application).

To be specific:

I want developers to be able to code applications that is embedded on my web application. Eg. if I have a file on my application they could provide a way for the users to interact with that file. Maybe a "preview" application that let the users preview the file.

Another application might draw a mindmap tree view of all the user's files.

What is the best way of doing this?

  • iFrame + Restful API on backend for data exchange?
  • Let them insert javascript on backend + frontend + html + css on my web application?
  • Other alternatives?


If you meant "embed" rather than "extend" and you just want people to drop a little box on a page and that's it, then an iframe should be fine.

However, if you want two-way communication or mashupability — rather than "opaque blob of HTML and hope for the best" communication — then a JavaScript or REST API might be a better call.

More specifics would make for an easier answer. If the functionality you need is on the level of an embedded ad or stackoverlflow flair then an iframe would work, if the functionality is more along the lines of a Google Map then an API of some sort would work better.


It depends on what you mean by "extend". When you use iFrames with 3rd parties, presumably vended from different domains than the host page, then you are constrained by cross-domain issues and cannot interact with the contents of those iFrames. If that's not an issue for you, then you can go ahead and try that strategy, but I can't see how merely adding iFrames without interopability is "extending" your web application.

0

精彩评论

暂无评论...
验证码 换一张
取 消