- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
12/7/00 Java Layers/RC,CL Java Layers Language Support for Stepwise Refinement Problem Software development and maintenance is expensive Difficult Takes a long time Reuse is Key Separation of concerns One application feature per component Flexible composition Presentation Overview Part I – Motivation Mixins Stepwise Refinement Drawbacks of Mixins Part II – Java Layers Java Layers Overview Two Language Features An OO Problem An OO Solution Use same lockable code for all 3 classes Encapsulate lockable code in a class Subtype Car, Box, House with new class Mixed-In Classes Mixins Types with parameterized supertypes Depend on type parameters More precisely: Parametric Polymorphism An OO mechanism for code reuse Apply same code to unrelated classes Work with single inheritance Mixins Software Components Question Can we use mixins to build applications out of reusable components? Example: Music Server Variation can occur on many axes: Client interface {getSong, putSong, eraseCopyright, hideBritney, …} Server execution strategy {single threaded, thread-spawning, thread pool, …} Transport type Fault tolerance Server discovery … Music Application Instances Application Assembly is Easy Base Class class Base { } GetSong Mixin class GetSongT extends Base extends T { static public class Client extends T.Client { void getSong(…){…} } static public class Server extends T.Server { void dispatch(Req req){ if (req.name.equals(“getSong”)) processGetSong(req); else super.dispatch(req); } … } } Other Mixins class EraseCopyrightT extends Base extends T { static public class Client extends T.Client { void eraseCopyright(…){…} } … } Stepwise Program Refinement Drawbacks of Mixins Superclass initialization Runtime efficiency Leaf-type references Composition validation Semantic validity Syntactic correctness Recap Software components imply reuse Mixins reuse OO code Mixins build applications incrementally Stepwise program refinement
您可能关注的文档
- Chapter 10 Mineral Nutrition of Aquatic Animal.ppt
- Chapter 7 Steroids(甾体).ppt
- Chapter two Basic theory of TCM.ppt
- Chapter 6 Hypoxia.ppt
- chengjing.ppt
- China's Development Rapid Growth, Rising Income Inequality.ppt
- Chinese Characters and Scripts.ppt
- Chapter 3 Displaying Data.ppt
- Chp 4 Hormonal Influences on Male Sex Behavior.ppt
- ci yun lǐ.ppt
- June 3230-530.ppt
- Judicial Decree to Terminate the Validity of Lost Bills of Lading.ppt
- key source of wal-mart's competitive advantages.ppt
- Kerr黑洞吸积盘的Limit-Cycle行为.ppt
- Kid's Notebook.ppt
- LCD中由局部单元缝隙变化产生的缺陷研究.ppt
- LAW OF TORTS.ppt
- Lecture 06. C++ Classes.ppt
- Lecture 35Fuzzy Logic Control (III).ppt
- LEARNING WITHTECHNOLOGY.ppt
最近下载
- 滤油器体的工艺规程及夹具设计.doc VIP
- 2025年3月22日山东事业单位统考《行测》真题(含答案).pdf VIP
- 2025-2026学年人教版(2024)小学体育与健康二年级全一册教学计划及进度表(第一学期).docx
- 建设单位安全管理体系如何建立.docx VIP
- 苯妥英钠的合成.pdf VIP
- 中国糖尿病肾脏病基层管理指南解读PPT课件.pptx VIP
- 陕西省专业技术人员继续教育答案《党的二十届三中全会精神解读与高质量发展》(1).pdf VIP
- 2024年全国中考数学考试大纲 .pdf VIP
- 聚乙酸乙烯酯乳液(粘胶剂)-安全技术说明书MSDS.pdf
- 体外膜肺氧合ECMO讲解.pptx VIP
文档评论(0)