Publishing Engine Programmer's Guide > PTC Arbortext Publishing > The Publishing Framework > How Arbortext PE server uses the Publishing Framework
  
How Arbortext PE server uses the Publishing Framework
When Arbortext PE server publishing is enabled on a client, either Arbortext Editor or Arbortext Publishing Engine Interactive, the publishing framework actually runs twice: once on the client and once on the server. On the client, the framework performs processing that results in a request being transmitted to the server. On the server, the framework performs the publishing operation and produces results that are transmitted back to the client.
This approach means that the specialized processing that follows running the content pipeline, such as file clean-up and execution of one or more content compilers, only needs to be coded in the post-process callback of the outer layer of the framework. The code can easily determine whether it’s running on the client or the server by checking the global parameter array entry e3.serverComposition, which is undefined (0,'', false) on the client and 1 on the server.
The following diagram illustrates the publishing framework processing performed on the client in preparation for sending a publishing request to the Arbortext PE server.
This diagram illustrates the publishing framework, containing the outer layer processing, the inner layer processing, and includes the processing performed by the PE Client Composer. The request is then sent to the Arbortext PE server.
The following diagram illustrates the publishing framework processing of an Arbortext Publishing Engine request on the server.
This diagram illustrates the publishing framework as managed by the Server Composer, containing the outer layer processing, the inner layer processing. The request is then sent back to the client.