[wirebox] sharing code between coldspring and wirebox - possible?

Stupid question time :slight_smile:

So my coding world is laid out like

  1. One big FW/1 app
  2. Two new ColdBox apps

When the FW/1 app was developed at the same time they created a large ‘common’ library with the thought they could re-use a lot of things across many apps. This is mainly a large collection of CFCs which are called from the FW/1 app via ColdSpring.

I haven’t tried this yet but I’m wondering how feasible it would be to share this code base between the two projects?

I’m guessing the inject=“securityGateway” type things needed by Wirebox are going to break but I haven’t tried this yet. Was just curious if maybe someone had done anything similar maybe when migrating between the two frameworks?

I’d rather not create two ‘common’ repositories for each framework but if that’s the only solution we can do that with the thought we’ll eventually re-write everything in Coldbox/Wirebox at some point.

Thanks
Jim

You can use the non-intrusive approach which is to create mappings for every CFC that specifies the dependencies without modifying the actual CFCs. Wirebox has a programmatic DSL you can use which is certainly more work IMO than the annotation-style injection but makes using Wirebox possible without modifying the CFCs.

If sounds like those CFCs would be a nice candidate for a module in the future.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com