高层架构

发布于 2024-07-10 06:00:52 字数 1560 浏览 6 评论 0原文

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

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

发布评论

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

评论(5

唔猫 2024-07-17 06:00:52

我不止一次与 Kent Beck 发生过这样的争论,他会说你错了,你不需要做出这些架构决策,或者更确切地说,你应该选择可能的最简单的事情工作并从那里继续。

我发现的问题是,您可能已经走了很长一段路,然后才发现 STTCPW 实际上不起作用,并给您带来大量返工。 现在,如果您正在逐步正确地做事,或者使用风险驱动模型做得更好,因此您首先检查风险最高的决策,那么希望您能够相对较早地发现这些事情,但这当然不能保证。

另一方面是,很多敏捷项目都处于大多数架构都是预先确定的环境中,例如 Ruby on Rails 或 J2EE。 这些系统大大降低了风险,因为您有一个确定的环境。

尽管我正在考虑写一本,但我不知道有什么关于这个主题的特定书籍; 这在敏捷社区中仍然存在争议。

我最喜欢的论坛可能是 Martin Fowler 的 bliki 和 InfoQ,但需要注意的是,我即将开始向 infoQ 发帖,因此可能会产生偏见。

I've had this argument with Kent Beck on more than one occasion, and he would say that you're just wrong, that you don't need to make these architectural decisions, or rather that you should choose the Simplest Thing That Could Possibly Work and proceed from there.

The problem I see is that you can be a long way down the tracks before you discover that the STTCPW won't, in fact, work, and leave you with a lot of rework. Now, if you're doing things properly incrementally, or even better with a risk-driven model so you examine the riskiest decisions first, then hopefully you will have spotted these things relatively early, but there's certainly no guarantee.

The other side of that is that a whole lot of Agile projects are in contexts where most of the architecture is pre-determined, eg, Ruby on Rails or J2EE. Those systems reduce the risk considerably, because you have a decided environment.

I don't know of any particular books on the topic, although I'm thinking of writing one; this is still pretty much up for debate in the Agile Community.

Probably my favorite fora for this are Martin Fowler's bliki, and InfoQ, with the caveat that I'm about to start posting to infoQ and so may be prejudiced.

冰雪之触 2024-07-17 06:00:52

关于该主题的一篇好文章是“谁需要建筑师吗?” 作者:Martin Fowler。

我个人的看法是,您可能需要预先做出的架构决策比您想象的要少得多。 如果你做了足够的工作来得出合理的估计,你应该做得很好。

不过,您需要密切关注设计力量,并善于重构。 您将希望尽早开始练习。 如果没有预先想出一个架构,应该会给你很多机会。 ;)

你会做出错误的决定吗? 是的。 改变架构需要时间吗? 当然。

但是,您也节省了大量时间,因为您无需尝试预先构想架构。 而且,因为在项目开始时您拥有的信息量最少,所以无论如何,前期架构都不会真正“正确”。 如果运气好的话,这“只是”太过分了,更有可能的是,你也会做出一些最好稍后改变的决定。

关于风险,请记住您应该首先开始开发最重要的功能。 这样,您的架构实际上将被构建为最好地支持最重要的功能,这正是它应该的方式。

您可能会喜欢关于该主题的一本好书是 Robert Martin 的“敏捷软件开发 - 原则、模式、实践”。

A good article on the topic is "Who needs an architect?" by Martin Fowler.

My personal take is that you probably need to make much less architectural decisions up front than you might think. If you just do enough to come up with reasonable estimates, you should do well.

You will need to pay close attention to design forces, and get good at refactoring, though. You will want to start practicing it as early as possible. Not having come up with an architecture up front should give you many opportunities. ;)

Will you make wrong decision? Yes. Will it take time to change the architecture. Sure.

But you also saved a lot of time by not trying to dream up an architecture up front. And, because at the beginning of the project you have the least amount of information, the up front architecture wouldn't be really "right", anyway. With some luck, it will "just" be overkill, more likely, there will also be decisions made that you'd better change later, too.

Regarding risk, remember that you should start developing the most important features first. That way, your architecture will in fact be build to support the most important features best, which is exactly the way it should be.

A good book you might enjoy on the topic is Robert Martin's "Agile Software Development - Principles, Patterns, Practices".

z祗昰~ 2024-07-17 06:00:52

在一般架构上,例如:

并且您有特定于平台的书籍,例如对于 java:

  • Sun Certified Architect for JEE Study Guide
  • Broemmer:J2EE 最佳实践

Wikipedia 有一个相当全面的关于 软件架构

On general architecture, you have for example:

  • Fowler: Patterns of Enterprise Application Architecture
  • Hohpe: Enterprise Integration Patterns
  • The Zachman framework
  • The Open Group Architecture Framework, TOGAF

And you have platform-specific books, for example for java:

  • The Sun Certified Architect for JEE Study Guide
  • Broemmer: J2EE Best Practices

Wikipedia has a fairly comprehensive list of pointers on software architecture.

笔芯 2024-07-17 06:00:52

这是敏捷的关键问题,我认为还没有人解决它。 最初的架构决策对于成功至关重要,正如 Kent Beck 所说,理想情况下,您应该推迟这些决策,直到获得足够的信息。

他之所以能这么说,很大程度上当然是因为他可以选择自己的客户,并要求这种程度的自由。 项目进行三个月后更改实施语言对他来说可能没问题,但对我们大多数人来说这不是一个选择。 我们必须尽早做出一些决定,而且它们必须是正确的。 我们必须在信息不足的情况下开展工作,并尽可能有效地利用我们的经验和智慧。

大多数建筑文本都有一个过程,从表达所需功能的英语句子开始,然后将名词和最终动词分解为分类器的语义表示,最终转化为实际的代码行。

我们不能在敏捷中太容易地做到这一点 - 用户故事不适合分解,因为它们不够详细,而且我们没有任何其他功能需求来源。

我建议避免使用 UML 之类的东西(至少除了保留自己的笔记之外),直到您至少编写了发布计划,并且您对哪些故事可能在哪个迭代中实现有所了解。 此时就可以开始详细的架构工作了。

在此之前,您必须做出一些决定,我认为您能做的最好的事情就是尝试确定您可以做的细节:

  • 非功能性需求可能是什么,
  • 您必须遵守哪些标准,
  • 您必须与哪些现有系统进行交互以及他们的 API,
  • 部署平台是什么,
  • 目标运营团队拥有什么技能,

诸如此类的事情。 通常,这些限制足以限制您的预期交付,使您可以对高级组件及其驻留位置充满信心。

我强烈建议在用户界面上进行信息架构工作。 UI 很脆弱且更改成本高昂,线框表示与成品足够接近,可以与利益相关者进行讨论并获得有价值的答案。

不过,您需要一名优秀的信息架构师,并且需要定期挖掘用户故事 IA 中的更改,以确保其中的所有内容都得到适当的估计。

对于非 UI 工作,请仔细考虑解决方案中的一些核心概念 - 通常可以非常清楚地识别和说明事务边界和事务安全要求等内容,即使您不知道每个内容具体包含什么内容交易类型。 针对交易和数据安全专门针对约束条件和成功标准做出一些声明,并获得利益相关者的同意。

最后,在每次迭代开始时,您可以进行一些详细的建模和架构工作,因为这里是真正的功能分解发生的地方。 我强烈建议花时间对这项工作进行预迭代。 在迭代的实际编码开始时,您应该清楚地了解要创建的每个类、它的存在位置以及它将与什么对象通信。 如果没有这个,就不可能协调开发团队。

This is the key problem with Agile, and I don't think anyone has solved it yet. Initial architectural decisions are critical to success, and as Kent Beck says ideally you would defer them until you have enough information.

That he can say it of course is largely because he can choose his clients, and demand that degree of freedom. Three months into a project changing the implementation language might be ok for him, but for most of us it's not an option. We have to make some decisions quite early, and they have to be right. We must work with insufficient information, and use our experience and nous as effectively as possible.

Most architectural texts have a process that starts with english sentences expressing required functionality, and then decompose the nouns and eventually verbs into semantic representations of classifiers that eventually end up being turned into actual lines of code.

We can't do this in agile too easily - user stories don't lend themselves to decomposition, because they are insufficiently detailed, and we don't have any other source of functional requirements.

I'd suggest avoiding anything like UML (for anything other than keeping your own notes at least) until you have at least written your Release Plan, and you have some idea of which stories are likely to be implemented in which Iteration. At this point you can start detailed architecture work.

Before this you must make some decisions, and the best you can manage I think is to try to pin down what detail you can:

  • what the nonfunctional requirements are likely to be,
  • which standards you must conform to,
  • which existing systems you must interface with and their APIs,
  • what the deployment platform will be,
  • what skills the target operational team have,

That sort of thing. Often these constraints can sufficiently box in your expected delivery that you can be confident of the high level components and where they will reside.

Something I do strongly recommend is doing Information Architecture work on user interfaces. UIs are fragile and expensive to change, and a wireframe representation is close enough to the finished article to be possible to discuss with stakeholders and get valuable answers.

You need a good information architect though, and you need to regularly mine changes in the IA for user stories, to ensure everything in them gets appropriately estimated.

For the non-UI work, think carefully about some of the core concepts in the solution - often things like transaction boundaries and requirements for transaction safety can be quite clearly identified and stated, even if you don't know what specifically is contained in each type of transaction. Make some statements about constraints and success criteria specifically for transactions and data safety, and get them agreed by stakeholders.

Finally at the beginning of each iteration you can do some detail modelling and architecture work, since here is where real functional decomposition happens. I strongly recommend putting in the time pre-iteration for this work. At the start of actual coding for the iteration you should have a clear idea of every class you are going to create, where it will live and what it will talk to. If you don't have this, it's impossible to coordinate the development team.

天煞孤星 2024-07-17 06:00:52

听起来您正在讨论功能分解。

有自下而上和自上而下的方法。 我喜欢从双方的角度思考一个项目。 这一点尤其重要,因为当您从底层开始时,您可以考虑类及其方法。 当您从顶部开始时,您可以考虑程序将如何流动。

尝试:

大规模 C++ 软件设计(Addison-Wesley 专业计算系列)作者:John Lakos(平装本 - 1996 年 7 月 20 日)

It sounds like you are discussing functional decomposition.

There are both bottom up and top down approaches. I like thinking about a project from both sides. This is especially important since when you start from the bottom, you can think about classes and their methods. When you start from the top, you can think about how the program will flow.

Try:

Large-Scale C++ Software Design (Addison-Wesley Professional Computing Series) by John Lakos (Paperback - Jul 20, 1996)

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