Uncle Bob: Architecture is About Intent, not Frameworks
Architecture is about intent, we have made it about frameworks and details, Robert C. Martin, "Uncle Bob", stated earlier at this year’s DDD Exchange Day in London.
Robert refers to an architecture model described in the book Growing Object-Oriented Software Guided by Tests, (similar to the Hexagonal architecture), which describes an architecture with three zones with dependencies going only one way, from the volatile parts towards the more stable parts:
- A Domain Model with the core business rules, the most stable and important part for the business, not depending on anything else.
- Application Services for the use cases of the system which uses, and depends on, the domain model.
- External Details, database, user interface, network, etc., that are less relevant for the business model. The most volatile part and depending on the other two.
Robert notes that this model fails to describe what he regards as a key aspect; architecture is about intent, what the application does. He thinks we focus too much on details and frameworks and have made them the centre of our systems.
To deal with this shortage Robert goes back to a book by Ivar Jacobson, "Object-Oriented Software Engineering, A Use Case Driven Approach" from 1992 where Ivar is defining a mechanism for application architecture based on small use cases without details.
Ivar introduces three types of objects, that fits naturally in the architecture model, and described by Robert as:
- Interactors that understands the use cases and has application specific business rules.
- Entities with the business rules, used by the Interactors.
- Boundary objects that transfer data between the external world and the Interactors.
A significant advantage with this model, Robert claims, is that it's a very testable model; it can be tested without any dependency on infrastructure by just sending and receiving data structures trough the boundary objects.
Robert then moves to his Clean Architecture model, a variant of the already mentioned architectures. An essential aspect of all the three models is that they follow the Stable Dependencies Principle; "Do not depend on things that change or are likely to change". The models do this by letting the external volatile parts depend on the more stable parts e.g. the domain model, and not the other way around. This also makes it easier to change an implementation; the volatile part is depending on something that is stable, quoting Robert:
A good architecture allows volatile decisions to be easily changed
Robert also refers to Jim Coplien and the DCI architecture which he thinks is similar to the other architectures.
Some criticism has been raised against some of these ideas that Robert has expressed in recent years, criticism that Robert also have responded to.
相关推荐
AndroDialysis: Analysis of Android Intent Effectiveness in Malware Detection
Android源代码 演示3个功能: (1)Intent打开另外一个Activity (2)Intent拨电话 (3)Intent在2个Activity间传递数据
电子邮件意图生成器 一个用于使用 URI创建 Intent的Android库 如果您想了解促使创建该库的原因,请阅读文章。... 您还可以使用EmailIntentBuilder添加其他两个字段并直接启动intent: EmailIntentBuilder . from(acti
Android Studio 实验二:Intent的使用
Intent intent = new Intent(Intent.ACTION_DIAL, uri); startActivity(intent); 2. 发送短信或彩信 // 给10086发送内容为“Hello”的短信 Uri uri = Uri.parse(smsto:10086); Intent intent = new Intent...
Android系列教程之十二:Intents and Intent Filters(三)
4种最常用的Intent传递方式,这4种方式如下: 1、通过Intent传递数据 2、通过静态变量传递数据 3、通过剪切板传递数据 4、通过全局变量传递数据
Android学习笔记(三五):再谈Intent(下)-一些实践
Android学习笔记(三四):再谈Intent(上)-一些知识
Android学习笔记(七):多个Activity和Intent
Android官方API文档完整版, ... Note that any extras that were included with the Intent at that point will not be seen here. 返回: Return an IBinder through which clients can call on to the service.
Cisco Digital Network Architecture Powering business transformations with an intent-based networking strategy
Android Intent的几种用法全面总结
在sendBroadcast,startActivity时,我们会用到Intent。 Intent可以携带一些数据,比如基本类型数据int、Boolean,或是String,或是序列化对象,Parcelable与Serializable。 Intent传递数据时,如果数据太大,可能...
通过一个实验,讲解Android的使用方法,总结详细
Intent intent = new Intent("android.intent.action.SILENT_PACKAGE_INSTALL"); intent.putExtra("silent_install_file", "/sdcard/Helloworld.apk"); intent.putExtra("...
Android应用程序中一般都有多个Activity,在Activity中,通过调用StartActivity方法,并在该方法的参数中传递Intent对象,就可以实现不同Activity之间的切换和数据传递。 通过StartActivity方法传递intent对象来启动...
1、设计界面,包括四个按钮,两个文本框。单击对应按钮可以启动对应activity。假定Activity A为启动Activity。 2、修改 Activity 的启动模式 LaunchMode,并通过 Log 信息来体会不同启动模式所对应的Activity 和 ...
Checking Intent-based Communication in Android With Intent Space Analysis 发表在AisaCCS'2016上。作者提出了IntentScope工具,能够综合系统中所有的security extensions规则,得出一个完整的,所有APP之间能否...
本文实例讲述了android中intent传递list或者对象的方法。分享给大家供大家参考。具体实现方法如下: 方法一: 如果单纯的传递List<String> 或者List的话 就可以直接使用 代码如下: 代码如下:intent....