Hello, I am looking to integrate chat using twilio to an ember app. I ve searched the web but cant find any addons on this subject. Any suggestions/recommendations?
If there’s no existing addon you’ll probably want to write your own wrapper service and perhaps component(s) if you need them. I think it usually makes sense to do the following:
- install the package and make sure you can import it properly (probably using ember-auto-import)
- if you need to do any work during or before app boot consider using an initializer
- generally it seems like the best way to encapsulate a 3rd party library like that is to write a service that keeps a reference to whatever instance(s) you need to from the library, provides nice method wrappers, etc. Then you can keep all the library-specific code isolated in one place (the service) and your app only has to touch the service with the interface you define.
- if there is UI involved try to keep it encapsulated in one or more components that leverage the service