Now that we know the possibilities that Silverlight offers us in order to handle the DOM, invoke JavaScript functions, as well as defining objects and methods accessible from JavaScript, we will work upon a sample—a little more complex—which shows all these features working together.
Our goal is to create an application to store our friends' contact data. To do so, we will create two applications, one in HTML and JavaScript and the other one in Silverlight. Each of them will make reciprocal calls between them. The HTML application is functional on its own and the Silverlight application is an extension of the first one. The HTML application will show a contact list, whereas the Silverlight application will offer a form to edit them, as shown in the following screenshot:
The sample can begin in a web application, which will only show the contact list. Later on, the functionality of this application is extended, allowing the contacts...