Creating a simple WPF application using Prism: Part 3

In Part 2, we discussed on how to go about creating Modules in Prism, so how do we go about getting one module to talk to another? For this portion, I’m going to explain how to get the Search Module to talk to the Navigation Module. (btw, the source code for this app can be downloaded at the end of this post)

EventAggregator

Read the rest of this entry »

Posted in WPF. Tags: . 1 Comment »

Creating a simple WPF application using Prism: Part 2

Here’s a link to Part 1 of this walkthrough.

Continuing where I left off, let’s look at creating the Search Module, that is going to be plugged into the “Search Region” of our shell. The UI is basically a search bar where the user can enter a membership number to search for. Begin by creating a new WPF User Control Library into your solution.

Search_Module

Read the rest of this entry »

Posted in WPF. Tags: . 1 Comment »

Creating a simple WPF application using Prism: Part 1

How to build a simple WPF application with Prism….this post is going to be just that. If you are unclear about the architecture of Prism, do have a quick look at it on my previous post.

Wpf_Prism_app

Read the rest of this entry »

Posted in WPF. Tags: . 1 Comment »

Prism: Adding more colors to WPF and Silverlight

Light_dispersion_conceptual_wavesMicrosoft has recently released an updated version of Prism for WPF/Silverlight (Prism v2), as part of their Patterns and Practices Composite Application Guide.

This library or framework provides guidance for developing Enterprise Level applications for WPF and Silverlight, which encourages a loosely coupled, easily testable, modular structured approach with a few good use of design patterns.

Read the rest of this entry »

Posted in Silverlight, WPF. Tags: . 2 Comments »

Tip: Use specific port number when hosting WCF service in Cassini Web Server

When you are hosting a WCF service in Visual Studio, a Cassini Web Server will spin up and assign a random port number, e.g. http://localhost:61447/MyService. If you add a Service Reference, it will use that port number currently assigned by Cassini. This is all good until you stop the Cassini Web Server, or restart VS IDE. Where did my old port number go???

Read the rest of this entry »

Handling Cross-Threading in ObservableCollection

One of the best things I reckon in WPF is the introduction of ObservableCollection<T>. With this class, databinding becomes a breeze and developers no longer need to write custom code to get the same effect with INotifyPropertyChanged.

I was playing with some multi-threading code today to update my ObservableCollection and ran into an Exception with this message “This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread.” Woah, what have I done? :)

Read the rest of this entry »

Posted in WPF. Tags: . 2 Comments »

Free ASP.NET MVC eBook Tutorial

You can find a link to download a free ASP.NET MVC eBook Tutorial in Scott Gu’s Blog, which is a 185 pages end-to-end tutorial on how to build an application with ASP.NET MVC. I’ve been reading it and I must say it’s very detailed and well illustrated, a must read!!!

JQuery UI and Validation

I’m still on my journey to become more proficient in JQuery, and the best way to get better is to do more hands-on. This time, I worked on an example for a simple registration form, with some animations, and made use of JQuery UI library and JQuery Validation library.

The sample registration requires you to first fill in “Step 1″ of the registration process before you can go to “Step 2″. Each step is lazily validated until you click the “Next” button, and the fields will be eagerly validated after that. Below are screenshots of validation provided by JQuery Validation library.

JQueryRegister_ValErrorJQueryRegister_ValValid

Read the rest of this entry »

Cleaning up WCF clients using Interception

If you have ever used the using statement to create a WCF client proxy before, you would have no doubt encountered problems of not getting your Service Exceptions propagating to the client. When exceptions are raised from service, your client proxy goes into a Faulted state, and attempting to close/dispose the proxy object (from the using statement) will result in WCF raising another Exception.

If you’re aware of this, you would have written code somewhat similar to this, to do proper cleanup.

SomeClient client = new SomeClient();

try
{
    client.SomeMethod();
    client.Close();
}
catch (CommunicationException)
{
    client.Abort();
}
catch (TimeoutException)
{
    client.Abort();
}
catch (Exception)
{
    client.Abort();
    throw;
}

Read the rest of this entry »

SOA 2.0: SOA evolved

In the IT world, acronyms and buzzwords come and go really quickly, with only the well-received ones persisting. Service Oriented Architecture (SOA) is one such example, and apparently there’s now an evolved version called SOA 2.0, coined at the JavaOne Conference not too long ago. From what I understand, SOA 2.0 leverages off SOA by incorporating Event Driven Architecture (EDA).

Read the rest of this entry »

Follow

Get every new post delivered to your Inbox.

Join 76 other followers