1. Michael Granger
  2. Strelka
  3. Issues
Issue #6 new

Change the convention for apps to live under bin/ instead of data/

Michael Granger
repo owner created an issue

Currently, apps are loaded via bin/strelka from the apps directory of a gem's data directory.

I think we should consider making them proper binaries under bin/ instead.

Pros/cons:

  • PRO: Executable code living under data/ is counter-intuitive.
  • PRO: Stripping out the discovery part greatly reduces complexity, facilitates doing away with the inheritance requirement (ala #4), and generally makes Strelka less esoteric.
  • CON: The bin/strelka tool provides some bootstrapping for apps that would have to either be explicitly added to each application, made part of App.run, or factored out into a separate utility method.
  • CON: If apps live under data/, they can be assumed to be safely loaded via Kernel.load to support discovery, inheritance via Strelka.App(), etc. However, if the convention moves to bin/, inheritance can be supported more conventionally by moving the bulk of the app to a class under lib/ that the binary just loads and executes. Discovery could be implemented using Gem.find_files('strelka/discover') or similar.

Comments (0)

  1. Log in to comment