Share via


MorphX Concepts

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Some central object-oriented mechanisms and terms appear repeatedly as you develop with MorphX. Below is a brief explanation of the most important ones.

MorphX concept

What is it and how does it work?

System class

An interface to the functionality that is defined in MorphX, such as creating or running a form.

Class

Defines an object's interfaces. A class instructs or explains how to construct an object of a particular type.

An essential characteristic of a class is that you can create a new instance (an object) of the class.

Forms are an example of a class. MorphX has a class definition that describes exactly what happens when a form object is created.

Controls

A graphical object, such as a text box, a check box, a command button, or a rectangle, that you place on a form or report when you are designing it to display data, perform an action, or make the form or report easier to read.

Data Source

Holds the data variables that a form or a query uses. These data variables can be one or more tables, or they can be individual fields from tables.

Designs

Provides access to define the layout of a form or a report.

Encapsulation

The data in the system is hidden behind methods and can be changed only by the methods.

Final

A class or method modifier that defines that the class or method cannot be extended (overridden).

Inheritance

A central concept in MorphX. It means that what you define in one element can be inherited by elements that extend that element.

An illustration of the hierarchy of inheritance is that your own methods can extend one of the methods defined in MorphX. In the code this is indicated by the super reference.

Method

Tasks that you can tell an object to do.

Methods can be programmed at several levels:

  • As part of a table

  • As part of a form

  • As part of a class

Methods for a form can be related to:

  • The general management of the form, such as running the form, or closing it

  • The data displayed in the form, such as deleting, or writing data

  • Form controls, such as moving the cursor

  • As part of queries

  • As part of a general class library

Initially, the methods are only frames that activate the methods of MorphX (indicated by the super() call).

In a method you can:

  • Add code to be executed prior to the main action of the method.

  • Write you own method or let MorphX handle it (the super() call).

  • Add code to be executed after the main action of the method.

Object

The central MorphX concept. Any form or control is an object. The database is an object.

Objects are created from classes. An object is an instance of a class.

Objects provide a convenient, logical way to organize procedures and data. Objects are encapsulated, which means that they contain both their code and their data.

To use an object, you must keep a reference to it in an object variable.

Property

Properties are data that describe an object. Each type of object has different types of properties. A method typically has only a few properties, one of which defines where it is to run. Conversely, a control frequently has about 50 properties which define position, size, color, and so on.

Query

A query is a filter mechanism to retrieve the data you want to see from your database tables.

Queries are typically used as the source of records for forms and reports.

Workspace

The Development Workspace contains the Microsoft Dynamics AX application development tools. The Application Workspace is used to display the client for the end-user.

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.