模型 - 视图 - 演示者(或oter GUI架构)的复杂图形用户界面库设计的WinForms和WPF [英] Model-View-Presenter (or oter GUI architectures) for Complex GUI Library Design in Winforms and WPF

查看:170
本文介绍了模型 - 视图 - 演示者(或oter GUI架构)的复杂图形用户界面库设计的WinForms和WPF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不太确定这个问题,甚至如何标题问真的,但我会尽我所能。

I wasn't quite sure how to title this question or even ask it really, but I will do my best.

我建立一个图/流程图风格设计师其中包括(从一个非常高的水平)的控制,连接,连接点,覆盖编辑等的工具箱。

I am building a diagram/flowchart style designer which involves (from a very high level) a toolbox of controls, connections, connection points, overlays for editing,etc.

控制由业务对象或组件的支持。 (即有可能是一个由帐户UI / View组件代表的帐户部分。

The controls are backed by business objects or components. (i.e. there might be an 'Accounts' components which is represented by a 'Accounts' UI/View component.

下面就是我上面提到的样品样机。

Below is a sample mockup of what I am mentioning above.

这是nothign失控和应用hundres也有类似的功能。

This is nothign out of control and hundres of applications have similar functionality.

我已经有这方面的一个工作版本(更多 - 或更少),但它是由我自己(很差做在我看来),为了让我们能够使这个可扩展的,这样我可以继续开发它我们的水平(附加工具箱支持),我需要重构和这样做清洁工。

I already have a working version of this (more-or-less), but it was done very poorly by myself (in my opinion) and in order for us to be able to make this extensible so that I can continue developing it our horizontally (additional toolbox support), I need to refactor and do this cleaner.

我一直在引用上常见的GUI体系结构,如MVP,MVVM,MP,PV,PM等一些文章。

I have been referencing some articles on common GUI Architectures such as MVP, MVVM, MP, PV,PM,etc.

我担心的是,到目前为止,我还读到的一切是非常密切的关系定义CRUD操作界面架构。这些都不真正讨论复杂的UI库设计。

My concern is that everything I have read so far is very closely related to defining GUI Architectures for CRUD operations. None of these really discuss complex UI library design.

我已经能够找到,让一些关于这个论题最佳实践几篇文章,但它真的没有多少我继续掉。

I have been able to find a few articles that give some 'Best Practices' on this topic, but its really not much for me to continue off of.

到目前为止,MVP是最接近我会想象将为这方面的工作,但我只是没有足够的信服走这路线。

Thus far, MVP is the closest to what I would imagine would work for this, but I am just not convinced enough to go down that route.

这可能不是太大的帮助,但我想我可以给一些需要加以说明的相互作用/行为的简要列表。没有什么不寻常的东西,你会在一个图表或流程图应用程序中看到的。

It may not help much, but I figured I could give a brief list of some of the interactions/behaviors that need to be accounted for. Nothing out of the ordinary of what you would see in a diagram or flowchart application.


  • 控制(由业务对象的支持,很可能只是一个参照在稍后的时间将要创建的类型)可从工具箱被拖动到设计画布。

    • 控件可以拖动,删除,并有自己的状态修改(业务状态)。

    • 连接可以是源之间的发起和目标组件。

    • 连接可以在soruce和目标组件之间移动(在两端)。

    • 多个设计师的窗户可以打开,所以我们必须保持积极的设计师的理念。

    • Controls (backed by business objects, most likely just a reference to the Type to be created at a later time) can be dragged from toolbox to the designer canvas.
      • Controls can be dragged, removed, and have their state modified (business state).
      • Connections can be initiated between a source and target component.
      • Connections can be moved (at both ends) between a soruce and target component.
      • Multiple designer windows can be open, so we will have to maintain the concept of 'active' designer.

      我仍然在设计这个,我想保持UI状态/逻辑以及业务状态/逻辑的情况下不能确定。此外,将在什么地方活动设计的概念进行维护,等等。

      I am still not sure in the case of designing this where I would want to maintain the UI state/logic as well as the business state/logic. Additionally, where would the concept of the 'active designer' be maintained,etc.

      更新显然,这是另一个目标为SO巨魔,所以我会试图澄清我的问题/职位。

      UPDATE Apparently, this is another target for SO trolls, so I will try to clarify my question/post.

      我对所应用的UI设计出不同的图案有些懂行,但他们似乎并不灵活,足以为图书馆设计复杂的UI组件。我可能是错在于此。我想知道的是,在此特定情形的情况下,从上面所讨论的内容,我错在假设下去MVP的途径可能无法来解释复杂的UI逻辑是什么?

      I am somewhat knowledgeable on the different patterns that are applied for UI design, however It seems they are not versatile enough for library design of complex UI Components. I could be wrong in this. What I want to know is in the case of this particular scenario, from what was discussed above, am I wrong in assuming that going down the route of MVP might not be able to account for complex UI logic?

      推荐答案

      在这个级别(MVP,MVVM等)所有模式适用于几乎你需要的任何复杂性。它能够处理仅仅是你的,你必须了解它仍然只是一种模式,而不是用一些预制的功能框架,你不得不使用。

      All patterns at this level (MVP, MVVM etc.) are suited for pretty much any complexity you'd need. What it can handle is only up to you, you must understand it's still just a pattern, not a framework with some pre-made functions you'd have to use.

      不管你做什么然而,摘了WPF的WinForms,特别是当你需要对用户界面复杂的控制。

      Whatever you do however, pick WPF over Winforms, especially when you need complex control over UI.

      这篇关于模型 - 视图 - 演示者(或oter GUI架构)的复杂图形用户界面库设计的WinForms和WPF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆