{"id":30219032,"url":"https://github.com/gcaufield/MonkeyInject","last_synced_at":"2025-08-14T07:05:16.250Z","repository":{"id":56644748,"uuid":"294938951","full_name":"gcaufield/MonkeyInject","owner":"gcaufield","description":"A dependency injection framework for Connect IQ","archived":true,"fork":false,"pushed_at":"2023-04-04T04:51:42.000Z","size":51,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-03-18T01:47:28.749Z","etag":null,"topics":["connect-iq","garmin","garmin-sdk","injection","injection-framework","monkey-c"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gcaufield.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-12T12:25:20.000Z","updated_at":"2023-09-02T17:03:39.000Z","dependencies_parsed_at":"2022-08-15T22:31:23.316Z","dependency_job_id":null,"html_url":"https://github.com/gcaufield/MonkeyInject","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/gcaufield/MonkeyInject","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcaufield%2FMonkeyInject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcaufield%2FMonkeyInject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcaufield%2FMonkeyInject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcaufield%2FMonkeyInject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gcaufield","download_url":"https://codeload.github.com/gcaufield/MonkeyInject/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcaufield%2FMonkeyInject/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270378861,"owners_count":24573459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["connect-iq","garmin","garmin-sdk","injection","injection-framework","monkey-c"],"created_at":"2025-08-14T07:03:05.485Z","updated_at":"2025-08-14T07:05:16.230Z","avatar_url":"https://github.com/gcaufield.png","language":"Shell","funding_links":[],"categories":["Tools"],"sub_categories":["Older resources"],"readme":"# MonkeyInject\n\nA dependency injection framework for ConnectIQ Applications\n\nBind Classes to interfaces, declare your dependencies, and let MonkeyInject\nhandle building.\n\n# Usage\n\n## Modules\n\n`Modules` are where you bind your interfaces to concrete classes. Create your\nown Module class and extend the `MonkeyInject.Module` that is included in the\nlibrary.\n\nModules `bind` interfaces, described by symbols to ClassDefs.\n\n```mc\nclass ConcreteWriteable {\n  function write(){\n    // Do some work.\n  }\n}\n\nclass MyModule extends MonkeyInject.Module {\n  function initialize() {\n    Module.initialize();\n\n    bind(:Writeable)          // Bind the Writeable Interface\n      .to(ConcreteWriteable); // To the ConcreteWriteable class\n  }\n}\n```\n\nBindings support different scopes, to determine when a new instance of the\nconcreate class will be created. Read about Bindings in the Wiki (todo).\n\n## Kernel\n\nThe entry point for the library is the `Kernel` object. Instantiate the kernel,\nload modules, and call `build()`. The framework will then handle building all of\nthe appropriate dependencies and will return a fully initialized implementation\nof the interface requested.\n\n```mc\nclass MyApp extends Application.App {\n  private var _writeable;\n  private var _kernel;\n\n  function initialize() {\n    _kernel = new MonkeyInject.Kernel();\n    _kernel.load(new MyModule());\n\n    _writeable = _kernel.build(:Writeable);\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcaufield%2FMonkeyInject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcaufield%2FMonkeyInject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcaufield%2FMonkeyInject/lists"}