Mousavimantenibilidad React
Mousavimantenibilidad React
Mousavimantenibilidad React
Maintainability Evaluation of
Single Page Application
Frameworks- Angular2 vs. React
1
1. Introduction
There is a large number of libraries and frameworks available for
developing single-page web applications. For implementing applications
from simple and small to large and complex ones, developers often use one or
several frameworks and libraries [2].
Choosing a suitable framework can reduce the development time and
increase the performance and quality of the application. Most of the IT
companies are using agile methodologies for software development. In agile
frameworks like Scrum, small teams consist of 3 to 9 developers work on
developing requirements, therefore creating a maintainable product is an
essential quality attribute [3].
In this project, we are comparing two software products, one developed
with Angular and the other with React. The comparison is respective to
maintainability with a focus on modifiability. The goal is to define how these
two approaches relate to maintainability and indicate general differences
between Angular and React.
In the following sections in this chapter, we describe the concept of quality
in software development, maintainability as a quality attribute, quality model
for evaluating the implementation, research done in this field and formulating
the problem.
1.1. Background
Web applications are subject to the same risks as involved in any other
applications, but the rapid pace of delivery, great challenging market, and fast
requirements change, pushed the quality attributes to the background. The
result is that web applications usually do not follow well-known practices,
have poor or no documentation and disordered architectures [4].
1
AngularJs (Angular.js) is referring version 1.x of the framework and version 2.x is just
called Angular.
2
Github
Watchers Stars Forks Contributors
React 3,995 56,775 10,235 882
Angular.js 4,468 54,130 26,852 1,553
Angular 2,202 19,353 5,025 387
1.1.2. Quality
Ian Sommerville [3] describes the quality as a concept with a different
meaning for the various actors, and they are related to the system. Glain in [7]
describes the primary purpose of quality attributes in end-user satisfaction
when classifying requirements.
One of the quality landscapes is the expected software lifetime. It means a
software system has a long-lifetime if it is maintainable [3].
1.1.3. Maintainability
Maintainability is a quality attribute that defines how easy a software
system can improve its components or how adapts to requirements and
environment changes. This quality attribute is highly related to how
developers experience software, and it will be hard to measure them
objectively, so we need to make some characteristics. Here we follow the
grouping by Sommerville [3] and divide maintainability into internal
attributes as the depth of inheritance tree, cyclomatic complexity and program
size in lines of code.
Also from an industrial perspective, changes in requirements and
developing a maintainable product is cost effective. In the lifecycle of
development administration processes, maintainability is one of the key
software quality metrics, and most of the development process cost is to
improve functionality and change management [8]. Therefore, choosing
frameworks and libraries that help to develop a maintainable software system
is essential.
3
Descriptive models give a standard meaning of quality, classifies them and
map each attribute of the project. The defined quality attributes can then later
be measured by evaluation models [10].
One of these standards is the ISO/IEC 25000 SQuaRE series [11] which
consists of five main divisions and extensions.
ISO/IEC 2501n is the quality model division where its extension, ISO/IEC
25010 [12], proposes a quality reference model for software products. Figure
1.1, shows the organization of SQuaRE.
4
1.1.5. Measurement Model
ISO/IEC 2502n is the Quality Measurement Division and the extension,
ISO/IEC 25022 [13] and ISO/IEC 25023 [14], proposes measurements for the
product quality model provided by 25010. Figure 1.3 shows the organization of
measurement models.
5
1.2. Problem Formulation
JavaScript (JS) is used by 94.4% of all client-side web applications. This
amount of usage makes JavaScript the most common programming language
in this area [16].
There are plenty of JS frameworks and libraries to facilitate programming
and make progress quicker, and there are also great differences in how they
solve various problems which make the code strongly bound to the chosen
framework or library. By a simple search on the internet for JavaScript
frameworks, the first two names that come across are React and Angular.
On the one hand, modifiability is an essential attribute of a maintainable
product, and on the another hand, there are differences in the programming
languages of Angular and React. This difference is the usage of a superset of
ECMAScript. Typescript, CoffeScript, and Dart are the famous
implementations of the ES specification. Modern browsers’ JavaScript engine
supports ES2015 (ES6) [17], but other supersets such as Typescript,
regarding their typing definition should be transpiled to ES5 or ES6 to run in
browsers. This difference can be troublesome when comparing frameworks.
According to the discussion in the background (Section 1.1), this question
arises, how can we compare two leading front-end development approaches
like Angular and React regarding maintainability with a focus on
modifiability, where Angular is a framework and React a UI library with
different programming languages.
1.3. Motivation
Softwerk AB2 has recently been developing a grammar learning web
application. Code modification is 50% of maintenance cost, and maintenance
itself costs 40% up to 70% of the software lifecycle [18][19][20]. Since
developing and maintaining the software is quite an investment, and used
framework can often not be changed, and since the company determines the
structure of the implementation to a large extent, it is important to choose the
right framework from the beginning. As the company wants to create high-
quality software, in particular with respect to maintainability, it is important
to know in which framework they should invest. Does Angular allow to
create more maintainable web applications than React, or it would be to the
same extent? The aims of this project are to conduct general differences and
similarities of both approaches by re-building part of the existing application
with React and afterward compare them regarding maintainability with a
focus on modifiability.
2
https://softwerk.se, founded in 2008 by employees and alumni of the Department of
Computer Science at Linnaeus University
6
1.4. Research Questions
Relating to the discussion in problem formulation and motivation, we
divide the aims of this project into the following research questions.
Figure 1.4 Systematic map over development phase (north) and research topic (east) [21]
7
We started by searching for relevant keywords such as; software quality,
maintainability, quality models, single-page applications, javascript
frameworks, etc. The quick review of the results and reading abstracts lead us
to a new query phrase for more accurate searching.
To conduct a search for general software quality models with a focus on
web technologies we used a combination of keywords in the following query:
(software OR (javascript AND frameworks) OR (web AND (application OR
technology)) AND (quality (standard OR model) OR maintainability)).
We filtered the articles first by peer reviewed second by relevance and
third by date. The result is approximately 40 articles and we have used most
of them to support our theory and analysis.
The keywords such as ((single page application OR SPA) OR Angular OR
React AND (comparison OR analysis OR evaluation)) did not have relevant
results except some student thesis. Among them, Eric Molin [25] in his
degree project conducts statistical analysis on popularity and trends of
Angular and React.
A literature review by [26] shows that, as ISO 25010 is new and yet under-
develop standard, most of the works in this field just analyzed the
characteristics, or just used the sub-characteristics to define their model and
the relation between divisions and internal attributes are not clearly analyzed.
Articles such as [27][9] identify models based on ISO 25010. [15] and
[28] argue the pros and cons of the quality model. Articles such as
[26][29][30][31][4][32] use the ISO standard to define metrics and evaluate
products by measurements.
8
1.6. Scope/Limitation
Evaluating the usefulness of quality models is one of the hot topics in
research area which is beyond the scope of this project. Therefore we choose
ISO/IEC 25010 which is an internationally accepted and widely used
standard in research settings [28].
The measurement extensions of SQuaRE, ISO/IEC 25022 and 25023 does
not propose metrics, and more describe measures at an abstract level.
Angular is a complete framework, and ReactJs is a library (see the
differences in Chapter 4), which both are new technologies with the reactive
and functional paradigm, and very few analyzer tools developed for them.
1.8. Outline
In Chapter 2 we outline details of the quality model, quality measure, and
the metric we choose for measuring maintainability of products. In Chapter 3
we outline the research strategy, argue the selected metric and the approach to
measure procedure. In Chapter 4 we outline general information about
Angular and React and describe the application implementation process.
Chapter 5 shows results of measurements, in Chapter 6 we analyze the results
and Chapters 7 and 8 contain discussion and conclusion.
9
2. Theory
In this chapter, we describe the model introduced in the background in
detail and introduce a model to determine and measure the maintainability of
the applications objectively.
3
http://eslint.org/
4
https://palantir.github.io/tslint/
10
Figure 2.1 Target Enteties For Quality Models [12]
11
Since 2005 machine learning algorithms for predicting quality are growing
and still are the most popular models, therefore usage of hybrid algorithms is
suggested [22]. One of the most famous hybrid algorithms is maintainability
index.
5
CFG is a graph to visualize the execution flow of a function or program.
12
2.2.2. Halstead Volume
Halstead introduces a static software metric that does not need the
program execution. The metric is directly calculated in a static manner from
operators and operands of the source code. Halstead’s metric looks at the
algorithms and programs as sequences of operators and their related operands
[40]. Table 2.1 shows the indicators and the measures that can be calculated
from indicators.
Parameter Meaning
n1 Number of unique operators
n2 Number of unique operands
N1 Number of total occurrence of operators
N2 Number of total occurrence of operands
13
The original regression model of the MI that uses Halstead Effort (HE)
presented in [37]. The model formulates MI as follow:
The next modification of the equation uses Halstead Volume (HV) instead
of HE with taking comment lines into consideration [42].
14
3. Method
In this chapter, we describe the inductive approach that is used to answer
the research questions.
15
formulation, motivation, research question and literature review in Chapter 1.
In the next chapter (Chapter 4), we briefly give an introduction to Angular
and React and describe the implementation of the application with ReactJs.
Also, the implementation part contains the official documentation study and
development best practices by checking official examples and several
tutorials and repositories.
6
http://www.jslint.com/
7
http://jshint.com/
8
https://github.com/es-analysis/plato
9
https://github.com/palantir/tslint/issues/1411
16
We also tried Visual Studio 2015 (update 3) for using solution analyzer.
For setting up an Angular application in the visual studio, we followed
ASP.NET 4.x cookbook where we had to create a project based on Visual C#
or VB templates. The embedded Typescript version available in VS
marketplace is V2.0 and setting external web tools to use Typescript from
npm path, was throwing several exceptions. As mentioned, Typescript V2.0
did not contain CC rule, and besides that, as the created template is based on
C# or VB, visual studio was not able to analyze the typescript files of the
Angular project and always outputting the MI as 100 with no file description.
In one hand it would not be the accurate result to compute the MI
manually, and in another hand, the second research question is to find tools to
automate the measurement. Therefore we decided to transpile the Typescript
files in Angular application to ES2015 and use the generated files as input for
Plato.
10
https://github.com/kisstkondoros/codemetrics
17
comparison. The results were showing that most of the modules in Typescript
and its transpiled JavaScript has the same CC value and in some of the
modules, the difference does not exceed by ±2. For instance, in the module in
Figure 3.2 both modules have the average CC value of 10.
18
Figure 3.2 Side by Side code comparison. Left JavaScript, Right Typescript
Figure 3.3 Side by Side code comparison. Left JavaScript, Right Typescript
19
4. Implementation
In this chapter, we give an introduction to Angular and React, and
afterward, we describe the React prototype implementation
20
By the description we can list the important features of Angular as follow:
Using ES6/7 and Typescript
High speed and performance with AoT (server-side compiling)
Using consistency concepts
Component based architecture
Angular CLI tool which automates creating and serving application with
lots of other features.
Style encapsulation.
Augury which is a Chrome dev tools extension for debugging the
application.
Angular is experimenting on different platform cores. This concept gives
Angular the ability to go beyond a framework for browser applications.
11
http://redux.js.org/
21
As mentioned before React itself is a UI library which can come along
with other libraries to cover all functionalities a framework should have,
which we call it an ecosystem. In this ecosystem, Redux provides a single
immutable state container that all components in the application can access
and manipulate. The official documentation mentions, “It is far more likely
that Redux is the right solution to your problem than that context is the right
solution.” [45]
React is also considering the Type checking. We can assign types to
variables in each component by React.PropTypes. For scaffolding a React
project, the community recently released create-react-app that creates
projects with no need of build configuration. We can list the important
features of React as follow:
Using ES6 and JSX
High speed and performance with virtual DOM and server-side rendering.
Component-based and stateful architecture.
React and Redux development tools for browsers.
At the time of writing this report, high community support and most
interested library in GitHub.
4.3.1. Scaffolding
For starting the project, we use the create-react-app module which is the
recommendation of the community. This is easily done via terminal with the
create command.
12
https://projects.spring.io/spring-boot/
22
Library Version Usage
React & React-dom 15.4.1 The main React UI library
Redux 3.6.0 Holding the application state
React-redux 5.0.1 map redux state and action creators to
props of component
Redux-thunk 2.1.0 Middleware for Asynchronous dispatches
Axios 0.15.3 AJAX requests to API
React-router 3.0.0 Keep the UI in sync with the URL
immutability-helper 2.0.0 Mutate a copy of the state object and
manipulate the needed parts
Eslint 3.12.2 Linting and static code analysis
Table 4.1 List of Libraries used in prototype development
23
shows the screenshots of the page and Redux state. As shown in the picture
the field that user should fill is set to null. As long as these fields are null, the
form is not valid.
Edit exercise mode is using the same view as creating new exercise mode.
The editable fields (sentence, word index and category) are rendered into
their tags. Appendix B5 shows the screenshots of editing an exercise.
Figure 4.1 Flow of events for rendering all exercise into browser
24
5. Results
To measure the MI of Angular and React applications we use Plato which
is an open source tool. Plato measures the MI according to the equation we
discussed in Chapter 2.2.
As we discussed in Chapter 3.3.1, at the time of writing this report we did
not find any tool to calculate MI of Typescript projects. Therefore, we
transpile all Typescript files to ES2015.
Regarding the design and creation strategy of our methodology, we should
assess the prototype in different increments during development and also the
hybrid model of MI shows that increments of functions affect the effort and
CC. We do not have access to commits of the Angular app. Therefore at the
first step, we measure the starter kits of Angular and React that contains
minimum dependencies.
The starter kit of the Angular app is angular2-webpack.starter13 which is
one of the best practices for starting an Angular project. Figure 5.1 shows the
analysis result of the starter kit and Figure 5.2 shows the analysis report after
implementation.
The starter of React app is create-react-app which is the official release of
the community. Figure 5.3 shows the analysis result for React starter kit and
Figure 5.4 shows the analysis result for React application after
implementation.
The results template contains:
Total lines of code in project and average lines of code
Distribution of MI among files in the project
Average MI of the project
Estimated Halstead errors per file.
13
https://github.com/AngularClass/angular2-webpack-starter
25
Figure 5.1 Plato Analysis for Angular Starter Kit
26
Figure 5.3 Plato Analysis for React Starter Kit
27
6. Analysis
The inputs for Plato analysis tool are files with js format. Another file
extensions such as HTML, JSON or CSS are not coming into account. The
Angular app is developed based on the practices of the starter kit. The starter
contains a service, resolver, routes, component deceleration, bundler
environment specification and a test class for app component.
React starter like Angular uses Webpack as bundler the starter uses only
one build dependency. The configuration of both development and
production builds handled cohesively. The routes and resolvers in React are
not separated and included in the index.js file. These build differences made a
great difference in the number of files in starter kits.
Number of files
10≤ CC < 16 5
2≤ CC <10 21
CC = 1 22
Table 6.1 Number of Files in CC Intervals
The MI calculated per file in each code base, emerges an even distribution
of values where no file is below the accepted threshold values. This even
distribution shows the CC of the app is well dispersed and indicating the
proper separation of functionality. Also, this separation of functionality is
resulting in maintenance improvement by 2.89% in compare to the starter kit.
28
6.2. React app Analysis
The development of React app is distributed in 28 files. In React, the
HTML tags are embedded into JSX files, and HTML tags are counted as the
number of lines of code.
The MI calculated per file in each code base emerges an even distribution
of values where no file is below the accepted threshold values. This even
distribution shows the CC of the app is well dispersed and indicating the
proper separation of functionality. In the React prototype, the highest
complexity is for the exercise-context file with CC of 8. Table 6.2 shows the
amount of files in CC intervals.
Number of files
10≤ CC < 16 0
2≤ CC <10 12
CC = 1 16
Table 6.2 Number of Files in CC Intervals
29
7. Discussion
In problem formulation in Chapter 1, we discussed that software product
maintenance and source code modification is one of the most significant
concerns in web application development. In this chapter, we discuss our
findings in this project to answer the research questions and outline the
general differences of React and Angular which were the target of
comparison of this project.
30
The analysis results show that we have a significant difference in the
number of files and number of code lines. Moreover, it demonstrates that the
second problem we face is if we are comparing a well-developed Angular
application with a bad developed React application or vice versa.
In better support to our discussion and to answer the research question we
add two more topics to discussion.
7.2.2. Statistics
As Table 1.1 shows, React, and Angular are both the most popular
technologies but React by the time of writing this report has the leading with
higher bookmarks and contribution in compare to Angular. Also, searching
Google shows the comparison of React and Angular is a hot topic, and one
can find thousands of blog posts, videos and slide shares that trying to
compare them. From the start of this project, we also have followed many of
these topics, but none of them has a clear conclusion and just mention some
pros and cons.
One of the most popular starting applications is ToDo list app that we can
find thousands of different implementations of it for various libraries and
frameworks. One of these projects is implementing the ToDo app in both
Angular and React and uses Redux as the state for both applications. As an
addition to our analysis, we also analyze ToDo-Redux project. This project is
implemented by one developer with same concerns and approach for
comparison reasons. Figure 7.1 shows the analysis result for this project. We
use the same Gulp approach for transpiling the Typescript files.
31
Figure 7.1 Plato analysis for ToDo app with Redux
In this analysis, we see that React app has a better average MI, but the
difference is not significant.
32
RQ3. Is ReactJs a better alternative to Angular for developing web
applications with respect to maintainability? React alone as a UI library can
be a better alternative to Angular for small and simple projects, but for more
complex enterprises, Angular as a complete framework with its objective
oriented manner is a better choice.
33
8. Conclusion
In this project, we discussed the factors which characterize software
quality. One of the important characters that also expands the lifetime of a
software product and contains up to 70% of production costs is
maintainability. Regarding the importance of software maintenance, we
argued how important it is to select a suitable framework for software
development. We formulated the problem in software quality area especially
in web technologies and mentioned the lack of research in JavaScript
frameworks and technologies. For the aims of this project, and answering the
research questions, we introduced ISO/IEC 20510 as a quality model and MI
as a quantitative measurement model. Also, Plato introduced as the best tool
we found for automating measurement process with visualization capabilities.
This project can be of interest to developers who want to know the general
differences and similarities of React and Angular and the ones who has an
interest in software maintenance.
The methodology in this work is an abstract approach and applicable for
any research settings, specially comparative evaluation that needs prototype
creation. The generated results also show that design and creation strategy
can be useful for measuring most of the JavaScript applications’
maintainability. In chapter 7 we deeply discussed the shortcomings of our
strategy.
The outcomes of this project can be more valuable and reliable if we
follow the following points:
the same developer should implement the Angular and the React
prototypes with the same design and architecture.
The prototypes have measurement results by each deliverable increment
in other to compare product maintenance and the MI in several phases of
development.
The final results can be accurate if we measure the values with tools that
support the programming language for each technology. In our project, a
tool that can measure MI for Typescript was not found.
34
One of the hot topics in conferences and forums especially in ng-conf14 is
combining Angular and React to get benefits of React components and the
virtual DOM in Angular directives and reach a higher performance. This also
can be a good investigation to evaluate performance and maintainability in
combined approach.
On the one hand, React is using React Native for creating native mobile
applications and Ionic2 can be used for creating a native mobile application
with Angular. An investigation on the amount of code that can be re-used
from the web app to create the mobile app can be an interesting research
topic.
14
https://www.ng-conf.org/
35
References
[1] “ECMAScript® 2015 Language Specification (HTML rendering),”
2015. [Online]. Available: http://www.ecma-international.org/ecma-
262/6.0/. [Accessed: 25-Dec-2016].
[2] S. Murugesan, “Understanding Web 2.0,” IT Prof., vol. 9, no. 4, 2007.
[3] I. Sommerville, “Quality management,” in Software engineering, 9th
ed., Marcia Horton, M. Hirsch, and M. Goldstein, Eds. Pearson
Education, Inc., 2011, pp. 652–680.
[4] L. Shanker Maurya and G. Shankar, “MAINTAINABILITY
ASSESSMENT OF WEB BASED APPLICATION,” J. Glob. Res.
Comput. Sci., vol. 3, no. 7, 2012.
[5] M. Mikowski and J. Powell, single page web applications. Manning
Publications, 2013.
[6] “most stared projects in github: serach result.” [Online]. Available:
https://github.com/search?o=desc&q=stars%3A%3E1000&ref=searchr
esults&s=stars&type=Repositories&utf8=✓. [Accessed: 20-Dec-
2016].
[7] D. Galin, Software quality assurance: from theory to implementation.
Pearson Education, 2004.
[8] R. L. Glass, Facts and Fallacies of Software Engineering. Addison
Wesley, 2002.
[9] M. K. Chawla and I. Chhabra, “SQMMA : Software Quality Model for
Maintainability Analysis,” in Proceedings of the 8th Annual ACM
India Conference (Compute ’15), 2015, pp. 9–17.
[10] K. Sheoran and O. P. Sangwan, “An Insight of software quality models
applied in predicting software quality attributes: A comparative
analysis,” 2015 4th Int. Conf. Reliab. Infocom Technol. Optim. (Trends
Futur. Dir., pp. 1–5, 2015.
[11] “ISO/IEC 25000: Systems and software engineering -- Systems and
software Quality Requirements and Evaluation (SQuaRE) -- Guide to
SQuaRE.” International Organization for Standardization, Geneva,
Switzerland, 2014.
[12] “ISO/IEC 25010: Systems and software engineering -- Systems and
software Quality Requirements and Evaluation (SQuaRE) -- System
and software quality models software quality models.” International
Organization for Standardization, Geneva, Switzerland, 2011.
[13] “ISO/IEC 25022: Systems and software engineering -- Systems and
software Quality Requirements and Evaluation (SQuaRE) --
Measurement of quality in use.” International Organization for
Standardization, Geneva, Switzerland, 2012.
[14] “ISO/IEC 25023: Systems and software engineering -- Systems and
software Quality Requirements and Evaluation (SQuaRE) --
Measurement of system and software product quality.” International
36
Organization for Standardization, Geneva, Switzerland, 2016.
[15] J. Gong, J. Lu, and L. Cai, “An Induction to the Development of
Software Quality Model Standards,” 2016 Third Int. Conf. Trust. Syst.
their Appl., vol. 9126, pp. 117–122, 2016.
[16] “Usage of client-side programming languages for websites.” [Online].
Available:
https://w3techs.com/technologies/overview/client_side_language/all.
[Accessed: 27-Dec-2016].
[17] “ECMAScript Compatibility Table,” 2016. [Online]. Available:
http://kangax.github.io/compat-table/es6/#chrome57. [Accessed: 25-
Dec-2016].
[18] R. P. L. Buse and W. R. Weimer, “A Metric for Software Readability,”
in Proceedings of the 2008 international symposium on Software
testing and analysis, 2008, pp. 121–130.
[19] V. Nguyen, “IMPROVED SIZE AND EFFORT ESTIMATION
MODELS FOR SOFTWARE MAINTENANCE,” UNIVERSITY OF
SOUTHERN CALIFORNIA, 2010.
[20] S. W. L. Yip and T. Lam, “A software maintenance survey,” in
Proceedings of 1st Asia-Pacific Software Engineering Conference, pp.
70–79.
[21] S. Casteleyn, “Ten Years of Rich Internet Applications: A Systematic
Mapping Study, and Beyond,” ACM Trans. Web, vol. 8, no. 3, 2014.
[22] R. Malhotra and A. Chug, “Software Maintainability: Systematic
Literature Review and Current Trends,” Int. J. Softw. Eng. Knowl.
Eng., vol. 26, no. 8, pp. 1221–1253, Oct. 2016.
[23] M. Riaz, E. Mendes, and E. Tempero, “A Systematic Review of
Software Maintainability Prediction and Metrics.pdf,” Third Int. Symp.
Empir. Softw. Eng. Meas., pp. 367–377, 2009.
[24] C. Wohlin, “Guidelines for Snowballing in Systematic Literature
Studies and a Replication in Software Engineering,” 18th Int. Conf.
Eval. Assess. Softw. Eng. (EASE 2014), pp. 1–10, 2014.
[25] E. Molin, “Comparison of Single-Page Application Frameworks,”
KTH ROYAL INSTITUTE OF TECHNOLOGY, 2016.
[26] S. K. Dubey, S. Ghosh, and A. Rana, “Comparison of software quality
models: an analytical approach,” Int. J. Emerg. Technol. Adv. Eng.,
vol. 2, no. 2, pp. 111–119, 2012.
[27] J. Franca and M. S. Soares, “SOAQM : Quality model for SOA
applications based on ISO 25010,” in 17th International Conference
on Enterprise Information Systems (ICEIS), 2015, no. APRIL.
[28] E. Bouwers, A. Van Deursen, and J. Visser, “Evaluating Usefulness of
Software Metrics-an Industrial Experience Report,” in Proceedings of
the 35th international Conference on Software Engineering, 2013, pp.
921–930.
[29] K. K. Aggarwal, Y. Singh, and J. K. Chhabra, “An integrated measure
37
of software maintainability,” Reliab. Maintainab. Symp. 2002.
Proceedings. Annu., pp. 235–241, 2002.
[30] S. Motogna, A. Vescan, C. Serban, and P. Tirban, “An Approach to
Assess Maintainability Change,” in 2016 IEEE International
Conference on Automation, Quality and Testing, Robotics (AQTR),
2016, pp. 1–6.
[31] E. Irrazábal and J. Garzás, “ALIGNMENT OF OPEN SOURCE
TOOLS WITH THE NEW ISO 25010 STANDARD - Focus on
Maintainability,” Proc. 6th Int. Conf. Softw. Database Technol., pp.
111–116, 2011.
[32] T. Hovorushchenko and O. Pomorova, “Evaluation of mutual
influences of software quality characteristics based ISO 25010:2011,”
Comput. Sci. Inf. Technol. - Proc. 11th Int. Sci. Tech. Conf. CSIT 2016,
pp. 80–83, 2016.
[33] A. Nitze, “Evaluation of JavaScript Quality Issues and Solutions for
Enterprise Application Development,” in Software Quality. Software
and Systems Quality in Distributed and Mobile Environments: 7th
International Conference, SWQD 2015, Vienna, Austria, January 20-
23, 2015, Proceedings, D. Winkler, S. Biffl, and J. Bergsmann, Eds.
Cham: Springer International Publishing, 2015, pp. 108–119.
[34] Object Management Group (OMG), “Automated Source Code
Maintainability Measure (ASCMM) v1.0,” no. January. Object
Management Group, Inc., 2016.
[35] I. Heitlager, T. Kuipers, and J. Visser, “A Practical Model for
Measuring Maintainability,” 6th Int. Conf. Qual. Inf. Commun.
Technol. (QUATIC 2007), pp. 30–39, 2007.
[36] D. I. K. Sjøberg, B. Anda, and A. Mockus, “Questioning software
maintenance metrics: A comparative case study,” Int. Symp. Empir.
Softw. Eng. Meas., no. Mi, pp. 107–110, 2012.
[37] D. Coleman, D. Ash, B. Lowther, and P. Oman, “Using metrics to
evaluate software system maintainability,” Computer (Long. Beach.
Calif)., vol. 27, no. 8, pp. 44–49, 1994.
[38] K. D. Welker, P. W. Oman, and G. G. Atkinson, “Development and
Application of an Automated Source Code Maintainability Index,” J.
Softw. Maint. Res. Pract., vol. 9, no. 3, pp. 127–159, 1997.
[39] P. Oman and J. Hagemeister, “Construction and testing of polynomials
predicting software maintainability,” J. Syst. Softw., vol. 24, no. 3, pp.
251–266, 1994.
[40] M. H. Halstead, Elements of software science. Elsevier New York,
1977.
[41] T. J. McCabe, “A Complexity Measure,” IEEE Trans. Softw. Eng., vol.
SE-2, no. 4, pp. 308–320, 1976.
[42] K. D. Welker, “The software maintainability index revisited,”
CrossTalk, no. August, pp. 18–21, 2001.
38
[43] Microsoft - Code Analysis Team Blog, “Maintainability Index Range
and Meaning.” [Online]. Available:
https://blogs.msdn.microsoft.com/codeanalysis/2007/11/20/maintainab
ility-index-range-and-meaning/. [Accessed: 06-Jan-2017].
[44] B. Oates, “Overview of the research process,” in Researching
Information Systems and Computing, Sage Publications, 2006, pp. 32–
42.
[45] “React - Documentation.” [Online]. Available:
https://facebook.github.io/react/docs/hello-world.html. [Accessed: 07-
Dec-2016].
[46] “Angular Docs - ts - INDEX.” [Online]. Available:
https://angular.io/docs/ts/latest/. [Accessed: 07-Dec-2016].
[47] P. Deeleman, Learning Angular 2. Birmingham: Packt Publishing,
2016.
[48] Rangle.io, “Rangles’s Angular 2 Training Book.” GitBook, 2016.
[49] A. Horton and R. Vice, Mastering React. Birmingham: Packt
Publishing, 2016.
[50] S. Counsell, X. Liu, S. Eldh, R. Tonelli, M. Marchesi, G. Concas, and
A. Murgia, “Re-visiting the ‘Maintainability Index’ Metric from an
Object-Oriented Perspective,” Proc. - 41st Euromicro Conf. Softw.
Eng. Adv. Appl. SEAA 2015, pp. 84–87, 2015.
[51] “Software Design Complexity.” [Online]. Available:
https://www.tutorialspoint.com/software_engineering/software_design
_complexity.htm. [Accessed: 06-Jan-2017].
39
Appendix A - CodeBlocks
A1 – gulp-typescript-helper
Gulpfile.ts
A2
1. ReactDOM.render(
2. <Provider store={store}>
3. <Router history={browserHistory}>
4. <Route path="/" component={App}>
5. <IndexRoute component={Greeting}/>
6. <Route path="uppgift/:id" component={ExercisePage}/>
7. <Route path="overview" component={OverviewPage}/>
8. </Route>
9. </Router>
10. </Provider>, document.getElementById('root'));
I
A3
1. class OverViewPage extends Component {
2. componentDidMount() {
3. this.props.fetchAllExercises();
4. }
5. render() {
6. return (
7. <div>
8. <OverviewList/>
9. </div>
10. );
11. }
A4
1. class ExercisePage extends Component {
2. constructor(props) {
3. super(props)
4. this.state = {
5. editMode: this.props.params.id !== '-1'
6. }
7. }
8. componentDidMount() {
9. if (!editMode) {
10. this.props.createEmptyExercise(types.PART_OF_SPEECH);
11. } else { /* logic*/ }
12. render() {return (
13. <div>
14. <ExerciseForm editMode={this.state.editMode}/>
15. </div>
16. );}}
A5
1. class ExerciseForm extends Component {
2. constructor(props) {
3. super(props)
4. this.state = {valid: true}
5. }
6. componentWillReceiveProps(nextProps) {
7. if (nextProps.Solution.category.value === null || nextProps.
Solution.selectedWordIndex === null) {
8. this.setState({valid: false})
9. } else {
10. this.setState({valid: true})
11. }
12. }
II
A6
1. const initialState={
2. id: '',
3. question: '',
4. sentence: '',
5. exerciseType: '',
6. rightAnswersNumber: '',
7. wrongAnswersNumber: '',
8. solutionGroups: []
9. }
10. export default function Exercise(state=initialState,action){
11. switch(action.type){
12. case SET_EXERCISE:
13. const exercise = action.payload
14. return update(state,{
15. sentence:{
16. $set:exercise.sentence
17. }
18. /*setting rest of the state*/
19. });
20. default: return state;
21. }
22.
23. }
III
Appendix B – Implementation
B1 – Requirements Mockup
IV
B2 – Folder Structure
V
B3 – Overview Page Screenshot with The State Payload
VI
B4 – Create New Exercise with The State Payload & Actions
Occurred
VII
B5 – Editing Exercise with The State & Actions Occurred
VIII