Guest Posted June 14, 2020 @Mahdi Safsafi Thank you very much. That was very smart. Share this post Link to post
David Heffernan 2345 Posted June 14, 2020 On 6/13/2020 at 10:17 AM, David Heffernan said: My post above demonstrates that RTTI does exist. I think that the real issue is that these types don't have qualified names. Basically this then? Share this post Link to post
Lars Fosdal 1792 Posted June 15, 2020 Treat console apps like you treat VCL or FMX apps. Keep the actual code in units and have just the skeleton init and run code in the .dpr. 1 Share this post Link to post
Sherlock 663 Posted June 15, 2020 That's what I would do as well. Though it is nice to have everything in one unit...it is not nice to do so, because that code is not reusable, especially if it is in a dpr. And you never know, if you'll need it later on. 1 Share this post Link to post
aehimself 396 Posted June 15, 2020 5 hours ago, Lars Fosdal said: Treat console apps like you treat VCL or FMX apps. Keep the actual code in units and have just the skeleton init and run code in the .dpr. This is exactly what I started to do lately. All my applications business logics are basically a TObject-descendant, and service initializations or console launchers only create an instance of them. I find this structure really easy to test, to port, to maintain or extend. This might be my own personal preference, though. 2 Share this post Link to post