glue-d 0.0.2
autoscanning + DI (with dejector fork) + ...
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
This package provides sub packages which can be used individually:
glue-d:indexer - autoscanning implementation
glue-d:utils - Common utilities from glue-d, extracted for the sake of other packages extraction
glue-d:logging - With 'optional' being a sole dependency provides unified logging for compile- and runtime
glue-d:annotations - Annotations = DLang UDAs - the good parts; each annotation needs to be a value, there are extendable facilities to control usage (repetitions, targets, etc) of annotations and to query for them.
glue-d
Bunch of different D-lang tools glued together with some sprinkles on top.
The point is to implement autoscanning, implement some annotation system (both done) then glue together a bunch of other projects: forked dejector for DI, mirror for reflection. Together with that this will become full application context, with runtime features, like autowiring, inheritance inspection and instantiation, as well as compile-time component scan, stereotyping, auto-implementation of interfaces, etc.
Next integrations will probably include vibe-d and maybe some data drivers.
Heavily inspired by Spring.
ToDo
bold are WIP and highest prio
- conceptual
- Java has Beans, what should we call components? something plant-related, "seed" seems alright as "uninitialized component"
- decide whether Glued is a infrastructure or IoC framework
- it its IoC, then DI, etc can stay in this repo
- it its infrastructure, then scan, indexing, logging, etc should stay here, but integrations with vibe-d, etc should be extracted to "starter bundles"
- I think I like IoC variant better, but with minimal external deps; it should be vibe-agnostic (so, components, stereotypes, indexing, etc should stay, but there should be different integrations for vibe-d, hunt, etc)
- figure out packaging - there are different qualifiers for source sets, they
will probably be non-empty for libraries
- figure out how to compose application from annotations pointing to scannables
- figure out naming - what is library, what is "bundle"/"starter", etc; we need some abstraction of library you depend on, add an annotation and autoconfiguration (scanning, defaults, etc)
- figure out configuration and resources facilities
- we will probably string txt = import(f) to read files in compile-time
- we need some way to package binaries like Java resources
- probably something like indexer that reads binaries and text, then generates _resources (or similar) module with enums containing byte[]
- it will probably be integrated with indexer
- some resources need to be deployed with the lib, some need to be present only during the build
- enhancements
- property=method/postcostruct injection
- refactor existing code to use logging
- enhance tests
- new features
- annotations enhancements:
- validation (target - written, unchecked; repeatable(0/1/n))
- @InheritAnnotations(target=aggregate/method/field) - if present, look into superclasses and copy annotations from super
- enhanced resolveCall and friends
- @Param(i/name, annotations...) - repeatable, used to define param-level annotations
- @Seed on non-config method? (that would probably require either merging dejector to this repo, duplicating resolveCall here or moving seed, the whole annotations module and probably some annotation definitions there)
- environment (key-value pairs, value injection)
- config utilities (environment required)
- config inspection
- autobinding structs/enums/simple types
- auto-bound LogSink (config required)
- enhance dejector to allow for aliases and qualifiers
- additional dispatch level - resolver (key -> binding)
- indexing scanned classes (aliases/qualifiers in dejector will be useful, but
not required; implementing in parallel will probably make API more consistent)
- indexing by inheritance hierarchy
- by stereotypes (with runtime-available stereotype instances)
- auto interface binding (require indexing by inheritance and qualifiers+aliases in dejector)
- vibe-d integration
- controller stereotype & autobinding
- repositories?
- Registered by Filip Malczak
- 0.0.2 released 4 years ago
- filipmalczak/glue-d
- Apache 2.0
- Copyright © 2019, Filip Malczak
- Authors:
- Sub packages:
- glue-d:indexer, glue-d:utils, glue-d:logging, glue-d:annotations
- Dependencies:
- glue-d:annotations, glue-d:logging, mirror, glue-dejector, unit-threaded, optional, glue-d:utils
- Versions:
-
0.0.2 2020-Apr-13 0.0.1 2020-Apr-02 ~master 2020-Apr-06 ~dev 2020-May-11 ~#21-value-injection 2020-Jun-29 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
8 downloads total
-
- Score:
- 0.0
- Short URL:
- glue-d.dub.pm