Search This Blog

10 September 2013

The concept of Data Binding

Recently I was referring S3D programming guide when I came across Early and Late Binding pages. Thought it would be fair enough to share knowledge about the topic with people who are unaware of the terms. Developers can skip the post.

.NET has many class libraries and features. An application built on .NET framework has to communicate to the data source. Data Binding provides the facility for the application and provides the relation with the data source.

As written in Wikipedia, 'Data Binding is the process which establishes a connection between UI and Business Logic'. A Data Binding has has typically 4 components:

  • Target Object for Binding
  • Target Property
  • Binding Source
  • Path of Binding source.
There are two types of Data Binding:

  • Early Binding - Also known as Static Binding. As soon as object is created, the method is called. Hence the compiler is aware of binding. The binding results are compiled in the program and is ready available.
  • Late Binding - Or Dynamic Binding. The object is created, but the method isn't assigned. The method is assigned at runtime. Advantage of late binding is that the COM doesn't need the compiler to reference the library that contains the object at compile time.

Till next post

Happy Smartplanting