Magritte

a metadata modeling framework github

Most applications consist of a big number of model- or so called domain-objects. Building different views, editors, and reports; querying, validating and storing those objects is very repetitive and error-prone, if an object changes its shape frequently. Magritte is a fully dynamic meta-description framework that helps to solve those problems, while keeping the full power with the programmer in all aspects. Moreover since Magritte is described in itself, you can let your users modify the meta-world and add their own fields and forms without writing a single line of code.

Lukas Renggli (2006), Magritte. Meta-Described Web Application Development. Masterarbeit wayback

Meta data at Work with Magritte: A Tutorial mail-archive forum.world.st book

> Basic Principles: […] The key idea behind Magritte is the following: given one object with a set of values, and a description of this information, we will create automatically tools that treat such information and for example automatically create Seaside components.

Figure 159 shows that a person address’, John’s address, instance of the class Address, is described by a description object which is attached to the class Address. A program (i.e., database query, generic UI, seaside component builder) will interpret the value of the instance by using its descriptions.

**Figure 159**: An object is described by a description which is defined on its class.

* Here are the basic description assumptions: An object is described by adding methods named description (naming convention) to the class-side of its class. Such description methods create different description entities. The following Address class method creates a string description object that has a label ’Street’, a priority and two accessors street and street: to access it.

Address class>>descriptionStreet ^ MAStringDescription new accessor: #street; label: 'Street'; priority: 100; yourself

Note that there is no need to have a one to one mapping between the instance variables of the class and the associated descriptions.

* All descriptions are automatically collected and put into a container description when sending description to the object (see Figure 160 ). * Descriptions are defined programmatically and can also be queried. They support the collection protocol (do:, select:...).

~

Most applications consist of a big number of model- or so called domain-objects. Building different views, editors, and reports; querying, validating and storing those objects is very repetitive and error-prone, if an object changes its shape frequently. github

Magritte: Meta-data at Work page – Many applications consist of a large number of input dialogs and reports that need to be built, displayed and validated manually. Often these dialogs remain static after the development phase and cannot be changed unless a new development effort occurs. For certain kinds of application domains such as small businesses, changing business plans, modifying workflows, etc., it usually boils down to minor modifications to domain objects and behavior, for example new fields have