25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2018-06-27-example-driven-development.md 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. Title: Example-driven development
  2. Date: 2018-06-27 00:00
  3. Category: News
  4. Slug: example-driven-development
  5. Lang: en
  6. ![Screenshot][screenshot]
  7. This article explains how the third OpenSceneGraph cross-platform example
  8. opened our eyes to example-driven development.
  9. **The third OpenSceneGraph cross-platform example**
  10. The third OpenSceneGraph cross-platform example explains how to implement
  11. [remote debugging across platforms][osgcpe-03]. This example is less about
  12. OpenSceneGraph and more about different platforms.
  13. Remote anything nowadays assumes the use of HTTP(s) over TCP/IP. Thus, the
  14. first idea was to embed HTTP server into an application and let HTTP clients
  15. interact with the server. However, serving HTTP across all platforms is
  16. complicated:
  17. * desktops have firewalls
  18. * mobiles have restrictions on background processes
  19. * web browsers are HTTP clients by design
  20. That's why we decided to create a mediator between debugged application and UI.
  21. [Debug broker][debug-broker], a small Node.js application, became that mediator.
  22. Debug broker uses no external dependencies, so it's easy to run virtually
  23. anywhere. Also, since debug broker is a server application, you can configure
  24. it once and use it for any number of applications.
  25. Both [debug UI][debug-ui] and [debug broker][debug-broker] use JavaScript
  26. because we wanted these tools to be accessible from anywhere with no prior
  27. installation. This decision limited us to web browser solution. Providing
  28. any sort of desktop application would incur additional installation and
  29. maintenance effort, which would only complicate the tools.
  30. **Example-driven development establishment**
  31. Once the third example was implemented, we realized how important and
  32. beneficial it is to develop new features outside the main project:
  33. * the main project is freed from excessive commit noise
  34. * a new feature is publicly shared for everyone to learn, criticize, and improve
  35. When we publicly share our knowledge:
  36. * we must create documentation for everyone (including ourselves later) to understand what's going on
  37. * we must not use hacks because that would break your trust in us
  38. From now on, all new features like input handling, Mahjong layout loading,
  39. resource caching, etc. are going to be first implemented as examples.
  40. We call this example-driven development.
  41. That's it for explaining how the third OpenSceneGraph cross-platform example
  42. opened our eyes to example-driven development.
  43. [screenshot]: {attach}/images/2018-06-27-example-driven-development.png
  44. [osgcpe-03]: https://github.com/OGStudio/openscenegraph-cross-platform-examples/tree/master/03.RemoteDebugging
  45. [debug-broker]: https://github.com/OGStudio/debug-broker
  46. [debug-ui]: https://github.com/OGStudio/debug-ui