Sample app

I read a lot of posts and articles about using MVC/MVP/MVVM and eliminating code behind, I wanted to see how easy/difficult it will be to do a app in silverlight without using code behind.

so without any kind of validation, styling, I did complete the app to some extent. the only code behind you will see is the default code that is generated when we add a xaml page

This app uses northwind database. if you download the code and want to run it make sure you change the connectionstring in web.config file.

Instructions to run the app

1. when you run the app you can use any of the existing customerId’s from northwind database(ALFKI,BONAP,BOLID etc), don’t need to enter password. click login


2. you will go to the default screen where you will be able to select a category, add a product to the cart and change between list view and grid view of the products



3. you can click on view cart to see the items in the cart with the ability to remove the items from the cart(this functionality is not complete, if you cancel and come back to this screen the products removed will comeback). you can click ‘place order’ to create an order for this customer along with order details.This app doesnt use the latest datagrid available with about 30 bug fixes. so while it does remove the items from the cart when you click the button, the UI will be weird.


4.In the login screen you can click on new customer and you can create a new customer, as there is no validation make sure you enter 5 characters for customerid

Of the things I learned, more often than not we need wrappers for the objects that are returned from our services and lack of RelativeSource in Binding can complicate some scenarios very quickly

you can download the code here


6 thoughts on “Sample app

  1. Pingback: chineseLocker
  2. Hi,
    I’am interested in used the patterns for Silverlight applications.
    What do You recommended: MVVM, MVP, MVC or another?

  3. Pingback: NewsPeeps

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s