du.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • harvard1
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Passive MVC och MVVM designmönster i Android: En jämförelse av kodkomplexitet mellan Passive MVC och MVVM
Dalarna University, School of Technology and Business Studies, Information Systems.
Dalarna University, School of Technology and Business Studies, Information Systems.
2016 (Swedish)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesisAlternative title
Passive MVC and MVVM design pattern in Android : A comparison of code complexity between Passive MVC and MVVM (English)
Abstract [sv]

Det mobila operativsystemet Android är idag ett ganska dominerande operativsystem på den mobila marknaden dels på grund av sin öppenhet men också på grund av att tillgängligheten är stor i och med både billiga och dyra telefoner finns att tillgå. Men idag har Android inget fördefinierat designmönster vilket leder till att varje utvecklare får bestämma själv vad som ska användas, vilket ibland kan leda till onödigt komplex kod i applikationerna som sen blir svårtestad och svårhanterlig.

Detta arbete ämnar jämföra två designmönster, Passive Model View Controller (PMVC) och Model View View-Model (MVVM), för att se vilket designmönster som blir minst komplext med hjälp av att räkna fram mätvärden med hjälp av Cyclomatic Complexity Number (CCN). Studien är gjord utifrån arbetssättet Design & Creation och ämnar bidra med: kunskap om vilket mönster man bör välja, samt om CCN kan peka ut vilka delar i en applikation som kommer att ta mer eller mindre lång tid att testa.

Under studiens gång tog vi även fram skillnader på om man anväder sig av den så kallade Single Responsibilyt Principle (SRP) eller inte. Detta för att se om separerade vyer gör någon skillnad i applikationernas komplexitet.

I slutändan så visar studien på att komplexiteten i små applikationer är väldigt likvärdig, men att man även på små applikationer kan se skillnad på hur komplex koden är men också att kodkomplexitet på metodnivå kan ge riktlinjer för testfall.

Abstract [en]

Today the mobile operating system Android has a firm grip on the mobile market due to its open source code and the availability due to the variety of phones available, from very cheap models to the high-end exclusive ones. However, Android currently has no defined design pattern which causes a bit of a problem during the initial stages of development because the developer has to make that decision before the initial development starts. This sometimes causes excessive complexity in the finished application, which then becomes difficult to test and manage.

In this report we compare the two design patterns Passive Model View Controller (PMVC) and Model View View-Model (MVVM) to decide which one is the least complex. For this we used so called metrics to show the complexity of the finished applications. The metrics were calculated using the existing library of functions called Cyclomatic Complexity Numbers (CCN). The study is based on the workflow Design & creation and aim to contribute with: knowledge that will make it easier to choose design pattern when developing an Android application, and if you can with CCN point out which areas in an application will take more or less time to conduct tests on.

During the study we also analyzed how big of an impact the Single Responsibility Principle (SRP) had on the complexity. This was part of the study so that we could see the difference of separated views versus non-separated views.

The study shows us that the complexity in small applications is very similar, no matter which design pattern you're using. However, it also shows that there are certain parts of the applications that are diverse in their complexity and that code complexity on method-level can give directions to test cases.

Place, publisher, year, edition, pages
2016.
Keyword [en]
Model View Controller, MVC, Passive MVC, Model View ViewModel, MVVM, Single Responsibility Principle, Designmönster, Android, Komplexitet, Kodkomplexitet, Test, Testfall
Keyword [sv]
Model View Controller, MVC, Passive MVC, Model View ViewModel, MVVM, Single Responsibility Principle, Designmönster, Android, Komplexitet, Kodkomplexitet, Test, Testfall
National Category
Information Systems
Identifiers
URN: urn:nbn:se:du-21219OAI: oai:DiVA.org:du-21219DiVA: diva2:910528
Available from: 2016-03-09 Created: 2016-03-09

Open Access in DiVA

fulltext(2176 kB)93 downloads
File information
File name FULLTEXT01.pdfFile size 2176 kBChecksum SHA-512
83cdc830f8622111fceb535b4d7714608f7df544e08be271a86b618747a3e6ffeca35b4916e4d134355f9e4d9bac054acb9c7e66d6bda1f6aee2d5270d4e5b6c
Type fulltextMimetype application/pdf

By organisation
Information Systems
Information Systems

Search outside of DiVA

GoogleGoogle Scholar
Total: 93 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

Total: 441 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • harvard1
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf