AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 11.03.2013, 21:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,631 / 848 (80) +++++++
Регистрация: 28.10.2006
axStart: Best practice checks.
Источник: http://www.axstart.com/best-practice-checks/
==============

When checking my Ax code, I always use best practice checks. Most of the time I perform this during the last 10 minutes of the day. I do not use compiler level 4 but I have to admit this has some issues.

Most of these issues make sense, but some of them are contradictory or cannot be solved because the core AX framework is programmed the wrong way.

My preference is to start with these settings.





From this point it is up to you what checks can be skipped. Skipping means not to comply with http://www.microsoft.com/dynamics/en...certified.aspx

But, in case you do not wish to follow this direction, I could give some tips so the imported checks stay on

-        Labels
  • Turn off help labels, in most projects I review they are not used altogether.
  • Use of Labels: if you use single quotes instead of double quotes the warnings disappear.
  • Use the description {locked} on labels from the developer documentation on tables.
-        AXBc Fields on tables: You can ignore this unless you are using the fields in AIF.

-        XML documentation: I know this is a lot of work but did you know that the remark section is optional? See http://msdn.microsoft.com/en-us/library/cc593549.aspx

-        “Customizing this class may cause problems with future upgrades to the software.” warning

///
/// This is a   framework class. Customizing this class may cause problems with future   upgrades to the software.
///



Ok, so far so good, now it is time for the freak show:

-        Reports
  • New should be protected. If you do this your report will not run anymore…..
-        The Construct method must only instantiate the class. Consider using a static new pattern instead.
  • I have just extended a class from the sys layer which does not follow this best practice, therefore it is a design issue for MS….
-        Forms
  • Listpage interaction classes: Implement static construct to allow for modifications. It will never be used…
  • My parameter form uses data that is partition independent, so the table is of type Framework: You will get all kinds of warnings of wrong captions in the parameter form.
  • An Action Pane should not be present on a form that is not a list page or other content page. This is an outdated warning, only relevant to AX 2009!
  • A document handler button on an Action Pane should use the label @SYS114630 for its Text property. The code seemed to be targeting the name property and the text property separately  but the check however seems to be asking for two different text property values, which is obviously impossible.
At the end I am still not happy with it: there are other checks such as broken relations, editable primary indexes, obsolete code and missing labels (this can happen when you use TFS, check in the EDT first and next check in the label, the label on the EDT is not corrected).





Источник: http://www.axstart.com/best-practice-checks/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axStart: Performance Guide Blog bot DAX Blogs 0 29.08.2012 14:11
axStart: Get in conrtol with Sharepoint DB names Blog bot DAX Blogs 0 29.08.2012 14:11
axStart: Labels in your AIF message Blog bot DAX Blogs 0 17.05.2011 17:11
axStart: Using base enums in your .net connector Blog bot DAX Blogs 0 30.07.2008 00:05
axStart: Best practice for creating/changing sales/purchase & project reports. Blog bot DAX Blogs 0 23.12.2007 17:51
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 17:15.