tags:

views:

223

answers:

3

I'm working on a project that needs to produce an application that runs both as a stand-alone application and a web application. We're considering using the User Interface Process (UIP) Application Block that available on the Microsoft Patterns & Practices web site.

The application block claims it can make this possible:

This block is a reusable code component that builds on the capabilities of the Microsoft .NET Framework to help you create both Web Forms- and Windows Forms-based applications.

Before we commit too much time to further investigation I'm wondering if anyone has had experience with using the UIP Application Block to create a Web-Forms- and a Windows Forms-based applications. How successful were you in separating the business logic from the user interface logic when using UIP?

A: 

I used the UIP to create an application to report insurance claims a few years ago. I found that it added complexity without any real benefit.

The UIP is not intended to keep your business logic and UI seperate. It's goal is to allow you to re-use your UI logic for both asp.net and winforms. This doesn't work out very well in practice because desktop apps and web apps are two completely different animals.

I also experienced quite a few bugs related to session state on the asp.net side (I can't remember the details, sorry). I eventually got sick of it stripped out all the UIP related code from the web app. After I did this it made the code much easier to understand and debug.

If your looking for a way to keep your UI separate from your business logic then you should check out CSLA.net.

Seth Reno
A: 

The UIP really sucked, I had a horrible experience using it. If you want a good example of the kind of architecture you are after download the Northwind Starter Kit.

It shows using different back ends/DB access techniques (SQL Server/Access/NHibernate) and different front ends (ASP.NET MVC/Monorail/Windows Forms/WPF).

It also has an associated book- "Architecting Applications for the Enterprise"

RichardOD
+1  A: 

I'm currently working on a project with the UIP. I won't say it's bad because I haven't really invested more than a day on it. But let me express one feeling: It's Saturday, my friends are hanging out drinking beers. I'm at the office, struggling to use it and reading around 50 pages of documentation. The web.config for the app is huge due to the amount of nodes it is using. I'm really, really sad and even I love Microsoft and programming because thanks to them I have a job to pay the rent... I am really frustrated, right now. And I'm usually a very happy guy.

I would rather use Aspnet MVC, cleaner, newer and built with the community input.

Hope this helps.

ciriarte
Aspnet MVC didn't meet our needs -- we needed to be able to create Winform and Web-based application on the same code base.
Jeff Stong
You need to arrange your projects correctly, MVC and Winforms are just UI projects which can refer to non UI code base,
CRice