presented by vishy grandhi. lesson 1: introduction to x++ lesson 2: development tools recipes

20
AX 2012 Development Training Presented by Vishy Grandhi

Upload: mark-owens

Post on 19-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

AX 2012 Development TrainingPresented by Vishy Grandhi

Page 2: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Lesson 1: Introduction to X++ Lesson 2: Development tools Recipes

Training Outline

Page 3: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

At the end of this lesson you will have an understanding about◦ Overview◦ Characteristics◦ Code tools◦ Color coding

Introduction to X++: Objectives

Page 4: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Primary programming language used in MorphX development environment

Resembles other popular languages such as C# and Java

It includes many integrated SQL commands Object-oriented language Base set of system classes provide a wide

range of functionality include I/O, XML etc..

Introduction to X++: Overview

Page 5: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Reliable: Compile-time checking and run-time checking

Memory management: Automatic garbage collection

Interpreted and Dynamic: Faster dev cycles including prototyping

Interoperable: .Net interoperable and can consume external managed code and COM objects

Introduction to X++: Characteristics

Page 6: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

X++ Editor X++ Compiler X++ Debugger Visual Studio Visual Studio Debugger

Introduction to X++: Code tools

Page 7: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

◦ Editor color-codes

Introduction to X++: Color coding

Color Code typ

Blue Reserved words

Green Comments

Dark Red Strings

Bright Red Numbers

Purple Labels

Black Everything else

Squiggly lines Errors

Page 8: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

At the end of this lesson you will have an understanding about◦ Compiler: Output window◦ Debugger: Window panes◦ Compare tool◦ Type Hierarchy browser◦ Reverse Engineering◦ Best Practices

Development Tools: Objectives

Page 9: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Compile (F7) Add-Ins->Compile Forward Compiler output window elements

◦ Filter buttons◦ Reset button◦ Edit button◦ Import/Export button◦ Setup button

Development Tools: Compiler

Page 10: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Breakpoint (F9) Tools->Options Developer tab:Debug field Window Panes in debugger

◦ Code◦ Variables◦ Call Stack◦ Watch◦ Breakpoints◦ Output

Development Tools: Debugger

Page 11: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Compare code in ◦ Two different layers◦ In an old version of an element◦ In two different elements◦ An element that will be imported

Development Tools: Compare

Page 12: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Add-Ins->Type hierarchy browser Display the hierarchy of a type inheritance Eg CustAccount, CustInvoiceAccount,

SalesLineType_Sales

Development Tools: Type hierarchy browser

Page 13: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Reverse engineer object and data models. Objects and the available models

Development Tools: Reverse engineering

Data Model Object Model

Tables Yes Yes

Table Group Property Yes

Table Fields Yes Yes

Table Index information Yes

Table Methods and parameters

Yes

Classes Yes

All EDTs Yes Yes

All Base Enums Yes Yes

All X++ Data Types Yes Yes

Page 14: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Naming Conventions: {business area name} + {business area description} + {action performed (for classes) or type of contents (for tables)}

All names in U.S. English Limit of 40 characters for identifiers All text must use labels Don’t begin any objects with prefix DEL_

Development Tools: Best Practices

Page 15: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Code Placement◦ Place in class to make it reusable◦ Code included in forms always runs on the client◦ Context ◦ Place code nearest to the source so it can be

more easily manipulated

Development Tools: Best Practices

Page 16: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

Comments◦ In-Line vs Separate lines◦ //, /* */, TODO, ///◦ Add-Ins->Extract XML documentation

Development Tools: Best Practices

Page 17: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

The following recipes are included in this presentation5a. Reverse engineer an object model5b. Reverse engineer a data model

Recipes: List of recipes

Page 18: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

1. Start

2. Open Microsoft Dynamics AX development workspace (Ctrl + Shift + W)

3. Create a project.

4. Drag AOT elements into the project you want to reverse engineer into an object model.

5. Right-click the project and select Add-ins > Reverse engineer.

6. Click Visio UML Object model to create a UML object model.

7. Select a name and path for the file and then click OK.

8. From Microsoft Visio, drag object nodes into the center grid to lay out the desired model.

9. Finish

Recipe 5a: Reverse engineer an object model

Page 19: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

1. Start

2. Open Microsoft Dynamics AX development workspace (Ctrl + Shift + W)

3. Create a project.

4. Drag the AOT elements into the project you want to reverse engineer into a data model.

5. Right-click the project and select Add-ins > Reverse engineer.

6. Click Visio UML Data model to create a UML data model.

7. Select a name and path for the file and then click OK.

8. From Microsoft Visio, drag table nodes into the center grid to lay out the desired model.

9. Finish

Recipe 5b: Reverse engineer a data model

Page 20: Presented by Vishy Grandhi.  Lesson 1: Introduction to X++  Lesson 2: Development tools  Recipes

We have looked at an Introduction to X++ and the various tools, best practices

Summary of Training