What is Zymonic?

From Zymonic
Revision as of 15:42, 19 September 2018 by Jbree (talk | contribs) (Clarification)

Introduction

Zymonic is a framework for building web-based, high-security (sufficient for PCI-DSS_ business applications). The systems that Zymonic produces use processes, and filter to interact with data in database tables.

The Architecture is as follows:

Let’s have a look at how they are produced using simple XML. Further information on everything mentioned can be found in later sections.

Processes

A process captures data from the user and enters it into a specified table in the database. It can be defined similarly to below:

<Process>
  <ZName>heating_process</ZName>
  <DisplayName>Heating Process</DisplayName>
  <InitialState><ZName>cold</Zname></InitialState>  
  <Transition>
    <ZName>switch_on</ZName>
    <DisplayName>Switch ON</DisplayName>
    <StateBefore><ZName>cold</ZName></StateBefore>
    <StateAfter><ZName>getting_hotter</ZName></StateAfter>
  </Transition>
  <Transition>
    <ZName>switch_off</ZName>
    <DisplayName>Switch Off</DisplayName>
    <StateBefore><ZName>getting_hotter</ZName></StateBefore>
    <StateAfter><ZName>getting_colder</ZName></StateAfter>
  </Transition>
  <State>
    <ZName>getting_hotter</ZName>
    <Form>
      <ZName>getting_hotter_form</ZName>
      <Table><ZName>heating_table</ZName></Table>
      <Field>
        <ZName>temperature</ZName>
      </Field>
      <Field>
        <ZName>average</ZName>
      </Field>
      <Field>
        <ZName>date</ZName>
          <FieldGroup>
            <ZName>data</ZName>
            <DisplayName>Data</DisplayName>
          </FieldGroup>
      </Field>
    </Form>
  </State>
  <State>
    <ZName>too_hot</ZName>
    <Form>
      <ZName>too_hot_form</ZName>
      <Table><ZName>heating_table</ZName></Table>
      <Field>
        <ZName>temperature_sensor</ZName>
      </Field>
    </Form>
  </State>
</Process>

The above XML would produce the following for the user:

Tables

Data captured by the process are entered into a database table also defined in the XML as follows:

   <Table>
    <ZName>heating_table</ZName>
    <DisplayName>Heating</DisplayName>
    <Field>
      <ZName>temperature</ZName>
      <Base>temperature</Base>
      <DisplayName>Temperature</DisplayName>
    </Field>
    <Field sequence="1">
      <ZName>average</ZName>
      <Base>average</Base>
      <RequiredField>true</RequiredField>
    </Field>
    <DefaultProcessZName>heating_process</DefaultProcessZName>
   </Table>
 

Filters

A filter captures data from the user using search fields and reports back matching results from the database table using report fields. It can be defined similarly to below:

   <Filter>
    <ZName>heating_filter</ZName>
    <DisplayName>Heating Filter</DisplayName>
      <BaseTable>
        <ZName>heating_table</ZName>
      </BaseTable>
      <ReportField>
        <Field>
          <ZName>temperature_rf</ZName>
        </Field>
        <SearchMap>
          <Condition>ZZRF LIKE ?</Condition>
          <PercentAfter>true</PercentAfter>
          <PercentBefore>true</PercentBefore>
          <SearchFieldName>temperature_sf</SearchFieldName>
          <ZName>temperature_sm</ZName>
        </SearchMap>
        <ZName>cbos_profile_profile_tillno_field_rf</ZName>
      </ReportField>
      <ReportField>
        <Field>
          <ZName>average_rf</ZName>
        </Field>
        <SearchMap>
          <Condition>ZZRF LIKE ?</Condition>
          <PercentAfter>true</PercentAfter>
          <PercentBefore>true</PercentBefore>
          <SearchFieldName>average_sf</SearchFieldName>
          <ZName>average_sm</ZName>
        </SearchMap>
      </ReportField>
    </Filter>

The above XML would produce the following to the user:

Putting it all together

A final site might have these separate elements on one page, with multiple filters and processes that can be opened from the menu on the left (the menu is also a filter). Also note that contents XML files must be wrapped in <Zymonic></Zymonic> tags or they won't be included in Zymonic.