Embeddable Meteor Clients?


#1

Has anyone tried to build something embeddable inside other applications?

Are there any front end DDP client libraries? Something I could stitch to something like Angular to make a portable widget/app?


#2

Check this project: https://github.com/mondora/asteroid

I’ve not used it personally. But this should help you.


#3

Are iframes considered completely uncool these days? I’ve put a meteor app in an iframe embedded in another app and it worked fine for my purposes. Of course, they can’t interact with each other directly in client side js, but can via database changes or DDP.


#5

Actually they can interact with each other, try window.postMessage


#6

Well, there’s of course iframes. But if you want to really seperate the client-side from the server side there are 2 approaches:

  1. Use a lightweight library like asteroid to build your application
  2. Set up a custom build system (e.g. using Gulp) to package the client side as a normal web application. You would need to create your own index.html and make sure DDP connects to the correct host/port.

This last approach is what I’ve done for my angular application, because I wanted to use angular-meteor instead of asteroid and I have many sub-applications (for different audiences) that connect to the same backend, but are completely different. I could have made this in one application with a router, but my sub-applications don’t share anything on the front-end so that didn’t seem to be a good way.


#7

Its not a function of being “uncool” so much as it is a very inelegant solution to a wide range of desired outcomes.


#8

How much time and effort did you end up putting into the second options? Any key learnings you don’t mind sharing?


Is there a way to create widgets, that can be embedded on other sites, with Meteor?
Transclusion of a Meteor App as part of a decomposed microservice based UI
#9

Very nice as usual Arunoda, thank you. I will investigate this thoroughly.


#10

Well, how about that?

window.postMessage – I learnt something new today.


#11

@babrahams Is there a SO answer / resource you used to guide you through embedding a Meteor web-app into an iFrame? Or, if you could share the general steps you took, that would be awesome!