Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

140 rindas
6.0KB

  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. <div id="header">
  79. <strong id="title">Open Game Studio</strong>
  80. <a href="../../en/news/index.html">News</a>
  81. <a href="../../en/game/index.html">Games</a>
  82. <a href="../../en/tool/index.html">Tools</a>
  83. <a href="../../en/page/about.html">About</a>
  84. <div id="lang">
  85. <a href="../../en/news/example-driven-development.html">EN</a>
  86. <a href="../../ru/news/example-driven-development.html">RU</a>
  87. </div>
  88. </div>
  89. <center>
  90. <h1>In the news...</h1>
  91. <div class="news_item">
  92. <h2 class="news_item_title">
  93. <a href="example-driven-development.html">Example-driven development</a>
  94. </h2>
  95. <p class="news_item_date">
  96. 2018-06-27 00:00
  97. </p>
  98. <div class="news_item_contents">
  99. <p><img src="../../images/2018-06-27-example-driven-development.png" alt="Debug broker" /></p>
  100. <p>This article explains how the third OpenSceneGraph cross-platform example opened our eyes to example-driven development.</p>
  101. <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>
  102. <p><strong>The third OpenSceneGraph cross-platform example</strong></p>
  103. <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>
  104. <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>
  105. <p>However, serving HTTP across all platforms is complicated:</p>
  106. <ul>
  107. <li>desktops have firewalls</li>
  108. <li>mobiles have restrictions on background processes</li>
  109. <li>web browsers are HTTP clients by design</li>
  110. </ul>
  111. <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>
  112. <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>
  113. <p><strong>Example-driven development establishment</strong></p>
  114. <p>Once the third example was implemented, we realized how important and beneficial it is to develop new features outside the main project:</p>
  115. <ul>
  116. <li>the main project is freed from excessive commit noise</li>
  117. <li>a new feature is publicly shared for everyone to learn, criticize, and improve</li>
  118. </ul>
  119. <p>When we publicly share our knowledge:</p>
  120. <ul>
  121. <li>we must create documentation for everyone (including ourselves later) to understand what's going on</li>
  122. <li>we must not use hacks because that would break your trust in us</li>
  123. </ul>
  124. <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>
  125. <p>That's it for explaining how the third OpenSceneGraph cross-platform example opened our eyes to example-driven development.</p>
  126. </div>
  127. </div>
  128. <div id="footer">
  129. The site has been generated by <a href="http://opengamestudio.org/pskov">PSKOV</a>
  130. from <a href="http://github.com/ogstudio/site-opengamestudio">this source code</a>.
  131. The site is hosted by <a href="https://pages.github.com">GitHub Pages</a>.
  132. </div>
  133. </center>
  134. </body>
  135. </html>