Exforsys

Home arrow Technical Training arrow Microsoft Silverlight

Developing Applications in Silverlight

Page 1 of 2
Author: Exforsys Inc.     Published on: 9th Jan 2009

Silverlight is a high end technology which gives developers the ability to generate web applications that can be processed within the browser. When you develop with Silverlight, it is important to understand the application structure for Silverlight.

Ads

A Silverlight application will be comprised of three things:

  • The application classes or services which are implemented within the application assembly,
  • The in-package library assemblies as well as resource files which can encapsulate
  • The UI and functionality.

The third element which comprises the Silverlight application structure is the On-demand library assemblies or resource files which must be responsible for dealing with UI functionality.

Every Silverlight application will need to implement the functionality in order to begin running once the Silverlight plug-in has downloaded it. The Silverlight plug-in requires all the Silverlight applications to implement their startup functionality within a well known as specific manner, which is referred to as being the entry point.

Within the Silverlight application, entry points will be comprised of a number of three things, and these are a class, assembly, and metadata. The class will be derived from the actual Application, which may also be called the application class. The assembly will comprise the application class, and will be known as the application assembly.

The metadata will be responsible for specifying the application assembly and class which in turn comprise the entry point. Another important factor which is connected to the development of applications within Silverlight are Application Services.

The Application class offers numerous application services which are typically need via applications. The more critical service is the capability of notifying the UI to show whenever the application is activated. Other important services are lifetime management, initialization parameters, and the detection of unhandled exceptions.

The Library Assembly and Resource Files

The library assembly within Silverlight is used for the purpose of encapsulating important UI functionality. The library assemblies may be used for a number of different purposes, and this can include the organization of the application into smaller portions and sharing both UI and functionality via numerous applications.

While it is important for both the library as well as the application assemblies to encapsulate the various functions of the Silverlight app, this application may also be comprised of data which is non-executable, and good examples of this include video, images, audio, XAML, and XML.

There are also a number of differences between on-demand as opposed to in-package. The application package can be thought of as the thing which the Silverlight plug-in is responsible for downloading in order to activate the Silverlight program.

The application package may come in the form of a Zip file archive which is complete with the .xap file name. The application package will need to be as small as necessary in order to offer the quickest download speed possible.

Ads

Additionally, the files which should be available in the application are the ones which comprise the UI as well as the functionality that the application needs in order to function. Files which can be found within the application like the assembly and resource files are called the in-package.

The files which comprise the UI functionality can be downloaded as necessary for the files which are on demand. Another thing that is important to consider is the development of the a library assembly for Silverlight.



 
This tutorial is part of a Microsoft Silverlight tutorial series. Read it from the beginning and learn yourself.

Microsoft Silverlight

 

Comments