PRISM 是否适合大规模应用程序开发?

发布于 2024-09-28 17:20:42 字数 132 浏览 3 评论 0原文

在过去的 6 个月里,我正在使用 Prism 框架开发一个 silverlight 应用程序。当我现在查看代码库时,它已经变得巨大,包含大量模块、事件聚合器、模块间通信代码等。事后看来,我正在考虑我是否做出了正确的选择。我应该选择其他更简单的框架吗?

I am developing a silverlight application for the past 6 months using prism framework. When I look at the code base now it has grown huge with lots of modules, event aggregators, inter module communication code etc. On hindsight I am contemplating whether I made the right choice. Is there any other simpler framework I should have gone for ?

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

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

发布评论

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

评论(1

流年已逝 2024-10-05 17:20:42

Prism 在针对大型应用程序时处于最佳状态。为什么?因为Prism提供的核心概念,比如Modularity、UI Composition、对MVVM的支持等在这类应用中用得最多。

正如您所说,这个想法是您最终可能会得到一堆模块。这样做的好处是您的应用程序是解耦的,并且模块可以在绝对隔离的情况下进行测试,因此易于维护。

通过在大型应用程序中使用 Prism 或任何其他模块化应用程序的库/框架(正确地),当您对其中一个部分进行更改时,您不需要遍历整个应用程序来查找错误。在单体应用程序中情况并非如此,在单体应用程序中,进行微小的更改可能会导致整个应用程序崩溃。

在这种情况下,Prism 的另一个优点是它允许多个团队同时处理不同的模块,而不会影响彼此的工作。这在与分布式团队合作时特别有用。

要说服您做出正确的选择,请将您创建的应用程序与其组件高度耦合的相同应用程序进行比较。

我希望这有帮助

Prism is at its best when targeting a large application. Why? Because the core concepts Prism provides, such as Modularity, UI Composition, support for MVVM, etc. are used the most in this kind of applications.

The idea, as you said, is that you are likely to end up with a bunch of modules. The benefit of that is that your application is decoupled, and modules can be tested in absolute isolation so they are easy to maintain.

By using Prism, or any other library/framework that modularizes your application, (correctly) in large applications, you don't need to go through your entire application looking for bugs when you make a change to one of the parts. This is not true in monolithic applications, where making a minor change might bring down the entire app.

Another plus for Prism in this scenarios is that it allows multiple teams to work on different modules simultaneously, without affecting each other's work. This is specially useful when working with distributed teams.

The thing that would convince you of making the right choice, would be comparing the application you created with the same one but with high coupling of its components.

I hope this helps

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