25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

example-driven-development.html 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. .news_item
  19. {
  20. background: #FFFFFF;
  21. width: 720px;
  22. padding: 1em;
  23. margin-top: 2em;
  24. margin-bottom: 2em;
  25. border: 1px solid #E0E0E0;
  26. text-align: left;
  27. }
  28. .news_item_contents
  29. {
  30. color: #444;
  31. line-height: 1.5em;
  32. }
  33. .news_item_date
  34. {
  35. margin-bottom: 2em;
  36. color: #aaa;
  37. }
  38. body
  39. {
  40. background: #FAFAFA;
  41. }
  42. code, pre
  43. {
  44. font-family: monospace, serif;
  45. font-size: 1em;
  46. color: #7f0a0c;
  47. }
  48. figure
  49. {
  50. margin: 0px;
  51. padding: 0px;
  52. }
  53. img
  54. {
  55. width: 720px;
  56. }
  57. html
  58. {
  59. font-family: sans-serif;
  60. }
  61. a
  62. {
  63. color: #3A91CB;
  64. text-decoration: none;
  65. }
  66. #lang
  67. {
  68. float: right;
  69. }
  70. figcaption
  71. {
  72. color: #aaa;
  73. }
  74. table
  75. {
  76. border-collapse: collapse;
  77. }
  78. table, th, td
  79. {
  80. border: 1px solid #aaa;
  81. padding: 0.5em;
  82. margin-top: 0.5em;
  83. margin-bottom: 0.5em;
  84. }
  85. </style>
  86. </head>
  87. <body>
  88. <center>
  89. <div id="header">
  90. <a href="../../en/news/index.html">News</a>
  91. <a href="../../en/page/games.html">Games</a>
  92. <a href="../../en/page/about.html">About</a>
  93. <div id="lang">
  94. <a href="example-driven-development.html">EN</a>
  95. <a href="../../ru/news/example-driven-development.html">RU</a>
  96. </div>
  97. </div>
  98. <h1>In the news</h1>
  99. <div class="news_item">
  100. <h2 class="news_item_title">
  101. <a href="example-driven-development.html">Example-driven development</a>
  102. </h2>
  103. <p class="news_item_date">
  104. 2018-06-27 00:00
  105. </p>
  106. <div class="news_item_contents">
  107. <figure>
  108. <img src="../../images/2018-06-27-example-driven-development.png" alt="Debug broker" /><figcaption>Debug broker</figcaption>
  109. </figure>
  110. <p>This article explains how the third OpenSceneGraph cross-platform example opened our eyes to example-driven development.</p>
  111. <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>
  112. <p><strong>The third OpenSceneGraph cross-platform example</strong></p>
  113. <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>
  114. <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>
  115. <p>However, serving HTTP across all platforms is complicated:</p>
  116. <ul>
  117. <li>desktops have firewalls</li>
  118. <li>mobiles have restrictions on background processes</li>
  119. <li>web browsers are HTTP clients by design</li>
  120. </ul>
  121. <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>
  122. <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>
  123. <p><strong>Example-driven development establishment</strong></p>
  124. <p>Once the third example was implemented, we realized how important and beneficial it is to develop new features outside the main project:</p>
  125. <ul>
  126. <li>the main project is freed from excessive commit noise</li>
  127. <li>a new feature is publicly shared for everyone to learn, criticize, and improve</li>
  128. </ul>
  129. <p>When we publicly share our knowledge:</p>
  130. <ul>
  131. <li>we must create documentation for everyone (including ourselves later) to understand what’s going on</li>
  132. <li>we must not use hacks because that would break your trust in us</li>
  133. </ul>
  134. <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>
  135. <p>That’s it for explaining how the third OpenSceneGraph cross-platform example opened our eyes to example-driven development.</p>
  136. </div>
  137. </div>
  138. </center>
  139. </body>
  140. </html>