Distributed development is a fact of life for many teams. Unfortunately most agile methodologies or approaches assume that the team is located in a single team room. Until recently there has been little guidance about how to apply these approaches with a geographically dispersed team.
Microsoft’s patterns & practices group has been following an agile, distributed development approach for the past five years. During this time teams within the group have experimented extensively with different approaches to best address the challenges of distributed agile development. Ade Miller from Microsoft Patterns & Practices has written a paper that outlines the challenges faced by geographically distributed agile teams and details some proven practices to address these issues and build successful distributed teams.
WCF handles errors and convey these details to the client using Fault contracts. SOAP fault messages are included in the metadata for an operation contract and when the exception is raised in these methods create a fault for the clients to get more details about the exceptions. But when you have a client that runs on 2.0 version of .NET framework, they can't make use of these fault contracts. In this case you need to send your faults as SOAP exceptions as in Web services.
Regions in Prism have been extended to support a more general notion of navigation, based on URIs and an extensible navigation mechanism.
Navigation within a region means that a new view is to be displayed within that region. The view to be displayed is identified via a URI, which, by default, refers to the name of the view to be created. You can programmatically initiate navigation using the RequestNavigate method defined by the INavigateAsync interface.
RegionManager in prism have a RequestNavigate method which allows you to specify the name of the region to be navigated. This convenient method obtains a reference to the specified region and then calls the RequestNavigate method, as shown in the code.
, newUri("EmployeeView1", UriKind.Relative)
, (navigationResult) =>
if (navigationResult.Result == true) MessageBox.Show("Success");
The views need to be registered with the region for navigation to work.
The OnNavigatedFrom method can be implemented to save the state of the currently active view or viewmodel before navigation. Similarly OnNavigatedTo method can be used to find details of the view or viewmodel navigated to.
If you want to confirm the navigation from the view, the IConfirmNavigationRequest interface can be implemented on the View or ViewModel to confirm the navigation request. The navigation can be canceled or confirmed based on the logic implemented in the ConfirmNavigationRequest method.
In Prism, loosely coupled components in the application communicate with each other using a event aggregation service that the library provides. The event aggregator service uses a publish/subscribe mechanism for communication. The EventAggregatorprovides multicast publish/subscribe functionality. This means there can be multiple publishers that raise the same event and there can be multiple subscribers listening to the same event as given below.
In prism communication between publishers and subscribers is done by the CompositePresentationEvent class. This class maintains the list of subscribers and handles event dispatching to the subscribers.
The CompositePresentationEvent class is a generic class that requires the payload type to be defined as the generic type. This helps enforce, at compile time, that publishers and subscribers provide the correct methods for successful event connection.
Event creation is done by creating a class that inherits the CompositPresentationEvent class.
Publishers raise an event by retrieving the event from the EventAggregator and calling the Publish method. To access the EventAggregator, you can use dependency injection by adding a parameter of type IEventAggregator to the class constructor. For e.g.
Authentication in Silverlight applications that use WCF RIA services can make use of the WCF RIA services authentication framework. WCF RIA Services builds upon the ASP.NET Membership framework by exposing the Membership framework to rich Internet clients through the authentication domain service. After adding an authentication domain service, you can enable the following functions:
Authentication - to verify a user's credentials and mark the user as logged in or logged out.
Roles - to group users by responsibilities and grant resource permissions to authenticated members of a group.
Profiles - to retain properties for authenticated users and retrieve those properties in your application.
This post demonstrates how to enable user authentication in your prism application using RIA services.
RIA Services provides the authentication domain service template to facilitate authentication on the presentation tier. The authentication domain service derives the AuthenticationBase class which contains the profile properties for the authenticated user. This service is accessed via the WebContext class which is automatically generated by the RIA services. You can also create your custom implementation for the membership provider and configure the service to use this instead of the default provider.