Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

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

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