grasp

Service layer = Application layer = GRASP Controller layer [closed]

让人想犯罪 __ 提交于 2020-01-01 05:29:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I think service/application layer is the same thing as Larman describes as GRASP Controller, being the first object beyond the GUI layer that delegates to the domain layer, and should be reusable from different GUI. Service (Evans) layer is the same as Application (Fowler) layer because Fowler himself says so, in

软件设计原则——GRASP

浪尽此生 提交于 2019-12-27 03:42:12
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Craig Larman氏在《Applying UML and Patterns》一书中提出了GRASP设计模式的概念。作者称其为设计模式,其实,更好的理解应该为设计原则。因为,与GoF等设计模式不同的是,GoF等设计模式是针对特定问题而提出的解决方法,而GRASP则是站在面向对象设计的角度,告诉我们怎么样设计问题空间中的类与它们的行为责任,以及明确类之间的相互关系等等。GRASP可以说是GoF等设计模式的基础。 GRASP是General Responsibility Assignment Software patterns(通用职责分配软件模式)的简称,它的核心思想是“职责分配(Responsibility Assignment)”,用职责设计对象:"Designing Objects with Responsibilities"。它包含了9个基本模式: 1 专家模式(Expert) 解决方案:将职责分配给具有履行职责所需要的信息的类 通俗点就是:该干嘛干嘛去,别管别人的闲事或者我的职责就是搞这个,别的事不管。 举个简单的例子,如果有一个类是专门处理字符串相关的类,那么这个类只能有字符串处理相关的方法,而不要将日期处理的方法加进来。也就是提高软件高内聚一种原则。 2 创建者(Creator) 解决方案

Is Information Expert from GRASP and Modell from MVC the same?

佐手、 提交于 2019-12-13 05:17:39
问题 I just started to read the Applying UML and Patterns(2nd edition) book. Is one of the GRASP Patterns the Information Expert, equivalent with the Modell form MVC? Do they have the same responsibilities(Storing and retrieving information)? 回答1: Is Information Expert from GRASP and Modell from MVC the same? Yes and No. Do they have the same responsibilities(Storing and retrieving information)? No. Information expert's eligibility is not restricted to storing and retrieving information. It is

What is the Difference between GOF and GRASP design patterns

吃可爱长大的小学妹 提交于 2019-12-12 08:01:45
问题 I am really confused about the difference between GOF and GRASP patterns? even both contribute to improved Object oriented practices 回答1: GOF are patterns i.e. proven design solutions to recurring problems. GRASP are principles and are not tied to any specific problem domain hence true in any scenario 回答2: Short Answer : GoF are mentioned to Design Patterns . And GRASP are Design Principles . Design Principles are so abstract than Design Patterns. Long Answer : The main purpose of Software

Business Rule Split among two classes

自闭症网瘾萝莉.ら 提交于 2019-12-10 10:36:37
问题 I have a project allocation domain with the following business rules When a new employee is getting allocated to a project the total expenditure should not exceed the Budget Amount. For an employee the total allocation percentage should not exceed 100% I have created entities as shown below created in C# . QUESTION The Allocate logic is split across two classes – Project and Employee..The List<Allocation> is passed as a parameter to the Allocate method rather than adding as property of the

Difference between Pure fabrication and Indirection

痞子三分冷 提交于 2019-12-09 14:34:42
问题 I was trying to find tutorials and good examples which would explain difference between those two, but not able to find any information. Pure fabrication and indirection acts to create and assign responsibilities to intermediate object, so could anyone explain what is difference between those design patterns? Thanks! 回答1: You use Indirection if you want to create a lower coupling between components. The example Larman suggests in Applying UML and Patterns is a class TaxCalculatorAdapter. In

C++ promotes a separation between class definitions and class implementations but not JAVA [closed]

守給你的承諾、 提交于 2019-12-04 07:10:43
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I have a homework and I need to evaluate which approach is better according to GRASP. I found this link that answers part of my

Difference between Pure fabrication and Indirection

半城伤御伤魂 提交于 2019-12-04 00:23:44
I was trying to find tutorials and good examples which would explain difference between those two, but not able to find any information. Pure fabrication and indirection acts to create and assign responsibilities to intermediate object, so could anyone explain what is difference between those design patterns? Thanks! You use Indirection if you want to create a lower coupling between components. The example Larman suggests in Applying UML and Patterns is a class TaxCalculatorAdapter. In order to shield clients from having to know inner workings of a possible adapter, he hides them with an

C++ promotes a separation between class definitions and class implementations but not JAVA [closed]

前提是你 提交于 2019-12-02 13:33:53
I have a homework and I need to evaluate which approach is better according to GRASP. I found this link that answers part of my questioning: Why have header files and .cpp files in C++? However, what I want to know is how much c++ way of working is better for extensibility and for code reuse than JAVA because everything is defined in a conjoint file ? Thanks for the help ! Edit: Just to make sure that this is not a debate, I want to know why does JAVA does not do like in C and promotes the separation between class definitions and class implementations. Are there any advantages with that way of