Web application wizard
OpenAsync ) // The following line will be executed // after the connection asynchronously established PerformSomeRequestToXDataServer () OnConnect and OnError events
![web application wizard web application wizard](https://2.bp.blogspot.com/-RESAv7C44HI/Wh87mFmeAqI/AAAAAAAAAA4/UXPiqLUmISc5HucojbHChZ3J-25Dd0j-QCLcBGAs/s1600/Laptop_replair_imac_macbook_vancouver.jpg)
This will ensure the next line will be executed after OpenAsync is complete, even though it's executed asynchronously: await ( XDataWebConnection1. Requests to XData server, you should use OnConnect and OnError events:įrom TMS Web Core 1.6 and on, you can also use the OpenAsync method using the await keyword. To make sure the component is connected and you can start performing Connected := True // The following line will NOT work because connection // is still being established asynchronously PerformSomeRequestToXDataServer () In the following code,įor example, the second line will probably not work because theĬonnection is probably not yet finished: XDataWebConnection1. If it expects the connection to be established.
WEB APPLICATION WIZARD CODE
This means that you can't be sure when the connection will be performed,Īnd any code after Connected is set to true is not guaranteed to work However, for web applications, you must beĪware that all connections are performed asynchronously. Then you perform the connection setting Connected property to true: DataWebConnection1. Inspector, including testing the connection. Simply drop theĬomponent in the form set its URL property to the root URL of XDataĮven though the examples above and below will show setting propertiesįrom code, since TXDataWebConnection is available at design-time, youĬan set most of the properties described here at design-time in object TXDataWebConnection is the first (and key) component you need to use toĬonnect to XData server from TMS Web Core applications. Setting Up the Connection with TXDataWebConnection
WEB APPLICATION WIZARD HOW TO
The following topics cover in details how to use TMS XData Web-Clientįramework and make use of TMS XData servers from TMS Web CoreĪpplications. Of use, and a dataset-like optional approach that simply feels home toĭelphi users but still uses modern REST/JSON requests behind the scenes. Support with visual components, a TXDataWebClient component thatĪbstracts low-level HTTP/JSON requests in a very easy and high-level way Matter of minutes, but is also provides the most complete and high-levelĬlient-side framework for TMS Web Core, including Delphi design-time It not onlyĪllows you to create REST API servers from an existing database in an TMS XData is the ideal back-end solution for TMS Web Core. HTTP(S), and send/receive data in JSON format.
![web application wizard web application wizard](https://i.ytimg.com/vi/oL_wfxvpeuQ/maxresdefault.jpg)
Through a REST API Server - the web client performs requests using With, and such data needs to be retrieved from a server (and eventually Stand alone in the browser, in many scenarios it needs data to work It allows you toĬreate pure HTML/JS Single-Page-Applications that runs in your browser.Įven though the web application generated by TMS Web Core can run 100% Framework for building web applications using Delphi.