如何使用delphi结合分散式和 移动式开发
1个回答
2017-11-16 · 知道合伙人互联网行家
关注
展开全部
使用Delphi结合分散式和
移动式开发
Gordon Li
5/17 成都, 5/19 上海
5/29 台北, 5/30 台中, 5/31 高雄
6/5 雅加达
Agenda
?DataSnap XE2
?Mobile Connector
?结合分散式和移动式开发
? XE2 Update 4
?Q&A
分散式系统(回到COM/DCOM的时代)
COM/DCOM/COM+(Midas)
伺服器
注册Type Informatio
注册Type Informatio
OLE Automatio
OLE Automatio
注册COM/DCOM
分散式系统
DataSnap Server
不需注册
不需注册
JSON/REST
JSON/REST
不需注册
JSON/REST
JSON/REST
JSON/REST
DataSnap XE2
? 从Midas/DataSnap到DataSnap XE2
– Protocol : COM/DCOM/COM+ ---? TCP/HTTP
– 呼叫方式 : Private call
---? REST
– 资料封装 : OLE Automatio
---? JSON
– 平台
: Windows Only
---? 跨平台
– 便利度 : 复杂,困难
---? 简易
– 执行效率 : 二位元资料封装
---? 字串
? DataSnap XE2保留IAppServer介面
– 可把Midas系统升级到DataSnap XE2
从Midas/DataSnap到DataSnap XE2
? TRemoteDatModule(COM/DCOM/COM+) – {$M+}
– IAppServer = interface(IDispatch)
– ['{1AEFCC20-7A24-11D2-98B0-C69BEB4B5B6D}']
– function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant
MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant):
OleVariant; safecall
– function AS_GetRecords(const ProviderName: WideString; Count: Integer; out RecsOut:
Integer
Options: Integer; const CommandText: WideString
var Params: OleVariant; var OwnerData: OleVariant): OleVariant; safecall
– function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant
afecall
– function AS_GetProviderNames: OleVariant; safecall
– function AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant):
OleVariant; safecall
– function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType:
Integer
var OwnerData: OleVariant): OleVariant; safecall
– procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString
var Params: OleVariant; var OwnerData: OleVariant); safecall
– end
– {$M-}
从Midas/DataSnap到DataSnap XE2
? TDSProviderDataModuleAdapter = class(TDSAdapterClass) //DataSnap XE2
? private
? FProviderDataModule: TProviderDataModule
? public
? constructor Create(AdapteeInstance: TObject); override
? destructor Destroy; override
? // IAppServerFastCall interface methods.
? //
? function AS_ApplyUpdates(const ProviderName: WideString; DeltaStream: OleVariant
MaxErrors: Integer; out ErrorCount: Integer; OwnerDataStream: TDBXStreamValue): OleVariant
? function AS_GetRecords(const ProviderName: WideString; Count: Integer
out RecsOut: Integer; Options: Integer; const CommandText: WideString
ParamReader: TDBXStreamValue; OwnerDataStream: TDBXStreamValue): OleVariant
? function AS_DataRequest(const ProviderName: WideString
DataStream: OleVariant): OleVariant
? function AS_GetProviderNames: string
? function AS_GetParams(const ProviderName: WideString
OwnerDataStream: TDBXStreamValue): OleVariant
? function AS_RowRequest(const ProviderName: WideString; RowStream: OleVariant
RequestType: Integer; OwnerDataStream: TDBXStreamValue): OleVariant
? procedure AS_Execute(const ProviderName, CommandText: WideString
ParamReader: TDBXStreamValue; OwnerDataStream: TDBXStreamValue)
roperty ProviderDataModule: TProviderDataModule read FProviderDataModule write FProviderDataModule
? end
从Midas/DataSnap到DataSnap XE2
? {$IFDEF MSWINDOWS}
? {$MethodInfo ON}
? TRemoteDataModule = class(TProviderDataModule, IAppServer)
? private
? FLock: TObject
? protected
? class procedure UpdateRegistry(Register: Boolean; co
移动式开发
Gordon Li
5/17 成都, 5/19 上海
5/29 台北, 5/30 台中, 5/31 高雄
6/5 雅加达
Agenda
?DataSnap XE2
?Mobile Connector
?结合分散式和移动式开发
? XE2 Update 4
?Q&A
分散式系统(回到COM/DCOM的时代)
COM/DCOM/COM+(Midas)
伺服器
注册Type Informatio
注册Type Informatio
OLE Automatio
OLE Automatio
注册COM/DCOM
分散式系统
DataSnap Server
不需注册
不需注册
JSON/REST
JSON/REST
不需注册
JSON/REST
JSON/REST
JSON/REST
DataSnap XE2
? 从Midas/DataSnap到DataSnap XE2
– Protocol : COM/DCOM/COM+ ---? TCP/HTTP
– 呼叫方式 : Private call
---? REST
– 资料封装 : OLE Automatio
---? JSON
– 平台
: Windows Only
---? 跨平台
– 便利度 : 复杂,困难
---? 简易
– 执行效率 : 二位元资料封装
---? 字串
? DataSnap XE2保留IAppServer介面
– 可把Midas系统升级到DataSnap XE2
从Midas/DataSnap到DataSnap XE2
? TRemoteDatModule(COM/DCOM/COM+) – {$M+}
– IAppServer = interface(IDispatch)
– ['{1AEFCC20-7A24-11D2-98B0-C69BEB4B5B6D}']
– function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant
MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant):
OleVariant; safecall
– function AS_GetRecords(const ProviderName: WideString; Count: Integer; out RecsOut:
Integer
Options: Integer; const CommandText: WideString
var Params: OleVariant; var OwnerData: OleVariant): OleVariant; safecall
– function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant
afecall
– function AS_GetProviderNames: OleVariant; safecall
– function AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant):
OleVariant; safecall
– function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType:
Integer
var OwnerData: OleVariant): OleVariant; safecall
– procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString
var Params: OleVariant; var OwnerData: OleVariant); safecall
– end
– {$M-}
从Midas/DataSnap到DataSnap XE2
? TDSProviderDataModuleAdapter = class(TDSAdapterClass) //DataSnap XE2
? private
? FProviderDataModule: TProviderDataModule
? public
? constructor Create(AdapteeInstance: TObject); override
? destructor Destroy; override
? // IAppServerFastCall interface methods.
? //
? function AS_ApplyUpdates(const ProviderName: WideString; DeltaStream: OleVariant
MaxErrors: Integer; out ErrorCount: Integer; OwnerDataStream: TDBXStreamValue): OleVariant
? function AS_GetRecords(const ProviderName: WideString; Count: Integer
out RecsOut: Integer; Options: Integer; const CommandText: WideString
ParamReader: TDBXStreamValue; OwnerDataStream: TDBXStreamValue): OleVariant
? function AS_DataRequest(const ProviderName: WideString
DataStream: OleVariant): OleVariant
? function AS_GetProviderNames: string
? function AS_GetParams(const ProviderName: WideString
OwnerDataStream: TDBXStreamValue): OleVariant
? function AS_RowRequest(const ProviderName: WideString; RowStream: OleVariant
RequestType: Integer; OwnerDataStream: TDBXStreamValue): OleVariant
? procedure AS_Execute(const ProviderName, CommandText: WideString
ParamReader: TDBXStreamValue; OwnerDataStream: TDBXStreamValue)
roperty ProviderDataModule: TProviderDataModule read FProviderDataModule write FProviderDataModule
? end
从Midas/DataSnap到DataSnap XE2
? {$IFDEF MSWINDOWS}
? {$MethodInfo ON}
? TRemoteDataModule = class(TProviderDataModule, IAppServer)
? private
? FLock: TObject
? protected
? class procedure UpdateRegistry(Register: Boolean; co
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询