Adding Remoting SDK functions to a Data Abstract Server in .NET

I am confused on how you add a Remoting SDK function to a Data Abstract server. The reason is I need to implement file upload and some other special functions which is beyond the scope of Data Abstract’s SQL table focus. I have an RODL for doing these functions in a pure Remoting SDK server but can’t figure out how you add the RODL functionality to an existing Data Abstract server. Any sort of example or step-by-step would be greatly appreciated.

Hello

Every Data Abstract server uses Remoting SDK as a transport layer. So in that terms Data Abstract server is a Remoting SDK server as well.

Adding a new service / methods in this case is exactly the same as it would be done for a plain Remoting SDK server: one just need to define and implement new services and/or service operations.

Services and operations can be defined using 2 different approaches: via RODL or directly via code.

Newly created Data Abstract server projects use the latter approach: they have the services defined via code.

Before continue to read please take a look at these 2 articles:

As you can see all you need to do to add a new service to your DA server is to add a new class to it and to start the project. After that you’ll see this new service in the server RODL:

[Service] 
public class SampleService : RemObjects.SDK.Server.Service 
{ 
    [ServiceMethod] 
    public string DoSomething(string someValue) 
    { 
        return "No Result"; 
    } 
} 

Or you can add additional methods to the Login or Data services just by adding there methods marked with the corresponding attribute:

    [ServiceMethod] 
    public string DoSomething(string someValue) 
    { 
        return "No Result"; 
    } 

Please note that in most cases it is better to define your methods in a separate service. This would allow to
a) Clearly separate concerns of custom code and base Data Abstract services code
b) Clients using these additional methods won’t have to reference Data Abstract assemblies
c) Avoid unnecessary overhead of Data Abstract service activation. Note that one of the steps of the Data Service activation process (performed on every incoming request to this service) is opening a database connection

Hope that helps

1 Like