Advanced programming


In classic WPF applications, XAML is compiled to BAML using the x: Class directive and linked to the code-behind file. The disadvantage of this procedure is that you can no longer make any adjustments during runtime, project or customer-specific. With iPlus, on the other hand, all designs are saved in the SQL database and only loaded at runtime just in time.

Just as properties, methods, events and configuration values ​​belong to a class and can be inherited and overwritten in the object-oriented sense, so it is with the designs.

Designs are stored in the ACClassDesign table and, like properties and methods, are clearly identified using the IACObjectBase.ACIdentifier.

Data and states of an ACComponent are presented using WPF data binding. The DataContext is usually the ACComponent to be presented itself:

 

GUI

Please familiarize yourself with the WPF first before reading on here for a better understanding. This also helps you to understand XAML better and then you are able to create designs directly in the XAML code window without the help of the iPlus GUI designer. This is often faster than using the graphical tool.

As an alternative to the iPlus GUI Designer, you can use  Microsoft Blend or the older version Microsoft Expression Design (Download link) and copy the XAML code generated there to the XAML editor from iPlus via clipboard. You can then do the rest of the work with the iPlus Designer:

 

Reports

Reports are also designs that are described as flow documents in XAML. In iPlus, the flow-related classes of  the .NET framework have been extended so that the data can be bound as with GUI classes and finally output on a printer or as an XPS / PDF document.

 


You manage designs in the iPlus Development Environment  in the "Designs" tab. The following points must be considered before any new design system:

 

1. Abstraction level

Since designs always belong to a class, you must first select the project under which the class is organized.

Designs that you add to classes in the "Variolibrary" project are designs that you want to reuse for future projects. Here you also have to consider at which abstraction level you want to define the design, since designs are inherited in the object-oriented sense, as are properties and methods.

Designs that you add to classes that are in the Root project are designs for business objects and entity classes. The inheritance rules also apply here!

Designs that you add to classes that are in application definition and application projects are designs for your customer project. Since classes in the application project inherit from the classes from the application definition project or the class library, you must also decide at which abstraction level you add your design.

Principle : If you create or change designs that are at a higher level of abstraction, this affects many instances. If you create or change designs that are at the last derivation level, this only affects the specific instance.

 

2. Overwrite

The design name (field ACIdentifier in ACClassDesign) serves to uniquely identify the design within a class. If you want to change a design in a derived class, create an additional design with the same design name (ACIdentifier) as it was named in the base class. You have now overwritten the design. In the following example, the design with the name "Design1" was overwritten in the second class :

 

3. Categorization

Designs are displayed in iPlus in different contexts, for example as a control element in the visualization, or for configuring an ACComponent in the control dialog, or for displaying database data in business objects.
When creating a design ("New Design" button) you will be asked to categorize the design using the "Usage" combo box :

 

4. Nesting

XAML code can often become very confusing when, for example, many animations are described or views are created that contain many data fields. For this reason, it is advisable to divide the entire design into several smaller designs (comparable to the nesting principle in computer science), which are later embedded in one another. The embedding of a lower design into a different parent design is the control VBDesign made.

The nesting principle offers the following advantages:

  • Reuse designs. 
  • Reduction of complexity.
  • Better clarity and maintainability.

 


Depending on which category has been assigned to the design, a corresponding design tool is required that selects the iPlus Development Environment for you:

Surface designer

The surface designer  is activated if the designs belong to the main view, partial view, control, control dialog and visualization categories. The surface designer can also be opened directly during runtime by executing the "Design mode on" command in the context menu. The design where the mouse pointer is located is always edited. Alternatively, the designer can be activated using the triangle symbol at the bottom of the status bar

Please read how to use the surface designer in the first subsection  .

 

Report designer

The report designer is activated if the designs belong to the "XAML report" category. The report designer is opened using the triangle icon at the top of the ribbon.

Please read how to use the report designer in the second subsection

 

Menüeditor

The menu editor is activated if it concerns designs which belong to the category "main menu". Menus belong to the "Root" root class in the Root project and should only be created there.

 

Special case: workflow designer

For completeness: workflows are methods and not designs! Since the presentation also takes place via XAML, you will also create a graphic tool . Your design is not saved in the ACClassDesign table, but in the ACClassMethod table.