ImageVerifierCode 换一换
格式:PPT , 页数:129 ,大小:1.72MB ,
文档编号:3480652      下载积分:29 文币
快捷下载
登录下载
邮箱/手机:
温馨提示:
系统将以此处填写的邮箱或者手机号生成账号和密码,方便再次下载。 如填写123,账号和密码都是123。
支付方式: 支付宝    微信支付   
验证码:   换一换

优惠套餐
 

温馨提示:若手机下载失败,请复制以下地址【https://www.163wenku.com/d-3480652.html】到电脑浏览器->登陆(账号密码均为手机号或邮箱;不要扫码登陆)->重新下载(不再收费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  
下载须知

1: 试题类文档的标题没说有答案,则无答案;主观题也可能无答案。PPT的音视频可能无法播放。 请谨慎下单,一旦售出,概不退换。
2: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
3: 本文为用户(三亚风情)主动上传,所有收益归该用户。163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

1,本文(软件工程-12领域模型-概念的可视化课件.ppt)为本站会员(三亚风情)主动上传,163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
2,用户下载本文档,所消耗的文币(积分)将全额增加到上传者的账号。
3, 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(发送邮件至3464097650@qq.com或直接QQ联系客服),我们立即给予删除!

软件工程-12领域模型-概念的可视化课件.ppt

1、领域模型-概念的可视化领域模型概念的可视化Content什么是领域模型概念类识别和提取概念类创建领域模型步骤几个问题l命名l概念类or属性?l相似概念问题lModeling the Unreal World不同视角的模型Process什么是领域模型Use cases:limportant requirements analysis artifact,but are not object-oriented.lemphasize a process view of the domain.Domain modellThe most important artifact to create in OO

2、A概念模型l领域模型显示问题领域中对建模者有意义的概念类l OOA中创建的最重要的制品l 识别大量对象或概念类heart of OOAl领域模型表达的是现实世界中的概念类,而不是软件构件(不是软件类或带有职责的软件对象)l识别概念类是问题域调查的一部分lUML中的类图可以显示领域模型领域模型domain model是概念类或问题领域中实际对象的可视化表达,又称为:l概念模型conceptual modelsl领域对象模型domain object modelsl分析对象模型analysis object models.使用UML表示法,领域模型用一组不带操作的类图来表示,可显示:l领域对象或概

3、念类l概念类之间的关联l概念类的属性部分领域模型可视化字典领域模型将领域中的单词、概念类可视化,并将其相互关联(比文字更容易阅读)领域模型显示了视图或抽象的一部分,而将建模者不感兴趣的细节忽略。创建领域模型同时有助于澄清领域中术语和词汇可视化字典不是软件设计领域模型是现实世界问题领域中事物的可视化,而不是软件构件的可视化l不是软件制品如window,databasel不带有职责和方法领域模型显示现实世界的概念领域模型避免软件制品或类概念类概念类的三层意思l概念类是思想、事物或对象l可以从以下几方面理解概念类:l符号symboll代表概念的单词或图像l内涵intensionl概念的定义l外延ex

4、tensionl概念所应用于的例子的集合概念类的三层意思When creating a domain model,it is usually the symbol and intensional view of a conceptual class that are of most practical interest.识别和提取概念类识别领域中的概念类Store,Register,Sale过度指定领域模型(带有大量细粒度的概念类)比不足好(越多越好)开始常会遗漏,在后面考虑属性、关联以及在设计阶段时,发现遗漏可随时补充Do not exclude a conceptual class sim

5、ply becauselIt has no attributeslthe requirements do not indicate any obvious need to remember information about it技巧l用概念类种类列表l识别名词短语l使用分析模式使用概念种类列表store and airline reservation domains.饥饿,恐高症识别名词和名词短语it is another source of inspiration.Care:la mechanical noun-to-class mapping isnt possiblelwords in

6、 natural languages are ambiguouslit is recommended in combination with the Conceptual Class Category List technique.Some are candidate conceptual classesSome maybe ignored in this iteration(Accounting and commissions)Some may be attributes of conceptual classes.(Price)使用分析模式由专家创建并公开的部分领域模型销售领域候选概念类R

7、eport ObjectsInclude Receipt in the Model?No-In general,showing a report of other information in a domain model is not useful since all its information is derived from other sources;Yes-A receipt has a special role in terms of the business rules.赋予持有者退货的权利(return bought items)l本次迭代未考虑退货,因而不包括Receipt

8、,处理Handle Returns的迭代中再考虑创建领域模型步骤列出候选概念类在领域模型中画出候选概念类添加关系添加属性几个问题命名mapmaker strategylMake a domain model in the spirit of how a cartographer or mapmaker works:l Use the existing names in the territory(地区,领域).l Exclude irrelevant features(地形图,人口分布)l Do not add things that are not there.also named the

9、Use the Domain Vocabulary strategy常见错误将应该作为概念类的当做属性-规则:若在现实世界中我们不把X当作数字或文本,则X可能是概念类而不是属性If we do not think of some conceptual class X as a number or text in the real world,X is probably a conceptual class,not an attribute.If in doubt,make it a separate concept.Attributes should be fairly rare in a d

10、omain model.解决相似概念A thing that records sales and payments,Register登记簿:la book that logged sales and payments.lcash register:收银机lAcquire a generalized meaning over time.POST:point-of-sale terminal.lIn computerese,a terminal is any end-point device in a system,such as a client PC,a wireless networked

11、PDA,and so forth.as a rule of thumb,a domain model is not absolutely correct or wrong,but more or less useful;it is a tool of communication.解决相似概念登记簿Register和POST功能一样。但Register更抽象,POST更面向实现,是否应该用Register而不是POST?l各有优缺点mapmaker principle,“POST”is a term familiar in the territoryPOST好,易于交流从模型的目的:抽象,实现独

12、立Register好,Modeling the Unreal Worldsome candidate conceptual classes related to a telecom-munication switch:Message,Connection,Port,Dialog,Route,Protocol.添加Specification/descriptionthe need for specification conceptual classes is common in many domain models.添加Specification/description商品ItemItem具有p

13、rice,and itemID,没有在其他地方记录物理商品被卖出,软件实例即删除cup1,cup2,cup3,全部售完,则没有了cup的记录,-Cup多少钱?无法回答a ProductSpecification(or ItemSpecification,ProductDescription .)conceptual class records information about itemsdoes not represent an Item,it represents a description of information about itemsit is common to state t

14、hat an XSpecification Describes an X规则:使用Specification/description的场合l当需要对Item或服务进行描述(独立于这些条目或服务当前存在的任何具体例子)时l删除实例会导致有用信息丢失时(这些信息和被删除的东西不恰当地关联在一起了)l要减少信息冗余common in sales,product,and manufacturing Domains又一例(服务)航班失事,则取消所有航班(service),所有Flight对象删除。则各个number的航班目的地信息全部丢失,应该把number部分提取出来不同视角的模型同一种图可用于不同视

15、角的模型Essential or conceptual perspectivel现实世界现实世界Specification perspectivel独立于语言的软件世界Implementation perspectivel具体语言实现解决语义鸿沟-用相同的名称representational gap or semantic gap Conceptual classlreal-world concept or thinglA conceptual or essential perspectivelThe UP Domain Model contains conceptual classes.So

16、ftware classla class representing a specification or implementationlperspective of a software component,regardless of the process or method.Design classla member of the UP Design Modella synonym for software classleither a specification or implementation perspective,as desired by the modeler.Impleme

17、ntation classla class implemented in an object-oriented language such as Java.Classlgeneral term lrepresenting either a real-world thing(a conceptual class)or software thing(a software class).POS系统领域模型领域模型和UP初始-no细化-l主要在此创建,当需要理解值得注意的概念,并映射到部分设计工作的类中l熟练者每次迭代只需几小时来开发领域模型,若是用预定义的分析模式,还将更快The UP Busine

18、ss Object Model vs.Domain ModelBusiness Object ModellThe UP BOM serves as an abstraction of how business workers and business entities need to be related and how they need to collaborate in order to perform the business.RUPlrepresented with several different diagrams(class,activity,and sequence)lill

19、ustrate how the entire enterprise runslmost useful if doing enterprise-wide business process engineering,Domain Modellmore commonly created subset artifact or specialization of the BOM.lYou can choose to develop an incomplete business object model,focusing on explaining things and products important

20、 to a domain.This is often referred to as a domain model.RUP领域设计制品领域模型添加关联Criteria for Useful AssociationsConsider including the following associations in a domain model:l Associations for which knowledge of the relationship needs to be pre-served for some duration(need-to-know associations).l Assoc

21、iations derived from the Common Associations List.Many lines on the diagram will add“visual noise”and make it less comprehensible尽量少加Need to knowTo reconstruct a sale,print a receipt,or calculate a sale total.the requirements do not suggest that any such relationship is needed.添加关联从常用关联列表中导出的关联-由此开始

22、高优先级关联 A is a physical or logical part of B.A is physically or logically contained in/on B.A is recorded in B.关联指南集中于需要保存一定时间的关系(Need to know关联)提取概念类比识别关联更重要太多的关联会使领域模型更混乱l耗时,而效果递减l避免显示冗余或可导出的关联角色Each end of an association is called a role.Roles may optionally have:lnamelmultiplicity expressionlNavi

23、gability(导航)MultiplicityThe multiplicity value communicates(表明)how many instances can be validly associated with another,at a particular moment,rather than over a span of time.l一夫一妻制中。任一时刻只能与一人结婚,但一段时间内可能与多人结婚l旧车任一时刻只能被一个经销商进货,但一段时间内可能反复被进货The multiplicity value is dependent on our interest as a mod

24、eler and software developerl现实中,Item可以不存储在任何Store中(如已卖出),但软件中,Item总与一个Store相联系Naming AssociationsTypeName-VerbPhrase-TypeName formatlverb phrase creates a sequence that is readable and meaningful in the model context.lstart with a capital letterlassociation represents a classifier of links between i

25、nstances;in the UMLl两种常用格式lPaid-bylPaidBydefault direction to read an association name is left to right or top to bottomlnot a UML default,but a common convention.Multiple Associations Between Two TypesUnforgettable Relationships in the StoreApplying the Category of Associations Checklist添加关联领域模型添加属

26、性包含什么样的属性任何针对属性的声明,应该在现实世界实体的语境中加以解释 领域模型中应该包含以下属性a receipt收银条(which reports the information of a sale)lnormally includes a date and time,andlmanagement wants to know the dates and times of sales for a variety of reasons.l Consequently,the Sale conceptual class needs a date and time attribute.用关联 or

27、 属性?属性简单数据类型关联复杂数据类型The type of an attribute should not normally be a complex domain conceptl such as a Sale or Airport.属性与代码实现 领域模型中属性用Simple data type,不意味着OOPL中的属性也必须Simple,primitive data typeduring design and implementation worklone of a number of possible design solutions to implement an associa

28、tionlthe associations between objects expressed in the domain model will often be implemented as attributes that reference other complex software objectslthis is one solution,decision should be deferred during domain modeling.属性,data type,概念类Attribute(data type)Attributes should generally be data ty

29、pes.la UML term that implies a set of values for which unique identity is not meaningfulAttribute(data type)For example,it is not(usually)meaningful to distinguish between:l Separate instances of the Number 5.l Separate instances of the String cat.l Separate instances of PhoneNumber that contain the

30、 same number.l Separate instances of Address that contain the same address.only value-based comparisons are relevant.Conceptual classit is meaningful to distinguish(by identity)between two separate instances of a Person whose names are both Jill Smithcompare the memory addresses of Person instances,

31、属性(data type)or 概念类?Make it an attributel if it is naturally thought of as number,string,boolean,date,or time(and so on)Otherwiselrepresent it as a separate conceptual class.If in doubtldefine something as a separate conceptual class rather than as anattribute.属性primitive data typelsuch as a number

32、or stringnon-primitive data type.lPhoneNumberlalso known as value objectsla non-primitive classlData Type Classes促销价Universal Product Code(UPC)or European Article Number(EAN)以前作为Primitive data type的在以下情况下可能表示为Non-primitive type应用以上原则尽管实例的唯一身份无意义,但仍值得作为单独的类item identifiernon-primitive ItemIDlabstract

33、ionlsubpartsprice and amount attributesnon-primitive Quantity or Money classesThe address attributea non-primitive AddressThere is no correct answerlA domain model is a tool of communication;choices about what is shown should be made with that consideration in mind.属性与外键undesirable lbecause its purp

34、ose is to relate the Cashier to a Register object.Betterlrelate types with an association,not with an attribute.lThere are many ways to relate objectsforeign keys being oneldefer how to implement the relation until designlto avoid design creep(creep,not anticipated near the start)数量与单位Most numeric q

35、uantities should not be represented as plain numbers.lprice or velocity 速度lThese are quantities with associated units,Solution(In the general case,)lrepresent Quantity as a distinct conceptual class,with an associated UnitQuantities are considered data types(unique identity of instances is not important)lit is acceptable to collapse their illustration into the attribute section of the class boxMultiplicity From SalesLineItem to Item添加属性

侵权处理QQ:3464097650--上传资料QQ:3464097650

【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。


163文库-Www.163Wenku.Com |网站地图|