"Local" Web Services
Of course the obvious integration point for such an architecture is web services, which clearly is not ideally suited for adding snippets of code or for having a bunch of internal methods that call each other and share the same dataset. What is needed is a method to have a web service that is treated like a local method call, much like in the CORBA days there was a way to do a local IIOP call.
The concept of Local Web Services is simple - procedural code that has XML Schema defined inputs and outputs. If Local Web Services that are calling each other are written in the same language and running in the same address space, they can simply call each other without having to do any type mapping, there will simply be a layer of indirection.
If Local Web Services are written in different languages and/or running in different address spaces, they go through an XML Schema translation mapping to call each other. And if a Local Web Services need to become a remotable web service, they can easily be upleveled into a real web service since they are already using XML Schema defined inputs and outputs.
The benefit is that all of the code now uses the same development paradigm and it can be easily implemented as a local call, local call to another process, or a remotable call. And it fits in very well into a world where a service-oriented application is defined by declarative XML.