Prism MVVM 的高级建模建议

发布于 2024-10-11 15:32:26 字数 343 浏览 1 评论 0原文

我开始对用于控制现金收集终端的现有应用程序进行建模。我对 Prism / Composite 应用程序库非常陌生,希望获得一些有关如何开始使用 Prism 库对此应用程序进行建模的建议。

基本上,该应用程序管理一个现金终端,该终端接受频繁的现金投放,计算存款中的票据,通过 3G/Edge 连接与我们的中央服务器进行通信以复制存款和其他数据,并执行现金提取。所有这一切的核心是现金罐的管理。该应用程序不是 UI 密集型的,但我们正在从 WinForms 转向 WPF,我应该使用这个框架来进行所有未来的开发。

I'm beginning modelling an existing application for controlling a cash collection terminal. I'm very new to the Prism / Composite Application Library and would like some advice on how I could begin modelling this application using the Prism library.

Basically the application manages a cash terminal that accepts frequent cash drops, counts notes in the deposits, communicates via a 3G/Edge connection with our central server to replicate deposit and other data, and performs cashups. Central to all this is management of the cash canister. The application is not UI intensive, but we are moving away from WinForms to WPF, and I am supposed to use this framework for all future development.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晒暮凉 2024-10-18 15:32:26

从本质上讲,Prism 是一个应用程序组合框架。它允许您模块化您的应用程序。首先要考虑应用程序的哪些部分需要模块化。

模块是一个功能单元,它本身很有用,但如果被替换或删除,并不会使应用程序变得无用。例如,在我为工作编写的应用程序中,我们有两种不同类型的联系人来处理案例。我们为每种联系人类型提供一个模块,提供特定于该联系人类型的功能。该应用程序在没有其中之一的情况下仍然可用,通过这种方式,我们可以单独或一起处理或测试每个组件。

希望这能为您提供如何建模应用程序的指南。 Prism 看起来很复杂,但它有助于理解 Prism 真正提供的是分割应用程序的能力。从较高的层次来看,这可能是您对建模更感兴趣的内容。

At its most fundamental core, Prism is an application composition framework. It allows you to modularize your application. The thing to start thinking about it what parts of your application need to be modular.

A module is a unit of functionality that is useful on its own, but doesn't make the application useless if it is replaced or removed. For example, in an application I've written for work we have two different types of contacts for which we handle cases. We have a module for each contact type that contributes functionality specific to that contact type. The application is still usable without one or the other and in this way we can work on or test each component individually as well as together.

Hopefully this gives you a guide to how to model your application. Prism seems complicated, but it helps to understand that what you really get with Prism is this ability to slice up your application. From a high level, this is what you'd probably be more interested in modeling.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文