On the Use of Properties in Java Applications

M. Lumpe, S. Mahmud, Rajesh Vasa
{"title":"On the Use of Properties in Java Applications","authors":"M. Lumpe, S. Mahmud, Rajesh Vasa","doi":"10.1109/ASWEC.2010.35","DOIUrl":null,"url":null,"abstract":"When building software systems, developers have to weigh the benefits of using one specific solution approach against the risks and costs of using another one. This process is not random. Certain preferences, architectural styles, and solution domain pressures create systematic biases that we can measure in order to assess their impact on the system being built and the underlying development process itself. In this paper we explore, whether the getter and setter methods in Java give rise to a bias also. Getter and setter methods, called \"properties\", are perceived commonplace and considered by some as a threat to data encapsulation. However, little empirical evidence exists that can reliably inform us about the real impact of the use of properties in Java. For this reason, we examined 102 open-source Java systems and discovered that properties are employed much more carefully than one might expect. Contrary to some folklore, developers use properties not just to gain access to an object's private state, but in a systematic and responsible manner and, in general, consistent with the domain requirements of the developed software system.","PeriodicalId":381789,"journal":{"name":"2010 21st Australian Software Engineering Conference","volume":"124 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2010-04-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"10","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2010 21st Australian Software Engineering Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ASWEC.2010.35","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 10

Abstract

When building software systems, developers have to weigh the benefits of using one specific solution approach against the risks and costs of using another one. This process is not random. Certain preferences, architectural styles, and solution domain pressures create systematic biases that we can measure in order to assess their impact on the system being built and the underlying development process itself. In this paper we explore, whether the getter and setter methods in Java give rise to a bias also. Getter and setter methods, called "properties", are perceived commonplace and considered by some as a threat to data encapsulation. However, little empirical evidence exists that can reliably inform us about the real impact of the use of properties in Java. For this reason, we examined 102 open-source Java systems and discovered that properties are employed much more carefully than one might expect. Contrary to some folklore, developers use properties not just to gain access to an object's private state, but in a systematic and responsible manner and, in general, consistent with the domain requirements of the developed software system.
关于Java应用程序中属性的使用
在构建软件系统时,开发人员必须权衡使用一种特定解决方案方法的好处与使用另一种解决方案的风险和成本。这个过程不是随机的。特定的偏好、架构风格和解决方案领域压力产生了系统偏差,我们可以度量这些偏差,以便评估它们对正在构建的系统和底层开发过程本身的影响。在本文中,我们探讨了Java中的getter和setter方法是否也会产生偏差。被称为“属性”的Getter和setter方法很常见,有些人认为这是对数据封装的威胁。然而,很少有经验证据可以可靠地告诉我们在Java中使用属性的实际影响。出于这个原因,我们检查了102个开源Java系统,发现属性的使用比人们想象的要小心得多。与一些民间说法相反,开发人员使用属性不仅仅是为了访问对象的私有状态,而是以一种系统和负责任的方式,并且通常与开发的软件系统的领域需求保持一致。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信