Accumulation

    In the dynamic model, programs, documents and tools can be represented by data. When the programs, documents and tools are data, they can be easily integrated together, from the dynamic model can be used to accumulate various Capabilities, knowledge and experience.

1. Pack various functions into models

    Various things can be packaged into models, for example, Java APIs, web pages, scripts and executable programs can be packaged into models, and then they can be used simply and quickly through models.

    The example in the home page is a wrapper around SWT.

<?xml version="1.0" encoding="utf-8"?>
 
<Shell name="shell" text="Hello World!" descriptors="xworker.swt.widgets.Shell"
               width="800" height="600">
    <FillLayout name="FillLayout"></FillLayout>
    <Browser name="Browser" url="https://www.xworker.org"></Browser>
</Shell>

    The following example is for VUE and Antdesign package.

<?xml version='1.0' encoding='utf-8'?>

<App name="testapp" descriptors="xworker.vue.App" label="Test Vue App" route="/index"
     extends="xworker.vue.Components">
    <Script name="Script" setup="true">
        <code><![CDATA[import {Button as AButton} from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import {DesktopOutlined} from '@ant-design/icons-vue';

import {ref} from 'vue';

const msg = "Hello World!";
const count = ref(0);

const showAlert = () => {
    count.value++;
}]]></code>
    </Script>
    <Template code="&lt;h1>{{msg}}&lt;/h1>">
        <Button _xmeta_id_="AButton" descriptors="xworker.antdesign.vue.components.common.Button"
             _innerText="OK{{count}}" block="true" danger="true" type="primary" size="large"
             _extraAttributes="@click=&quot;showAlert&quot;">
            <Icon name="Icon" descriptors="xworker.antdesign.vue.components.common.Icon"
                 iconName="desktop-outlined" rotate="90"/>
        </Button>
        <RouteLink name="RouteLink" descriptors="xworker.vue.router.RouteLink" _innerText="To Test"
             to="/test"/>
        <RouterView name="default" _xmeta_id_="RouterView" descriptors="xworker.vue.router.RouterView"/>
    </Template>
    <AntDesign name="AntDesign" descriptors="xworker.antdesign.vue.AntDesign"/>
    <VueRouter name="VueRouter" descriptors="xworker.vue.plugins.VueRouter"/>
</App>

2. Knowledge and experience

    Knowledge and experience can also be packaged into models. Below are some commonly used documents and tools in model editors, which are also commonly written using models.

2.1. Documentation and tools that come with the model

    You can write documentation and related tools on the model when you define the model, and you can view the documentation and use the related tools in the editor when editing a model instance.

2.2. Model Wizard

     Wizard is a function in the model editor, which can develop a wizard for a specific model, and can quickly edit the model through the wizard.

2.3. Help Elf

    More documentation and examples of a model can be registered in the help wizard. When a model is selected in the model editor, its related documentation and examples will be displayed.

2.4. Tutorials, help and examples

     XWorker also provides features such as tutorials, help and examples, which are also written using models, and third-party tutorials, help and examples can also be registered.

 

 

Copyright ©  2007-2019 XWorker.org  版权所有  沪ICP备08000575号