diff --git a/2016-09-03_august-recap.png b/2016-09-03_august-recap.png new file mode 100644 index 0000000..c11707a Binary files /dev/null and b/2016-09-03_august-recap.png differ diff --git a/2016-august-recap-ru.html b/2016-august-recap-ru.html new file mode 100644 index 0000000..06e3937 --- /dev/null +++ b/2016-august-recap-ru.html @@ -0,0 +1,301 @@ + + + + + + + Август 2016 кратко + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+

Август 2016 кратко

+
+ +
Сб 03 Сентябрь 2016 + en + +

2016-august-recap

+

Эта статья описывает самые важные технические детали разработки за август: модуль UIQt, его переработку, новый подход к разработке на основе функционала и его преимущества.

+

Модуль UIQt - это коллекция компонент UI на основе Qt. Сейчас используем лишь для интерфейса редактора.

+

Список компонент модуля UIQt с описанием и размером кода: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
КомпонентаОписаниеРазмер (Б)Размер (%)
1UIQtActionДействия (события) для меню112249
2UIQtAuxИнициализирует Qt и главное окно. Предоставляет поиск виджета по имени для других компонент1551812
3UIQtDockВиджет стыковки52734
4UIQtFileDialogДиалог выбора файла89607
5UIQtMenuМеню для главного окна и на ПКМ (вроде меню по добавлению/копированию/вставке/удалению узла)45663
6UIQtMenuBarПанель меню для главного окна42223
7UIQtRunnerПозволяет запустить QApplication24502
8UIQtThumbnailDialogДиалог с изображениями1861514
9UIQtToolBarПанель инструментов для главого окна42763
10UIQtTreeПредоставляет сложные виджеты вроде Дерева сцены и Редактора свойств5121639
11UIQtWidgetОбщие свойства виджетов вроде фокуса и видимости54654

+

Мы переработали модуль UIQt для замены старого State API на новый Environment API, который позволяет делать то же самое лаконичнее, т.е. упрощает и ускоряет разработку.

+

Переработку начали в июле и должны были закончить в том же месяце. Тем не менеe, работы завершили лишь в августе. Начальный план предполагал, что 28 часов должно хватить, но мы потратили 65. Мы оценивали необходимое время на основе количества вызовов публичного API каждой компоненты. Это хорошо сработало для небольших компонент, т.к. число вызовов их публичного API было примерно равно количеству их функционала, а сам функционал был очень маленький. Однако такой подход полностью провалился для компонеты UIQtTree, составляющей 39% кода модуля UIQt, потому что не было прямой связи между публичным API и функционалом.

+

Новый подход к разработке на основе функционала родился после решения проблем с переработкой UIQtTree. Т.к. Qt использует MVC, компонента UIQtTree состоит из нескольких классов. К тому моменту, когда UIQtTree могла отображать и управлять иерархией элементов, компонента уже имела размер в 27К. Мы заметили, что UIQtTree стала потреблять непомерное количество времени разработки даже для мелкого функционала. Это было явным проявлением количественной сложности.

+

Мы решили разбить UIQtTree на базовую часть и дополнительные. База содержит лишь необходимый минимум кода. Дополнение содержит код, специфичный для данного функционала, и может быть безболезненно изменено. В случае UIQtTree, отображение и управление иерархией элементов - это минимальный функционал, а переименование элементов - это дополнение.

+

Текущий функционал UIQtTree состоит из следующих возможностей:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**№****Функционал****Описание****Размер (Б)****Размер (%)**
1BaseСоздание, изменение, отображение иерархии элементов2696652
2Item open stateХранит состояние свойства скрыто/отображено элемента30946
3Item renamingПереименование элемента34717
4Item selectionПолучение/установка выбранного элемента23385
5Item valueПредоставляет второй и последующие столбцы для элементов, используется Редактором свойств13073
6Item value editingРедактирование значений элемента с помощью стандартного виджета19964
7Item value editing with comboboxРедактирование значений элемента с помощью виджета combobox581911
8Item value editing with spinnerРедактирование значений элемента с помощью виджета spinbox529010
9MenuМеню на ПКМ12482
+ +

Пример файла функционала Menu для UIQtTree: TREE_MENU.

+

Преимущества подхода:

+
    +
  1. Более быстрое чтение/понимание благодаря небольшому размеру
  2. +
  3. Более простое и безболезненное изменение благодаря изолированному коду
  4. +
+

Есть и недостаток: новый подход требует изучения.

+

На этом мы заканчиваем описание самых важных технических деталей разработки за август: модуль UIQt, его переработку, новый подход к разработке на основе функционала и его преимущества.

+

Category: News + +

+ + + +
+
+ + + + + +
+ + + + \ No newline at end of file diff --git a/2016-august-recap.html b/2016-august-recap.html new file mode 100644 index 0000000..0a0ddb1 --- /dev/null +++ b/2016-august-recap.html @@ -0,0 +1,301 @@ + + + + + + + August 2016 recap + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+

August 2016 recap

+
+ +
Сб 03 Сентябрь 2016 + ru + +

2016-august-recap

+

This article explains the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.

+

UIQt module is a collection of UI components backed by Qt. We only use it for Editor UI at the moment.

+

Here is a list of UIQt module components with their description and current code size: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentDescriptionSize (B)Size (%)
1UIQtActionActions (events) for menus112249
2UIQtAuxInitializes Qt and main window. Provides widget resolution by name to other components1551812
3UIQtDockWidget docks52734
4UIQtFileDialogFile selection dialogs89607
5UIQtMenuMenus for main window and pop-ups (like node's add/copy/paste/delete menu)45663
6UIQtMenuBarMenu bar for main window42223
7UIQtRunnerAllows to start QApplication24502
8UIQtThumbnailDialogDialog with thumbnail images1861514
9UIQtToolBarTool bar for main window42763
10UIQtTreeProvides complex widgets like Scene tree and Property browser5121639
11UIQtWidgetCommon widget properties like focus and visibility54654

+

UIQt module refactoring purpose was to replace old State API with new Environment API, which allows to achieve the same functionality with less code, i.e., makes development easier and faster.

+

Refactoring started in July and should have been done the same month. However, we only finished the work in August. Initial plan assumed 28 hours would be enough, but we spent 65 instead. We estimated planned time by relying on the number of public API calls of each component. That worked fine for small components, because the number of their public API calls was roughly equal to the number of their features, and features themselves were very small. However, it totally failed for UIQtTree, which contains 39% of UIQt module code, because there was no direct connection between public API and features.

+

Feature based development approach was born as a result of UIQtTree refactoring struggle. Since Qt uses MVC, UIQtTree component consists of several classes. By the time UIQtTree could display and manage a hierarchy of items, the component was already 27K in size. We noticed UIQtTree started to require abnormal amount of development time even for tiny features. This was an obvious quantitative complexity manifestation.

+

We decided to separate UIQtTree into base part and additional ones. Base would only contain minimal code required by all features. Addition would contain specific feature code and could be safely modified. In the case of UIQtTree, item hierarchy display and modification is the minimal functionality, while item renaming is an addition.

+

Here is a list of current UIQtTree features:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**№****Feature****Description****Size (B)****Size (%)**
1BaseAllows to construct item hierarchy, modify it, and display it2696652
2Item open stateKeeps track of collapsed/expanded item properties30946
3Item renamingAllows to rename an item34717
4Item selectionAllows to get/set selected item23385
5Item valueProvides 2nd and the rest columns for items, used by Property browser13073
6Item value editingAllows to edit item values with a default editor widget19964
7Item value editing with comboboxProvides combobox editor581911
8Item value editing with spinnerProvides spinbox editor529010
9MenuProvides pop-up menu12482
+ +

Here's an example of UIQtTree Menu feature file: TREE_MENU.

+

Benefits of the approach include:

+
    +
  1. Faster code reading/understanding due to small size
  2. +
  3. Easier and safer modification due to isolated code
  4. +
+

There's a drawback, too: new approach requires learning.

+

That's it for the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.

+

Category: News + +

+ + + +
+
+ + + + + +
+ + + + \ No newline at end of file diff --git a/archives.html b/archives.html index 4d6d8a2..fbde7d3 100644 --- a/archives.html +++ b/archives.html @@ -125,6 +125,10 @@ Сб 17 Сентябрь 2016 Live session: 25 September 2016 + + Сб 03 Сентябрь 2016 + August 2016 recap + diff --git a/author/opensource-game-studio2.html b/author/opensource-game-studio2.html index f2369fb..52553fa 100644 --- a/author/opensource-game-studio2.html +++ b/author/opensource-game-studio2.html @@ -227,6 +227,26 @@ It's time to create simple Mahjong solitaire game.

Categ


+ + + +
+

August 2016 recap

+
Сб 03 Сентябрь 2016 + ru + +

2016-august-recap

+

This article explains the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.

+

UIQt module is a collection of UI components backed by Qt. We only use it for Editor UI at the moment.

+

Here is a list ...

Category: News + +

+ + + Read More +
+
+
Page 2 of 2
diff --git a/category/news2.html b/category/news2.html index 7c8efaa..6fddf17 100644 --- a/category/news2.html +++ b/category/news2.html @@ -227,6 +227,26 @@ It's time to create simple Mahjong solitaire game.

Categ


+ + + +
+

August 2016 recap

+
Сб 03 Сентябрь 2016 + ru + +

2016-august-recap

+

This article explains the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.

+

UIQt module is a collection of UI components backed by Qt. We only use it for Editor UI at the moment.

+

Here is a list ...

Category: News + +

+ + + Read More +
+
+
Page 2 of 2
diff --git a/feeds/all.atom.xml b/feeds/all.atom.xml index f50bff9..5c141c7 100644 --- a/feeds/all.atom.xml +++ b/feeds/all.atom.xml @@ -822,4 +822,352 @@ We will publish live session materials later this week.</p> It's time to create simple Mahjong solitaire game.</p>Прямой эфир: 25 сентября 20162016-09-17T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-09-17:september-live-session-announcement-ru.html<iframe width="560" height="315" src="https://www.youtube.com/embed/Y5hOGKcQ8wA" frameborder="0" allowfullscreen></iframe> <p><a href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=%D0%9F%D1%80%D1%8F%D0%BC%D0%BE%D0%B9+%D1%8D%D1%84%D0%B8%D1%80+Open+Game+Studio%3A+%D0%A1%D0%B5%D0%BD%D1%82%D1%8F%D0%B1%D1%80%D1%8C+2016&amp;iso=20160925T13&amp;p1=166&amp;ah=2">25 сентября 2016 в 13:00 MSK</a> мы проведём <a href="https://www.livecoding.tv/kornerr">прямой эфир</a>. -Самое время создать простой пасьянс Маджонг</p> \ No newline at end of file +Самое время создать простой пасьянс Маджонг</p>August 2016 recap2016-09-03T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-09-03:2016-august-recap.html<p><img alt="2016-august-recap" src="http://opengamestudio.org/2016-09-03_august-recap.png" /></p> +<p>This article explains the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.</p> +<p><strong>UIQt module</strong> is a collection of UI components backed by Qt. We only use it for Editor UI at the moment.</p> +<p>Here is a list of UIQt module components with their description and current code size:<table> +<tr> + <th><strong>№</strong></th> + <th><strong>Component</strong></th> + <th><strong>Description</strong></th> + <th><strong>Size (B)</strong></th> + <th><strong>Size (%)</strong></th> +</tr> +<tr> + <td>1</td> + <td>UIQtAction</td> + <td>Actions (events) for menus</td> + <td>11224</td> + <td>9</td> +</tr> +<tr> + <td>2</td> + <td>UIQtAux</td> + <td>Initializes Qt and main window. Provides widget resolution by name to other components</td> + <td>15518</td> + <td>12</td> +</tr> +<tr> + <td>3</td> + <td>UIQtDock</td> + <td>Widget docks</td> + <td>5273</td> + <td>4</td> +</tr> +<tr> + <td>4</td> + <td>UIQtFileDialog</td> + <td>File selection dialogs</td> + <td>8960</td> + <td>7</td> +</tr> +<tr> + <td>5</td> + <td>UIQtMenu</td> + <td>Menus for main window and pop-ups (like node's add/copy/paste/delete menu)</td> + <td>4566</td> + <td>3</td> +</tr> +<tr> + <td>6</td> + <td>UIQtMenuBar</td> + <td>Menu bar for main window</td> + <td>4222</td> + <td>3</td> +</tr> +<tr> + <td>7</td> + <td>UIQtRunner</td> + <td>Allows to start QApplication</td> + <td>2450</td> + <td>2</td> +</tr> +<tr> + <td>8</td> + <td>UIQtThumbnailDialog</td> + <td>Dialog with thumbnail images</td> + <td>18615</td> + <td>14</td> +</tr> +<tr> + <td>9</td> + <td>UIQtToolBar</td> + <td>Tool bar for main window</td> + <td>4276</td> + <td>3</td> +</tr> +<tr> + <td>10</td> + <td>UIQtTree</td> + <td>Provides complex widgets like Scene tree and Property browser</td> + <td>51216</td> + <td>39</td> +</tr> +<tr> + <td>11</td> + <td>UIQtWidget</td> + <td>Common widget properties like focus and visibility</td> + <td>5465</td> + <td>4</td> +</tr> +</table></p> +<p><strong>UIQt module refactoring</strong> purpose was to replace old State API with new Environment API, which allows to achieve the same functionality with less code, i.e., makes development easier and faster.</p> +<p>Refactoring started in July and should have been done the same month. However, we only finished the work in August. Initial plan assumed 28 hours would be enough, but we spent 65 instead. We estimated planned time by relying on the number of public API calls of each component. That worked fine for small components, because the number of their public API calls was roughly equal to the number of their features, and features themselves were very small. However, it totally failed for UIQtTree, which contains 39% of UIQt module code, because there was no direct connection between public API and features.</p> +<p><strong>Feature based development approach</strong> was born as a result of UIQtTree refactoring struggle. Since Qt uses MVC, UIQtTree component consists of several classes. By the time UIQtTree could display and manage a hierarchy of items, the component was already 27K in size. We noticed UIQtTree started to require abnormal amount of development time even for tiny features. This was an obvious <a href="http://kornerr.blogspot.com/2012/04/complexity-conservation-law-complexity.html">quantitative complexity</a> manifestation.</p> +<p>We decided to separate UIQtTree into base part and additional ones. Base would only contain minimal code required by all features. Addition would contain specific feature code and could be safely modified. In the case of UIQtTree, item hierarchy display and modification is the minimal functionality, while item renaming is an addition.</p> +<p>Here is a list of current UIQtTree features:</p> +<table> +<tr> + <th>**№**</th> + <th>**Feature**</th> + <th>**Description**</th> + <th>**Size (B)**</th> + <th>**Size (%)**</th> +</tr> +<tr> + <td>1</td> + <td>Base</td> + <td>Allows to construct item hierarchy, modify it, and display it</td> + <td>26966</td> + <td>52</td> +</tr> +<tr> + <td>2</td> + <td>Item open state</td> + <td>Keeps track of collapsed/expanded item properties</td> + <td>3094</td> + <td>6</td> +</tr> +<tr> + <td>3</td> + <td>Item renaming</td> + <td>Allows to rename an item</td> + <td>3471</td> + <td>7</td> +</tr> +<tr> + <td>4</td> + <td>Item selection</td> + <td>Allows to get/set selected item</td> + <td>2338</td> + <td>5</td> +</tr> +<tr> + <td>5</td> + <td>Item value</td> + <td>Provides 2nd and the rest columns for items, used by Property browser</td> + <td>1307</td> + <td>3</td> +</tr> +<tr> + <td>6</td> + <td>Item value editing</td> + <td>Allows to edit item values with a default editor widget</td> + <td>1996</td> + <td>4</td> +</tr> +<tr> + <td>7</td> + <td>Item value editing with combobox</td> + <td>Provides combobox editor</td> + <td>5819</td> + <td>11</td> +</tr> +<tr> + <td>8</td> + <td>Item value editing with spinner</td> + <td>Provides spinbox editor</td> + <td>5290</td> + <td>10</td> +</tr> +<tr> + <td>9</td> + <td>Menu</td> + <td>Provides pop-up menu</td> + <td>1248</td> + <td>2</td> +</tr> +</table> + +<p>Here's an example of UIQtTree Menu feature file: <a href="https://bitbucket.org/ogstudio-history/mjin/src/0c4cc3c3213f4687c0f3bd6a5426a6054cadd79b/f/TREE_MENU.cpp?at=Studio+0.10&amp;fileviewer=file-view-default">TREE_MENU</a>.</p> +<p><strong>Benefits of the approach</strong> include:</p> +<ol> +<li>Faster code reading/understanding due to small size</li> +<li>Easier and safer modification due to isolated code</li> +</ol> +<p>There's a drawback, too: new approach requires learning.</p> +<p>That's it for the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.</p>Август 2016 кратко2016-09-03T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-09-03:2016-august-recap-ru.html<p><img alt="2016-august-recap" src="http://opengamestudio.org/2016-09-03_august-recap.png" /></p> +<p>Эта статья описывает самые важные технические детали разработки за август: модуль UIQt, его переработку, новый подход к разработке на основе функционала и его преимущества.</p> +<p><strong>Модуль UIQt</strong> - это коллекция компонент UI на основе Qt. Сейчас используем лишь для интерфейса редактора.</p> +<p>Список компонент модуля UIQt с описанием и размером кода:<table> +<tr> + <th><strong>№</strong></th> + <th><strong>Компонента</strong></th> + <th><strong>Описание</strong></th> + <th><strong>Размер (Б)</strong></th> + <th><strong>Размер (%)</strong></th> +</tr> +<tr> + <td>1</td> + <td>UIQtAction</td> + <td>Действия (события) для меню</td> + <td>11224</td> + <td>9</td> +</tr> +<tr> + <td>2</td> + <td>UIQtAux</td> + <td>Инициализирует Qt и главное окно. Предоставляет поиск виджета по имени для других компонент</td> + <td>15518</td> + <td>12</td> +</tr> +<tr> + <td>3</td> + <td>UIQtDock</td> + <td>Виджет стыковки</td> + <td>5273</td> + <td>4</td> +</tr> +<tr> + <td>4</td> + <td>UIQtFileDialog</td> + <td>Диалог выбора файла</td> + <td>8960</td> + <td>7</td> +</tr> +<tr> + <td>5</td> + <td>UIQtMenu</td> + <td>Меню для главного окна и на ПКМ (вроде меню по добавлению/копированию/вставке/удалению узла)</td> + <td>4566</td> + <td>3</td> +</tr> +<tr> + <td>6</td> + <td>UIQtMenuBar</td> + <td>Панель меню для главного окна</td> + <td>4222</td> + <td>3</td> +</tr> +<tr> + <td>7</td> + <td>UIQtRunner</td> + <td>Позволяет запустить QApplication</td> + <td>2450</td> + <td>2</td> +</tr> +<tr> + <td>8</td> + <td>UIQtThumbnailDialog</td> + <td>Диалог с изображениями</td> + <td>18615</td> + <td>14</td> +</tr> +<tr> + <td>9</td> + <td>UIQtToolBar</td> + <td>Панель инструментов для главого окна</td> + <td>4276</td> + <td>3</td> +</tr> +<tr> + <td>10</td> + <td>UIQtTree</td> + <td>Предоставляет сложные виджеты вроде Дерева сцены и Редактора свойств</td> + <td>51216</td> + <td>39</td> +</tr> +<tr> + <td>11</td> + <td>UIQtWidget</td> + <td>Общие свойства виджетов вроде фокуса и видимости</td> + <td>5465</td> + <td>4</td> +</tr> +</table></p> +<p><strong>Мы переработали модуль UIQt</strong> для замены старого State API на новый Environment API, который позволяет делать то же самое лаконичнее, т.е. упрощает и ускоряет разработку.</p> +<p>Переработку начали в июле и должны были закончить в том же месяце. Тем не менеe, работы завершили лишь в августе. Начальный план предполагал, что 28 часов должно хватить, но мы потратили 65. Мы оценивали необходимое время на основе количества вызовов публичного API каждой компоненты. Это хорошо сработало для небольших компонент, т.к. число вызовов их публичного API было примерно равно количеству их функционала, а сам функционал был очень маленький. Однако такой подход полностью провалился для компонеты UIQtTree, составляющей 39% кода модуля UIQt, потому что не было прямой связи между публичным API и функционалом.</p> +<p><strong>Новый подход к разработке на основе функционала</strong> родился после решения проблем с переработкой UIQtTree. Т.к. Qt использует MVC, компонента UIQtTree состоит из нескольких классов. К тому моменту, когда UIQtTree могла отображать и управлять иерархией элементов, компонента уже имела размер в 27К. Мы заметили, что UIQtTree стала потреблять непомерное количество времени разработки даже для мелкого функционала. Это было явным проявлением <a href="http://rsdn.org/article/philosophy/Complexity.xml">количественной сложности</a>.</p> +<p>Мы решили разбить UIQtTree на базовую часть и дополнительные. База содержит лишь необходимый минимум кода. Дополнение содержит код, специфичный для данного функционала, и может быть безболезненно изменено. В случае UIQtTree, отображение и управление иерархией элементов - это минимальный функционал, а переименование элементов - это дополнение.</p> +<p>Текущий функционал UIQtTree состоит из следующих возможностей:</p> +<table> +<tr> + <th>**№**</th> + <th>**Функционал**</th> + <th>**Описание**</th> + <th>**Размер (Б)**</th> + <th>**Размер (%)**</th> +</tr> +<tr> + <td>1</td> + <td>Base</td> + <td>Создание, изменение, отображение иерархии элементов</td> + <td>26966</td> + <td>52</td> +</tr> +<tr> + <td>2</td> + <td>Item open state</td> + <td>Хранит состояние свойства скрыто/отображено элемента</td> + <td>3094</td> + <td>6</td> +</tr> +<tr> + <td>3</td> + <td>Item renaming</td> + <td>Переименование элемента</td> + <td>3471</td> + <td>7</td> +</tr> +<tr> + <td>4</td> + <td>Item selection</td> + <td>Получение/установка выбранного элемента</td> + <td>2338</td> + <td>5</td> +</tr> +<tr> + <td>5</td> + <td>Item value</td> + <td>Предоставляет второй и последующие столбцы для элементов, используется Редактором свойств</td> + <td>1307</td> + <td>3</td> +</tr> +<tr> + <td>6</td> + <td>Item value editing</td> + <td>Редактирование значений элемента с помощью стандартного виджета</td> + <td>1996</td> + <td>4</td> +</tr> +<tr> + <td>7</td> + <td>Item value editing with combobox</td> + <td>Редактирование значений элемента с помощью виджета combobox</td> + <td>5819</td> + <td>11</td> +</tr> +<tr> + <td>8</td> + <td>Item value editing with spinner</td> + <td>Редактирование значений элемента с помощью виджета spinbox</td> + <td>5290</td> + <td>10</td> +</tr> +<tr> + <td>9</td> + <td>Menu</td> + <td>Меню на ПКМ</td> + <td>1248</td> + <td>2</td> +</tr> +</table> + +<p>Пример файла функционала Menu для UIQtTree: <a href="https://bitbucket.org/ogstudio-history/mjin/src/0c4cc3c3213f4687c0f3bd6a5426a6054cadd79b/f/TREE_MENU.cpp?at=Studio+0.10&amp;fileviewer=file-view-default">TREE_MENU</a>.</p> +<p><strong>Преимущества подхода:</strong></p> +<ol> +<li>Более быстрое чтение/понимание благодаря небольшому размеру</li> +<li>Более простое и безболезненное изменение благодаря изолированному коду</li> +</ol> +<p>Есть и недостаток: новый подход требует изучения.</p> +<p>На этом мы заканчиваем описание самых важных технических деталей разработки за август: модуль UIQt, его переработку, новый подход к разработке на основе функционала и его преимущества.</p> \ No newline at end of file diff --git a/feeds/news.atom.xml b/feeds/news.atom.xml index 2b4b641..7a157d1 100644 --- a/feeds/news.atom.xml +++ b/feeds/news.atom.xml @@ -411,4 +411,178 @@ We will publish live session materials later this week.</p> <p>Get ready for <a href="https://www.livecoding.tv/kornerr">live session</a>, it's about to happen in 24 hours!</p>Live session: 25 September 20162016-09-17T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-09-17:september-live-session-announcement.html<iframe width="560" height="315" src="https://www.youtube.com/embed/Y5hOGKcQ8wA" frameborder="0" allowfullscreen></iframe> <p>We will hold <a href="https://www.livecoding.tv/kornerr">live session</a> on <a href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=Open+Game+Studio+September+2016+live+session&amp;iso=20160925T12&amp;p1=37&amp;ah=2">25 September 2016 at 12:00 CEST</a> -It's time to create simple Mahjong solitaire game.</p> \ No newline at end of file +It's time to create simple Mahjong solitaire game.</p>August 2016 recap2016-09-03T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-09-03:2016-august-recap.html<p><img alt="2016-august-recap" src="http://opengamestudio.org/2016-09-03_august-recap.png" /></p> +<p>This article explains the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.</p> +<p><strong>UIQt module</strong> is a collection of UI components backed by Qt. We only use it for Editor UI at the moment.</p> +<p>Here is a list of UIQt module components with their description and current code size:<table> +<tr> + <th><strong>№</strong></th> + <th><strong>Component</strong></th> + <th><strong>Description</strong></th> + <th><strong>Size (B)</strong></th> + <th><strong>Size (%)</strong></th> +</tr> +<tr> + <td>1</td> + <td>UIQtAction</td> + <td>Actions (events) for menus</td> + <td>11224</td> + <td>9</td> +</tr> +<tr> + <td>2</td> + <td>UIQtAux</td> + <td>Initializes Qt and main window. Provides widget resolution by name to other components</td> + <td>15518</td> + <td>12</td> +</tr> +<tr> + <td>3</td> + <td>UIQtDock</td> + <td>Widget docks</td> + <td>5273</td> + <td>4</td> +</tr> +<tr> + <td>4</td> + <td>UIQtFileDialog</td> + <td>File selection dialogs</td> + <td>8960</td> + <td>7</td> +</tr> +<tr> + <td>5</td> + <td>UIQtMenu</td> + <td>Menus for main window and pop-ups (like node's add/copy/paste/delete menu)</td> + <td>4566</td> + <td>3</td> +</tr> +<tr> + <td>6</td> + <td>UIQtMenuBar</td> + <td>Menu bar for main window</td> + <td>4222</td> + <td>3</td> +</tr> +<tr> + <td>7</td> + <td>UIQtRunner</td> + <td>Allows to start QApplication</td> + <td>2450</td> + <td>2</td> +</tr> +<tr> + <td>8</td> + <td>UIQtThumbnailDialog</td> + <td>Dialog with thumbnail images</td> + <td>18615</td> + <td>14</td> +</tr> +<tr> + <td>9</td> + <td>UIQtToolBar</td> + <td>Tool bar for main window</td> + <td>4276</td> + <td>3</td> +</tr> +<tr> + <td>10</td> + <td>UIQtTree</td> + <td>Provides complex widgets like Scene tree and Property browser</td> + <td>51216</td> + <td>39</td> +</tr> +<tr> + <td>11</td> + <td>UIQtWidget</td> + <td>Common widget properties like focus and visibility</td> + <td>5465</td> + <td>4</td> +</tr> +</table></p> +<p><strong>UIQt module refactoring</strong> purpose was to replace old State API with new Environment API, which allows to achieve the same functionality with less code, i.e., makes development easier and faster.</p> +<p>Refactoring started in July and should have been done the same month. However, we only finished the work in August. Initial plan assumed 28 hours would be enough, but we spent 65 instead. We estimated planned time by relying on the number of public API calls of each component. That worked fine for small components, because the number of their public API calls was roughly equal to the number of their features, and features themselves were very small. However, it totally failed for UIQtTree, which contains 39% of UIQt module code, because there was no direct connection between public API and features.</p> +<p><strong>Feature based development approach</strong> was born as a result of UIQtTree refactoring struggle. Since Qt uses MVC, UIQtTree component consists of several classes. By the time UIQtTree could display and manage a hierarchy of items, the component was already 27K in size. We noticed UIQtTree started to require abnormal amount of development time even for tiny features. This was an obvious <a href="http://kornerr.blogspot.com/2012/04/complexity-conservation-law-complexity.html">quantitative complexity</a> manifestation.</p> +<p>We decided to separate UIQtTree into base part and additional ones. Base would only contain minimal code required by all features. Addition would contain specific feature code and could be safely modified. In the case of UIQtTree, item hierarchy display and modification is the minimal functionality, while item renaming is an addition.</p> +<p>Here is a list of current UIQtTree features:</p> +<table> +<tr> + <th>**№**</th> + <th>**Feature**</th> + <th>**Description**</th> + <th>**Size (B)**</th> + <th>**Size (%)**</th> +</tr> +<tr> + <td>1</td> + <td>Base</td> + <td>Allows to construct item hierarchy, modify it, and display it</td> + <td>26966</td> + <td>52</td> +</tr> +<tr> + <td>2</td> + <td>Item open state</td> + <td>Keeps track of collapsed/expanded item properties</td> + <td>3094</td> + <td>6</td> +</tr> +<tr> + <td>3</td> + <td>Item renaming</td> + <td>Allows to rename an item</td> + <td>3471</td> + <td>7</td> +</tr> +<tr> + <td>4</td> + <td>Item selection</td> + <td>Allows to get/set selected item</td> + <td>2338</td> + <td>5</td> +</tr> +<tr> + <td>5</td> + <td>Item value</td> + <td>Provides 2nd and the rest columns for items, used by Property browser</td> + <td>1307</td> + <td>3</td> +</tr> +<tr> + <td>6</td> + <td>Item value editing</td> + <td>Allows to edit item values with a default editor widget</td> + <td>1996</td> + <td>4</td> +</tr> +<tr> + <td>7</td> + <td>Item value editing with combobox</td> + <td>Provides combobox editor</td> + <td>5819</td> + <td>11</td> +</tr> +<tr> + <td>8</td> + <td>Item value editing with spinner</td> + <td>Provides spinbox editor</td> + <td>5290</td> + <td>10</td> +</tr> +<tr> + <td>9</td> + <td>Menu</td> + <td>Provides pop-up menu</td> + <td>1248</td> + <td>2</td> +</tr> +</table> + +<p>Here's an example of UIQtTree Menu feature file: <a href="https://bitbucket.org/ogstudio-history/mjin/src/0c4cc3c3213f4687c0f3bd6a5426a6054cadd79b/f/TREE_MENU.cpp?at=Studio+0.10&amp;fileviewer=file-view-default">TREE_MENU</a>.</p> +<p><strong>Benefits of the approach</strong> include:</p> +<ol> +<li>Faster code reading/understanding due to small size</li> +<li>Easier and safer modification due to isolated code</li> +</ol> +<p>There's a drawback, too: new approach requires learning.</p> +<p>That's it for the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.</p> \ No newline at end of file diff --git a/index2.html b/index2.html index 87c7dc1..db1a0d6 100644 --- a/index2.html +++ b/index2.html @@ -227,6 +227,26 @@ It's time to create simple Mahjong solitaire game.

Categ


+ + + +
+

August 2016 recap

+
Сб 03 Сентябрь 2016 + ru + +

2016-august-recap

+

This article explains the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.

+

UIQt module is a collection of UI components backed by Qt. We only use it for Editor UI at the moment.

+

Here is a list ...

Category: News + +

+ + + Read More +
+
+
Page 2 of 2
diff --git a/pelican/content/articles/2016-09-03_2016-august-recap-ru.md b/pelican/content/articles/2016-09-03_2016-august-recap-ru.md new file mode 100644 index 0000000..046816d --- /dev/null +++ b/pelican/content/articles/2016-09-03_2016-august-recap-ru.md @@ -0,0 +1,197 @@ +Title: Август 2016 кратко +Date: 2016-09-03 00:00 +Category: News +Slug: 2016-august-recap +Lang: ru + +![2016-august-recap][screenshot] + + +Эта статья описывает самые важные технические детали разработки за август: модуль UIQt, его переработку, новый подход к разработке на основе функционала и его преимущества. + +**Модуль UIQt** - это коллекция компонент UI на основе Qt. Сейчас используем лишь для интерфейса редактора. + +Список компонент модуля UIQt с описанием и размером кода: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**№****Компонента****Описание****Размер (Б)****Размер (%)**
1UIQtActionДействия (события) для меню112249
2UIQtAuxИнициализирует Qt и главное окно. Предоставляет поиск виджета по имени для других компонент1551812
3UIQtDockВиджет стыковки52734
4UIQtFileDialogДиалог выбора файла89607
5UIQtMenuМеню для главного окна и на ПКМ (вроде меню по добавлению/копированию/вставке/удалению узла)45663
6UIQtMenuBarПанель меню для главного окна42223
7UIQtRunnerПозволяет запустить QApplication24502
8UIQtThumbnailDialogДиалог с изображениями1861514
9UIQtToolBarПанель инструментов для главого окна42763
10UIQtTreeПредоставляет сложные виджеты вроде Дерева сцены и Редактора свойств5121639
11UIQtWidgetОбщие свойства виджетов вроде фокуса и видимости54654
+ +**Мы переработали модуль UIQt** для замены старого State API на новый Environment API, который позволяет делать то же самое лаконичнее, т.е. упрощает и ускоряет разработку. + +Переработку начали в июле и должны были закончить в том же месяце. Тем не менеe, работы завершили лишь в августе. Начальный план предполагал, что 28 часов должно хватить, но мы потратили 65. Мы оценивали необходимое время на основе количества вызовов публичного API каждой компоненты. Это хорошо сработало для небольших компонент, т.к. число вызовов их публичного API было примерно равно количеству их функционала, а сам функционал был очень маленький. Однако такой подход полностью провалился для компонеты UIQtTree, составляющей 39% кода модуля UIQt, потому что не было прямой связи между публичным API и функционалом. + +**Новый подход к разработке на основе функционала** родился после решения проблем с переработкой UIQtTree. Т.к. Qt использует MVC, компонента UIQtTree состоит из нескольких классов. К тому моменту, когда UIQtTree могла отображать и управлять иерархией элементов, компонента уже имела размер в 27К. Мы заметили, что UIQtTree стала потреблять непомерное количество времени разработки даже для мелкого функционала. Это было явным проявлением [количественной сложности](http://rsdn.org/article/philosophy/Complexity.xml). + +Мы решили разбить UIQtTree на базовую часть и дополнительные. База содержит лишь необходимый минимум кода. Дополнение содержит код, специфичный для данного функционала, и может быть безболезненно изменено. В случае UIQtTree, отображение и управление иерархией элементов - это минимальный функционал, а переименование элементов - это дополнение. + +Текущий функционал UIQtTree состоит из следующих возможностей: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**№****Функционал****Описание****Размер (Б)****Размер (%)**
1BaseСоздание, изменение, отображение иерархии элементов2696652
2Item open stateХранит состояние свойства скрыто/отображено элемента30946
3Item renamingПереименование элемента34717
4Item selectionПолучение/установка выбранного элемента23385
5Item valueПредоставляет второй и последующие столбцы для элементов, используется Редактором свойств13073
6Item value editingРедактирование значений элемента с помощью стандартного виджета19964
7Item value editing with comboboxРедактирование значений элемента с помощью виджета combobox581911
8Item value editing with spinnerРедактирование значений элемента с помощью виджета spinbox529010
9MenuМеню на ПКМ12482
+ +Пример файла функционала Menu для UIQtTree: [TREE_MENU](https://bitbucket.org/ogstudio-history/mjin/src/0c4cc3c3213f4687c0f3bd6a5426a6054cadd79b/f/TREE_MENU.cpp?at=Studio+0.10&fileviewer=file-view-default). + +**Преимущества подхода:** + +0. Более быстрое чтение/понимание благодаря небольшому размеру +0. Более простое и безболезненное изменение благодаря изолированному коду + + + +Есть и недостаток: новый подход требует изучения. + +На этом мы заканчиваем описание самых важных технических деталей разработки за август: модуль UIQt, его переработку, новый подход к разработке на основе функционала и его преимущества. + +[screenshot]: {attach}/images/2016-09-03_august-recap.png diff --git a/pelican/content/articles/2016-09-03_2016-august-recap.md b/pelican/content/articles/2016-09-03_2016-august-recap.md new file mode 100644 index 0000000..b38267e --- /dev/null +++ b/pelican/content/articles/2016-09-03_2016-august-recap.md @@ -0,0 +1,196 @@ +Title: August 2016 recap +Date: 2016-09-03 00:00 +Category: News +Slug: 2016-august-recap +Lang: en + +![2016-august-recap][screenshot] + + +This article explains the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits. + +**UIQt module** is a collection of UI components backed by Qt. We only use it for Editor UI at the moment. + +Here is a list of UIQt module components with their description and current code size: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**№****Component****Description****Size (B)****Size (%)**
1UIQtActionActions (events) for menus112249
2UIQtAuxInitializes Qt and main window. Provides widget resolution by name to other components1551812
3UIQtDockWidget docks52734
4UIQtFileDialogFile selection dialogs89607
5UIQtMenuMenus for main window and pop-ups (like node's add/copy/paste/delete menu)45663
6UIQtMenuBarMenu bar for main window42223
7UIQtRunnerAllows to start QApplication24502
8UIQtThumbnailDialogDialog with thumbnail images1861514
9UIQtToolBarTool bar for main window42763
10UIQtTreeProvides complex widgets like Scene tree and Property browser5121639
11UIQtWidgetCommon widget properties like focus and visibility54654
+ +**UIQt module refactoring** purpose was to replace old State API with new Environment API, which allows to achieve the same functionality with less code, i.e., makes development easier and faster. + +Refactoring started in July and should have been done the same month. However, we only finished the work in August. Initial plan assumed 28 hours would be enough, but we spent 65 instead. We estimated planned time by relying on the number of public API calls of each component. That worked fine for small components, because the number of their public API calls was roughly equal to the number of their features, and features themselves were very small. However, it totally failed for UIQtTree, which contains 39% of UIQt module code, because there was no direct connection between public API and features. + +**Feature based development approach** was born as a result of UIQtTree refactoring struggle. Since Qt uses MVC, UIQtTree component consists of several classes. By the time UIQtTree could display and manage a hierarchy of items, the component was already 27K in size. We noticed UIQtTree started to require abnormal amount of development time even for tiny features. This was an obvious [quantitative complexity](http://kornerr.blogspot.com/2012/04/complexity-conservation-law-complexity.html) manifestation. + +We decided to separate UIQtTree into base part and additional ones. Base would only contain minimal code required by all features. Addition would contain specific feature code and could be safely modified. In the case of UIQtTree, item hierarchy display and modification is the minimal functionality, while item renaming is an addition. + +Here is a list of current UIQtTree features: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**№****Feature****Description****Size (B)****Size (%)**
1BaseAllows to construct item hierarchy, modify it, and display it2696652
2Item open stateKeeps track of collapsed/expanded item properties30946
3Item renamingAllows to rename an item34717
4Item selectionAllows to get/set selected item23385
5Item valueProvides 2nd and the rest columns for items, used by Property browser13073
6Item value editingAllows to edit item values with a default editor widget19964
7Item value editing with comboboxProvides combobox editor581911
8Item value editing with spinnerProvides spinbox editor529010
9MenuProvides pop-up menu12482
+ +Here's an example of UIQtTree Menu feature file: [TREE_MENU](https://bitbucket.org/ogstudio-history/mjin/src/0c4cc3c3213f4687c0f3bd6a5426a6054cadd79b/f/TREE_MENU.cpp?at=Studio+0.10&fileviewer=file-view-default). + +**Benefits of the approach** include: + +0. Faster code reading/understanding due to small size +0. Easier and safer modification due to isolated code + + +There's a drawback, too: new approach requires learning. + +That's it for the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits. + +[screenshot]: {attach}/images/2016-09-03_august-recap.png diff --git a/pelican/content/images/2016-09-03_august-recap.png b/pelican/content/images/2016-09-03_august-recap.png new file mode 100644 index 0000000..c11707a Binary files /dev/null and b/pelican/content/images/2016-09-03_august-recap.png differ