You are not logged in.
Pages: 1
Hello,
My question: this is possible to filter search result on the server side and return to the client only records
which satisfy the conditions of the server logic.
In other word this is like per record authentication
Offline
Do you mean per record query for the remote ORM?
Yes of course!
http://synopse.info/files/html/Synopse% … ml#TITL_36
If you want to "hide" some data from the client, the best, safest and easier is to write an interface-based service, and some DTO objects.
See http://synopse.info/files/html/Synopse% … ml#TITL_63
Offline
Thank you, I need hide some data and try now to research available ways.
Now I try to test Sample 20, but when start server from this sample I'm got error:
HttpSetServiceConfiguration failed: Access denied (5)
This error occured in unit SynCrtSock:
class function THttpApiServer.AddUrlAuthorize(const aRoot, aPort: RawByteString;
Https: boolean; const aDomainName: RawByteString; OnlyDelete: boolean): string;
Oh, with admin right this is works, thanks )
Last edited by EgorovAlex (2015-02-24 07:35:35)
Offline
This is possible to return from Service the TObjectList?
My idea - send request to the service with parameters and service should return list of TSQLRecord
Offline
I found, that this is possible with DTO, thanks to your comment above
and now I have this classes:
TSQLMyRec = class(TSQLRecord)
TDTOItem = class(TCollectionItem)
TDTOCollection = class(TInterfacedCollection)
In my situation TDTOItem is exact copy of TSQLMyRec
there is no way to avoid duplication and use single code for this classes?
Offline
If I undersnand right - I can use one interface IInvokable with many methods,
which is the best way - one interface with full server functionality
or interfaces per specific job?
Which way more faster and correct?
Offline
Please take a look at the "SOLID principles", e.g. in our documentation.
See http://synopse.info/files/html/Synopse% … ml#TITL_47
You should better follow the "interface segregation" principle.
http://synopse.info/files/html/Synopse% … #TITLE_318
Offline
Pages: 1