Basic ComponentsVersion: 4.62Basic Components Depending on your project, you will likely encounter some of the different types or componetents of a mos.configuration. All files within a configuration are of the file type JavaScript Object Notation or JSON for short. The following pages contain the available components and a short description of their purpose. Each component is located within its own folder of you configuration and can hold one or multiple files. Please note that a component folder should be named accordingly for it to work correctly. ๐๏ธAssetAssets provide a way to make media files available to the configuration. Assets can be bundled in the app during the build. If all assets are available, the app can display media items even when the app is offline.๐๏ธClient TemplateThe typicall mos. application consists of several views.๐๏ธConfigThe app config defines general settings that control the basic behavior of your app.๐๏ธDatabase Tablesmos. offers a build-in SQLite based solution to persist data. Furthermore it allows you to define sources for tables that the app will automatically keep up to date.๐๏ธEnvironmentYou can define different environment variables depending on the environments you start your application in. These variables are replaced with their value at runtime. Typicall variables defined in environments are URLs for external third-party APIs (i.e. different environments could point towards the development and production API). Most of the time you will find an environment called default for production purposes and one called local for development on you local machine.๐๏ธEventEvents are used to call actions from elsewhere in the app.๐๏ธFontCustom fonts can be added to an app and used throughout the configuration.๐๏ธLayer StyleLayer styles allow you to define attributes that are used repeatedly within a configuration, such as colors and fonts. They reduce redundancy and make it possible to apply attributes to layers that meet specific criteria.๐๏ธLayer Style ConditionAs the name suggests layer style conditions apply to layer styles and can be used to control a layout and/or its behavior depending on different factors like device type or system settings (e.g. darkmode).๐๏ธLayoutUnderstanding layouting is one of the first steps one needs to undertake, to create beautiful and functional mobile applications with mos.๐๏ธStart ConfigThe start configuration is the starting point for the app. It tells the app which display type, layout, client template and named style to use on the app start.๐๏ธStyleThe ./style directory contains named styles that are used by the system to style views.๐๏ธTranslationMos. supports translations for text strings used throughout an app.
๐๏ธAssetAssets provide a way to make media files available to the configuration. Assets can be bundled in the app during the build. If all assets are available, the app can display media items even when the app is offline.
๐๏ธDatabase Tablesmos. offers a build-in SQLite based solution to persist data. Furthermore it allows you to define sources for tables that the app will automatically keep up to date.
๐๏ธEnvironmentYou can define different environment variables depending on the environments you start your application in. These variables are replaced with their value at runtime. Typicall variables defined in environments are URLs for external third-party APIs (i.e. different environments could point towards the development and production API). Most of the time you will find an environment called default for production purposes and one called local for development on you local machine.
๐๏ธLayer StyleLayer styles allow you to define attributes that are used repeatedly within a configuration, such as colors and fonts. They reduce redundancy and make it possible to apply attributes to layers that meet specific criteria.
๐๏ธLayer Style ConditionAs the name suggests layer style conditions apply to layer styles and can be used to control a layout and/or its behavior depending on different factors like device type or system settings (e.g. darkmode).
๐๏ธLayoutUnderstanding layouting is one of the first steps one needs to undertake, to create beautiful and functional mobile applications with mos.
๐๏ธStart ConfigThe start configuration is the starting point for the app. It tells the app which display type, layout, client template and named style to use on the app start.