Scenario: Your application requires real-time updates of data in the UI whenever changes occur in the database. Which type of data binding would be suitable for this scenario, and why?

  • Two-way data binding
  • One-way data binding
  • Observer pattern
  • Three-way data binding
The correct option is Observer pattern. In this scenario, where real-time updates are needed in the UI, the Observer pattern would be suitable. The Observer pattern allows objects to subscribe to changes in other objects and receive notifications when those changes occur. This enables real-time updates in the UI whenever changes happen in the database, ensuring synchronization between the database and the UI. Two-way data binding allows updates from UI to data source and vice versa, but it might not provide real-time updates. One-way data binding only updates the UI from the data source, and Three-way data binding is not a standard concept in ADO.NET.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *