CodeFirst (?) and ServerSide function calling using *_ServerAcces and *_Intf

Hi,

is it somehow possible to use the Access-Units to utilize the same comfort for access to the functions for the server like it is possible for the clients? If I include both Code-First client-units into the Server-Projects the Serialization/Deserialization gets confused because Objects are declared twice (e.g. TableRequestInfoArray -> once in the generated *_Intf.pas and once more in DataAbstract4_Intf. In the end the server mixes both up and returns such strange errors like

class “TableRequestInfo” does not descend from “TableRequestInfo”

I’m thinking of something like a *_ServerSideAcces.pas, is this possible?

Thanks,
Peter

Hello

We actually plan to introduce something that will make it easier to call service methods on the server itself. Please note that service methods are nothing more than a usual servce methods. If the service method doesn’t use sessions then it can be called as simple as

(new ServiceClass()).ServiceMethod();

Proper service activation is required if the session data is actually needed or if some additional actions are performed when the service activated or deacivated.

Still the best approach is to strictly separate business logic code and service code, so service methods will look like

[ServiceMethod]
public void ServiceMethod()
{
    this._businessObject.SomeMethod();
}

Regards

1 Like