在 ASP.NET 中启动 Web 应用程序之前如何选择架构?

发布于 2024-12-01 00:26:11 字数 128 浏览 0 评论 0原文

我有点困惑,在 ASP.NET 中启动网站或 Web 应用程序之前,我们如何选择最佳架构和最佳模型?

因为大多数时候我看到我们为此应用程序选择了错误的架构或模型,并且我们在应用程序的中间或末尾发现了这一点,当时我们无法更改它?

I am little bit confused that how we can choose a best architecture and a best model before starting a website or web-application in asp.net?

because most of the time i saw we choose a wrong architecture or model for this application and we found this at the middle or end of the application, when we can't change it at that time?

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

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

发布评论

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

评论(1

转瞬即逝 2024-12-08 00:26:11

选择“最佳”架构就是要了解所需解决方案背后的驱动因素。这不是开发团队可以自己完成的事情 - 他们需要与业务/利益相关者合作,以确保他们了解相对优先级。

原因之一是您不希望“具有架构意义”的优先级在中途改变(改变的程度可能太大)。如果事情没有尽早详细说明,那么当你发现主要驱动因素时就已经太晚了。

那么你“如何”做到这一点呢?

  • 了解问题并制定相关标准列表/矩阵。例如:
    • “用户可以用自己的实现替换模块,这一点至关重要,因此架构必须支持模块化设计。”
    • 这可能会导致:“需要在运行时更换组件而不使系统离线”,因此架构必须支持“热插拔”模块。
    • 系统需要支持基于桌面和手机的客户端,因此我们需要保持 UI 和业务服务的清晰分离。
    • 系统需要支持不同的数据库平台,因此数据访问必须松散耦合。
  • 非功能性需求:哪些是重要的?确定前 3-5 个并确定其优先级。安全性总是胜过可用性吗?可扩展性重要吗?如果重要的话,我们的架构是否应该允许我们将系统的不同部分部署到不同的物理服务器?
  • 一般来说,您想要做的事情之前已经完成了 - 出去做一些研究:找到参考架构和实现,根据您的标准对其进行评估。
  • 在查看参考架构师时,请记住,您可以通过不同的方式来实现它 - 按领域(医疗、银行、电信)或按技术(云与 Web/Java 与 .net)。 TOGAF 具有架构和解决方案连续体的概念 - 请参阅部分中的图表和文本9.6.1。它的工作原理是,其他人可能已经在某个地方定义了一个可能非常适合您的情况的良好架构

Choosing the "best" architecture is all about understanding the drivers behind the solution that's required. This isn't something that the dev team can do on their own - they need to work with the business / stakeholders to ensure they understand the relative priorities.

One of the reasons for this is that you don't want "architecturally significant" priorities to change mid-stream (the degree of change will probably be too much). If things aren't elaborated enough early on you'll discover major drivers when its essentially too late.

So "how" do you do this?

  • Understand the problem and draw up a list / matrix of criteria that is relevant. for example:
    • "It's essential that users can swap-out modules with their own implementations, so the architecture must support modular design."
    • This might then lead to: "components need to be swapped out at run-time without taking the system off-line", so the architecture must support "hot-swappable" modules.
    • The system will need to support desktop and phone based clients so we need to keep the separation of the UI and Business services very clean.
    • The system will need to support different database platforms so the dataaccess must be loosely coupled.
  • Non-functional Requirements: what ones are important? identify the top 3-5 and prioritze them. Does security always trump usability? Is scalability important - if so should our architecture allow us to deploy different parts of the system to different physical servers?
  • Generally speaking what you're trying to do has been done before - go out and do some research: find reference architectures and implementations, evaluate them against your criteria.
  • When looking at reference architects just remember that there's different ways you can approach it - by domain (medical, banking, telecom) or by technology (cloud vs web / java vs .net). TOGAF has the concepts of Architecture and Solutions Continuums - see the diagram and text in section 9.6.1. It works on the idea that somewhere someone else will probably have defined a good architecture that might be a good fit for your situation
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文