|
|
Want to know more about Packt's Article Network? Interested in contributing your article ideas? Please visit our FAQ for more information. See More Most of the qualities of an ideal ERP system such as, Total Cost of Ownership, Flexibility, Usability, Integration and many more are implemented by conformance to the technical best practices discussed in this two part article by Anil Kumar Gupta. The Dynamics AX best practice can be grouped into three categories i.e. application design standards, shared standards, and AOT object standards. The first part of this article will discuss Application Design Standards. See More |
Technical Best Practices for Dynamics AX - Shared and AOT Object Standards
Shared StandardsSome Dynamics AX customization best practices are applicable irrespective of AOT element. These standards include X++ standards, naming conventions, label standards, and Help Text guidelines. X++ StandardsThis section discusses some best practices related to the X++ language. Conformance to this standard results in improved execution time, ease in upgrading and further customization, efficient use of OOP concepts, better readability of code, etc. Some general principles are as follows:
Text Constant StandardsAll the text used in Dynamics AX is supposed to be in a label file irrespective of its use e.g. user interface or error or success message. The use of text constants can be classified into two broad categories i.e. user interface text and system-oriented text. The text used in the user interface should follow the following best practices:
System-oriented text constants must be in single quotes. Exception HandlingThe principle uses of exception handling include freeing system resources (e.g. memory through object deletion, closing database connection, etc.) and providing constructive information in the Infolog so that the user can prevent such erroneous conditions. The following are a few recommended best practices related to exception handling:
BranchingA few recommended best practices related to the if-else statement and switch statement are as follows:
Code LayoutFor readability of the code, code should be written in a proper layout. Some chief best practices for code layout are as follows:
MethodsFollowing are a few best practices for methods:
Handling DatesDates are sources of error due to variations in date presentation formats and in values due to differences in time zone. A few best practices for handling dates are as follows:
Label StandardsIt is highly recommended that any user-interface text is defined using labels. This will ensure many advantages during translation. A few label file standards to ensure the true benefits of the label file system are as follows:
AOT Object StandardsThe AOT object standards are specific to a particular AOT element. Broadly we can classify AOT elements as follows:
Data DictionaryThis is a group of AOT objects including the items mentioned in the previous section. The best practices for tables can further be divided into best practices for the fields, field groups, indexes, table relations, delete actions, and methods. Extended Data TypeThe EDT plays a great role as it is the basic entity of GUI elements. The following are a few basic best practices related to extended data types.
Base EnumThe following are a few basic best practices related to Base Enum:
TablesMany of the best practices for tables come under the scope of performance optimization, database design standards, etc. and hence those standards have been discussed elsewhere. Some of the standards not discussed are discussed here.
FieldsMost of the properties for the fields are inherited from extended data types; however, it is not mandatory to use some or all inherited values for such properties. Here are a few guidelines:
Field GroupThe field group is a group of fields shown in the user interface. Dynamics AX has some standard groups (e.g. Identification, Administration, Address, Dimension, Setup, Misc, etc.), while other can be created. The fields that logically belong together can be placed in one field group while the Misc field group can be used to group fields that do not fit in any other field group. The dimension field group must have a single kind of field Dimension. The field groups should have the same kind of grouping at the database and form or reports to improve caching and hence the performance. Delete ActionsThe database integrity is one of the key principles in Relational Database Management System (RDBMS). The delete action should be used on every relation between two tables. The following are key best practices for delete actions.
Dynamics AX has three types of delete actions; selection of one will solely depend upon the custom requirements. Books from Packt Table MethodsThe tables in Dynamics AX have several properties such as delete, validateDelete, etc. and hence Dynamics AX recommends that you should not write methods or X++ code to implement something that can be done just by setting property values. Dynamics AX recommends using inbuilt table methods for those custom requirements that cannot be met with table properties settings. Some of the table methods are mandatory to implement e.g. find and exists methods. ClassesThe classes have a peculiarity that they may have both a back end (database) and front end (GUI). The front interface should be easy to use and at the same time as secure as possible. The implementation details of the class should always be hidden from the user and hence use of private or protected methods is recommended. The back-end methods are highly secure, standardized, and reliable and hence use of private or protected methods is recommended in prescribed design patterns. The design patterns depend upon the type of class. Classes can be categorized in the following categories:
The following are a few common best practices related to declaration:
There is a rich set of best practices for classes and the Best Practices for Microsoft Dynamics AX Development released by Microsoft would be good read. FormsThe forms are in the presentation tier in any three-tier architecture system. Most of them are related to look and feel or layout. Some other best practices for forms revolve around the following characteristics:
Avoid Coding on FormsThe basic concept of three-tier architecture is that forms should be used only for the presentation tier and hence no other code such as business logic should be there on forms. The code placed on forms also reduces their reusability and the ease of further customization; e.g. if you want to develop an enterprise portal, the code written on forms will have to be written again in classes or table methods, etc., which will make the implementation complex. Another example may be when you want to 'COM enable' your business logic; form code related to business logic will make your life almost impossible. Any code (other than presentation logic) written on forms imposes limitation on performance as call between two different layers increase slowing the performance and hence code on forms should be avoided as much as possible. In cases where avoiding code on forms is not possible the guidelines summarized in the following table should be used for writing code on forms.
Use of IntelliMorph MaximallyDue to a user's locale or preferred format a form may be presented in a different language and/or a different date, time, or currency format. Dynamics AX best practices recommend Auto as the value for the display properties related to the following:
The rule of thumb is to keep the various properties as Auto or default value, which will help IntelliMorph to function maximally. For further details about best practices readers are recommended to go through the Developers Guide for Best Practices. ReportsThe peculiar fact about the reports is that they are output media where the external environment such as paper size, user's configuration about the locale or language, font size, etc. matters. Dynamics AX recommends using 'Auto Design' to develop the report as these kinds of reports can change the layout according to external environmental variables. Another way to develop a report in Dynamics AX is 'Generated Design'; this type of design is recommended only when strict report layout is required. A few such examples may be regulatory reports, accounts reports, etc. SummaryIn this two part article we discussed various areas where quality could be improved by adopting best practices. We also discussed various best practices, theory behind best practices, and how to adopt these best practices, i.e. with practical tips. About the AuthorMr. Anil Kumar Gupta is a highly experienced Information Technology professional with proven Software Test Management and Software Process Improvement expertise. He has led various programs in diverse software projects such as ERP, eGovernance, eBanking, eLearning, system Software, Application Software, etc. in conjunction with Commercial off-the-shelf (COTS) products, Business Process Management (BPM), Customer Relationship Management (CRM), and Enterprise Resource Planning (ERP) technology solutions, J2EE, and .Net to meet and exceed challenging business needs in both the commercial and governmental sectors. His 10+ year professional career combines expertise and strong technical qualifications in many domains including but not restricted to Systems Engineering and Integration, Financial Services, and ERPs for Manufacturing and Process Industries fields using computer tools to solve complex engineering problems. His exceptional analytical and communications skills along with effective interaction with management, vendors, customers, and staff, have allowed for meeting aggressive deadlines under pressure. At the same time, Mr. Gupta identified, managed, and resolved multiple complex project tasks that included changing priorities in both team and sole-person environments. Mr. Gupta provides strong collaborative management which is task-oriented with attention given to required details and accuracy. Mr. Gupta is a self-motivated, energetic, dependable, flexible, assertive, attentive, and resourceful manager, who provides effective team support that combines interpersonal, coordination, mentoring, and verbal and written communication skills. During his professional career he met many challenges, which included the establishment of QA and Testing practice at EuroInfo Systems Pvt. Ltd. (Currently known as Tectura India). Tectura India is the largest MBS solution provider and globally Tectura is the biggest MBS solution provider. EIS was the pioneer in establishing a separate QC department in 2004 and this challenge was given to Anil. Due to his successful quality initiatives EIS was awarded the Global Axapta Excellence Award for the year 2005, among 1000 MBS partners. The author is the most experienced resource for Dynamics AX Testing in India and has worked for multiple IBI-compliant Dynamics AX ISV projects.
|
TOP TITLES SQL 2008 server is the latest in the line of Microsoft database servers and this article by Dr. Jayaram Krishnaswamy discusses the challenges one may face in installing the Developer version of this product which was released in November 2007. On a virgin machine the software probably installs without a hitch but with a history of installs, especially of the earlier versions it is anything but a joy ride. "It is almost always true for most of the software I have installed, not necessarily limited to Microsoft. However, most of Microsoft products need entry in the Window's registry and it is almost certain that one has to follow a certain protocol if one wishes to have a successful install. In fact the unsuccessful install flags out what went wrong while the initial steps do verify the requirements during installation. Despite this help and warnings one may face problems simply because it is not possible to foresee all possible combinations of hardware, software, user created error issues at launch time of the product. Again this article does not guarantee a successful install if one were to follow the steps delineated but gives you some guidance based on the author's experience." See More |
| ||||||