Building an app marketplace with MEF (MEF/Silverlight 4 tutorial)

by Gill Cleeren 4 September 2010 21:25

In April, I was in the UK for speaking at the VBUG conference and I was impressed by a demo given by Josh Twist. He built using MEF and WPF a “marketplace” application. The goal of the application was mainly showing the dynamic capabilities of adding new functionality to an application through MEF (or in full, the Managed Extensibility Framework for Silverlight 4).

For a presentation I’m giving shortly, I rebuilt something similar but in Silverlight: the MEF Marketplace in Silverlight. The setup is the following: a user gets an overview of apps he purchased in the market place and can run these on demand. The market place app will download the applications available to the user after the application has started, so this app mainly is a hosting shell for the other ‘purchased” applications to run in. Of course, the sample is a demo and can be extended quite a lot. For example, in the current implementation, I hard-coded the list of purchased apps and there’s no option to buy new ones. Also, it could be extended so that when new apps are purchased, a duplex service notifies the client of this and MEF downloads the new app in the background.

But, instead of talking of what could be added, let’s take a look at what I currently built already! Here’s a screenshot of the application showing the "purchased” applications.

SNAGHTMLaf6bd

And here’s one of the apps (the Flickr Image search) running inside the "market place shell”.

SNAGHTMLb8796

Time for some code. Let’s begin with the market place itself.

I defined a contract interface for all applications that can be loaded in the market place, IMarketPlaceApplication.

public interface IMarketPlaceApplication
{
    string ApplicationName
{ get; }
    FrameworkElement MarketPlaceIcon { get; }
    FrameworkElement MainView { get; }
}
This interface defines that all my apps will (of course) have a name, a default view which will load as the landing screen when the app is loaded (MainView.xaml) and an icon to show in the list (MarketPlaceIcon.xaml). As these 2 latest ones are XAML files, you can put in whatever you like.

A very easy application that will be possible to load from MEF is the HelloWorldApplication. The project structure of this app is as follows:

image

As you can see, there’s a class called HelloWorldApplication, which implements the IMarketPlaceApplication and 2 xaml files. The HelloWorldApplication code is shown below:

[Export(typeof(IMarketPlaceApplication))]
public class HelloWorldApplication:
IMarketPlaceApplication
{
 
    #region IMarketPlaceApplication
Members
 
    public string ApplicationName
    {
        get { return "Hello
MEF world"; }
    }
 
    [Import(typeof(Icon))]
    public FrameworkElement
MarketPlaceIcon
    {
        get;
        set;
    }
 
    [Import(typeof(HelloWorldView))]
    public FrameworkElement
MainView
    {
        get;
        set;
    }
 
    #endregion
}

This is our first encounter with MEF. The first line uses the Export attribute. This class is saying that it is available for someone to use, when someone requests an instance of IMarketPlaceApplication. A bit further, we are using the Import attribute on both the MarketPlaceIcon and the MainView. Here we are saying: MEF, search us a class that’s exporting itself as type Icon and HelloWorldView respectively.

These 2 latter instances will be inserted by MEF upon executing the application, that is, if MEF finds the corresponding export. These exports can be found in the 2 XAML files (in the code-behind). The HelloWorldView.xaml.cs code is shown next. Note the Export attribute: we’re telling to MEF that this type can be used where an Import is requested of the HelloWorldView type.

[Export]
public partial class HelloWorldView
: UserControl
{
    
    public HelloWorldView()
    {
        InitializeComponent();
    }
}

The Icon.xaml.cs is pretty similar code-behind-wise (I think I invented that term here): here alse we are adding an Export attribute.

[Export]
public partial class Icon
: UserControl
{
    public Icon()
    {
        InitializeComponent();
    }
}

The HelloWorldApplication is at this point a stand-alone application (it compiles to its own XAP file), but we’ll now build the Market Place shell that will host this app. The code download at the end of the article contains several sample applications (a Flickr app and a Facebook app).

Similar to a real market place application, our implementation will get a list of apps you purchased previously. Only these are available to you and will be shown. To get this list, I wrote a basic Silverlight-enabled WCF service that fetches this list of available applications. This service is hosted in this case in the hosting website. The code below shows this service, which in this case returns a hard-coded list of apps (note that I have some more apps already added here).

[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = 
    AspNetCompatibilityRequirementsMode.Allowed)]
public class MarketPlaceService
{
    [OperationContract]
    public List<MefApplication>
GetAvailableApplicationsForUser()
    {
        return new List<MefApplication>()
        {
            new MefApplication(){ApplicationName="Flickr
Image Search", 
                XapFileName="FlickImageSearch.xap"}, 
            new MefApplication(){ApplicationName="Hello
World", 
                XapFileName="HelloWorldApplication.xap"},
            new MefApplication(){ApplicationName="MEFacebook", 
                XapFileName="FacebookApplication.xap"}
        };
    }
 
    //
Add more operations here and mark them with [OperationContract]
}
 
[DataContract]
public class MefApplication
{
    [DataMember]
    public string ApplicationName
{ get; set; }
 
    [DataMember]
    public string XapFileName
{ get; set; }
}

The service uses the MefApplication class as a helper class: it contains the name of the application and more importantly, the name of the XAP file (this could easily be replaced with a Uri to the XAP file).

In the MefMarketPlace, the Silverlight Market Place application, we can create a web reference to this service. In the App.xaml.cs, I add a call to a new method, DownloadMyApplicationList():

private void Application_Startup(object sender,
StartupEventArgs e)
{
    DownloadMyApplicationsList();
    this.RootVisual
= new MainPage();
}

This new method makes the service call to get a list of available XAPs that I can use (apps that I purchased).

void DownloadMyApplicationsList()
{
    AggregateCatalog = new AggregateCatalog();
 
    container = new CompositionContainer(this.AggregateCatalog);
    CompositionHost.Initialize(container);
 
    MarketPlaceService.MarketPlaceServiceClient client = 
        new MarketPlaceService.MarketPlaceServiceClient();
    client.GetAvailableApplicationsForUserCompleted += 
        new EventHandler<MarketPlaceService.GetAvailableApplicationsForUserCompletedEventArgs>
            (client_GetAvailableApplicationsForUserCompleted);
    client.GetAvailableApplicationsForUserAsync();
}
 
void client_GetAvailableApplicationsForUserCompleted(object sender, 
    MarketPlaceService.GetAvailableApplicationsForUserCompletedEventArgs e)
{
    if (e.Error
== null)
    {
        AvailableApplicationsForUser = e.Result;
        InitializeCatalog();
    }
}

In the callback method of the service, I call InitializeCatalog(). MEF has the concept of Catalogs: a Catalog can be used to tell MEF where it has to look for Parts. Several types of catalogs exist in MEF for Silverlight: the TypeCatalog, the AssemblyCatalog, the DeploymentCatalog and the AggregateCatalog. A TypeCatalog basically allows us to register a specific type with MEF: if I want MEF to know about a certain Export, I can register it in a TypeCatalog. An AssemblyCatalog tells MEF to look for parts in a specific assembly. The DeploymentCatalog allows us to specify a XAP file and MEF will look in the assemblies therein for parts. It also allows us to asynchronously download a XAP file. An AggregateCatalog can contain any number of other catalogs and more catalogs can be added at any time.

By default, if we don’t specify a Catalog for our application, MEF looks at the current XAP file and for each assembly it finds, it creates an AssemblyCatalog. It then combines these with an AggregateCatalog. That means that we can omit creating a catalog in our application: in this case, MEF will create a default one for us, with something similar to this code:

void InitializeCatalog()
{
    AggregateCatalog catalog = new AggregateCatalog();
 
    foreach (var
deployedPart in Deployment.Current.Parts)
    {
        StreamResourceInfo resourceInfo = 
            Application.GetResourceStream(new Uri(deployedPart.Source,
UriKind.Relative));
 
        Assembly assembly = deployedPart.Load(resourceInfo.Stream);
        catalog.Catalogs.Add(new AssemblyCatalog(assembly));
    }
 
    CompositionHost.Initialize(catalog);
}

Back to our application. If we look at the available catalogs in MEF, we can see that the DeploymentCatalog is a good candidate for what we need: we can use it to download a XAP file (the application that we want to load). After that, we can add each DeploymentCatalog to an AggregateCatalog. MEF will then make these available in our application and we can run the downloaded applications.

In code, this gives the following:

private CompositionContainer
container;
void InitializeCatalog()
{
 
    foreach (var
item in AvailableApplicationsForUser)
    {
        DeploymentCatalog deploymentCatalog = 
            new DeploymentCatalog(item.XapFileName);
        this.AggregateCatalog.Catalogs.Add(deploymentCatalog);
 
        deploymentCatalog.DownloadCompleted += (s, e) =>
        {
            //extend
to give meaningful error handling
            if (e.Error
!= null)
                MessageBox.Show(e.Error.Message);
        };
 
        deploymentCatalog.DownloadAsync();
    }
 
    container.ComposeParts(this);
}

You can see that I use a CompositionContainer here. The container is well, like the word says it, a container where MEF puts all the parts, shakes it up and creates/composes parts.

We now have the code that runs when we start the application: it gets a list of all the applications we can use over the service and then it downloads the XAP files of these apps asynchronously. Each XAP file is downloaded using a DeploymentCatalog and these are added to an AggregateCatalog. This now makes our downloaded applications available to run.

Let’s now take a look at the UI where we’ll run the apps from. The following screenshot shows the UI:

image

The “Load my apps'” button on the top right will execute a command on the viewmodel that will load all available applications in the ListBox on the left.

image

When clicking on the “Load app” button, the selected application (here the Flickr app) is loaded:

image

Clicking the “Home” button unloads the app and returns us to the list screen.

The complete XAML listing can be found in the code download. The most important part is shown below. Note that there’s a ContentPresenter used here and it’s bound to the MainView property of the SelectedApplication. The latter is a property exposed on the viewmodel (see further). If no view/app is selected, this ContentPresenter won’t be visible and we’ll see the default UI again.

<Grid x:Name="LayoutRoot" Background="Black">
    <Grid.RowDefinitions>
        <RowDefinition Height="*"></RowDefinition>
        <RowDefinition Height="60"></RowDefinition>
    </Grid.RowDefinitions>
    <Grid>
        ...
    </Grid>
 
    <ContentPresenter Content="{Binding
SelectedApplication.MainView}">
    </ContentPresenter>
    <Button Grid.Row="1" Content="Home" Margin="10" Background="#FFABE3FF" 
            Command="{Binding
HomeCommand}" BorderBrush="#FF00AAFF" 
            Style="{StaticResource
ButtonStyle1}" 
            Width="130" Height="40" HorizontalAlignment="Center" 
            VerticalAlignment="Center"></Button>
</Grid>

Time to look at the viewmodel now. Probably the most important part here is the ObservableCollection<IMarketPlaceApplication>:

[ImportMany(AllowRecomposition=true)]
public ObservableCollection<IMarketPlaceApplication>
Applications
{
    get
    {
        return _applications;
    }
}

The ListBox in the UI is bound to this collection and since it’s an ObservableCollection, the UI will reflect changes to this collection. That’s important here, since the list of available apps won’t be known after the shell contacted the service. Note that the collection property is attributed with the ImportMany attribute. This is a sign for MEF that more than one part that is exposing itself with the same Export attribute (same type) is allowed. By default, this isn’t allowed since MEF wouldn’t know which one to use. Here, we want the ImportMany since we know that more than one app will be available and they all need to be exported as an IMarketPlaceApplication. Another important thing to note here is the AllowRecomposition option we used here. AllowRecomposition tells MEF that if during the run of the app more Exports become available for this Import, it’s OK to add them, in other words, to rebuild the composition.

The ContentPresenter in the UI bound to SelectedApplication.MainView. The SelectedApplication property is shown next.

private IMarketPlaceApplication
_selectedApplication;
 
public IMarketPlaceApplication
SelectedApplication 
{
    get
    {
        return _selectedApplication;
    }
    set
    {
        _selectedApplication = value;
        NotifyPropertyChanged("SelectedApplication");
    }
}

NotifyPropertyChanged is a simple method that raises the PropertyChanged event of the INotifyPropertyChanged interface.

private void NotifyPropertyChanged(string p)
{
    if (PropertyChanged
!= null)
    {
        PropertyChanged(this, new PropertyChangedEventArgs(p));
    }
}

The “Load apps” button in the UI is bound to the LoadAppsCommand. I use the MVVM Light RelayCommand here. In the execute code of the ICommand, I ask MEF to satisfy the Imports of the current class (the viewmodel). This basically tells MEF to look at the catalogs and bring all the Export(typeof(IMarketPlaceApplication)) into the ImportMany.

public RelayCommand
LoadAppsCommand
{
    get
    {
        if (_loadAppsCommand
== null)
        {
            _loadAppsCommand = new RelayCommand(
                    () =>
                    {
                        CompositionInitializer.SatisfyImports(this);
                        loaded = true;
                    },
                    () =>
                    {
                        if (loaded)
                            return false;
                        return true;
                    }
                );
        }
        return _loadAppsCommand;
    }
}

The LoadSelectedApplicationCommand and the HomeCommand respectively set the SelectedApplication property to the selected application in the list or null.

public RelayCommand<IMarketPlaceApplication>
LoadSelectedAppCommand
{
    get
    {
        if (_loadSelectedAppCommand
== null)
        {
            _loadSelectedAppCommand = new RelayCommand<IMarketPlaceApplication>(
                    (a) => 
                    { 
                        SelectedApplication = a; 
                    }
                );
        }
        return _loadSelectedAppCommand;
    }
}
 
 
public RelayCommand
HomeCommand
{
    get
    {
        if (_homeCommand
== null)
        {
            _homeCommand = new RelayCommand(
                    () =>
                    {
                        SelectedApplication = null;
                    }
                );
        }
        return _homeCommand;
    }
}

With that, we have successfully implemented the MEF Marketplace. As said in the very beginning, this can be extended quite a lot. Add a duplex service and a buying system that pushes a message to the client and trigger the client to download the linked XAP file is a nice way to start. The complete file can be downloaded below.

Enjoy!

Code download: MefMarketPlace.zip (868.99 KB)



Snowball.be - The blog of Gill Cleeren
Click here to see the original post

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

Snowball.be

More praise for my Silverlight 4 book

by Gill Cleeren 3 September 2010 08:09

I was looking at Amazon today and noticed that there were now already 12 reviews on our (Kevin and myself) book, giving the book a whopping 5 star rating, which is of course great!

9843_Mockupcover

Here are some of the excerpts:

Ideal for those who prefer a tutorial-oriented writing style, August 30, 2010 5.0 out of 5 stars
HOW THIS COOKBOOK WORKED FOR ME: In contrast, this book ("Microsoft Silverlight 4 Data and Services Cookbook" from PACKT) certainly proved valuable to me by appealing to my learning style, and delivering what was advertised on the cover. I was able to learn a reasonable amount of SL4 specifically for handling business data, using "Microsoft Silverlight 4 Data and Services Cookbook". The format and approach is ideal for those among us who prefer to "cut to the chase" instead of wading through lengthy tirades. The examples build on one another which served to reinforce key concepts through out the book-- money well spent from my perspective.

Great Book for Silverlight App Development, June 22, 2010 5.0 out of 5 stars
*Getting ready
*How to do it...
*How it works...
*There's more...
*See also
The ample pictures of both the Visual Studio 2010 GUI and running Silverlight applications augment the many code samples. The section that I have appreciated the most has been the chapter on "Talking to WCF RIA Services" as I am working on developing a better understanding of it.
Now that the summer is here, it's a great time to pick up a book or two to read when you're away from your computer. If you are building or want to build applications with Silverlight, I highly recommend this book and suggest that you get a copy for your summer reading.

Best book for Developers., July 18, 2010 5.0 out of 5 stars
Best book for beginner / intermediate developers who have prior knowledge about basics of Silverlight.

Best Silverlight 4 Book To Date, June 19, 2010 5.0 out of 5 stars
I have read through every well-known Silverlight 4 book on the market. I have even read part of Microsoft Step by Step Silverlight 4 (released yesterday 2010-06-18 on Safari and via ebook) - In my humble opinion, this is the best Silverlight 4 book on the market to date. Most of what I have read from the other Silverlight books is covered in Ian Griffith's Silverlight 4 labs up on the Microsoft Silverlight 4 page. If you want a fast track to learn Silverlight 4 and are already familiar with C# .NET, I would recommend picking up a top rated Silverlight 3 book (I personally like books from the Apress series - "Pro Silverlight 3" and the Silverlight 3 Business Intelligence one (forget the exact title) - then the labs on the official Silverlight 4 website and this book.

life savor, August 25, 2010 5.0 out of 5 stars
I had to write a web-application to demo the WCF Data Service I was writing on a very short time budget. This book was a life savor; it had all the answers I needed for consuming the service and displaying in the datagrid. For server side programming, both Effective REST Services and Essential WCF are great.

The best silverlight book i've seen..., 24 Aug 20105.0 out of 5 stars
This is an excellent book, packed with step by step exercises so you learn by doing rather than just having reading a book as thick as a house brick. Personally I would buy this book to learn Silverlight from scratch, while its true you wont learn a great deal about the controls but you WILL learn the most important aspects which are accessing and displaying data.
I've been a software developer for 6 years after University and bought so many IT books, so far, this has been the best and most readable. I enjoyed reading and practicing the examples in it unlike so many 20 inch thick programming beasts that you dread opening because they just send you to sleep!
Dont hesitate, just buy it.
My only gripe about this book is that when I brought it I thought it was a tad expensive at £35... But, worth it though.

Concise and relevant, 11 Aug 2010 5.0 out of 5 stars
This book covers the essentials of Silverlight and WPF with practical examples that you are going to follow when building your real world applications. It explains WPF binding and DataTemplates well, and what interfaces your business layer objects need to implement to notify when changes occur.
The recipies on WCF communication (sockets, WCF, net.tcp) are great and give examples of when you would best use them, and cover the config file changes needed too.
A refreshingly slim book too - lets face it, who wants a 1000+ page book covering everything and the kitchen sink. You want a straight to the point book that covers the essentials you would use at work and touches all the major areas. Highly recommended.

 

If you want to read more reviews or order my Silverlight 4 Data and services cookbook, head to Amazon.com or Amazon.co.uk or alternatively you can order via the Packt website as well!



Snowball.be - The blog of Gill Cleeren
Click here to see the original post

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Snowball.be

Slides and demos for DotNed.nl Silverlight session

by Gill Cleeren 27 August 2010 07:54

Yesterday, I gave a talk for DotNed.nl, the Dutch usergroup at the Ordina offices in Nieuwegein. 55 people attended the sold-out talk, I hope you enjoyed it. Any feedback is of course welcome via mail.

The talk, Building an end-to-end Silverlight application consisted out of 10 topics that we often encounter when building LOB applications:

  • 1.SketchFlow
  • 2.WCF RIA Services
  • 3.Data binding & DataGrid
  • 4.MVVM
  • 5.MEF
  • 6.Commanding & behaviors
  • 7.Messaging, navigation & dialogs
  • 8.Custom controls & third party controls
  • 9.OOB
  • 10.Printing

The ZIP file below contains the PPTX and the demos (also of the 2 topics we didn’t cover).

Remember that in 2 weeks, on September 14th, I’ll be again in the Netherlands for 2 sessions for SiXin, the Silverlight usergroup. Registration for this event is free and can be done here.

PPTX & demos



Snowball.be - The blog of Gill Cleeren
Click here to see the original post

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Snowball.be

Slides and demos for DotNed.nl Silverlight session

by Gill Cleeren 27 August 2010 07:54

Yesterday, I gave a talk for DotNed.nl, the Dutch usergroup at the Ordina offices in Nieuwegein. 55 people attended the sold-out talk, I hope you enjoyed it. Any feedback is of course welcome via mail.

The talk, Building an end-to-end Silverlight application consisted out of 10 topics that we often encounter when building LOB applications:

  • 1.SketchFlow
  • 2.WCF RIA Services
  • 3.Data binding & DataGrid
  • 4.MVVM
  • 5.MEF
  • 6.Commanding & behaviors
  • 7.Messaging, navigation & dialogs
  • 8.Custom controls & third party controls
  • 9.OOB
  • 10.Printing

The ZIP file below contains the PPTX and the demos (also of the 2 topics we didn’t cover).

Remember that in 2 weeks, on September 14th, I’ll be again in the Netherlands for 2 sessions for SiXin, the Silverlight usergroup. Registration for this event is free and can be done here.

PPTX & demos



Snowball.be - The blog of Gill Cleeren
Click here to see the original post

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Snowball.be

Upcoming DotNed.nl session: Building an end-to-end Silverlight application with me!

by Gill Cleeren 19 August 2010 20:06

hNext week Thursday (August 26th 2010), I’ll be presenting at DotNed.nl. The presentation is titled Building an end-to-end Silverlight 4 application. As the title says, we’ll be looking at some of the common questions (and of course answers) you’ll have when you are faced with the challenge of building a Line-of-Business application from scratch.

Bring your demo hat today, as we’ll be building an end-to-end, real life Silverlight application during this session! Looking at Silverlight today, we easily see that the platform is getting larger and larger, with more frameworks such as MEF being developed on the side. Advanced features such as COM interop and printing make the Silverlight story complete. In this session, we’ll take a look at how we can use all members of the Silverlight family to build an end-to-end application, based on MVVM principles.

 

Registration is free but mandatory and can be done on the DotNed.nl site. And since it’s taking place in the Ordina.NL offices, I won’t be feeling all that strange ;-) (FYI, I work at Ordina.BE!)



Snowball.be - The blog of Gill Cleeren
Click here to see the original post

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Snowball.be

Vote for sessions at TechEd 2010 Berlin

by Gill Cleeren 13 July 2010 21:37

Microsoft just announced that all of us can help deciding which sessions will be delivered at Tech-Ed 2010 Berlin. That's a great way of making sure that the contents is what the public wants!

I've ran through the list and 4 of my proposals made the shortlist (which is good news :)).

  • Treasures for the C# developer in Visual Studio 2010
  • AJAX Tips and tricks: things you never knew that could be done in ASP.NET Ajax
  • Silverlight data access and services not for the faint of heart
  • The good, the bad and… well, that’s it: Comparing good and bad practices in Silverlight application development

If you would like me to deliver one of these sessions on the upcoming Tech-Ed, please vote for them at http://europe.msteched.com/sessionpreference . Of course, there are many really other interesting sessions there as well: I'm sure this will be a great conference!

Thanks for voting!



Snowball.be - The blog of Gill Cleeren
Click here to see the original post

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

Snowball.be

The jury has spoken: some reviews of my book

by Gill Cleeren 22 May 2010 20:06

With my book I wrote together with Kevin Dockx, Microsoft Silverlight 4 Data and Services Cookbook available for a couple of weeks now, I decided to do a small search on reviews. I’ll be honest, I took all I could find right now.

9843_Mockupcover

Here’s the ones I found:

Richard Costall:

“Microsoft Silverlight 4 Data and Services Cookbook is a great publication, and worthy of a place any Silverlight developers bookshelf. The formula of ‘recipes’ works well, with well explained, yet simple examples covering almost everything you’d ask when starting out building business applications in Silverlight. It highlights Silverlight 2 and Silverlight 3 functionality differences, yet is right up to date on Silverlight 4.”

Complete review at: http://www.nxtgenug.net/Article.aspx?ArticleID=368

Vikram Pendse writes:

“My Review Comments : * * * * * (5 Stars)..Simple Amazing book !..Go and Grab your Copy Today !!! :)

Impressed with this Book?..want to have a look at? Ok ! What you see is what you get ! kidding..You can download a sample chapter right away !”

Complete review at http://pendsevikram.blogspot.com/2010/05/microsoft-silverlight-4-data-and.html

Damir Tomicic writes:

“Das Buch ist sehr praktisch geschrieben. Der Leser merkt sofort, dass Gill und Kevin die Ansätze selbst ausprobiert und für die Leser optimiert haben. Die gewählte Sprache ist einfach, die Beispiele auch für Anfänger geeignet. Ein guter Einstieg in das Thema.”

Complete review at: http://tomicic.de/2010/05/05/MicrosoftSilverlight4DataAndServicesCookbookGillcleeren.aspx

Review on Amazon.com

“Good Introduction to the Datagrid, Dataform, and different Services (4/5)”


Complete review at http://www.amazon.com/Microsoft-Silverlight-Data-Services-Cookbook/product-reviews/1847199844/ref=dp_db_cm_cr_acr_txt?ie=UTF8&showViewpoints=1

Interested in my book as well? It is available from Packt Publishing, Amazon.com, Amazon UK and many other retailers as well! I hope you enjoy it!



Snowball.be - The blog of Gill Cleeren
Click here to see the original post

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Snowball.be

Community Day 2010 registration open: register now!

by Gill Cleeren 11 May 2010 09:35

Community Day 2010 is coming! Registration is now open.

No less than fourteen Microsoft user groups combine their efforts to organize this unique knowledge-sharing and networking event. With so many new Microsoft product and technology releases, the content of this Community Day will be focusing on Visual Studio 2010, SharePoint 2010, Silverlight 4, Office 2010, SQL Server 2008 R2, OCSR2, and many more!
So don’t miss out on the Community Day and join us on Thursday June 24th in Utopolis, Mechelen. We will bring together more than 300 IT Pro’s and developers.
The Community Day 2010 is brought to you by Azug, Besug, Biwug, IT-Talks Pro-Exchange, SCUG, SQLUG, VBIB, Visug, WinSec, XNA-BUG, CLUG, MyTIC and DotNetHub.

Register now for free at www.communityday.be !



Snowball.be - The blog of Gill Cleeren
Click here to see the original post

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Snowball.be

My book released: Silverlight 4 Data and Services Cookbook

by Gill Cleeren 26 April 2010 14:32

Earlier today, I got confirmation that my first book I wrote (together with Kevin Dockx) has been published and can now be ordered, both in e-book and hard copy. This is the new cover. The book also marks the launch of the new brand of Packt, namely Packt Enterprise.

9843_Mockupcover

The e-book version is available from the publisher’s website: https://www.packtpub.com/microsoft-silverlight-4-data-and-services-cookbook/book . On this site, you can also get a discount on the printed version.

You can also buy the book from Amazon of course (which at this moment still lists it as pre-order though). If you shop at Amazon.com, you can get your copy here: http://www.amazon.com/Microsoft-Silverlight-Data-Services-Cookbook/dp/1847199844. If you rather order at Amazon UK, you can order here: http://www.amazon.co.uk/Microsoft-Silverlight-Data-Services-Cookbook/dp/1847199844/ref=sr_1_1?ie=UTF8&s=books&qid=1272289229&sr=8-1.

If you want to get a more in-depth look at what the book has to offer, take a look here: https://www.packtpub.com/microsoft-silverlight-4-data-and-services-cookbook/book#in_detail .

What the book is about:

Silverlight 3 made a big step into Line-Of-Business applications and Silverlight 4 builds further on this. This book is not a general Silverlight 4 overview book; it is uniquely aimed at developers who want to build data-driven applications using Silverlight. It focuses on showing . NET developers how to interact with and handle multiple sources of data in Silverlight business applications and how to solve particular data problems, following a practical hands-on approach, using real-world recipes in a practical cookbook format. The book is aimed at Silverlight 4, however most of the covered features work both in Silverlight 3 and 4.

By following the practical recipes in this book, you will learn the concepts needed to create data-rich business applications—from the basic creation of a Silverlight application, to displaying data using data binding and upgrading your existing applications to use Silverlight.

Who this book is written for:

If you are a .NET developer who wants to build professional data-driven applications with Silverlight, then this book is for you. Basic Silverlight experience and familiarity with accessing data using ADO.NET in regular .NET applications is required.

What you will learn from this book:

  • Display and validate data efficiently in Silverlight business applications using data binding
  • Use the full power of the important data controls in Silverlight such as the DataGrid and the DataForm
  • Discover how your Silverlight business applications can quickly access data residing in a database or even Windows Azure by calling web services using XML, RSS, JSON and more
  • Exchange information between Silverlight clients and WCF or ASMX services in your Silverlight business applications
  • Add functionality to your Silverlight business applications by harnessing REST and WCF Data Services
  • Communicate with well-known REST APIs such as Flickr and Twitter from Silverlight
  • Simplify your data-driven business application development with WCF RIA Services

You can also read some sample recipes on the Packt site here: https://www.packtpub.com/article/inserting-updating-deleting-sorting-grouping-displaying-data-grid-silverlight .

I do hope you’ll like the book. If you have any questions on the book, don’t hesitate to mail me at silverlight@snowball.be .



Snowball.be - The blog of Gill Cleeren
Click here to see the original post

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Snowball.be

Visual Studio 2010 Tip: Navigate to functionality

by Gill Cleeren 11 April 2010 22:04

Very often, you need to navigate to a class while coding. Perhaps a class you wrote yourself, perhaps you just want to see the members of a type of the .NET framework.

Visual Studio 2010 has THE ultimate feature for this, namely the Navigate To function. What you do, is hit CTRL + , (yes, indeed the comma) and it will open the Navigate To window, as shown below.

image

This window follows the same rules as the new IntelliSense: if I’m searching for a property “OverPaid”, I can search by typing Over… or just use OP.

image

If you have some text already selected in the code editor, the window will perform its search from there.

image



Snowball.be - The blog of Gill Cleeren
Click here to see the original post

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Snowball.be