You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
6.1KB

  1. <!DOCTYPE html>
  2. <html>
  3. <meta charset="utf-8">
  4. <head>
  5. <style>
  6. #header
  7. {
  8. background: #2BA6E3;
  9. padding: 0.7em;
  10. text-align: left;
  11. }
  12. #header a
  13. {
  14. color: white;
  15. text-decoration: none;
  16. padding: 0.5em 1em 0.5em 1em;
  17. }
  18. #lang
  19. {
  20. float: right;
  21. }
  22. .news_item
  23. {
  24. background: #FFFFFF;
  25. width: 720px;
  26. padding: 1em;
  27. margin-top: 2em;
  28. margin-bottom: 2em;
  29. border: 1px solid #E0E0E0;
  30. text-align: left;
  31. }
  32. .news_item_contents
  33. {
  34. color: #444;
  35. line-height: 1.5em;
  36. }
  37. .news_item_date
  38. {
  39. margin-bottom: 2em;
  40. color: #aaa;
  41. }
  42. html
  43. {
  44. font-family: sans-serif;
  45. }
  46. body
  47. {
  48. background: #FAFAFA;
  49. }
  50. code, pre
  51. {
  52. font-family: monospace, serif;
  53. font-size: 1em;
  54. color: #7f0a0c;
  55. }
  56. img
  57. {
  58. width: 720px;
  59. }
  60. a
  61. {
  62. color: #3A91CB;
  63. }
  64. table
  65. {
  66. border-collapse: collapse;
  67. }
  68. table, th, td
  69. {
  70. border: 1px solid #aaa;
  71. padding: 0.5em;
  72. margin-top: 0.5em;
  73. margin-bottom: 0.5em;
  74. }
  75. </style>
  76. </head>
  77. <body>
  78. <script data-goatcounter="https://services.opengamestudio.org:443/count" async src="//services.opengamestudio.org:443/count.js"></script>
  79. <div id="header">
  80. <strong id="title">Open Game Studio</strong>
  81. <a href="../../en/news/index.html">News</a>
  82. <a href="../../en/game/index.html">Games</a>
  83. <a href="../../en/tool/index.html">Tools</a>
  84. <a href="../../en/page/about.html">About</a>
  85. <div id="lang">
  86. <a href="../../en/news/example-driven-development.html">EN</a>
  87. <a href="../../ru/news/example-driven-development.html">RU</a>
  88. </div>
  89. </div>
  90. <center>
  91. <h1>In the news...</h1>
  92. <div class="news_item">
  93. <h2 class="news_item_title">
  94. <a href="example-driven-development.html">Example-driven development</a>
  95. </h2>
  96. <p class="news_item_date">
  97. 2018-06-27 00:00
  98. </p>
  99. <div class="news_item_contents">
  100. <p><img src="../../images/2018-06-27-example-driven-development.png" alt="Debug broker" /></p>
  101. <p>This article explains how the third OpenSceneGraph cross-platform example opened our eyes to example-driven development.</p>
  102. <p><strong>2018-08 EDIT</strong>: the third example has been renamed to the fourth one due to the reasons described in the <a href="examples-and-dependencies.html">next article</a>.</p>
  103. <p><strong>The third OpenSceneGraph cross-platform example</strong></p>
  104. <p>The third OpenSceneGraph cross-platform example explains how to implement <a href="https://github.com/OGStudio/openscenegraph-cross-platform-examples/tree/master/04.RemoteDebugging">remote debugging across platforms</a>. This example is less about OpenSceneGraph and more about different platforms.</p>
  105. <p>Remote anything nowadays assumes the use of HTTP(s) over TCP/IP. Thus, the first idea was to embed HTTP server into an application and let HTTP clients interact with the server.</p>
  106. <p>However, serving HTTP across all platforms is complicated:</p>
  107. <ul>
  108. <li>desktops have firewalls</li>
  109. <li>mobiles have restrictions on background processes</li>
  110. <li>web browsers are HTTP clients by design</li>
  111. </ul>
  112. <p>That's why we decided to create a mediator between debugged application and UI. <a href="https://github.com/OGStudio/debug-broker">Debug broker</a>, a small Node.js application, became that mediator. Debug broker uses no external dependencies, so it's easy to run virtually anywhere. Also, since debug broker is a server application, you can configure it once and use it for any number of applications.</p>
  113. <p>Both <a href="https://github.com/OGStudio/debug-ui">debug UI</a> and <a href="https://github.com/OGStudio/debug-broker">debug broker</a> use JavaScript because we wanted these tools to be accessible from anywhere with no prior installation. This decision limited us to web browser solution. Providing any sort of desktop application would incur additional installation and maintenance effort, which would only complicate the tools.</p>
  114. <p><strong>Example-driven development establishment</strong></p>
  115. <p>Once the third example was implemented, we realized how important and beneficial it is to develop new features outside the main project:</p>
  116. <ul>
  117. <li>the main project is freed from excessive commit noise</li>
  118. <li>a new feature is publicly shared for everyone to learn, criticize, and improve</li>
  119. </ul>
  120. <p>When we publicly share our knowledge:</p>
  121. <ul>
  122. <li>we must create documentation for everyone (including ourselves later) to understand what's going on</li>
  123. <li>we must not use hacks because that would break your trust in us</li>
  124. </ul>
  125. <p>From now on, all new features like input handling, Mahjong layout loading, resource caching, etc. are going to be first implemented as examples. We call this example-driven development.</p>
  126. <p>That's it for explaining how the third OpenSceneGraph cross-platform example opened our eyes to example-driven development.</p>
  127. </div>
  128. </div>
  129. <div id="footer">
  130. The site has been generated by <a href="http://opengamestudio.org/pskov">PSKOV</a>
  131. from <a href="http://github.com/ogstudio/site-opengamestudio">this source code</a>.
  132. The site is hosted by <a href="https://pages.github.com">GitHub Pages</a>.
  133. </div>
  134. </center>
  135. </body>
  136. </html>