Compact框架中的设计模式

发布于 2024-08-19 13:51:38 字数 351 浏览 4 评论 0原文

到目前为止,我一直致力于 Web 应用程序的工作,并且刚刚获得了使用 Microsoft Compact Framework 的机会。我对这个框架还很陌生。在 ASP.net 应用程序中,我一直遵循一些预定义的设计模式,有时还遵循 CSLA.net 或 Factory/Abstract Factory 等框架。 现在,在查看迄今为止为现有设备应用程序生成的现有代码时,我发现它缺乏任何模式,并且就像在您想要的地方使用一样。就是这样。在与其他成员讨论后,我发现设备应用程序应该是轻量级的,消息中传递的内容需要更少。这可能是使用模式的问题。 你们中有人在使用 Compact Framework 时精通 Designn 模式的使用吗?任何想法任何意见都非常受欢迎。

谢谢。

I have been working on Web application so far and has just got an opportunity to work ong Microsoft Compact Framework. i am pretty new about the framework. In ASP.net application I have been following some of the predefined Design patters and sometimes frameworks like CSLA.net or Factory/Abstract Factory.
Now while looking at the existing code produced so far for the existing device applications I find out that its lacking in any patterns and worked like use the thing where you want it . that's it. After having discussions with other members, I find out that Device application suppose to be lightwieght and contents passed in massages need to less. Which might be a problem with using the patterns.
Any of you well verse over the usage of Designn patterns while working with Compact Framework? Any ideas any inputs are highly welcome.

thanks.

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

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

发布评论

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

评论(2

口干舌燥 2024-08-26 13:51:38

呃?我在桌面和移动应用程序中使用相同的设计模式。不过,我通常会使用不同的设计
我建议您不要担心模式和消息大小,而应该更多地担心性能和内存使用情况。它们更加基础和重要,在设计和实现时将它们融入到您的思考中。
在将它们集成到设计中之前,测试您将要做出的有关性能的任何假设。

一个差异的一个小例子是,许多桌面设计喜欢使用反射,但反射在移动设备上相当慢。因此,您需要一种新的方法或解决方法,在这种情况下,您可以通过使用代码生成来解决这个问题。然而,在其他情况下,可能没有解决方法可以导致您的设计发生变化。

Eh? I use the same design patterns in both desktop and mobile applications. However I do typically use different designs.
I would suggest that instead of worrying about patterns and message size you should worry more about performance and memory usage. They are more fundamental and important, work them into your thinking at design time as well as implementation.
Test any assumptions you're about to make about performance before integrating them into the design.

A small example of one difference is that a lot of desktop designs like to use reflection, however reflection is pretty slow on mobile. So you need a new approach or a workaround, in this case you can get around this by using code generation instead. However in other scenarios there may be no workarounds leading to a change in your design.

默嘫て 2024-08-26 13:51:38

您可以查看 Microsoft 模式中的智能客户端软件工厂和实践可以为您提供一些标准构建块和设计指导。

Codeplex 上还有 OpenNETCF 的 IoC 框架,它以 SCSF 为模型,并在某些方面对其进行了扩展。

You could have a look at the Smart Client Software Factory from Microsoft's Patterns and Practices which can provide you with some standard building blocks and design guidance.

And there is also OpenNETCF's IoC Framework on Codeplex which is modelled on SCSF and extends it in some ways.

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