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.

example-driven-development.html 6.9KB

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