Using Dart with Polymer.dart allows to easily implement design patterns in the style of MVC, MVP or MVVM. I suppose that in a web environment the controller part is essentially an HTTP request handler/router that calls views or models.
The question is: can you show an example on how to connect user input data from HTML + Polymer.dart up to a database back-end?
As far as I can see, the “two-way data binding” announced by Polymer.dart seems to relate only to client-side code.
My problem is understanding how the client-side Dart code that listens to HTML form inputs may interact with the server-side Dart code. Would that be a typical AJAX request that calls the controller or is there a more idiomatic two-way data binding that I’m missing in Dart?
The server processes and stores received data and/or responds with the requested data .
These patterns primary purpose is to make client code testable.
The view (HTML) is hard to test. Using such patterns splits the view from model and controller and makes at least these two easy testable.
There is much literature out there about such design patterns. Such questions are usually to broad for StackOverflow.
Answered By – Günter Zöchbauer
Answer Checked By – Terry (FlutterFixes Volunteer)