My suggestion is to create a playground to explore this approach and proceed with the actual implementation only after you get the details right.
There are so many ways that this can break that have nothing to do with Elm. On Tue, Mar 28, 2017 at 11:19 AM, Charles-Edouard Cady < [email protected]> wrote: > Hi Peter! Thanks for your reply! > > Front-end composition from microservices is an emerging pattern which > allows cross-functional teams to independently deploy features (including > back-end and front-end). > Each team has full responsibility of the feature they release (from > back-end to front-end), which gives them full autonomy to release whenever > they are ready. > It's a pattern used by Netflix, Amazon or Spotify, to name a few. > > You can learn more about it here: > > https://technologyconversations.com/2015/08/09/including-front- > end-web-components-into-microservices/ > http://techblog.scout24.com/2016/01/unexpected-solution- > microservices-ui-composition/ > https://medium.com/@clifcunn/nodeconf-eu-29dd3ed500ec > > > > On Tuesday, March 28, 2017 at 8:58:22 AM UTC+2, Peter Damoc wrote: >> >> >> On Tue, Mar 28, 2017 at 9:26 AM, Charles-Edouard Cady < >> [email protected]> wrote: >> >>> I'm composing a single-page application from several microservices >>> back-ends. Each back-end should render a part of the page. >>> >>> Right now I'm considering using webcomponents: >>> >>> - main page is in Elm and subscribes to a websocket giving it the list >>> of microservices it can get webcomponents from >>> - each microservice serves an html page containing the web component & >>> its name >>> - the main page dynamically includes the webcomponent & uses its name to >>> create the node in the DOM >>> >>> This means that whenever I switch a microservice on the component >>> appears on the page & it disappears when I switch the microservice off. >>> >>> The reason I'm using webcomponents here is that I may include >>> microservices written by third parties who do not necessarily want to be >>> locked in using Elm, or any specific technology for that matter. >>> >>> I therefore need two things : >>> >>> (1) the ability to use webcomponents in Elm (I think this has already >>> been covered, except maybe some conflicts between Elm's virtual DOM & the >>> webcomponent's virtual DOM) >>> (2) the ability to write webcomponents in Elm. >>> >>> I'm not too sure about number 2: what I've seen in the list so far is >>> mainly interest in using webcomponents but not so much in writing them. >>> Does anybody have more information on this? Any help would be greatly >>> appreciated! >>> >>> Here is how you would implement a web component in regular Elm & Polymer >> https://github.com/kevinlebrun/elm-polymer/tree/master/ >> counter-elm-inside-polymer >> >> You will probably need to use some kind of head manipulation for >> dynamically importing the web-components into your page. >> I have never tried to do this but my intuition tells me it might be a >> very bad idea. >> Have you seen this approach done outside of Elm? >> >> >> >> -- >> There is NO FATE, we are the creators. >> blog: http://damoc.ro/ >> > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- There is NO FATE, we are the creators. blog: http://damoc.ro/ -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
