Applet solution packages allow developers to bundle together a series of individual applet PAK files into a single file. There are a variety of reasons you may want to do this:
It ensures that any dependencies your applet requires are present on the target system when the solution is deployed.
It allows one single SanteDB deployment to support multiple user interfaces which can be selectively subscribed to by clients.
It prevents tampering by allowing the bundling of a single pak file which is signed with your publishing key and verified at startup in the SanteDB service.
Applet solution packages are described using a solution XML file and composed from a series of PAK files. The process for compiling and creating an applet solution is simple:
Write your applet like you normally would
Create a package manifest file
Compile your applets (see Packaging Applets)
Compose the applet packages into a single solution file
An applet solution manifest is really just a point to other applets which are composed. The format of the solution manifest is illustrated below:
<AppletManifest xmlns="http://santedb.org/applet"><info id="santedb.sample.sln" version="220.127.116.11"><icon>/org.santedb.core/img/icon.png</icon><name lang="en">SanteDB Sample</name><author>SanteSuite Contributors</author><dependency id="org.santedb.core" version="18.104.22.168"/><dependency id="org.santedb.uicore" version="22.214.171.124"/><dependency id="org.santedb.bicore" version="126.96.36.199"/><dependency id="org.santedb.config" version="188.8.131.52"/><dependency id="org.santedb.config.init" version="184.108.40.206"/><dependency id="org.santedb.i18n.en" version="220.127.116.11"/><dependency id="org.santedb.sample" version="18.104.22.168"/></info></AppletManifest>
In this example, only the org.santedb.sample package needs to be written, the rest of the applets would simply need their pak files in the directory while composing.
Once you are ready to distribute your applet solution you use the sdb-pakr command (the same as used to package your applet).
pakman --compile --source=.\ -o org.santedb.sample.pak --installpakman --compose --source=santedb.sample.sln.xml -o santedb.sample.sln.pak
The generated pak file contains static copies of the referenced pak files as well as a package manifest.