I've just installed the Transact SDK and set up a project in IDEA.
The Transact SDK introduces packages but I was wondering what is the best structure to make it all work seamlessly.
I've created a couple of dummy services to explore the SDK.
I would also like to use a 'common' package, similar to the same concept in Fluent SDK. With a Fluent project you could add the common folder to the project as a source folder and IDEA would recognize it and handle the common classes. You then "include" the files in the service-def.json and it all works when you deploy the service to TM.
However, with the Transact SDK I find that does not behave properly. I had to use an import statement, like "import company.svc.common", to make the required common class available within a particular service. But I suspect that would fail a type-check as the package is not white listed in TM.
I planned to have one IDEA project for all our services (that worked well with Fluent), but need to set the package structure so that each service is self contained, but has access to the common classes.
One possible structure would be:
But that structure has the access/visibility problem.
Any ideas would be greatly appreciated.
I worked out a structure that appears to work, at least at this early stage of working with the Transact SDK.
I have the following:
That seems to work; IDEA can recognize all the common classes and the package structure appears to be working as expected.
Hope that is of some help to someone.