Silverlight 2: Application model
The first public beta of Silverlight 2 is now live. If you've played with building apps on it, you know we weren't kidding when we used the "Windows Presentation Foundation / Everywhere" moniker. Although we didn't inflict that monstrosity of a name on you, we did bring much of the sheer goodness of WPF in the APIs, the depth of functionality, the extensibility points and the overall experience designing or developing one of these babies.
In this first installment of a series of posts on Silverlight 2 features, I'll talk about the new Application Model. I'll loosely define an Application Model as "the principles on what constitutes an application, how it's lifetime is governed, and the set of services offered by a platform or runtime to the application". The Silverlight 2 Application Model borrows heavily from that of WPF. And it's goals are to be simple and predictable, to provide extensibility hooks, and otherwise to stay out of the way.
The Silverlight 2 application
The Silverlight 2 application is a client-side entity running within the confines of a host such as a browser. It is a packaged archive -- we use the Zip data compression and archival format -- with the .xap file extension and application/x-silverlight-app MIME type. Despite the introduction of this new application file, the Silverlight 2 runtime continues to support vanilla XAML content specified via file Uri or inline reference to SCRIPT block a la the v1.0 programming model.
Here's an outline of the features supported in the new application model:
- New application package unit
- Encapsulation of application functionality in a type deriving from System.Windows.Application, along with app definition XAML
- Application lifetime: ctor, Startup event, Exit event
- Handle exception conditions in a central location at the app level
- Support for declarative dependency downloads, as well as programmatic for more granular control
- Utility methods to extract app resources or resources from arbitrary Zip packages
- Access to the Silverlight plug-in's object model via the Host property
- Default splash screen provided by the platform, with ability to override it using custom XAML and JavaScript
- Support for activating a Silverlight application from cross-domain (x-domain) to HTML page; secure by default, and ingress/egress need to be opted into.
- Ability to refactor application functionality into individual pieces, daisy-chained together and dynamically loaded at runtime
A more detailed overview of the new Silverlight 2 application model is provided in this slide deck I've posted on my sky drive. The Silverlight 2 application model documentation on MSDN is a must-read. As always, feedback is appreciated. You can drop a comment here or post on the Silverlight forums.
Labels: Application Model, Silverlight

3 Comments:
Hi;
Could you please give us some guidelines for creating a solution or application that may have many pages/forms that a similar WPF or WinForm application may have?
a) How to break down the app into multi pages.
b) How can we Instantiate only the page that needs to be viewed and then release the memory when not in use?
c) Should we load all the pages up front or should we load each page as needed (sample code would be great)?
d) How do we pass data among these pages?
I still have not seen one doc that lays out the formation of an app with many pages and how they should work in SL 2.
Thank you and I hope I get some answers this time ;-)
..Ben
By
Anonymous, at March 10, 2008 9:47 AM
There's several good questions there. I'll respond with a post, rather than a comment. Queued one now.
By
Ashish Shetty, at March 10, 2008 5:39 PM
網頁設計,情趣用品,情趣用品,情趣用品,情趣用品
色情遊戲,寄情築園小遊戲,情色文學,一葉情貼圖片區,情惑用品性易購,情人視訊網,辣妹視訊,情色交友,成人論壇,情色論壇,愛情公寓,情色,舊情人,情色貼圖,色情聊天室,色情小說,做愛,做愛影片,性愛
免費視訊聊天室,aio交友愛情館,愛情公寓,一葉情貼圖片區,情色貼圖,情色文學,色情聊天室,情色小說,情色電影,情色論壇,成人論壇,辣妹視訊,視訊聊天室,情色視訊,免費視訊,免費視訊聊天,視訊交友網,視訊聊天室,視訊美女,視訊交友,視訊交友90739,UT聊天室,聊天室,豆豆聊天室,尋夢園聊天室,聊天室尋夢園,080聊天室,080苗栗人聊天室,女同志聊天室,上班族聊天室,小高聊天室
AV,AV女優
視訊,影音視訊聊天室,視訊交友
視訊,影音視訊聊天室,視訊聊天室,視訊交友,視訊聊天,視訊美女
By
J&D, at May 2, 2009 4:42 AM
Post a Comment | Home | Inference: my personal blog