问题描述
在delphi下编写客户端 - 服务器应用程序的最佳方式是什么?我知道有一个DataSnap技术,但它不是专业版。你有任何经验,你可以分享吗?
这是一个相当广泛的问题,因为它可以取决于你的数据库决策。
DataSnap真的允许N-Tier解决方案,如果你寻找的客户端服务器你有
大多数一切你需要在专业版本取决于数据库选择。
对于客户端服务器:
有几个框架可用,他们都遵循相同的模式。
> Query - >(Optional Provider - > TClientDataset) - > TDataSource - > Visual Control
DBX
- TSqlConnection - 连接到数据库
- TSqlQuery - 针对DB生成单向数据集的查询
- TSqlStoredProc - 对数据库执行存储过程
ADO
$ b b
- TAdoConnection - 连接到数据库
- TAdoQuery - 针对DB生成双向数据集的查询
公共组件
- TClientDataSet - 方向
- TDatasetProvider - 获取其他数据集并将数据绑定到TClientDataset
- TDataSource - 将数据集绑定到数据感知控件
根据数据库选择,还有其他几个选项。
询问N层(中层)类型解决方案
对于N层
N-Tier架构是当客户端与中间层通信然后与服务器通信时。
商业选项(需要支付额外的$$)
- (DataAbstract的一部分,但可以单独使用)
我个人不知道任何免费或开源的选项,虽然我怀疑一些存在。
What is the best way to write a client-server application under delphi? I know there's a DataSnap technology, but it's not in Professional version. Do You have any experience that You can share?
This is fairly wide open question, as it can depend on your database decision.
DataSnap really allows for N-Tier solutions, if your looking for Client Server you havemost everything you need in the professional version depending on the Database Choice.
For Client Server:
Client Server Architecture is when the Client communicates directly with the server.
There are several frameworks available they all follow the same pattern.
DB Connection -> Query -> (Optional Provider -> TClientDataset) -> TDataSource -> Visual Control
DBX
- TSqlConnection - Connects to the Database
- TSqlQuery - Query against DB producing uni-directional Dataset
- TSqlStoredProc - Executes Stores Procedures against DB
ADO
- TAdoConnection - Connects to Database
- TAdoQuery - Query against DB producing Bi-Directional Dataset
Common Components
- TClientDataSet - In Memory dataset that is bi-directional
- TDatasetProvider - Takes other datasets and ties the data to TClientDataset
- TDataSource - Ties a Dataset to a data-aware visual control
There are several other options available depending on Database Choice.
However, you seem to be asking about N-Tier (Middle-Tier) type solutions
For N-Tier
N-Tier architecture is when the Client communicates with Middle Tier that then communicates with the Server. It's referred to N-Tier as you have option to have multiple Middle Tiers or Application Servers.
Commercial Options (Required additional $$ to be spent)
- DataSnap
- DataAbstract
- RemObjects SDK (Part of DataAbstract but can be used by itself)
- KBMMw
- Midware
I personally don't know of any free or open source options, although I suspect some exist.
这篇关于客户端 - 服务器应用程序写在delphi中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!