views:

149

answers:

3

I know S#arp architecture is built for ASP.NET MVC. But I'm wondering if it can be used in classic ASP.NET (WebForms) or even desktop applications like WinForms or WPF.

Thnkas a lot.

+1  A: 

As far as I understood from your question, you should have a look at the MVP pattern. You can create your own Models and Views by yourself with asp.net forms.

Kubi
A: 

I'm not sure about WebForms or WPF but if you want to use it for WinForms, check this out:

wiki.sharparchitecture.net/ContribNonWebHowTo.ashx

I have found it to be very workable.

Sandor Drieënhuizen
A: 

Iain, You most definitely could use S#arp Architecture in an application other than ASP.NET MVC. I use it to power several console applications and we have a few windows services running it as well.

You would want to look at the S#arp Architecture Contrib project to use it in a non MVC or Web Form app. To use it in web forms, you would use spin it up as you would a MVC application, but using it in your web forms would be slightly different. In this case, look for an MVVM or MVP solution and replace as you need.

Alec Whittington