Project Description
Sonic.Net is a .Net Library designed to facilitate development of rich client applications both in Silverlight and WPF. Sonic.Net makes use of all the latest Microsoft Patterns and Practices to solve common and advanced scenarios both on the Server and the Client.
About
This project is an ongoing process and there is much more to come. Libraries planed to be included in the near future include DataAccess, DataServices, Core classes to buildup your projects using M-V-VM pattern and more. This project is the result of usecase driven framework design originaly created inside
indice labs. There is a
new sample application available in the
downloads section that highlights the way to configure unity in the silverlight client. The configuration takes place in a xaml resource just like this:
Now available via Nuget
Sonic Unity Configuration
PM> Install-Package SonicUnityConfiguration
<u:Unity xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:u="clr-namespace:UnityConfiguration;assembly=sonic.UnityConfiguration.Silverlight">
<u:TypeAliases>
<!-- Lifetime manager types -->
<u:TypeAlias Alias="singleton"
Type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity.Silverlight, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<u:TypeAlias Alias="external"
Type="Microsoft.Practices.Unity.ExternallyControlledLifetimeManager, Microsoft.Practices.Unity.Silverlight, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<!-- User-defined type aliases -->
<u:TypeAlias Alias="IAccountService"
Type="sonic.Samples.Infrastructure.Services.IAccountService, Infrastructure, Version=1.0.0.0" />
</u:TypeAliases>
<u:Containers>
<u:Container>
<u:Types>
<u:UnityType TypeName="IAccountService"
MapToName="sonic.Samples.Infrastructure.Services.MockAccountService, Infrastructure, Version=1.0.0.0" >
<u:Lifetime TypeName="singleton" />
</u:UnityType>
</u:Types>
</u:Container>
</u:Containers>
</u:Unity>
Who is it for
Current Version
Sonic.Net now supports .net Framework 4.0 and silverlight 4.
Parts
- Sonic.UnityConfiguration.Silverlight: Inspired by the Composite Application Gudance Module Configuration feature for silverlight. Brings the power of the UnityConfiguration library that targets the server's web.config (app.config as well) to the silverlight world. Uses xaml resource as the means to configure the dependency injection container and follows schema of its xml configuration siblin.
- Sonic.UnityConfiguration.Wpf: This is a mirror project with linked files that facilitates the code sharing between clients developed both for Silverlight and wpf.
Prerequisites
- Microsoft.Practices.ObjectBuilder2.dll
- Microsoft.Practices.Unity.dll