- 15 Oct 2024
- 1 読む分
- 印刷する
The TypeScript Framework Architecture
- 更新日 15 Oct 2024
- 1 読む分
- 印刷する
The Framework is supplied in two flavors and they both implement the Model-View-Controller Pattern (MVC), where:
Model
The Message data from the CMS along with Player-metadata, e.g. the current Attribute/Trigger states, the View Mode, the location of this item in the Playlist etc.View
Your “template implementation“ as an implementation of the ITemplateView interface. This is usually done by subclassing either TemplateViewBase or SimpleViewBase.Controller
This is the TemplateController, which hosts (your) View. It takes care of all the event-communication with the Player and abstracts the API for the template/View.
Framework variants
The framework currently includes two different implementations. Choose the one that best suits your needs.
Plain/classic Typescript (namespaces)
- Located in “TemplateFramework/framework”
- async/Promise-basedESM
- Located in “TemplateFramework/esm“
- ES6 modules
- The same as the “async“-framework from the client’s point-of-view
The ESM framework requires a bundler (e.g. WebPack) for deployment if you are using external modules from NPM or want to rely on the standard “zipping“ script. The other can be bundled by the TypeScript compiler.