You build an application with MorphX using modeling. The building blocks available for modeling are commonly known as application model elements.
In this section, we introduce the different kinds of application model
elements and their relationships, describe the tools necessary for
working with application model elements, and explain the sequence in
which to apply the tools. For a more thorough explanation of the
application model elements, refer to the Microsoft Dynamics AX SDK on
MSDN.
The
application model dictionary in the AOT organizes the application model
elements. For example, rich client forms are grouped under Forms, rich
client reports are grouped under Reports, and Web client forms and
reports are collected under a Reported Libraries group.
Tip
To better understand the application model element structure as you read, start Dynamics AX 2009 and open the AOT. |
Operational and Programming Model Elements
Operational model elements
are used to model how the application should behave according to
security, configuration, and licensing in an operational environment.
For example, certain functionality is available only if it is enabled
system-wide and the user is authorized to use it. Programming model
elements provide ways to reference library code, definitions, and
resources. They also allow you to write small X++ scripts to experiment
with the X++ language capabilities.
Here are the operational model elements:
License codes
Configuration keys
Security keys
These model elements change the operational characteristics of the Dynamics AX development and runtime environments.
These are the types of programming model elements:
Reference elements Elements whose properties identify the Microsoft .NET assemblies referenced in X++ statements
Resource elements Named file resources loaded into the memory
Macro elements Libraries of X++ string replacement procedures
Job elements X++ programs primarily used for testing and debugging an executable from within the development environment
Figure 1 illustrates the operational and programming element categories in the AOT.
Operational Model Elements
You
use the AOT and the property sheet to declaratively group related
application features by associating configuration keys with menu item
elements and data elements. This enables the application administrator
to enable and disable application features. The MorphX IDE synchronizes
table and view elements with the database schema only if they are
associated with an active configuration key or if they have no
configuration key. The Dynamics AX runtime environment renders
presentation controls only for menu items that are associated with an
active configuration key or that have no configuration key. You can
enable and disable application logic by using X++ to test for the state
of a configuration key.
Dynamics AX includes
all the application modules developed by Microsoft. These modules are
locked with license codes that must be unlocked with license keys. You
can also configure an unlocked module by using configuration keys.
Dynamics AX administrators manually enable and disable configuration
keys by using the check boxes in the system configuration dialog box at
Administration\Setup\System\Configuration. You can manually activate
configuration keys associated with license code elements only if there
is a valid license key for the corresponding license code element.
Security keys are
part of the Dynamics AX security framework. When a user identified by a
Windows principal logs on to a Dynamics AX application, he or she is
authenticated with the Windows platform security infrastructure and then
associated with a Dynamics AX application user
group that denotes the application user’s role. An application user
role determines which user interface actions a user is authorized to
perform and which data the user is authorized to view and modify.
Security keys are
associated with menu item elements and data elements so that related
elements can be grouped together into a security group. Access
permissions that are assigned to a security key apply to all elements
that are members of the associated security group. Access permissions
can also be assigned to individual elements in a security group. The
security grouping provided by security keys is used to display a tree of
security keys and application elements when they are displayed in the
User Group Permissions dialog box. This makes it easier for the
application administrator to navigate the thousands of menu item
elements and data elements that need to be assigned user group
permissions.
Programming Model Elements
The following list describes the programming model elements:
Reference elements
Reference elements hold references to .NET assemblies for the .NET
common language runtime (CLR) types to be incorporated natively into X++
source code. The X++ editor reads type data from the referenced
assemblies so that IntelliSense is available for CLR namespaces, types,
and type members. The MorphX compiler uses the CLR type definitions in
the referenced assembly for type and member syntax validation, and the
Dynamics AX runtime uses the reference elements to locate and load the
referenced assembly.
Resource elements
Resource elements hold references to file resources that are read from
the file system and stored in memory. Image and animation files used
when developing Web client applications are referenced as resources. The
name of the file that contains the resource also references the
resource when it is stored in the database.
Macro elements
Macro elements are libraries of X++ syntax replacement procedures
included in the X++ source code. You should use macro libraries to
provide readable names for constants.
Job elements
Job elements are X++ source code statements that are easily executed by
selecting the Command\Go menu item or by pressing F5 on the keyboard
while using MorphX. Job elements offer a convenient method of
experimenting with features of the X++ language when they are used to
write sample code.