TAdvDBFormBox - like for WebCore

Hi all,

the problem: i am in a Crisis-Team for Covid, here in Italy. I have to create / modify some web forms in a very short slice of time, because the rules / fields / informations needed are always changing, day after day. The situation evolves constantly, and so the requirements.
Until now, we have used an automatic generator of php code (PhpMaker) to solve the first requests. The people involved wanted some web forms to save / view records stored in a db. But now, the requirements tends to become more sophisticated, and PhpMaker has reached a limit.

So... i think i could create some TAdvDBFormBox - like component for WebCore, to maintain the "automatic" behavior of form generation, and use all the freedom of WebCore to code the "dedicated complexity" of the requirements.

Can you suggest me how to proceed ? Could i take, for example, the VCL TAdvDBFormBox code, and try to convert it to FNC ? It's the wrong road ? Maybe it requires months of work ? It's better to create from scratch the code to generate fields automatically on the panel, based on field types ?

...Or it's better to  learn to code in Php ?

Thank you, ciao !

Arnaldo


First of all, I wish you all the best for working in the crisis centrum and hope you can do there very valuable help for the people!

With respect to creating a form on the fly, I'd think there are in a TMS WEB Core application a couple of approaches:


1) You write the code at application level that loops through all fields in a dataset (can be similar code  as in VCL) and generate at runtime the corresponding DB-aware controls for the fields in the dataset.

2) You encapsulate the above in a TMS WEB Core custom control

3) You create an FNC custom control (similar to 2)) with the advantage that this will then be usable for VCL,FMX,LCL and WEB. 

If you plan to use this in TMS WEB Core only, my advice would be to start writing 1) and then move the code to a reusable component class.

Thank you Bruno,

i will follow your sequence, i also think that is the more "guaranteed result" one.

Take care all, i will say the most important thing now...

Stay At Home, as soon as possible.

Ciao, Arnaldo


Yes, the whole team is already working remotely and we are in lockdown.
https://www.facebook.com/tmssoftware/photos/a.378304032515/10159693951882516/?type=3&theater