I need some explanation on the architecture of a RO DataSnap Server.
I already had a look at the DataSnap sample, but don’t understand it fully.
DataSnap Server:
What is IAppServer1 = interface(IAppServer) and why do I need that?
Is that interface always empty?
Can I place more than 1 TDataSetProviders in one TRODataSnapModule?
Why do I have to write the interface name ‘IAppServer1’ as string in the TROClassFactory.Create constructor?
4.1) Must that name always match the declared interface?
This example illustrates the use of different the TRODataSnapModule simultaneously in the server application. If you use only one TRODataSnapModule, you can skip using IAppServer1/IAppServer2
Interface isn’t empty - it’s descendant of IAppServer so it inherits all properties and methods of parent interface.
Yes, you can. see Providers property of TRODataSnapModule.
Client also passes interface name as string so server compares these strings and finds correspondent Invoker.
more complicated way is declare your service as Code-First service. I’ve attached updated DataSnap sample: testcase.zip (78.2 KB).
look at TDataSnapServerDataForm.Now method