Prism v4 当前文档/教程和用法/渗透

发布于 2024-11-14 10:13:32 字数 841 浏览 3 评论 0原文

我最近花了很多时间尝试学习 XAML/C#/WPF/Silverlight,尝试构建一个桌面应用程序以及一个与之配合的 Web 应用程序,如果可能的话,重新使用相同的代码。

Prism 似乎是实现此目的的最佳工具,它让我能够同时记住 MVVM、Silverlight 和 DesktopWPF。然而,我的担忧来自两个地方:

1)几乎所有我读过的视频/示例(关于 PRISM)都是 Prism v2,除了我现在正在阅读的 342 页 Prism v4 文档。而且整个 Prism 世界的文档/更新似乎非常稀疏,PRISM v4 的最后一次更新是在一年多前。 当我观看向我展示如何在 Prism v2 中执行某些操作的视频时,这会导致问题,然后我了解到 Silverlight v4 实际上带来了一些突破,这意味着我可以以更合乎逻辑的方式执行相同的操作。是否有任何更新的教程,至少概述了 Prism 的更改(例如 ICommand 支持,对区域的少量更改)。我是第一次学习这个,我宁愿学习 v4 而不是 v2,并且了解所有更新的实践。

2) PROJECT LINKER VS2010 扩展(这对于重复使用相同代码库进行多目标 WPF 和 Silverlight 部署似乎 100% 是必要的,但仅被下载了 5000 次?!这是否意味着最多有 5000 个公司甚至尝试同时将应用程序部署到 WPF 和 Silverlight,为什么(至少对我来说)能够编写 1 段代码?部署到桌面和基于 Web 的平台的基础是一个巨大的优势,但如果我是仅有的 5000 名进行双 WPF/Silverlight 开发的人之一,我会担心也许还有另一个更好的解决方案

?更新了 Prism v4 文档/实践,VS2010 的 PRISM/Project 链接器是否是从头开始编码基于桌面/Web 的双应用程序的可靠方法?

I've been spending quite alot of time recently trying to learn XAML/C#/WPF/Silverlight, trying to build a Desktop application as well as a web application to go along with it, re-using the same code if possible.

Prism seems like the optimal tool to do this, allowing me to keep both MVVM, Silverlight and DesktopWPF in mind all at once. However, my concern derives from two places:

1) Almost all of the videos/examples I have been reading (wrt PRISM) are Prism v2, save for the 342 page Prism v4 documentation I am going through right now. Also it seems like documentation/updates in the whole Prism world are very sparse, PRISM v4 was last updated over a year ago.
This causes problems when I watch a video showing me how to do something in Prism v2, then I learn that Silverlight v4 has actually brought some breakthrough that means I can do the same thing in a much more logical manner. Is there any updated tutorials, at least ones the outline the changes w.r.t. Prism (eg ICommand support, few changes to Region). I'm learning this for the first time and I'd rather learn v4 than v2 and know all of the updated practices.

2) The PROJECT LINKER VS2010 extension (which seems 100% neccessary in order to do a multi-target WPF & Silverlight deployment re-using the same code base, has only been downloaded 5000 times?! Does this mean there are at most 5000 companies even TRYING to deploy apps to both WPF and Silverlight at the same time? Why is that? It seems (to me at least) that being able to write 1 code base that deploys to both Desktops and web-based platforms is a HUGE advantage, but it worries me if I am one of only 5000 people doing a dual WPF/Silverlight development that perhaps there is another better solution?

Basically, is there any resource for updated Prism v4 documentation/practices, and is PRISM/Project linker for VS2010 a reliable way to start coding a dual Desktop/Web-based application starting from the ground up?

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

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

发布评论

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

评论(1

浮生未歇 2024-11-21 10:13:32

我们已经为 WPF 和 Silverlight 创建了许多大型 PRISM 项目(V2 和 V4),其中包含大量共享代码,并且遇到了与您相同的问题。

关于第 1 项:我们只是阅读所有内容并尝试牢记文档的日期。 PRISM 总是让我们感觉自己是开拓者,因此在这方面您并不孤单。

关于第 2 项:基于最简单的往往是最好的(我们的原始 C# 代码只是原始 C# 代码,无论平台如何),我们为 WPF 和 Silverlight 项目以及 WinForms 等保留单独的库,但如果代码需要为了共享,我们将原始文件保存在一个通用的 .Net 库中(仅用于存储),并使用“链接”选项将文件包含在其他项目中。

(请原谅以下的矫枉过正,我正在玩 SnagIt:))

添加现有项目...
在此处输入图像描述

添加为链接文件...

在此处输入图像描述

文件保留在原来的位置,文件图标在项目中有一个小链接符号...输入图像这里的描述

我们也发现自己经常回到 Stack Overflow 来解决这类问题,所以至少你有很好的陪伴。

We have created a number of large PRISM projects (V2 and V4) for WPF and Silverlight with lots of shared code and have run into the same issues you have.

With regard to item 1: we just read up everything and try to bear the date of the docs in mind. PRISM always makes us feel like we are trail blazing, so you are not alone in that respect.

With regard to item 2: On the basis that simplest is often best (and our raw C# code is just raw C# code, regardless of platform), we keep separate libraries for our WPF and Silverlight projects and WinForms etc, but if the code needs to be shared we keep the original in a common .Net library (just for storage) and use the "link" option for including files in other projects.

(forgive the following as overkill, I am playing with SnagIt:)).

Add existing item...
enter image description here

Add as a linked file...

enter image description here

The file remains in the original place and the file icon has a little link symbol in the project...enter image description here

We also find ourselves back here at Stack Overflow quite a lot for these sort of issues, so at least you are in good company.

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