Prism MVVM 的高级建模建议 [英] High Level Modelling Advice for Prism MVVM

查看:49
本文介绍了Prism MVVM 的高级建模建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开始为控制 现金收款终端的现有应用程序建模.我对 Prism/Composite 应用程序库非常陌生,想就如何开始使用 Prism 库对该应用程序进行建模提供一些建议.

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.

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

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.

推荐答案

在最基本的核心中,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.

希望这可以为您提供有关如何对应用程序建模的指南.Prism 看起来很复杂,但它有助于理解 Prism 真正获得的是这种对应用程序进行切片的能力.从高层次来看,这可能是您对建模更感兴趣的内容.

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.

这篇关于Prism MVVM 的高级建模建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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