thenativeweb / node-cqrs-domain

Node-cqrs-domain is a node.js module based on nodeEventStore that. It can be very useful as domain component if you work with (d)ddd, cqrs, eventdenormalizer, host, etc.
http://cqrs.js.org/pages/domain.html
MIT License
269 stars 57 forks source link

Support for generic default tree structure #117

Open aehtiopicus opened 6 years ago

aehtiopicus commented 6 years ago

This is not an issue but i wanted to propose a runtime tree definition.

When there are lots of commands it gets harder and harder to write/maintain the file structure and in most cases it is only needed a basic tree structure like the exposed in node-cqrs example.

Is there a way to enhance the library to support a runtime tree definition?

adrai commented 6 years ago

not right now, but open fur the suggestion... feel free to make a PR, so we can continue to discuss...

aehtiopicus commented 6 years ago

I managed to enhance the domain.js to load additional domains which are previously generated in a programmatically wey.
I am afraid that the code might not be useful but what i did Is to get the generated tree in the init function store it and then re run the first and third async block (from init) changing the domainPath and appending the new aggregators to the stored variable before attachLookupFunctions

That it make sense???

adrai commented 6 years ago

And this works for you? Should this async blocks be exposed?

aehtiopicus commented 6 years ago

If you want to check it it is in my fork.

adrai commented 6 years ago

Is it private?