views:

2072

answers:

12

I'm wondering if there are any architectural frameworks out there to create desktop or standalone applications, in Java or C# for instance. It seems that there are tons of them available for web applications but I can't find many good resources on frameworks or architectural best-practices for desktop development.

Ideally I would like to know if there is any source code available of desktop applications that would be considered to have a good architecture or are built with a certain framework.

+1  A: 

You can use some of the same approaches in client development that you use in web development, such as Model View Presenter. The System.Windows.Forms namespace has everything you need to build a client application in C#, with the rest of the .NET Framework available to provide the services you need (such as IO and remoting).

As far as source code for solid architectures in desktop apps, look at the code for Paint.NET and SharpDevelop. Both have very different approaches that will be interesting to you.

Sorry for the .NET slant of this reply. It's what I know best. :)

Robert S.
+4  A: 

Check Microsoft's Smart Client Software Factory. It contains code samples and documentation.

Overview

This software factory provides proven solutions to common challenges found while building and operating composite smart client applications. It helps architects and developers build modular systems that can be built and deployed by independent teams. Applications built with the software factory use proven practices for operations, such as centralized exception logging.

The software factory contains a collection of reusable components and libraries, Visual Studio 2008 solution templates, wizards and extensions, How-to topics, automated tests, extensive architecture documentation, patterns, and a reference implementation. The software factory uses Windows Forms, Windows Presentation Foundation, Windows Communication Foundation, and the Enterprise Library 3.1 – May 2007 release. With this release, the Composite UI Application Block is included in the software factory.

Panos
+1 for SCSF (and EntLib/CAB).
boj
If you're going to be writing enterprise desktop apps for a company. I recommend not writing one-off apps for every little need the company has. Write a composite app and build a platform. SCSF is also my recommendation. The users love going to ONE place. Developers love having a pluggable platform.. and only ONE application to maintain/deploy.
Travis Heseman
+2  A: 

In Java, Naked Objects -- http://nakedobjects.org/home/index.shtml

JMatter -- implementation of naked objects -- http://jmatter.org/. pretty good.

both of them are open source.

anjanb
+5  A: 

There's a new .NET architectural guidance package from Microsoft patterns & practices for WPF that is code named "Prism" -- it's basically a "next generation" Composite UI Application Block (without the SCSF tooling). It uses Dependency injection, Composite pattern throughout, etc.

There was a pretty good DNRTV screencast demoing it last week.

Guy Starbuck
+5  A: 

While not directly related to desktop applications if you are looking for decent source code for well written projects I asked a similar question:

Open source C# projects that have extremely high code quality to learn from.

People gave some pretty good suggestions there:

Simucal
+6  A: 

In the lightweight app category, JSR 296 for Java (to be in future Java 7 possibly) is a framework handling the basics like resource management and actions. Lots of links here:

Scaling up a bit, you could look at various RCP frameworks like:

UPDATE: It has been mentioned (by Mark Reinhold at Devoxx '08) that JSR 296 will be included in Java 7.

Alex Miller
A: 

We develop in .NET technologies here.

Our friends here working on client applications develop their software to the Model View Presenter design pattern that is often associated with Web Development. For them they find it works very well, I believe it may be worth checking out.

The Smart Client Factory (mentioned by Panos) may also be useful to you, though it's not a framework but more of a library of best practice solutions to common problems.

Odd
+2  A: 

On the Java side, there are several projects aimed at Rich Client Platforms (RCP is the new buzzword for 'desktop' apps):

  • Eclipse RCP (if you are OK using SWT instead of Swing)
  • Spring RCP (which is in the process of being overhauled into Spring Desktop)
  • NetBeans RCP (which I'm not particularly impressed with, but that is getting some traction)
  • JSR 296 (Application Framework) - I actually really like this one

Google any of the above and you'll get tons of info.

Kevin Day
A: 

Specifically to organized presentation framework of ui functions we have been using infonode docking windows, that's a windowing framework using an eclipse like appearance (drag views anywhere, close them, undock them etc., skinnable of course). there's a gpl version for open source products out, altough afaik the developer licence is not that expensive ($299 each).

dhiller
+1  A: 

I would recommend CSLA .NET framework by Rockford Lhotka: http://www.lhotka.net/cslanet/Default.aspx

It comes will full source code as well as sample client applications built in ASP.NET, WinForms and WPF.

Blend Master
+1  A: 

I just found the Composite Application Guidance for WPF and Silverlight which looks very interesting. It was published in February 2009.

Christophe Herreman
A: 

Check IdeaBlade's Cabana For DotNet C#. http://www.ideablade.com/CAB.html

Cabana Sample App

The Cabana application is a simple smart client reference app with a crisp, feature-rich user experience that is easy to deploy and operate over the web. Cabana demonstrates:

An easy approach to the Composite UI Application Block from Microsoft ’s Patterns & Practices Group. Maintainable, reusable code through UI composition. Separation of Model (business logic and data access) from Presentation. The Model-View-Presenter pattern. Performance tuning. And more.

AlejandroR