Forum OpenACS Development: Response to Difference between Service and Application Package

Hi Peter,

Apps and services are essentially the same, and can be treated the same at a nuts and bolts level.  The difference is how they are used.  Rarely, if ever, is a service mounted to the site map.  It is there to define data model and API for other services and applications to draw upon.  Applications can do the same, but they are also intended to be mountable.  Application/service hybrids (i.e. apps that provide a bunch of API or data model intended to be generally useful) should be tagged as applications, or split into multiple packages.

I can't account for the problems sharing procedures between apps that you described beyond a caution that very strange things can happen when using a combination of watching files in the APM admin interface and restarting AOLServer.  If, for example, you have a working procedure in a Tcl library and you accidentally insert a bug that causes a parse error in the Tcl library (like a missing close brace), reloading the file through the APM will not cause the procedure to disappear (the old procedure didn't get overloaded, so why should it?)... it will remain in its old state.  You won't even know (unless you've got an open tail -f on the log file) that the reload failed.  If you were to start wondering why your changes don't seem to get sourced, and resort to restarting aolserver, you'd discover that the proc disappears entirely.  This can generate some real head-scratchers on occasion, and has tripped me up more times than it should have given the fact that I already know about the problem.