22

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.

4

13 回答 13

8

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:

于 2008-09-29T20:36:25.817 回答
7

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 is a pretty good DNRTV screencast demoing it.

于 2008-09-29T20:25:39.417 回答
7

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.

Further update: JSR 296 is dead. JavaFX is the current direction for client-side Java.

于 2008-09-29T21:45:17.383 回答
6

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.

于 2008-09-29T20:08:33.980 回答
3

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.

于 2008-09-29T20:19:22.800 回答
3

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.

于 2008-09-30T03:18:08.317 回答
1

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. :)

于 2008-09-29T20:08:19.847 回答
1

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.

于 2008-10-14T12:52:57.237 回答
1

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

于 2009-03-19T18:38:27.490 回答
0

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.

于 2008-09-29T23:26:55.237 回答
0

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).

于 2008-09-30T06:15:54.707 回答
0

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.

于 2009-06-15T22:46:21.017 回答
0

I recently published DesktopBootstrap. It's my attempt to factor out many of the common elements of creating medium to large scale desktop apps.

You can find it here.

于 2011-11-27T20:27:44.460 回答