UI
Baked introduces a metadata generation template which can be used to transform the business domain to UI metadata to be used in dynamic UI applications.
app.Layers.AddUi();
UiLayer
provides IComponentDescriptor
, IComponentSchema
, IData
types for
building UI page metadata. A page metadata will have a component descriptor
(represented by a ComponentDescriptorAttribute
instance) at the top in the
hierarchy containing Type
, Schema
, Name
and Data
properties.
The generated UI metadata files will be saved to
Ui
folder at$(OutDir)
of your project, you can add below properties to your.csproj
file to copy generated files to given directory<PropertyGroup> <CopyComponentDescriptors>true</CopyComponentDescriptors> <UiAppDir>$(ProjectDir)..\admin</UiAppDir> </PropertyGroup>
Configuration Targets
This layer provides AppDescriptor
, ComponentExports
, LayerDescriptors
and PageDescriptors
configuration target for registering pages using
ComponentDescriptor
instances.
Also this layer provides ILocaleTemplate
and Localization
configuration
targets to generate localization data for generated page descriptors
AppDescriptor
This target is provided in GenerateCode
phase. To configure it in a feature;
configurator.ConfigureAppDescriptor(app =>
{
...
});
AppDescriptor
This target is provided in GenerateCode
phase. To configure it in a feature;
configurator.ConfigureComponentExports(exports =>
{
...
});
ILocaleTemplate
This target is provided in GenerateCode
phase. To configure it in a feature;
configurator.ConfigurePageDescriptors(pages =>
{
configurator.UsingLocaleTemplate(localeTemplate =>
{
...
});
});
LayoutDescriptors
This target is provided in GenerateCode
phase. To configure it in a feature;
configurator.ConfigureLayoutDescriptors(layouts =>
{
...
});
Localization
This target is provided in GenerateCode
phase. To configure it in a feature;
configurator.ConfigurePageDescriptors(pages =>
{
configurator.UsingLocalization(l =>
{
...
});
});
PageDescriptors
This target is provided in GenerateCode
phase. To configure it in a feature;
configurator.ConfigurePageDescriptors(pages =>
{
...
});