当前位置:网站首页>将原则纳入到架构的生命中

将原则纳入到架构的生命中

2021-01-05 16:29:41 InfoQ

{"type":"doc","content":[{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最近一段时间,随着对架构的深入了解和体会,开始对架构有了新的看法,今天特地来和大家分享一下。","attrs":{}}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我们做程序员的时候,或多或少的都想要当一个架构师。我们看到公司中或者网上各式各样的架构图,感觉他们都很厉害。当我们按照架构去写代码的时候,也能感受到不同的架构对于自己的编码有着不同的影响。我们遇到不好的架构也会发出 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"我上我也行","attrs":{}}],"attrs":{}},{"type":"text","text":" 的感慨。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我们于是去看各种各样的架构文章,或者去学习一些架构师的课程。我们期望着有一天自己能够成为自己仰慕的那种架构师。而突然有一天我们的机会来了,有一个项目或者模块需要我们来设计。我们满心欢喜,认为自己大展拳脚的机会来了。结果设计的时候突然茫然了,那些架构的课程说的都太宽泛了,根本没有办法直接拿来使用。很多好的设计你也知道,但是你突然发现,好像这样设计变得更复杂了。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/8b/8b8ed5702543807b3088464e99948b1f.webp","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"你开始疑惑了,是要用完美的设计还是先把目前的功能实现了,后面再来修补。你的deadline越来越近,你不太执迷于良好的设计,架构对于你突然变得煎熬了起来,你只想赶快完成工作。于是你匆忙设计,只为完成工作。那些设计原则也早已被你抛之脑后。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最后你交了一份你自己都知道满是问题的架构设计,你也知道按照自己的设计,以后修补的工作肯定不少。你突然觉得架构好难,甚至觉得自己不是个架构的料。这时候你再看网上那些架构文章,你内心只觉得他们在夸夸其谈,没有任何实质内容。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"你其实没有做错,你只是在经历成为架构师必经的阶段。从美好到破碎,才会让你重新审视 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"架构","attrs":{}}],"attrs":{}},{"type":"text","text":" 这两个字的含义。随着你继续的了解,你会发现那些文章并没有说错,之所以让你没有让你觉得有用,是因为架构本身就是个变化的东西。他没有统一的结构,他需要你结合实际场景来去看。当你体会到这一点,你更加茫然了,因为这种自由恰恰让你不知所措。不知从何开始,就像黑夜中前行,地图已没有任何作用。需要你自己去体会,去摸索。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/47/477047ba7a333756cc48d09b03081f21.webp","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"你没有走错,只是遗忘了开始。架构是没有统一的外表,但是他有着一样的核心。是你在很多文章中都曾看到的,是你在一开始就知道的事情。那就是原则,从你一开始学习架构,你就遇到的事物。随着你碰到的坑越来越多,你越发发现 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"原则","attrs":{}}],"attrs":{}},{"type":"text","text":" 的重要性,你开始明白为什么那么多文章不去讲自己的架构多么多么牛逼,而是去和你探讨原则。因为他就像是指路明灯,在你迷茫的时候告诉你什么是正确的。在你架构的开始到审视自己的结果时,他就想一张检查清单告诉你,你还缺少什么,你还需要怎么做。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"世上没有统一的架构,但是有一致的原则。就将这些原则纳入到你的架构生命中吧。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://xie.infoq.cn/article/71677a6c46100af455022d14a?utm_source=rss&utm_medium=article

随机推荐