views:

44

answers:

3

What would be the application development process for WPF applications and silverlight application? Like how many tiers the application is divided into and how they communicate with each other. And what steps are followed during development like design , then business logic layer. How the data base is accessed can Linq be used or data sets are better option?

A: 

This question isn't really about WPF or Silverlight as they are just UIs. The architecture isn't dictated by whether you use Silverlight, WPF or something else.

For example (and not limited to this scenario), if you are using a classic n-tier architecture, you could continue to do so while using a Silverlight front end.

Sohnee
+2  A: 

I would suggest that you start out using the WPF Application Framework. Your "tiers" should be something along the lines of:

  1. Business "Model" logic (database, LinqToSQL/EntityFramework is great with WPF)
  2. Your "View" which is your WPF/Silverlight controls
  3. Your "ViewModel" which binds the Logic to your View, passing change notifications anduser interactions.

I would do these steps in order. Assuming step 1 is mostly complete since it's not really unique to WPF/Silverlight, make an interesting UI but don't tie it to your model quite yet. Then study up on ViewModels. ViewModels, strictly bound and not accessed in code behind, will give you the best results.

If you're already familiar with C#/.NET, I would also strongly suggest you check out this excellent screencast showing you how to retrofit an application to following the "Model, View, ViewModel" architecture.

bufferz
+1  A: 

The process would be the same as for any other application; that is, design an architecture to suit your requirements! However, within your actual WPF/Silverlight code, you might want to look at the Model-View-Viewmodel architecture.

MVVM is a pattern that is typically used to structure the code behind a WPF UI, though it doesn't dictate how you access your data or define your business logic. The MVVM code would sit on top of your business/data code and provide an abstraction that's suitable for the UI to work with.

Dan Puzey