Home > Back-end >  How to write a small server for Ajax provides real-time data?
How to write a small server for Ajax provides real-time data?

Time:09-19

The front desk with ajax from the background data and draw lines show, the background to write a servlet using delphi7 (only know D7), data is also very simple, is the stock code, name, price, volume of a structure, such as how to implement?

CodePudding user response:

Can through the establishment of a DataSnap server,

CodePudding user response:

With ajax server using Delphi7 too inconvenient, recommend DataSnap REST architecture service program, here is a more detailed example: https://edn.embarcadero.com/article/41305, the latest version of the DataSnap REST Application creation process, please refer to bring help files, Delphi cabin also has a DataSnap Demo, in the Samples \ Object Pascal \ DataSnap,

CodePudding user response:

reference 1st floor lyhoo163 response:
can through the establishment of a DataSnap server,

It supports the ajax get the data? Can you give the simplest case?

CodePudding user response:

refer to the second floor santiaodahan response:
with ajax server using Delphi7 too inconvenient, recommend DataSnap REST architecture service program, here is a more detailed example: https://edn.embarcadero.com/article/41305, the latest version of the DataSnap REST Application creation process, please refer to bring help files, Delphi cabin also has a DataSnap Demo, under the Samples \ Object Pascal \ DataSnap

D7 support? As if must XE

CodePudding user response:

DataSnap REST Application can only XE,

CodePudding user response:

D7 DatyaSnap under, you can return through XML format data,

CodePudding user response:

reference 4 floor realside response:
Quote: refer to the second floor santiaodahan response:

With ajax server using Delphi7 too inconvenient, recommend DataSnap REST architecture service program, here is a more detailed example: https://edn.embarcadero.com/article/41305, the latest version of the DataSnap REST Application creation process, please refer to bring help files, Delphi cabin also has a DataSnap Demo, under the Samples \ Object Pascal \ DataSnap

D7 support? As if must XE

Version does not support these components need to XE +, ajax is through XML or json via the HTTP protocol and server interaction, you can use the way of CGI, the Demos, the Internet, there are some examples of CGI, under CGIs

CodePudding user response:

http://blog.csdn.net/pcwe2002/article/details/54606778
This is d7 server-side example, d7 by writing a plug-in to front ajax restful services, can also be stored procedures provide directly

CodePudding user response:

refer to the eighth floor pcwe2002 response:

http://blog.csdn.net/pcwe2002/article/details/54606778This is d7 server-side example, d7 by writing a plug-in to front ajax restful services, also can be directly stored procedures provide

Saw, this is not D7? Also need to add the plugin. Pas, where there is this?

CodePudding user response:

This example is d7, there is a corresponding example d7 project
  • Related