javascript - best practice/architecture to combine multiple js components in a spa -
i have following architecture single page application:
- each page or widget can independent reusable module (reusable project might used on others well)
- there core application use external modules. core application able communicate modules , vice versa.
- each module can written in technology (react, angular, vanilla)
- each module should deployed independently (something dynamic-lazy-loading)
- the core app should responsible config of modules (api urls etc)
i have not been able think way of achieving stated nor find on google.. might missing keyword such architecture.
any ideas, best practices or relevant input? thanks!
after researching subject bit more, architecture think match requirements based on web-components (can read more here - http://webcomponents.org/ , recommend using library polymer). advantage of web-components can hold need in them (html,css,ajax requests, can in html document) , using shadow or shady dom imply components document have done once iframes.
by using architecture, able migrate components without caring wrappers technology (angular 1/2,react, knockout, vanilla js etc). example, in order use in angular, wrap component directive , thats it. other bonus can host components in different servers , therefore deploy them separately.
Comments
Post a Comment