Mavarik 6 Posted August 28, 2019 (edited) Hello, if you have 2 minutes, please fill out my latest survey. Thanx Mavarik Edited August 28, 2019 by Mavarik 1 Share this post Link to post
Stefan Glienke 2002 Posted August 28, 2019 (edited) After a lot of research and experiments I believe that MVVM as it works in other languages which makes it desirable to use is not possible in Delphi at this point. (*) The main reasons for this are lack of language support for things that are achievable in a very compact way in other languages and the way the main UI frameworks work in Delphi. Considering the history and existing support for datasets everywhere I think that separation of business logic and UI can be achieved rather by utilizing this to be able to access plain object with their properties over a TDataSet API to make any DB aware control work with them out of the box giving you all the support that has been there since Delphi 1. (*) "WTF is he talking about?!" - just take ReactiveUI as an example - implementing this in Delphi in a nicely usable way is imo almost if not entirely impossible. Edited August 28, 2019 by Stefan Glienke 1 Share this post Link to post
Stéphane Wierzbicki 45 Posted August 28, 2019 7 hours ago, Mavarik said: Hello, if you have 2 minutes, please fill out my latest survey. Thanx Mavarik Just to let you know that nothing happens as soon I press the finish button... 1 Share this post Link to post
Bill Meyer 337 Posted August 28, 2019 7 hours ago, Stefan Glienke said: After a lot of research and experiments I believe that MVVM as it works in other languages which makes it desirable to use is not possible in Delphi at this point. (*) The main reasons for this are lack of language support for things that are achievable in a very compact way in other languages and the way the main UI frameworks work in Delphi. (*) "WTF is he talking about?!" - just take ReactiveUI as an example - implementing this in Delphi in a nicely usable way is imo almost if not entirely impossible. Nor should we be surprised, as MVVM was evolved into by people working every day in C# and with XAML. This happened, I am told, as people simply found a comfortable approach in that environment, not because they sought to copy an idiom from another language. Share this post Link to post
Stefan Glienke 2002 Posted August 28, 2019 1 hour ago, Bill Meyer said: Nor should we be surprised, as MVVM was evolved into by people working every day in C# and with XAML. This happened, I am told, as people simply found a comfortable approach in that environment, not because they sought to copy an idiom from another language. And yet that idiom works even better in the Web where you can easily blend data binding into the DOM like all those MVVM frameworks over there do. Share this post Link to post
Bill Meyer 337 Posted August 28, 2019 20 minutes ago, Stefan Glienke said: And yet that idiom works even better in the Web where you can easily blend data binding into the DOM like all those MVVM frameworks over there do. And that's fine, but doesn't negate it being a bad fit for Delphi, does it? Share this post Link to post
Stefan Glienke 2002 Posted August 29, 2019 10 hours ago, Bill Meyer said: And that's fine, but doesn't negate it being a bad fit for Delphi, does it? IMO not - the beauty of MVVM comes from things that I have not seen yet seen achieved in Delphi. It requires special support for every existing control by either subclassing or other ways, CoC and existing data binding solutions are very brittle and easily break when renaming things, functional approaches like done in ReactiveUI are almost impossible or create clunky and bloated code. Share this post Link to post