Bai 09 - Tong Quan Ve UML Va PTTK HDT

  • Published on

  • View

  • Download

Embed Size (px)


hng i tng


<p>2</p> <p>B MN CNG NGH PHN MM ViN CNG NGH THNG TIN V TRUYN THNG TRNG I HC BCH KHOA H NI</p> <p>Ni dungLP TRNH HNG I TNG 1. Tng quan v UML 2. Phn tch thit k hng i tng 3. Cng c pht trin OOAD</p> <p>Bi 09. Tng quan v UML v PTTK HTCao Tun Dng - Nguyn Th Thu Trang</p> <p>3</p> <p>1.1. M hnh ha l g? Gip n gin ha th gii thc bng cc m hnh Gip hiu r hn v h thng di mt gc nhn no </p> <p>S quan trng ca m hnh haMc quan trng thp Mc quan trng cao hn</p> <p>My bay giy</p> <p>My bay phn lc</p> <p>5</p> <p>6</p> <p>i d n thng khng m hnh ha Rt nhiu i d n tin hnh xy dng ng dng theo hng tip cn ca vic gp my bay giy. Bt u lp trnh ngay khi c c yu cu. Mt rt nhiu thi gian v to ra rt nhiu m ngun. Khng c bt k mt kin trc no. Phi chu kh vi nhng li pht sinh.</p> <p>1.2. UML l g? Ngn ng m hnh ha thng nht UML (Unified Modeling Language) UML l ngn ng : trc quan ha (visualizing) xc nh r (c t - Specifying) xy dng (constructing) ti liu ha (documenting)</p> <p> M hnh ha l mt con ng dn n thnh cng ca d n.</p> <p>cc cu phn (artifact) ca mt h thng phn mm</p> <p>UML l ngn ng trc quan UML l ngn ng thng nht trc quan gip cng vic c x l nht qun, gim thiu li xy ra C nhng th m nu khng m hnh ha th khng hoc kh c th hiu c M hnh tr gip hiu qu trong vic lin lc, trao iTrong t chc Bn ngoi t chc</p> <p>UML l ngn ng c t UML xy dng cc m hnh chnh xc, r rng v y .</p> <p>UML l ngn ng xy dng HT Cc m hnh UML c th kt ni trc tip vi rt nhiu ngn ng lp trnh. nh x sang Java, C++, Visual Basic Cc bng trong RDBMS hoc kho lu tr trong OODBMS Cho php cc k ngh xui (chuyn UML thnh m ngun) Cho php k ngh ngc (xy dng m hnh h thng t m ngun)</p> <p>UML l ngn ng ti liu ha UML gip ti liu ha v kin trc, yu cu, kim th, lp k hoch d n, v qun l vic bn giao phn mm Cc biu khc nhau, cc ghi ch, rng buc c c t trong ti liuUse Case DiagramUse Case 1 - .EXE</p> <p>Deployment Diagram - 9 5 : </p> <p>- NT: - , - - : - - - IBM : - , -</p> <p>Wi n d o w9 5</p> <p>Wi n d o ws 9 5 Wi n d o ws 9 5</p> <p> - </p> <p>Wi n d o ws NT</p> <p>Actor A</p> <p>Use Case 2</p> <p>Actor BSo l a ri s - .EXE</p> <p>Al p h a UNIX - .EXE Wi n d o ws NT</p> <p>Use Case 3</p> <p>IBM M a i n fra me</p> <p> -</p> <p>Do c u m e n tL s it</p> <p>ma inW n d us er</p> <p>fil eMg r : Fil eM gr</p> <p>do cu me nt : D ocu me nt</p> <p>gFi l e</p> <p>rep os itoryFi l e M g r add ()</p> <p>Do c u m e n t</p> <p>nam e : in t fe tc h Do c( ) s o rtBy Na me ( ) delet e () doc d i :n it n u m Fi e l d :i n t</p> <p> .</p> <p> - </p> <p>1 : Do c v i e w re que st ( )</p> <p>ge t( ) open () c l o se ( ) 2 : fe t c h Do c( ) Fi l e L s it re a d () s o rtFi l e L i st( ) fL i st 3 : c re a te ( ) add () delet e () 4 : c re a te ( ) 1 c re a te () fi l l Do c u m en t( ) re a d () fi l l th e c od e ..</p> <p>5 : re a d Do c ( )</p> <p>- </p> <p> - .</p> <p>6 : fi l l Do c u me n t()</p> <p>re p 7 : re a d Fi l e ( ) Fi l e Re p o s i t o ry</p> <p>8 : fi l l F ile( ) (fro m Pe rs s i te n ce ) re a d () - - . re a d Do c( ) re a d Fi e l () c re a te () fi l l Fi l e () 9 : s o rtB y Na m e ( ) n a m e : ch a r * = 0 Grp Fi l e</p> <p>re a d () open ()</p> <p>Sequence Diagram</p> <p>Class Diagram</p> <p>1.3. Lch s pht trin ca UML (2) 1.3. Lch s pht trin ca UML Vo 1994, c hn 50 phng php m hnh ha hng i tng: Fusion, Shlaer-Mellor, ROOM, Class-Relation,Wirfs-Brock, CoadYourdon, MOSES, Syntropy, BOOM, OOSD, OSA, BON, Catalysis, COMMA, HOOD, Ooram, DOORS </p> <p> UML c 3 chuyn gia hng i tng hp nht cc k thut ca h vo nm 1994: Booch91 (Grady Booch): Conception, Architecture OOSE (Ivar Jacobson): Use cases OMT (Jim Rumbaugh): Analysis</p> <p> Meta-models tng ng vi nhau Cc k php ha khc nhau Quy trnh khc nhau hoc khng r rng Cn chun ha v thng nht cc phng php</p> <p> Thit lp mt phng thc thng nht xy dng v v ra cc yu cu v thit k hng i tng trong qu trnh PTTK phn mm UML c cng nhn l chun chung vo nm 1997.</p> <p>UML l mt ngn ng hp nhtRumbaughMeyerBefore and after conditions</p> <p>UML l mt ngn ng thng nht</p> <p>Booch</p> <p>JacobsonFusionOperation descriptions, message numbering</p> <p>HarelState charts</p> <p>EmbleySingleton classes, High-level view</p> <p>Gamma, et.alFrameworks, patterns, notes</p> <p>Wirfs-BrockResponsibilities</p> <p>Shlaer- MellorObject lifecycles</p> <p>Selic, Gullekson, WardROOM (Real-Time Object-Oriented Modeling)</p> <p>OdellClassification</p> <p>1.3. Lch s pht trin ca UML (3)UML 2.0(2004)</p> <p>1.4. Cc khung nhn ca UMLKhung nhn ca m hnh c ngha vi nhng ngi tham gia no Biu din cc chc nng v mi 4 + 1 Architectural ViewLogical ViewAnalysts/DesignersStructure</p> <p>UML 1.5(March, 03)</p> <p>UML Partners Expertise</p> <p>UML 1.1(Sept. 97)</p> <p>UML 1.0(Jan. 97)</p> <p>Implementation ViewProgrammersSoftware management</p> <p>UML 0.9 and UML 0.91(June 96) (Oct. 96)</p> <p>Use-Case View Public FeedbackEnd-user Functionality</p> <p>Unified Method 0.8(OOPSLA 95)</p> <p>Process ViewSystem integratorsPerformance, scalability, throughput</p> <p>Deployment ViewSystem engineeringSystem topology, delivery, installation, communication</p> <p>Booch 93</p> <p>OMT - 2</p> <p>OOSE</p> <p>Other Methods</p> <p>Booch 91</p> <p>OMT - 1</p> <p>trng d kin r cc cCh ah th ngyu di cnhn u ch nng gc cc a a h hi th ngc dng Ch ira ung nh ng, ng, (cc dcc ch v t M nh t co dn nt v vt v th ng c nng cung l thng khc l nhau c v a c cho ng M tth vi c cc k tn ti lni h p ng s d ng) ch c cc un nhau gima chng ph n cc mm nh cho ctu hnh nh n mt chia thnh n ng in package, phn hnh nht lp v qun l cu hnh</p> <p>Cc biu UML Biu use case (Use Case Diagram) Biu hot ng (Activity Diagram) Biu tng tc (Interaction Diagrams) Biu trnh t (Sequence Diagram) Biu giao tip/cng tc (Communication/Collaboration Diagram)</p> <p>Quy trnh v UML UML l k php ch khng phi l phng php UML c th p dng cho tt c cc pha ca quy trnh pht trin phn mm "Rational Unified Process" - quy trnh pht trin cho UML</p> <p> Biu trng thi (Statechart Diagram) Biu cu trc tnh (Static Structure Diagrams) Biu lp (Class Diagram) Biu i tng (Object Diagram)</p> <p> Biu thc thi (Implementation Diagrams) Biu thnh phn (Component Diagram) Biu trin khai (Deployment Diagram)</p> <p>19</p> <p>20</p> <p>Ni dung1. Tng quan v UML 2. Phn tch thit k hng i tng 3. Cng c pht trin OOAD</p> <p>2.1. Tm quan trng ca OOAD Nhiu ngi pht trin d n Cho rng phn mm ch yu c xy dng bng cch g code t bn phm Khng dnh thi gian cho qu trnh phn tch v thit k phn mm</p> <p>H phi cy ba hon thnh chng trnh v Khng hiu hoc hiu sai yu cu Giao tip vi cc thnh vin khng tt Khng tch hp c vi module ca ng nghip</p> <p>H nhn ra rng Phn tch v Thit k cn c coi trng hn, nhng qu mun</p> <p>21</p> <p>22</p> <p>2.1. Tm quan trng ca OOAD (2) Cn thit lp mt c ch hiu qu nm bt yu cu, phn tch thit k C ch ny phi nh l mt ngn ng thng nht gip cho qu trnh hp tc hiu qu gia cc thnh vin trong nhm pht trin phn mm. OOAD</p> <p>2.2. Mc ch ca OOAD Chuyn cc yu cu ca bi ton thnh mt bn thit k ca h thng s c xy dng Tp trung vo qu trnh phn tch cc YU CU ca h thng v thit k cc M HNH cho h thng trc giai on lp trnh c thc hin nhm m bo mc ch v yu cu ca h thng c ghi li mt cch hp l trc khi h thng c xy dng Cung cp cho ngi dng, khch hng, k s phn tch, thit k nhiu ci nhn khc nhau v cng mt h thng</p> <p>23</p> <p>24</p> <p>2.3. Phng php OOAD (2) 2.3. Phng php OOAD OOAD c chia thnh 2 giai on Phn tch hng i tng (OOA) Thit k hng i tng (OOD)1. Use case modeling to define requirements 6. External Specification Design</p> <p> OOA l giai on nhm to ra cc m hnh c bn (m hnh khi nim) ca h thng da theo nhng g khch hng yu cu v h thng ca h OOD s b sung thm cc thng tin thit k chi tit cho cc m hnh ni trn</p> <p>2. Object extraction and message sequence design between objects</p> <p>5. Normalization of the data structure using E-R diagram</p> <p>3. Class design</p> <p>4. E-R modeling for persistent data</p> <p>25</p> <p>2.4. Cng c UML OOAD Cng c m ngun m: EclipseUML UmlDesigner ArgoUML...</p> <p> Cng c thng mi: Enterprise Architect IBM Rational Software Architect Microsoft Visio Visual Paradigm for UML SmartDraw...</p>