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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 27.11.2019, 23:12   #1  
Blog bot is offline
Blog bot
Участник
 
23,922 / 805 (74) +++++++
Регистрация: 28.10.2006
Navigate Into Success: Control Add-ins Supercharged – Separating concerns
Источник: http://vjeko.com/control-add-ins-sup...ting-concerns/
==============

If you know me, you know that I am obsessed with separation of concerns. It’s the core principle of good design, and good design is what I am always striving for.

The original Control Add-ins Supercharged example showcased how most of non-web developers (a category into which most of AL developers squarely fall) would develop a control add-in: just stuff everything into a single script, and all is fine. But it isn’t fine, if for nothing else, then because it can be done much better.

My next example is showing how you might attempt to solve the separation of concerns issue. The first step you may take is splitting the single script file into multiple files. For example, you may separate UI logic from state management logic, from AL-to-JavaScript interface logic. However, the example I am presenting today is yet an example of a good solution. It’s in fact a yet another “don’t do it this way” example. There are a few more wrong steps I want to intentionally take before I start solving problems for real, one by one.

The primary issue that my second repo (branch 01-split-js) addresses is that it separates front-end concerns as much as reasonably possible. However, as you will see in the repo description, once you attempt to separate logic into multiple JavaScript files, the separation of concerns isn’t really achieved, and there are a few files where you still have a mish-mash of UI, data, state, events, precisely those things that shouldn’t go together. The problem is, whatever way you attempt to solve it, you soon realize that the solution is just not good enough. As long as you are attempting to generate and maintain your UI using pure DOM, it will be impossible to achieve any decent level of separation of concerns.

So, head over to https://github.com/vjekob/supercharg...ee/01-split-js and check out the repo description (and content) and see for yourself why this approach is better than the previous one, but still far from good.

See you soon with the next example.

Read this post at its original location at http://vjeko.com/control-add-ins-sup...ting-concerns/, or visit the original blog at http://vjeko.com. 5e33c5f6cb90c441bd1f23d5b9eeca34The post Control Add-ins Supercharged – Separating concerns appeared first on Vjeko.com.




Источник: http://vjeko.com/control-add-ins-sup...ting-concerns/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Navigate Into Success: Control Add-ins Supercharged – Kicking off Blog bot NAV: Blogs 0 27.11.2019 06:24
Navigate Into Success: Using Font Awesome icons in control add-ins Blog bot NAV: Blogs 0 29.05.2019 19:14
Navigate Into Success: Abusing Images property to load HTML in control add-ins Blog bot NAV: Blogs 0 12.12.2018 00:17
Navigate Into Success: Deploying control add-ins during development in NAV 2016 Blog bot Dynamics CRM: Blogs 0 13.11.2015 10:00
Navigate Into Success: Goodies from the Control Add-ins session at NAV TechDays 2014 Blog bot Dynamics CRM: Blogs 0 21.11.2014 19:24
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 21:42.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.