Client-Server application writing in delphi

前端 未结 7 1460
盖世英雄少女心
盖世英雄少女心 2021-02-11 01:19

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

7条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-11 01:39

    Since a few months ago I stopped to implement new projects with this kind of architecture (n-tiers, 2-tiers) Based on Delphis and specific DB technologies. I believe these architecture are not future prof. The architecture i'm using now is a 2-pier one. The server is a normal HTTP server. It works as app server* and optionally provides a web client. Developing clients in Delphi it's harder but worth it. Since specif tools are not available as the ones offered for DB connections, I use indy to send and receive data from the HTTP server. I do a GET request to fetch data and then parse it to show it on the GUI. Then a POST request to update or insert new data. The HTTP server handle all business logic :-)

    Apart of being future prof, this architecture is cheaper and platform independent. And if you analyze it, this is the same architecture used by most mobile apps. So, if you plan to write a mobile client in the future, consider developing the app server with script languages (Python, PHP, Ruby, etc.).

    That's my recommendation. Don't forget: Great things require great commitments!

    • An App Server is a service which provides your application (thin client) with with an interface to get and send data. Also it control the business logic. Your application don't care about DB's or controlling record relations and data constrains. That's all is transparently done by the app server.

提交回复
热议问题