针对 Microsoft 嵌入式手持式 6.5.3 设备进行开发 - 架构?

发布于 2024-11-16 07:49:57 字数 495 浏览 3 评论 0原文

我即将启动一个大型项目,其中三个不同的应用程序/源将查询同一数据库。

对于 WPF,我想我会选择 MVVM 模式(或者 MVP 可能更有意义?),但是当涉及到手持设备时,我对此一无所知选择哪种模式/架构。是否有可能在这样的设备上拥有某种架构?

有人有这方面的经验吗? :-)

如有任何帮助/提示,​​我们将不胜感激!

/ 博

I'm about to start up a large project where the same database will be queried by three different applications/sources.

For the WPF I think I'll go with with MVVM pattern (or will MVP make more sense maybe?), but when it comes to the handheld device, I'm clueless as to which pattern/arcitecture to choose. Is it even possible to have some sort of arcitecture on such a device?

Anyone got any experience with this? :-)

Any help/hint is appreciated!

/ Bo

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

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

发布评论

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

评论(1

如果您计划将 Windows Mobile 6.5 与 .NET Compact Framework 3.5 SP1(在 Visual Studio 2008 中)一起使用,最常见的方法是使用 Windows 窗体(紧凑型)。如果您打算使用 C++,则可以忽略此答案的其余部分,因为我不确定 C++ 的最佳实践是什么。

适用于 .NET CF 的 Windows 窗体与完整框架 Windows 窗体类似,但在功能和开箱即用工具方面受到更多限制。实际上没有现成的 WPF/Silverlight/MVVM 选项可用于旧版 Windows Mobile 平台,但如果您足够勇敢,您可以尝试推出自己的 MVVM 类型框架,但我可能不会建议这样做,因为 MVVM 与 WPF 配合使用效果更好或 Silverlight,并且可能无法映射到 Windows 窗体以及其他选项。

有几个适用于 .NET CF Windows 窗体的 MVC 或 MVP 示例或基本框架,但我还没有看到真正功能齐全的。您可以尝试来自 Patterns & 的 Windows Mobile 的“智能客户端软件工厂”。微软的实践团队,但我不确定我会走这条路,因为它可能过于复杂。在 google 中搜索“Windows Mobile MVC 或 MVP”。很多时候,MVC/MVP 示例仅显示单个屏幕,这并不能让您了解作者打算如何处理应用程序屏幕转换、全局事件等。

我可能会建议使用 MVP 模式而不是 MVC,因为 MVP 效果很好与 Windows 窗体。 MVC 使用 Forms 可能会有点尴尬,除非你做得非常小心。这是我在 .NET CF 中使用 MVP 在 Compact Framework 上找到的多屏应用程序的最佳示例:

https://github.com/derickbailey/appcontroller.cf

这是一个很好的例子,因为它使用了 IoC 和 UI 事件聚合等现代最佳实践。此示例的另一个好处是它为良好的单元测试和 UI 开发的良好实践奠定了基础。

If you are planning to use Windows Mobile 6.5 along with the .NET Compact Framework 3.5 SP1 (in Visual Studio 2008), the most common approach is to use Windows Forms (Compact). If you are planning to use C++, you can ignore the rest of this answer as I'm not sure what the best practices are for C++.

Windows Forms for .NET CF is similar to the full framework Windows Forms, but much more limited in functionality and out-of-the-box tools. There is really no WPF/Silverlight/MVVM options readily available for the legacy Windows Mobile platform, but you can try to roll your own MVVM type framework if you're brave, but I probably wouldn't suggest that as MVVM works better with WPF or Silverlight, and may not map to Windows Forms as well as other options.

There are several MVC or MVP examples or basic frameworks out there for .NET CF Windows Forms, but I haven't seen one that's really full-featured. You could try the "Smart Client Software Factory" for Windows Mobile from the Patterns & Practices team at Microsoft, but I'm not sure I would go that route, as it can be overly complicated. Search google for "Windows Mobile MVC or MVP". A lot of times the MVC/MVP examples only show a single screen, which does not give you any idea how the author intends to handle application screen transitions, global events, etc.

I would probably suggest the MVP pattern over MVC as MVP works well with Windows Forms. MVC can be a little awkward with Forms, unless you do it very carefully. This is the best example I've found of a multi-screen app on the Compact Framework using MVP in .NET CF:

https://github.com/derickbailey/appcontroller.cf

This is a great example, as it uses modern best practices like IoC and UI event aggregation. The other bonus of this example is that it sets the stage for good unit testing and good practices for UI development.

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