Skip to content

Let's get rid of static field based singletons #17

@hurelhuyag

Description

@hurelhuyag

There is static field based singletons at template files. Those singletons making hard to write tests. In my view, We should get rid of those static fields. Generally it's bad design choice.

I have found some of those:
https://github.com/vlingo/vlingo-xoom/blob/master/src/main/resources/codegen/java/JournalProvider.ftl#L26
https://github.com/vlingo/vlingo-xoom/blob/master/src/main/resources/codegen/java/ProjectionDispatcherProvider.ftl#L22
https://github.com/vlingo/vlingo-xoom/blob/master/src/main/resources/codegen/java/StateStoreProvider.ftl#L34

Event this. I don't see any particular reason to declare static field here.
https://github.com/vlingo/vlingo-xoom/blob/master/src/main/resources/codegen/java/DefaultBootstrap.ftl#L20

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions