Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Microsoft Dynamics AX 2009 : The MorphX Tools - Code Compiler & Dynamics AX SDK

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
7/25/2011 11:32:42 AM

Code Compiler

Whenever you make a change to X++ code, you must recompile, just as you would in any other development language. You start the recompile by pressing F7 in the X++ code editor. Your code also recompiles whenever you close the editor or save a dirty element.

The compiler also produces a list of the following information:

  • Compiler errors These prevent code from compiling and should be fixed as soon as possible.

  • Compiler warnings These typically indicate that something is wrong in the implementation. See Table 1, later in this section, for a list of compiler warnings. Compiler warnings can and should be addressed. Check-in attempts with compiler warnings are rejected.

    Table 1. Compiler Warnings
    Warning MessageLevel
    Break statement found outside legal context1
    The new method of a derived class does not call super()1
    The new method of a derived class may not call super()1
    Function never returns a value1
    Not all paths return a value1
    Assignment/comparison loses precision1
    Unreachable code2
    Empty compound statement3
    Class names should start with an uppercase letter4
    Member names should start with a lowercase letter4

  • Tasks (also known as to-dos) The compiler picks up single-line comments that start with TODO. These comments can be useful during development for adding reminders, but you should use them only in cases in which implementation can’t be completed.

    For example, you might use a to-do comment when you’re waiting for a check-in from another developer. You should avoid using to-do comments just to postpone work. For a developer, there is nothing worse than debugging an issue at a customer site and finding a to-do comment indicating that the issue was already known but overlooked.

    Note

    Unlike other languages, X++ requires that you compile only code you’ve modified. This is because the intermediate language the compiler produces is persisted along with the X++ code and metadata. Of course, your changes can require other methods consuming your code to be changed and recompiled if, for example, you rename a method or modify its parameters. If the consumers are not recompiled, a run-time error is thrown when they are invoked. This means that you can execute your business application even when compile errors exist, as long as you don’t use the code that can’t compile. You should always compile the entire AOT when you consider your changes complete, and you should fix any compilation errors found.


The Compiler Output dialog box provides access to everything reported during compilation, as shown in Figure 1. Each category of findings has a dedicated tab: Status, Errors And Warnings, Best Practices, and Tasks. Each tab contains the same information for each issue that the compiler detects—a description of the issue and its location. For example, the Status tab shows a count of the detected issues.

Figure 1. Compiler Output dialog box

You can export compile results. This capability is useful if you want to share the list of issues with team members. The exported file is an HTML file that can be viewed in Microsoft Internet Explorer or re-imported into the Compiler Output dialog box in another Dynamics AX session.

In the Compiler Output dialog box, click Setup and then click Compiler to define the types of issues that the compiler should report. Compiler warnings are grouped into four levels, as shown in Table 1.

Dynamics AX SDK

Constructing quality software has become a daunting task in the 21st century. Many new competencies are expected of the developer, and mastering them fully and at all times is nearly impossible. Today you must write code conforming to many technical requirements, including security, localization, internationalization, customization, performance, accessibility, reliability, scalability, compatibility, supportability, interoperability, and so on. The list seems to grow with each software revision, and keeping up with all of these competencies is increasingly difficult.

Microsoft Dynamics AX 2009 includes a software development kit (SDK) that explains how to satisfy these requirements when you use MorphX. You can access the SDK from the application Help menu under Developer Help. We highly recommend that you read the Developer Help section—it’s not just for novices but also for experienced developers, who will find that the content has been extensively revised for Dynamics AX 2009. The SDK is frequently refreshed with new content, so you might want to check it often on MSDN.

Among other critical information, the Developer Help section of the SDK includes an important discussion on conforming to best practices in Dynamics AX. The motivation for conforming to best practices should be obvious to anyone. Constructing code that follows proven standards and patterns can’t guarantee a project’s success, but it certainly minimizes the risk of failure. To ensure your project’s success, you should learn, conform to, and advocate best practices within your group.

The following are a few benefits of following best practices:

  • You avoid less-than-obvious pitfalls. Following best practices helps you avoid many obstacles, even those that surface only in border scenarios that would otherwise be difficult and time consuming to detect and test. Using best practices allows you to leverage the combined experiences of Dynamics AX expert developers.

  • The learning curve is flattened. When you perform similar tasks in a standard way, you are more comfortable in an unknown area of the application. Consequently, adding new resources to a project is more cost efficient, and downstream consumers of the code are able to make changes more readily.

  • You are making a long-term investment. Code that conforms to standards is less likely to require rework during an upgrade process, whether you’re upgrading to Dynamics AX 2009, installing service packs, or upgrading to future releases.

  • You are more likely to ship on time. Most of the problems you face when implementing a solution in Dynamics AX have been solved at least once before. Choosing a proven solution results in faster implementation and less regression. You can find solutions to known problems in both the Developer Help section of the SDK and the code base.

Other -----------------
- Microsoft Dynamics AX 2009 : The MorphX Tools - Visual Form Designer and Visual Report Design
- Windows Server 2008 R2 : Work with Windows Updates (part 3) - Use Group Policy to Configure Automatic Updates
- Windows Server 2008 R2 : Work with Windows Updates (part 2)
- Windows Server 2008 R2 : Work with Windows Updates (part 1)
- SQL Server 2005 : Privilege Escalation Without Ownership Chains
- SQL Server 2005 : Privilege and Authorization - Ownership Chaining
- SQL Server 2005 : Privilege and Authorization - Basic Impersonation Using EXECUTE AS
- Configuring Standard Permissions for Exchange Server 2010 (part 2) - Understanding & Assigning Advanced Exchange Server Permissions
- Configuring Standard Permissions for Exchange Server 2010 (part 1)
- Feature Overview of Microsoft Lync Server 2010 : Dial-In Conferencing & Enterprise Voice
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server