吃什么下奶快下奶多| 静电对人体有什么危害| 甲亢不能吃什么| 什么是低碳饮食| 运六月有什么说法| 脸上长粉刺是什么原因| 风云人物什么意思| 胎心停了是什么原因引起的| 湿气是什么原因造成的| st-t改变是什么意思| 类风湿和风湿有什么区别| 秋天有什么水果| 怀孕可以吃什么水果| 空腹喝啤酒有什么危害| 舌头边缘有齿痕是什么原因| 什么药治痔疮最快| 喝茶心慌的人什么体质| 孕妇什么时候开始补钙| 见好就收是什么意思| 晚上十一点是什么时辰| qs排名是什么意思| 阳历1月份是什么星座| 张国立的老婆叫什么名字| 甘油三酯高不能吃什么| 短发适合什么脸型| 云雾茶是什么茶| 小排畸主要检查什么| 手臂疼痛挂什么科| 右小指麻木是什么征兆| 自什么自什么| 心动过缓吃什么药最好| 属羊的什么命| 痔疮有什么症状| 三月一日是什么星座| 医院康复科是干什么的| 1933年属什么生肖| 小孩满月送什么礼物好| 客家是什么意思| 巨细胞病毒是什么病| 什么是益生菌| 印度人信仰什么教| 口爆是什么意思| 苯磺酸氨氯地平片是什么药| 什么是同源染色体| 什么是胃溃疡| 玩微博的都是什么人| 宁的五行属性是什么| 部分是什么意思| 4.23是什么星座| 最近老放屁是什么原因| 什么叫易经| 闪光眼是什么症状| 阴道炎用什么药效果好| 早早孕试纸什么时候测最准| 碟鱼是什么鱼| 补休是什么意思| 县人武部政委什么级别| 李白字什么| 北京市长是什么级别| 西红柿什么时候吃最好| 什么的山谷| 信佛有什么好处| 牙体牙髓科看什么| 卵巢多囊是什么原因造成的| 哈尔滨有什么特产| 肝瘘是什么| 吃黄精有什么好处| 肺部增殖灶是什么意思| 好事多磨什么意思| 布鲁氏菌病是什么病| 女人出虚汗失眠吃什么药| 猪脆肠是什么器官| 园丁是什么意思| 脑梗什么原因导致的| 溦是什么意思| 大便溏稀吃什么药| 梦见墓碑是什么意思| 港式按摩是什么意思| 九月二十九号是什么星座| 80岁是什么之年| 蝙蝠属于什么动物| 为什么现在不吃糖丸了| 精神可嘉是什么意思| 什么是偏财| 什么什么分明的成语| 肉蒲团是什么意思| 岗位等级是什么意思| 酵素什么牌子好| 58岁属什么生肖| 发物是什么| 血管堵塞吃什么药好| 辅酶是什么| 命里有时终须有命里无时莫强求什么意思| 飞机票号是什么意思| 增强胃动力吃什么药| 经常干呕是什么原因| 什么人容易得心梗| 小苏打可以用什么代替| 跳蚤长什么样子图片| 水痘是什么病毒| 经期喝什么汤| 天安门以前叫什么| ph什么意思| 辽宁舰舰长是什么军衔| 什么是ct检查| 叛逆是什么意思| 百合有什么功效| 十月一是什么星座| 什么时候收复台湾| 弥留之际什么意思| 老古董是什么意思| 乖乖是什么意思| nars属于什么档次| 霉菌感染用什么药最好| 俎是什么意思| 日久生情是什么意思| 屎特别臭是什么原因| 屎是什么味道| 手串断了寓意什么| 小肠换气什么症状| 女性漏尿吃什么药最好| 颈椎病头晕吃什么药| 手指麻木吃什么药| 摩羯座的幸运花是什么| 四个人念什么| 安坦又叫什么药| 塞飞洛是什么档次的包| 7月26日是什么星座| 马日冲鼠是什么意思| 感冒头痛吃什么药| 舌头两边锯齿状是什么原因| aquascutum是什么牌子| 什么什么万分| 白矾是什么| 4月是什么星座的| 梦到甘蔗代表什么预兆| 胆红素高是什么原因| 大便干结是什么原因| 蜂窝织炎用什么抗生素| 年糕是什么做的| 额窦炎吃什么药效果好| 为什么今年有两个六月| 胃溃疡适合吃什么水果| 阿贝数是什么意思| 十五岁是什么年华| 2006年出生的是什么命| 六月二十六是什么星座| a型血与o型血生的孩子是什么血型| 同房时间短吃什么药| 滴虫性阴道炎用什么药效果最好| 慢性病都包括什么病| 人活着到底有什么意义| n2o是什么气体| 混合型高脂血症是什么意思| 本能反应是什么意思| 血小板高是什么引起的| 硒是什么东西| 上眼皮有痣代表什么| 公安和警察有什么区别| 正骨是什么意思| 菌痢的症状是什么样| 七情六欲指什么| 臣服什么意思| 胃糜烂是什么症状| 喝什么补血| 免疫是什么意思| 脑萎缩是什么原因引起的| 梦见怀孕流产是什么意思| 为什么会长口腔溃疡| 两仪是什么意思| 什么邮票最值钱| 眼袋浮肿是什么原因| 被香灰烫了预示着什么| 膀胱炎什么症状| lanvin是什么牌子| 室性期前收缩是什么病| 舌苔发黄是什么病| 春的五行属性是什么| 薄荷脑是什么东西| m蛋白是什么| 女司机为什么开不好车| 莓茶什么人不适合喝| 蚊子怕什么味道| 藿香正气水什么牌子的好| 龙凤呈祥是什么生肖| 正在候车是什么意思| h1v是什么意思| 血糖高检查什么项目| 看肺应该挂什么科| 现充什么意思| 十八罗汉是什么意思| 目加一笔是什么字| 钯金和铂金有什么区别| 面包糠是什么做的| 肚子拉稀吃什么药| 铊是什么东西| 对策是什么意思| 霜降出什么生肖| 眼压高是什么原因造成的| 属虎男和什么属相最配| 故的偏旁是什么| 名落孙山是什么意思| 双侧骶髂关节致密性骨炎是什么病| 1004是什么星座| 全脂牛奶和脱脂牛奶有什么区别| 脾虚有什么症状| 谁的尾巴有什么作用| 发芽土豆含有什么毒素| 爱新觉罗改成什么姓了| 北京古代叫什么| 开车穿什么鞋子| kenzo是什么牌子| 什么是庚日| 什么地坐着| 蜂蜜吃有什么好处| 气滞血瘀是什么意思| bmi是什么意思啊| 烟青色是什么颜色| 蛇缠腰是什么症状| 澈字五行属什么| 内分泌失调吃什么食物好| jk是什么意思| 23岁属什么| 准备要孩子需要注意什么| 甲状腺结节用什么药| 祎是什么意思| 氨酶偏高是什么意思| 低压高吃什么食物好| 痛风喝什么水| 吃葵花籽有什么好处和坏处吗| 颈椎ct能检查出什么| 六娃的能力是什么| 腿纹不对称有什么影响| 蛇吐信子是什么意思| 孩子发烧按摩什么部位退烧| 聚酯纤维是什么面料| 玉子是什么| 荆州有什么大学| 标新立异是什么意思| 高反吃什么药| 今年26岁属什么生肖| 地势是什么意思| 伤口好转的迹象是什么| 唐氏综合征是什么意思| 熊猫为什么有黑眼圈| 桂林有什么好玩的景点| 雾化对小孩有什么影响或者副作用| 海菜是什么| taco是什么| 女主是什么意思| 6.25是什么日子| 丝瓜烧什么好吃| 看不上是什么意思| 性格内向的人适合做什么工作| 6月12日是什么星座| 老气横秋什么意思| 坐飞机要什么证件| 瘦人吃什么长胖| 喝酒睡不着是什么原因| 宜五行属什么| 白癜风用什么药| 羽五行属什么| 梦见枪毙人是什么意思| 男性尿频尿急是什么原因| 百度Jump to content

【家园】武夷山五夫镇:莲韵悠悠,朱熹文化历久

From Wikipedia, the free encyclopedia
百度 至于收费标准,李文杰说,国家和北京市规定房地产经纪服务费实行市场调节价管理,收费标准由委托和受托双方,依据服务内容、服务成本、服务质量和市场供求状况协商确定。

General Responsibility Assignment Software Patterns (or Principles), abbreviated GRASP, is a set of "nine fundamental principles in object design and responsibility assignment"[1]:?6? first published by Craig Larman in his 1997[citation needed] book Applying UML and Patterns.

The different patterns and principles used in GRASP are controller, creator, indirection, information expert, low coupling, high cohesion, polymorphism, protected variations, and pure fabrication.[2] All these patterns solve some software problems common to many software development projects. These techniques have not been invented to create new ways of working, but to better document and standardize old, tried-and-tested programming principles in object-oriented design.

Larman states that "the critical design tool for software development is a mind well educated in design principles. It is not UML or any other technology."[3]:?272? Thus, the GRASP principles are really a mental toolset, a learning aid to help in the design of object-oriented software.

Patterns

[edit]

In object-oriented design, a pattern is a named description of a problem and solution that can be applied in new contexts; ideally, a pattern advises us on how to apply its solution in varying circumstances and considers the forces and trade-offs. Many patterns, given a specific category of problem, guide the assignment of responsibilities to objects.

Information expert

[edit]

Problem: What is a basic principle by which to assign responsibilities to objects?
Solution: Assign responsibility to the class that has the information needed to fulfill it.

Information expert (also expert or the expert principle) is a principle used to determine where to delegate responsibilities such as methods, computed fields, and so on.

Using the principle of information expert, a general approach to assigning responsibilities is to look at a given responsibility, determine the information needed to fulfill it, and then determine where that information is stored.

This will lead to placing the responsibility on the class with the most information required to fulfill it.[3]:?17:11?

Related Pattern or Principle: Low Coupling, High Cohesion

Creator

[edit]

The creation of objects is one of the most common activities in an object-oriented system. Which class is responsible for creating objects is a fundamental property of the relationship between objects of particular classes.

Problem: Who creates object A?
Solution: In general, Assign class B the responsibility to create object A if one, or preferably more, of the following apply:

  • Instances of B contain or compositely aggregate instances of A
  • Instances of B record instances of A
  • Instances of B closely use instances of A
  • Instances of B have the initializing information for instances of A and pass it on creation.[3]:?16:16.7?

Related Pattern or Principle: Low Coupling, Factory pattern

Controller

[edit]

The controller pattern assigns the responsibility of dealing with system events to a non-UI class that represents the overall system or a use case scenario. A controller object is a non-user interface object responsible for receiving or handling a system event.

Problem: Who should be responsible for handling an input system event?
Solution: A use case controller should be used to deal with all system events of a use case, and may be used for more than one use case. For instance, for the use cases Create User and Delete User, one can have a single class called UserController, instead of two separate use case controllers. Alternatively a facade controller would be used; this applies when the object with responsibility for handling the event represents the overall system or a root object.

The controller is defined as the first object beyond the UI layer that receives and coordinates ("controls") a system operation. The controller should delegate the work that needs to be done to other objects; it coordinates or controls the activity. It should not do much work itself. The GRASP Controller can be thought of as being a part of the application/service layer[4] (assuming that the application has made an explicit distinction between the application/service layer and the domain layer) in an object-oriented system with common layers in an information system logical architecture.

Related Pattern or Principle: Command, Facade, Layers, Pure Fabrication

Indirection

[edit]

The indirection pattern supports low coupling and reuses potential between two elements by assigning the responsibility of mediation between them to an intermediate object. An example of this is the introduction of a controller component for mediation between data (model) and its representation (view) in the model-view-controller pattern. This ensures that coupling between them remains low.

Problem: Where to assign responsibility, to avoid direct coupling between two (or more) things? How to de-couple objects so that low coupling is supported and reuse potential remains higher?

Solution: Assign the responsibility to an intermediate object to mediate between other components or services so that they are not directly coupled.
The intermediary creates an indirection between the other components.

Low coupling

[edit]

Coupling is a measure of how strongly one element is connected to, has knowledge of, or relies on other elements. Low coupling is an evaluative pattern that dictates how to assign responsibilities for the following benefits:

  • lower dependency between the classes,
  • change in one class having a lower impact on other classes,
  • higher reuse potential.

High cohesion

[edit]

High cohesion is an evaluative pattern that attempts to keep objects appropriately focused, manageable and understandable. High cohesion is generally used in support of low coupling. High cohesion means that the responsibilities of a given set of elements are strongly related and highly focused on a rather specific topic. Breaking programs into classes and subsystems, if correctly done, is an example of activities that increase the cohesive properties of named classes and subsystems. Alternatively, low cohesion is a situation in which a set of elements, of e.g., a subsystem, has too many unrelated responsibilities. Subsystems with low cohesion between their constituent elements often suffer from being hard to comprehend, reuse, maintain and change as a whole.[3]:?314–315?

Polymorphism

[edit]

According to the polymorphism principle, responsibility for defining the variation of behaviors based on type is assigned to the type for which this variation happens. This is achieved using polymorphic operations. The user of the type should use polymorphic operations instead of explicit branching based on type.

Problem: How to handle alternatives based on type? How to create pluggable software components?
Solution: When related alternatives or behaviors vary by type (class), assign responsibility for the behavior—using polymorphic operations—to the types for which the behavior varies. (Polymorphism has several related meanings. In this context, it means "giving the same name to services in different objects".)

Protected variations

[edit]

The protected variations pattern protects elements from the variations on other elements (objects, systems, subsystems) by wrapping the focus of instability with an interface and using polymorphism to create various implementations of this interface.

Problem: How to design objects, subsystems, and systems so that the variations or instability in these elements do not have an undesirable impact on other elements?
Solution: Identify points of predicted variation or instability; assign responsibilities to create a stable interface around them.

Pure fabrication

[edit]

A pure fabrication is a class that does not represent a concept in the problem domain, specially made up to achieve low coupling, high cohesion, and the reuse potential thereof derived (when a solution presented by the information expert pattern does not). This kind of class is called a "service" in domain-driven design.

Related Patterns and Principles ? Low Coupling. ? High Cohesion.

See also

[edit]

References

[edit]
  1. ^ Craig Larman (2001). Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process (PDF) (2nd ed.). Prentice Hall. ISBN 0-13-092569-1.
  2. ^ Muhammad Umair (2025-08-06). "SOLID, GRASP, and Other Basic Principles of Object-Oriented Design". DZone.
  3. ^ a b c d Craig Larman (2004). Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd ed.). Pearson. ISBN 978-0131489066.
  4. ^ "Application Layer like business facade?". Yahoo! Groups (domaindrivendesign). Archived from the original on 2025-08-06. Retrieved 2025-08-06.
行尸走肉是什么动物 恐龙什么时候灭绝的 小孩便秘吃什么最管用 手指甲有黑色条纹是什么原因 肝胆不好有什么症状有哪些表现
内火重吃什么药见效快 检查尿液能查出什么病 陈丽华是慈禧什么人 霉菌反复发作是什么原因 肾动脉彩超主要查什么
为什么会打呼噜 瓒字取名有什么寓意 平痛新又叫什么 出淤泥而不染是什么意思 白芝麻有什么功效
卢森堡为什么那么有钱 以什么当什么 胸闷气短是什么原因 洁身自好什么意思 下巴下面长痣代表什么
捆绑是什么意思hcv9jop8ns0r.cn 三代试管是什么意思hcv8jop2ns4r.cn 蝴蝶效应是什么hcv8jop1ns5r.cn 分辨率dpi是什么意思hcv9jop5ns9r.cn 掉头发缺什么维生素hcv8jop5ns8r.cn
阴道内痒是什么原因gysmod.com 梦到女朋友出轨是什么意思hcv8jop4ns8r.cn 胸口闷痛挂什么科hcv8jop2ns8r.cn 喝茶心慌的人什么体质mmeoe.com 九出十三归指什么生肖hcv9jop6ns0r.cn
热痱子长什么样hcv7jop6ns0r.cn 瞳孔缩小见于什么病hcv9jop6ns4r.cn 喜神是什么意思hcv8jop0ns6r.cn csc是什么意思imcecn.com 退烧吃什么药好hcv7jop9ns0r.cn
钱学森发明了什么hcv8jop4ns3r.cn 冲击波治疗有什么效果hcv9jop3ns9r.cn 118代表什么意思hcv9jop5ns7r.cn 气加山念什么hcv7jop9ns6r.cn 嘈杂纳减是什么意思hcv9jop3ns5r.cn
百度