Managed API for Silverlight Employs Code Running at the Common Language Runtime
Author: rickflair | Posted: 24.01.2012As a way to carryout Silverlight development effectively, Silverlight developer in UK can make use of 2 kinds of Silverlight application models. With the help of the application models, it is possible to set up standard, intricate and also extensible applications. These programs subsequently share the resources over network. The 1st model is that of the managed API for Silverlight which exploits program code working for the common language runtime (CLR) for Silverlight. Managed API can be used with complied languages which can include Visual Basic and C# or dynamic languages including IronPython and IronRuby.
The second model is the JavaScript API for Silverlight that uses JavaScript program code interpreted through the web browser. Most of the Silverlight documentation utilizes managed API which has more functionality to provide as compared to the JavaScript API. Managed API based programs can also access lightweight version of the .NET framework. JavaScript API based applications may use just the Silverlight presentation core as well as the browser JavaScript engine.
The Silverlight developer in UK can conclude managed assemblies and resource files into application package (.xap) files with the aid of the managed API. The Silverlight plug-in allows for loading of app package along with pulling of its contents.
It is vital that application package has an assembly with a class extracted from the app. An interaction within program and Silverlight plug-in takes place in Application class. By the the application class, the Silverlight developer in UK can display ui within the host Web page. In addition, it features application lifetime events plus resource management.
Developers can use XAML markup to include ui layouts in the managed API and the JavaScript API. The developers by utilizing managed API may include the application program code into multiple XAML files with code-behind files. When XAML files get full of the help of Silverlight plug-in, now there occurs an object tree to be manipulated by way of code-behind. By way of the HTML Bridge, HTML Document Object Model (DOM) could be manipulated by way of this program code.
JavaScript API demands only a single XAML page instead of the complete application package. With this XAML, there exist URI references to server-side resources just like images and video clips. An object tree is made through the help of this XAML which can be manipulated by way of JavaScript in host HTML page.
The confusing apps which has internal site navigation aren't supported by the application model offered by the JavaScript API. However, in some instances such as splash screens, it is recommended to make use of this app model instead of Managed API which might prove a bit bothersome. The developer incorporate the use of both the managed API and JavaScript API for silverlight to use JavaScript within the host HTML page to integrate Silverlight with the HTML Document Object Model (DOM).
To help implement the majority of the developer application attributes, silverlight consultants should certainly use browser-interpreted JavaScript that will directly communicate with the DOM. In managed API, JavaScript as well as DOM code connect with the Silverlight plug-in and the application model using the HTML Bridge.
Therefore, these two programming models will vary as they simply can't be utilised together with a single instance of Silverlight plug-in. Nevertheless, it's possible to implement a splash screen that employs the JavaScript API and then transitions to the managed API when the application has loaded
About Author:
The article author runs applications development consultancy. He has got almost Seven to eight yrs of experience in this field. He consistently talks concerning Silverlight Application Development as well as Silverlight development company in several publications and newsletters..
The article author runs applications development consultancy. He has got almost Seven to eight yrs of experience in this field. He consistently talks concerning Silverlight Application Development as well as Silverlight development company in several publications and newsletters..
Click here to return original format