1 / 25

A preliminary empirical exploration of quality measurement for JavaScript solutions

This paper presents a preliminary empirical exploration of quality measurement for JavaScript solutions. It reviews different approaches and metrics for measuring complexity and other quality attributes of JavaScript solutions and identifies potentially applicable metrics. The goal is to establish an appropriate measurement approach using the SSQSA framework to monitor and assess the quality of JavaScript applications.

andreaa
Télécharger la présentation

A preliminary empirical exploration of quality measurement for JavaScript solutions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A preliminary empirical exploration of quality measurement for JavaScript solutions DAVID KOSTANJEVEC, MAJA PUŠNIK, MARJAN HERIČKO, BOŠTJAN ŠUMAK UNIVERSITY OF MARIBOR GORDANA RAKIĆ, ZORAN BUDIMAC UNIVERSITY OF NOVI SAD

  2. Agenda Motivation Introduction Review approach Review results Limitations Conclusion Future work 2

  3. Motivation (Part 1) The actuality of the subject: • Increasing popularity of JavaScript programming language • Lack of appropriate metrics or measurements of their applicability in practice 3

  4. Motivation (Part 2) Practicality of student's efforts • Do something useful at Empirical research methods at the University of Maribor • Get feedback before sending disposition of the master's degree 4

  5. Motivation (Part 3) The SSQSA Framework • Providing support for JavaScript solution • Using existing metrics, implemented for other program languages 5

  6. Introduction JavaScript is an increasingly popular programming language, dynamically interpreted with simple syntax The field is growing rapidly In 2016, 30.6% jobs were recorded as JavaScript oriented main programming language for developing hybrid mobile applications The solutions are constantly evolving (expanding) 6

  7. ECMAScript : JavaScript ECMAScript is a language, standardized by ECMA International overviewed by TC39 board JavaScript – it's a generally used term for a language, that implements the standard ECMAScript It is not connected to a specific version of the standard ECMAScript It can represent an implementation that partially or fully implements the standard Other languages, that implement ECMAScript Jscript, ActionScript, V8, ...

  8. The history of JavaScript JavaScript!= Java Script language, developed at Netscape (Brendan Eich) 1995, as part of the browser. It‘s purpose is to ensure interactive webpages. Initially named LiveScript. A marketing move due to popularity of Java JavaScript. 1996 Netscape offers JavaScript to be standardized due to its growing success in the market

  9. JavaScript – browsers support  1996 Microsoft adds support for JavaScript in browser IE 3.0.  1997 Microsoft and Netscape in collaboration with European Computer Manufacturers Association(ECMA) publish first version of ECMAScript (ECMA- 262) specification.  ECMAScript is a standardized version of JavaScript.  More browsers (Firefox, Safari, Opera) support ECMA 262 v.3 (1999):  but each browser supports the standard in a different way  incompatibility.

  10. History of ES  1. edition – June 1997 (initiative: Netscape)  2. edition – June 1998 – Updates to achieve ISO 16262  3. edition – December 1999 – RegEx, try/catch, …  4. edition – / – Due to different opinions regarding the complexity of the language, it has never been issued  5. edition – ES5 - December 2009 – getters, setters, JSON, ...  5.1. edition – June 2011 – Updates to achieve ISO 16262:2011  6. edition – ES 6, June 2015, greater differences compared to previous versions, partially implemented in most browsers  7. edition– EcmaScript 2016, June 2016

  11. ES6 – (some) novelties  Definition and use of variables (legt, const)  (shorter) creation of objects  Managing of parameters  Classes  A thick arrow method  Template strings  Iterator For..Of  Modules  Map / Set  Asynchronous placement and promises

  12. The goal! Due to the large number and fast development/updating of different frameworks, a need emerges for appropriate tools enabling analysis and comparison of frameworks in terms of different quality dimensions. The analysis should include benchmarking criteria for frameworks what the framework is intended for quality of the software developed on the framework. The quality of developed projects should be tested by using JavaScript software metrics that are still not precisely defined 13

  13. The goal of the research  establish and apply an appropriate measurement to monitor quality of JavaScript applications  conduct a preliminary research to identify software metrics potentially appropriate for assessing the quality of JavaScript solutions The goal of this paper is to review approaches for measuring complexity and other quality attributes applied to JavaScript solutions, in order to select applicable metrics Upon the establishment of an measurement approach, exploit the SSQSA Framework to measure JavaScript solutions according to it 14

  14. Related work Existing frameworks extract different metrics for measuring quality of solutions written in different languages (including JavaScript) however with several setbacks: no processing of extracted numbers that would provide the user with useful information about the quality of the analysed solution. No analytic technique used to generate information about the quality JavaScript solutions which extracted metrics could be taken into account how metrics measure the quality attributes in JavaScript solutions no provided quantitative data about the quality variables or factors. 15

  15. Review approach  Following guidelines/research questions :  Which software metrics have been used in existing literature for measuring the quality of JavaScript solutions?  Are these metrics appropriate to measure the quality of JavaScript solutions?  What are the shortcomings of the existing JavaScript metrics?  What JavaScript metrics already exists and what are their reference values?  Is it possible to extend the existing set of JavaScript metrics for comprehensive software quality measurement of JavaScript based solutions?  What tools for static analysis of JavaScript code already exists and which metrics do the support? 16

  16. The source of information Following databases of scientific papers were used : Web of Science, Science Direct and IEEE Xplore Digital Library. The search was focused on research published in the past 5 years (from 2012 to 2017) in the field of computer science and informatics. 17

  17. The keywords A combination of a keyword sequence # of results IEEE Xplorer 28 ((javascript) OR Javascript) AND ((metric)OR (static analysis*) OR (software analys*)OR ("Abstract":staticanalys*)) ScienceDirect 27 (TITLE-ABSTR-KEY(javascript)) AND (TITLE-ABSTR- KEY(metric) OR TITLE-ABSTR-KEY(static analys*) OR TITLE-ABSTR-KEY(software analys*) ) Web of Science 38 TS=(javascript AND metric*) OR SU=(static analys* OR software analys*) 18

  18. Review results  The preliminary research included 13 papers, addressing listed general questions, without a specific selection criterion: focusing on discovery of software metrics applied on JavaScript solutions and exploration of their usability.  The preliminary research in this paper is not a systematic literature review; all research questions will be addressed in more depth in future work. 19

  19. Most common (identified) metrics Cohesion Among Methods (CAM) Number of Classes (NCLASS), Number of Parameters (NPAR) Nesting level (NEST) Message Passage Coupling (MPC) Number of Overridden Methods (NMO) Number of Public Attributes (NOPA) Lack of Cohesion in Methods 4 (LCOM4) Effort (E) Instability (I) Lack of Cohesion in Methods 5 (LCOM5) Tight Class Cohesion (TCC) Abstractness (A) Loose Class Cohesion (LCC) Number of Statements (STAT) Number of Methods Inherited (NMI) Attribute Hiding Factor (AHF) Class Cohesion (CC) Data Abstraction Coupling (DAC) Data Access Metric (DAM) Method of Aggregation (MOA) Method Hiding Factor (MHF) Normalized Distance from Main Sequence (Dn) Weighted Methods per Class (WMC) Coupling Between Objects (CBO) Lack of Cohesion in Methods (LCOM) Depth of Inheritance Tree (DIT) Lines of Code (LOC) Number of Children (NOC) Response for a Class (RFC) Number of Methods (NOM) Cyclomatic Complexity (V(G)) Number of Attributes (NOA) Fan-out (FANOUT) Fan-in (FANIN), Number of Public Methods (NOPM) Lines of Comments (LCOMM) Afferent Couplings (Ca), Efferent Couplings (Ce) Lines of Source Code (SLOC) Lack of Cohesion in Methods 3 (LCOM3) 20

  20. JavaScript suitable metrics Metrics obtained with the tool and suitable for JavaScript measurement Number of classes Number of methods Number of attributes Number of subclasses Depth of inheritance tree 21

  21. Limitations of the research the research was conducted by students within the course Empirical research methods and is not a complete systematic literature review (other papers of existing research must be taken into consideration). This paper is only a preliminary research from the empirical perspective. Only after comprehensive empirical research, confirmed conclusions have to be challenged in practical application to examine real usability of selected metrics and discover their weaknesses. 22

  22. Conclusion Several metrics have been identified and are already commonly used for software quality measurement however most of them are reportedly not suitable for JavaScript source code measurements. The preliminary research in this paper is an initial effort to examine the field of JavaScript metrics, providing basic insight into the research field. 23

  23. Future work • A systematic literature review of the field • Practical examination of selected metrics and tools • Definition of metrics suitable for JavaScript program code measurement in terms of quality and complexity • Extended formation of appropriate measurements for JavaScript source code • Implementation of metrics and integration of them with the SSQSA Framework. 24

  24. ACKNOWLEDGMENTS This joint work is enabled by bilateral project “Multidimensional quality control for e-business applications” between Furthermore, the two authors from University of Novi Sad were partially supported by the Ministry of Education, Science, and Technological development, Republic of Serbia, through project no. OI 174023. The authors acknowledge the financial support from the Slovenian Research Agency (research core funding No. (J5-8230)). Serbia and Slovenia (2016-2017). 25

  25. A preliminary empirical exploration of quality measurement for JavaScript solutions Thank you for listening! QUESTIONS? maja.pusnik@um.si david.kostanjevec@student.um.si 26

More Related