Shanghai Jiao Tong University 图 上海交通大学 Object Oriented Analysis and Design Model Driven Development 上海交通大学软件工程中心
Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Model Driven Development
波音747 超过6百万个零件,仅机尾就有上百 个零件 ◆能承载上百个旅客 ◆能不停地飞行上千公里 Object Oriented Analysis and Design 2
Object Oriented Analysis and Design 2 波音747 w超过6百万个零件,仅机尾就有上百 个零件 w能承载上百个旅客 w能不停地飞行上千公里
波音747 当波音在60年代开始生产747的时候, 一共画了75,000张工程图 为什么? 因为他们正在生产一个极其复杂的系统, 而且不能出哪怕是一点点的差错 Object Oriented Analysis and Design 3
Object Oriented Analysis and Design 3 波音747 w当波音在60年代开始生产747的时候, 一共画了75,000张工程图 因为他们正在生产一个极其复杂的系统, 而且不能出哪怕是一点点的差错 为什么?
软件开发也同样复杂 人与系统的 交互 系统安全 交易,存储 Customer Support 模型 Date 可靠性,可 子系统,模 扩展性 块, H鼠 other 分布式 成千上万行 Shared Reeources and Agps 程序 Object Oriented Analysis and Design 4
Object Oriented Analysis and Design 4 软件开发也同样复杂 人与系统的 交互 交易,存储 子系统,模 块, 分布式 成千上万行 程序 可靠性,可 扩展性 系统安全 模型
什么是模型 ■ A simplified view of a system that shows the essentials of the system from a particular perspective and hides the non-essential details Bitine Information Receipt Product credCarcNum二nte0et recptNumber:Integer procuctName.S市ing 1 otaPrice二Currency SKUNumber:Integer :Integer productDesc String orocuctPrice i.n Salesperson salesNum Ineger salesName Stnng Shipping In“ormation street1 String Credit Compar street2:String ctys¥tng st运1e:81mmg country:String mailCode Ineger insured:Boolean FullTime Partime mon日stf下⊙G达Mode习 Ctiem日4ts可b1 ect Moden salary currency rate:currencr Object Oriented Analysis and Design 5
Object Oriented Analysis and Design 5 什么是模型
什么是模型驱动开发? Model-driven Development (MDD)is a challenging approach to software engineering that is expected to change the way systems are developed.It postulates the model as the main artifact being developed rather than the code. Model Driven Deve lopm ent (M DD) Model Model Mo del Transformation Lanipuhtion Execution Object Oriented Analysis and Design 6
Object Oriented Analysis and Design 6 什么是模型驱动开发? ü Model-driven Development (MDD) is a challenging approach to software engineering that is expected to change the way systems are developed. It postulates the model as the main artifact being developed rather than the code
模型驱动开发 A strategic initiative to automate the integration,generation, modernization,visualization,and reuse of software artifacts Modeling √Unify business Web Requiremenis and software teams and Application D2坦 Software with model-driven Business Construction business integration Processes Improve productivity by LHIFED providing a choice of 0胞K6 LAHGUAGE modeling paradigms Make reuse practical Management Deployment with asset-based development Object Oriented Analysis and Design 7
Object Oriented Analysis and Design 7 ü Unify business and software teams with model-driven business integration ü Improve productivity by providing a choice of modeling paradigms ü Make reuse practical with asset-based development Software Construction Modeling Management Deployment Web Requirements and Application Data Business Processes 模型驱动开发 A strategic initiative to automate the integration, generation, modernization, visualization, and reuse of software artifacts
模型驱动开发成熟度方阵 Smaller Semantic Gap Software lifecycle Support Executable Models Platform Independence Multi-models Patterns/templates Components Synchronization Visualization Manual Level0 Levell Level2 Level3 Level4 Level5 Level6 Modeling Maturity Object Oriented Analysis and Design 8
Object Oriented Analysis and Design 8 模型驱动开发成熟度方阵 Smaller Semantic Gap
Level 0:Manual Object Oriented Analysis and Design 9
Object Oriented Analysis and Design 9 Level 0: Manual package com.megabank.loan; import javax.ejb.EntityBean; public abstract class LoanBean implements EntityBean { private javax.ejb.EntityContext entityContext; public LoanBean() {} public void ejbActivate() {} public void ejbPassivate() {} public void ejbRemove() {} public void ejbLoad() {} public void ejbStore() {} public javax.ejb.EntityContext getEntityContext() { return entityContext; }public void setEntityContext(javax.ejb.EntityContext entityContext) { this.entityContext = entityContext; }public void unsetEntityContext() {} public abstract void setRate(java.lang.Float rate); public abstract java.lang.Float getRate(); public abstract void setAmount(java.lang.Float amount); public abstract java.lang.Float getAmount(); public abstract void setBalance(java.lang.Float balance); public abstract java.lang.Float getBalance(); public abstract void setTermMonths(java.lang.Integer termMonths); public abstract java.lang.Integer getTermMonths(); public java.lang.String ejbCreate() throws javax.ejb.CreateException { return null; }public void ejbPostCreate() {} public abstract void setId(java.lang.Long aId); public abstract java.lang.Long getId(); … }
Level 1:Visualization comborland samples.welcome ActionListener Welcome WelcomeApp WekcemeFrame ◆ 通常是由代码逆 向产生模型图 ◆ 目的 com.bortandsamples.welcome comn.borland.spe线.welcome wecomeApp ◆packFrame:b00len WelcomeFrame ◆mar0roi以 ·文档化 ◆e(omeApp0ei0 ■浏览 java.lang Exception String Throwable ■理解 javax.swing Source Design Bean UL Doc History Object Oriented Analysis and Design 10
Object Oriented Analysis and Design 10 Level 1: Visualization w 通常是由代码逆 向产生模型图 w 目的 §文档化 §浏览 §理解