Stateful functions and modules

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Stateful functions and modules

danp
Hi, 

What is the preferred way to expose functions (FunctionTypes) between modules?

For example lets say i have the following maven modules:

-> common
-> statistics
-> persister
-> tradematching

and I have some FunctionTypes in common and persister module that should be reach
from all modules.

common module is included everywhere so I thought about creating 
a helper class, CallableFunctions, and there specify the FunctionTypes that can 
be called from all modules. Is this the right approach or is there a better way?

Regards
Dan
Reply | Threaded
Open this post in threaded view
|

Re: Stateful functions and modules

Igal Shilman
Hi Dan,

Having a class that defines only the function types indeed makes sense, this would lower the coupling between the (maven) module that contains the function implementation and the (maven) module that uses it. 
You can peek here for example: 


Igal.

On Saturday, January 4, 2020, Dan Pettersson <[hidden email]> wrote:
Hi, 

What is the preferred way to expose functions (FunctionTypes) between modules?

For example lets say i have the following maven modules:

-> common
-> statistics
-> persister
-> tradematching

and I have some FunctionTypes in common and persister module that should be reach
from all modules.

common module is included everywhere so I thought about creating 
a helper class, CallableFunctions, and there specify the FunctionTypes that can 
be called from all modules. Is this the right approach or is there a better way?

Regards
Dan
Reply | Threaded
Open this post in threaded view
|

Re: Stateful functions and modules

danp
Ok, good. Thanks for your response.

/Dan

Den sön 5 jan. 2020 11:52Igal Shilman <[hidden email]> skrev:
Hi Dan,

Having a class that defines only the function types indeed makes sense, this would lower the coupling between the (maven) module that contains the function implementation and the (maven) module that uses it. 
You can peek here for example: 


Igal.

On Saturday, January 4, 2020, Dan Pettersson <[hidden email]> wrote:
Hi, 

What is the preferred way to expose functions (FunctionTypes) between modules?

For example lets say i have the following maven modules:

-> common
-> statistics
-> persister
-> tradematching

and I have some FunctionTypes in common and persister module that should be reach
from all modules.

common module is included everywhere so I thought about creating 
a helper class, CallableFunctions, and there specify the FunctionTypes that can 
be called from all modules. Is this the right approach or is there a better way?

Regards
Dan