Memory Usage Comparison in an Android Application: Basic Object-Oriented Programming vs Decorator Design Pattern: Coding styles for keeping low memory usage in a mobile application.

Wasana Ngaogate
{"title":"Memory Usage Comparison in an Android Application: Basic Object-Oriented Programming vs Decorator Design Pattern: Coding styles for keeping low memory usage in a mobile application.","authors":"Wasana Ngaogate","doi":"10.1145/3548636.3548655","DOIUrl":null,"url":null,"abstract":"This paper explores how an Android application consumes memory when it is developed by two approaches: basic object-oriented programming versus decorator design pattern. Somehow programmers develop applications based on their coding experience without concern of memory usage especially in mobile applications which memory consumption is a critical issue. The deployed Android application of a list of temples which join a Candle Festival is selected as a case study. New functions are assumingly required by users so that the application could provide more services. Two class diagrams are designed based on basic object-oriented programming and based on decorator design pattern before implementation of the two approaches. The problem is what is the better approach for handling an increasing number of services after the application has been deployed. So that the application still consumes less memory as possible. The case-study applications retrieve information from a free REST API. Memory usage is measured by using an emulator and a physical device. The result shows that an Android application which developed by using decorator design pattern consumes more memory although its codes are cleaner and easier to read. Therefore, when a developer applies decorator design pattern, they should pay more attention on unexpected effect of the design pattern. Research in impact of design patterns should also be investigated more.","PeriodicalId":384376,"journal":{"name":"Proceedings of the 4th International Conference on Information Technology and Computer Communications","volume":"39 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-06-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 4th International Conference on Information Technology and Computer Communications","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3548636.3548655","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

This paper explores how an Android application consumes memory when it is developed by two approaches: basic object-oriented programming versus decorator design pattern. Somehow programmers develop applications based on their coding experience without concern of memory usage especially in mobile applications which memory consumption is a critical issue. The deployed Android application of a list of temples which join a Candle Festival is selected as a case study. New functions are assumingly required by users so that the application could provide more services. Two class diagrams are designed based on basic object-oriented programming and based on decorator design pattern before implementation of the two approaches. The problem is what is the better approach for handling an increasing number of services after the application has been deployed. So that the application still consumes less memory as possible. The case-study applications retrieve information from a free REST API. Memory usage is measured by using an emulator and a physical device. The result shows that an Android application which developed by using decorator design pattern consumes more memory although its codes are cleaner and easier to read. Therefore, when a developer applies decorator design pattern, they should pay more attention on unexpected effect of the design pattern. Research in impact of design patterns should also be investigated more.
Android应用程序中的内存使用比较:基本面向对象编程与装饰设计模式:在移动应用程序中保持低内存使用的编码风格。
本文探讨了使用两种方法开发Android应用程序时如何消耗内存:基本的面向对象编程与装饰器设计模式。程序员根据他们的编码经验开发应用程序,而不考虑内存使用,特别是在内存消耗是一个关键问题的移动应用程序中。本文选择了一个已部署的Android应用程序,该应用程序是一个加入烛光节的寺庙列表。假设用户需要新的功能,以便应用程序可以提供更多的服务。在实现这两种方法之前,分别基于基本的面向对象编程和装饰器设计模式设计了两个类图。问题是,在部署了应用程序之后,处理不断增加的服务数量的更好方法是什么。这样应用程序仍然消耗尽可能少的内存。案例研究应用程序从一个免费的REST API检索信息。内存使用是通过使用模拟器和物理设备来测量的。结果表明,使用decorator设计模式开发的Android应用程序虽然代码更清晰、更易于阅读,但占用的内存更多。因此,开发人员在应用装饰器设计模式时,更应注意设计模式的意外效果。对设计模式影响的研究也应该进行更多的调查。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信