实例介绍
干净架构是一种分层的架构方式,将核心业务(对应domain层)、UI相关(对应presenter层)以及数据加载(对应data层)彼此独立开来,不同的层之间由接口依次连接起来,但却又彼此不了解彼此的具体实现。
Robert c. martin Series Clean Code The Clean Code Cean arch武etu要 The software Visit informit. com/ martinseries for a complete list of available publications. T he Robert C. Martin Series is directed at software developers, team- leaders, business analysts, and managers who want to increase their skills and proficiency to the level of a Master Craftsman. The series contains books that guide software professionals in the principles, patterns, and practices of programming software project management, requirements gathering, design analysis, testing, and others Make syse to connect with us! inform. com/socialcon nect Pearson informit com Safari Clean architecture A CRAFTSMANS GUIDE TO SOFTWARE STRUCTURE AND DESIGN Robert c. martin PRENTICE HALL Boston Columbus. Indianapolis. New York. San Francisco Amsterdam. Cape Town Dubai· London· Madrid· Milan· Munich· Paris· Montreal· Toronto·Dehi· Mexico City Sao Paulo. Sydney· Hong Kong· Seoul Singapore· Taipei· Tokyo Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at corpsales @pearsoned com or(800)382-3419 Forgovernmentsalesinquiriespleasecontactgovernmentsales@pearsoned.com ForquestionsaboutsalesoutsidetheU.s,pleasecontactintlcs@pearson.com Visit us on the web: informit. com Library of congress control Number: 2017945537 Copyright c 2018 Pearson Education, Inc All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording or likewise. For information regarding permissions, request forms and the appropriate contacts within the pearson education GlobalRights&PermissionsDepartmentpleasevisitwww.pearsoned.com/permissions/ ISBN-13:9780-13-449416-6 ISBN-10:0-13-449416-4 117 This book is dedicated to my lovely wife, my four spectacular children, and their families, including my quiver full of five grandchildren-who are the dessert of my life CONTENTS Foreword Pr reface Acknowledgments About the author PART I Introduction Chapter 1 What Is Design and Architecture? The goal? Case stuc dy Conclusion Chapter 2 A Tale of Two values Behavion Architecture The greater value Eisenhower’ s Matrix Fight for the architecture PaRT II Starting with the Bricks: Programming Paradigms Chapter 3 paradigm Overview Structured programming Object-Oriented Programming Functional Programming Food for thoug Conclusion Chapter 4 Structured Programming Proof A harmful proclamation Functional Decomposition No formal proofs SCience to the rescue Tests Conclusion Chapter 5 object-Oriented Programming Encapsulation? Inheritance Polymorphism? Conclusion Chapter 6 Functional Programming Squares of integers Immutability and architecture Segregation of Mutability Event Sourcing Conclusion PART III Design Principles Chapter 7 SRP: The Single Responsibility principle Symptom 1: Accidental Duplication Symptom 2: Merges Solutions Conclusion Chapter 8 OCP: The Open-Closed Principle A Thought Experiment Directional control nformation Hiding Conclusion Chapter 9 LSP: The Liskov Substitution Principle Guiding the Use of Inheritance The Square/Rectangle Problem LSP and architecture Example LsP violation Conclusion Chapter 10 ISP: The Interface Segregation Principle ISP and Language ISP and Architecture Conclusion Chapter 11 DIP: The Dependency Inversion Principle Stable abstractions Factories Concrete Components Conclusion PART IV Component Principles Chapter 12 Components a Brief history of Components Relocatability Linkers Conclusion Chapter 13 Component Cohesion The reuse/release equivalence principle The Common Closure Principle The Common Reuse principle The Tension Diagram for Component Cohesion Conclusion Chapter 14 Component Coupling The Acyclic Dependencies principle Top-Down Design The Stable Dependencies Principle The Stable Abstractions Principle Conclusion PART V Architecture Chapter 15 What Is Architecture? Development Deployment Operation aintenance Keeping Options open Device Independence Junk mail Physical addressing Conclusion Chapter 16 Independence Use cases Operation Development Deployment eaving Options Open Decoupling Layers Decoupling use Cases Decoupling mode Independent Develop-ability Independent deployability Duplication Decoupling Modes(again) Conclusion Chapter 17 Boundaries: Drawing Lines A Couple of sad Stories Fitnesse Which lines do you draw. and when do you draw them? What About Input and output? Plugin architecture The Plugin Argument Conclusion Chapter 18 Boundary Anatomy Boundary crossing 【实例截图】
【核心代码】
标签:
相关软件
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论