Wednesday, May 12, 2021, 12:00 noon, CDT (UTC−5:00)
Different ways to access and display 4D data – Christophe Flament – Ponga Consulting, Inc.
4D is constantly evolving adding new concepts and features. As 4D developers, we have to keep up. Here is an opportunity to learn some of those new concepts.
In this demo, Christophe Flament will demonstrate how to access 4D data via HTTP requests, displaying it using ORDA: collection / object. He will also explain some of the code techniques we can now use with 4D v18 R6.
Using a project database (Library-Demo) adapted from a v17 demo, Christophe will explain how you can display data into a form with a listbox loading it via an HTTP request. This concept is useful, for example, if you want to create a Volume Desktop application that will run independently with no local data/ getting it from the 4D Server via HTTP request calls instead. The same concept is also applicable to PHP code loading the 4D data into a web interface or using the Postman application for testing.
The presentation will explain:
- How to make an HTTP request call passing query parameters as an object
- How to detect a JSON request during the On Web Connection event
- How to query data via ORDA and load it into a collection (EntitySelection.toCollection)
- Transferring the response as an object during the On Web Connection event
- Displaying the response as a collection into a listbox
Some of the latest commands available with 4D v18 R6 will be demonstrated:
- The new method declaration for parameters
- Using of 4D classes
- Using of ORDA with [$table] & [$field]
- The Storage command replacing interprocess variables
- The FORM Event command
- The WEB Server as an object – how to start and stop it
A 4D Project on Github with some code examples will be made available.
This meeting is being hosted on Zoom. Click here to join…
To follow along with the meeting slideshow, access it here when it is available…
Slides for May 12, 2021 meeting
Christophe’s demo slides
Have comments or questions after the meeting? Either post them here or to discuss.4d.com.
If you cannot attend the live Zoom meeting, don’t worry! A recording will be posted to the 4DMethod Youtube channel after the meeting ends.