Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

172 lines
7.0KB

  1. <!DOCTYPE html>
  2. <head>
  3. <meta charset="utf-8" />
  4. <!-- Set the viewport width to device width for mobile -->
  5. <meta name="viewport" content="width=device-width" />
  6. <title>Example-driven development</title>
  7. <link rel="stylesheet" href="http://opengamestudio.org/theme/css/normalize.css" />
  8. <link rel="stylesheet" href="http://opengamestudio.org/theme/css/foundation.min.css" />
  9. <link rel="stylesheet" href="http://opengamestudio.org/theme/css/style.css" />
  10. <link rel="stylesheet" href="http://opengamestudio.org/theme/css/pygments.css" />
  11. <script src="http://opengamestudio.org/theme/js/custom.modernizr.js"></script>
  12. <!-- So Firefox can bookmark->"abo this site" -->
  13. <link href="feeds/all.atom.xml" rel="alternate" title="Opensource Game Studio" type="application/atom+xml">
  14. </head>
  15. <body>
  16. <!-- Nav Bar -->
  17. <nav>
  18. <!-- Show menu items and pages -->
  19. <div class="row">
  20. <div class="large-12 columns top-bar">
  21. <h1><a href="http://opengamestudio.org">Opensource Game Studio</a></h1>
  22. </div>
  23. </div>
  24. <div class="row top-menu">
  25. <div class="large-12 columns">
  26. <a href="/pages/games.html" class="menu-button secondary">Games</a>
  27. <a href="/pages/education.html" class="menu-button secondary">Education</a>
  28. <a href="/pages/about.html" class="menu-button secondary">About</a>
  29. </div>
  30. </div>
  31. </nav>
  32. <!-- End Nav -->
  33. <!-- Main Page Content and Sidebar -->
  34. <div class="row">
  35. <!-- Main Blog Content -->
  36. <div class="large-9 columns">
  37. <article>
  38. <header>
  39. <h3 class="article-title"><a href="http://opengamestudio.org/example-driven-development.html" rel="bookmark"
  40. title="Permalink to Example-driven development">Example-driven development</a></h3>
  41. </header>
  42. <h6 class="subheader" title="2018-06-27T00:00:00+03:00">Ср 27 июня 2018
  43. <a class="button secondary small translation-button" href="http://opengamestudio.org/example-driven-development-ru.html">ru</a>
  44. </h6> <p><img alt="Screenshot" src="http://opengamestudio.org/2018-06-27-example-driven-development.png"></p>
  45. <p>This article explains how the third OpenSceneGraph cross-platform example
  46. opened our eyes to example-driven development.</p>
  47. <p><strong>2018-08 EDIT</strong>: the third example has been renamed to the fourth one due to
  48. the reasons described in the <a href="http://opengamestudio.org/examples-and-dependencies.html">next article</a>.</p>
  49. <p><strong>The third OpenSceneGraph cross-platform example</strong></p>
  50. <p>The third OpenSceneGraph cross-platform example explains how to implement
  51. <a href="https://github.com/OGStudio/openscenegraph-cross-platform-examples/tree/master/04.RemoteDebugging">remote debugging across platforms</a>. This example is less about
  52. OpenSceneGraph and more about different platforms.</p>
  53. <p>Remote anything nowadays assumes the use of HTTP(s) over TCP/IP. Thus, the
  54. first idea was to embed HTTP server into an application and let HTTP clients
  55. interact with the server. However, serving HTTP across all platforms is
  56. complicated:</p>
  57. <ul>
  58. <li>desktops have firewalls</li>
  59. <li>mobiles have restrictions on background processes</li>
  60. <li>web browsers are HTTP clients by design</li>
  61. </ul>
  62. <p>That's why we decided to create a mediator between debugged application and UI.
  63. <a href="https://github.com/OGStudio/debug-broker">Debug broker</a>, a small Node.js application, became that mediator.
  64. Debug broker uses no external dependencies, so it's easy to run virtually
  65. anywhere. Also, since debug broker is a server application, you can configure
  66. it once and use it for any number of applications.</p>
  67. <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
  68. because we wanted these tools to be accessible from anywhere with no prior
  69. installation. This decision limited us to web browser solution. Providing
  70. any sort of desktop application would incur additional installation and
  71. maintenance effort, which would only complicate the tools.</p>
  72. <p><strong>Example-driven development establishment</strong></p>
  73. <p>Once the third example was implemented, we realized how important and
  74. beneficial it is to develop new features outside the main project:</p>
  75. <ul>
  76. <li>the main project is freed from excessive commit noise</li>
  77. <li>a new feature is publicly shared for everyone to learn, criticize, and improve</li>
  78. </ul>
  79. <p>When we publicly share our knowledge:</p>
  80. <ul>
  81. <li>we must create documentation for everyone (including ourselves later) to understand what's going on</li>
  82. <li>we must not use hacks because that would break your trust in us</li>
  83. </ul>
  84. <p>From now on, all new features like input handling, Mahjong layout loading,
  85. resource caching, etc. are going to be first implemented as examples.
  86. We call this example-driven development.</p>
  87. <p>That's it for explaining how the third OpenSceneGraph cross-platform example
  88. opened our eyes to example-driven development.</p>
  89. <p class="subheader">Category: <a href="http://opengamestudio.org/category/news.html">News</a>
  90. </p>
  91. </article>
  92. </div>
  93. <!-- End Main Content -->
  94. <!-- Sidebar -->
  95. <aside class="large-3 columns">
  96. <!--k
  97. <h5 class="sidebar-title">Site</h5>
  98. <ul class="side-nav">
  99. <li><a href="http://opengamestudio.org/archives.html">Archives</a>
  100. <li><a href="http://opengamestudio.org/tags.html">Tags</a>
  101. <li><a href="http://opengamestudio.org/feeds/all.atom.xml" rel="alternate">Atom feed</a></li>
  102. </ul>
  103. <h5 class="sidebar-title">Categories</h5>
  104. <ul class="side-nav">
  105. <li><a href="http://opengamestudio.org/category/news.html">News</a></li>
  106. </ul>
  107. -->
  108. <h5 class="sidebar-title">Ads</h5>
  109. <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  110. <!-- ogs2 -->
  111. <ins class="adsbygoogle"
  112. style="display:block"
  113. data-ad-client="ca-pub-4473792248813084"
  114. data-ad-slot="9024247127"
  115. data-ad-format="auto"></ins>
  116. <script>
  117. (adsbygoogle = window.adsbygoogle || []).push({});
  118. </script>
  119. </aside> <!-- End Sidebar -->
  120. </div> <!-- End Main Content and Sidebar -->
  121. <!-- Footer -->
  122. <footer class="row">
  123. <div class="large-12 columns">
  124. <hr />
  125. <div class="row">
  126. <div class="large-7 columns">
  127. <p>Proudly powered by <a href="http://getpelican.com">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.</p>
  128. </div>
  129. </div>
  130. </div>
  131. <script type="text/javascript">
  132. var _gaq = _gaq || [];
  133. _gaq.push(['_setAccount', 'UA-3773114-1']);
  134. _gaq.push(['_trackPageview']);
  135. (function() {
  136. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  137. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  138. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  139. })();
  140. </script>
  141. </footer>