![]() ![]() Each store or service that wants to be started must implement an interface called “IStartupable”, which includes a “startup” method that returns a promise. To facilitate this startup process, we created a startup manager. We could have implemented a corresponding ConfigurationService that fetches configuration updates, but we opted to implement this functionality within the ConfigurationStore out of pragmatism.Īt startup time, the app needs to instantiate all of its singleton stores and services, some of which have dependencies on others. which features are enabled for a particular user). For example, we created a ConfigurationStore to track app-level configuration settings (e.g. In some cases, a service was so tightly bound to the operation of a particular store that we merged their functionality into a single module. notifications that are generated for incoming messages that require the user’s immediate attention). Others are responsible for listening to one or more other stores and synthesizing information from those stores (e.g. Some services are responsible for updating stores and saving information to the local database. These are singleton objects that are instantiated at app startup time. Services & Startup Managementīackground tasks, such as fetching new messages, are handled by modules we refer to as “Services”. It also supports transactions and string indexing for full text searches. Each table can have multiple indexes, including composite (multi-key) indexes. The abstraction allows us to create and query multiple tables. It uses the native database implementation for each platform (sqlite for iOS, indexDB for some browsers, etc.). It also allows for fast startup, since we don’t need to wait for data to download over the network.įor local storage, we developed a cross-platform no-SQL database abstraction. Storing data locally allows the app to run in “offline” mode. We also had the need to persist data in a structured manner. Stores are responsible for maintaining in-memory data representations. Others are allocated on demand and have a well-defined lifetime that corresponds to a user interaction or mode. Some stores within the app are singleton objects and are allocated - and perhaps even populated - at startup time. More details and sample code can be found on the ReSub github site. ReSub provides coarse-grained data binding between components and stores, and it automates the process of subscribing and unsubscribing. ![]() For these reasons, we developed a new mechanism that we call ReSub, short for “React Subscriptions”. State management also became hard to manage within our more complex components. We liked some of its properties, but we found it cumbersome because it required us to implement a bunch of helper classes (dispatcher, actions, action creators). We initially tried using Flux, an architectural pattern created by Facebook engineers. In this article, I’ll talk more about the architecture of the new Skype app. ReactXP was developed by the Skype team at Microsoft as a way to improve development agility and efficiency.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |