Академический Документы
Профессиональный Документы
Культура Документы
Aleksi Olkkonen
Pekka Melgin
Project documentation
December 2015
Software engineering
ICT
1
Content
1. Introduction.................................................................2
2. Objectives....................................................................3
3. Tools............................................................................ 3
1. Libraries.....................................................................................3
4. Use cases.....................................................................4
5. Mockups......................................................................5
6. Application architecture................................................5
1. Clean Architecture.....................................................................5
2. Presentation Layer.....................................................................6
3. Domain Layer............................................................................7
4. Data Layer.................................................................................7
5. UML diagrams............................................................................8
7. Product........................................................................9
8. Workload....................................................................11
2
1. Introduction
Route. Is a set of holds which defines the way that you climb
up.
2. Objectives
3. Tools
For this project the IDE used will be Android Studio 1.4.1 and
upwards.
1. Libraries
In order not to create all the wheels again, this project uses few first,
and third party libraries to ease the workload within the project
itself. These libraries mainly focus on the UI presentation of the
application. It enables us to create modern user experience without
us trying to make all the components by ourselves.
com.android.support:appcompat-v7:23.0.1
com.android.support:design:23.0.1
4
com.android.support:cardview-v7:23.0.1
com.android.support:recyclerview-v7:23.0.1
com.flipboard:bottomsheet:1.4.3
com.gordonwong:material-sheet-fab:1.2
4. Use cases
5. Mockups
7
8
9
10
11
12
13
14
15
16
17
6. Application architecture
1. Clean Architecture
The project's code base tries to follow a Clean architecture pattern
first mentioned by Robert C. martin in his blog post The Clean
Architecture, and later implemented into android development by
Fernando Docejas.
The main objective of any application architecture is to make
developing easier as the application grows. This helps to avoid
spaghetti style code in which everything is done in same class. Also
applying correct architecture patterns to the problem makes the
application more testable, thus reducing costs of QA and the amount
of possible bugs.
The clean architecture idea manages all of this, if done properly the
architecture should provide system that is:
Independent of frameworks. Does not depend on existence of
some library
Testable. All of the components, UI, database logic, business
logic can be tested with unit tests without other components
Independent of UI. The UI of the application can be easily
changed without changing the rest of the application
Independent of database. Database can be switched easily,
data can come from cloud, or internal store.
Independent of any external agency. Business rules does not
know anything about outside world.
Most of this can be achieved within context of an android project.
Although there are some problems that this kind of architecture
brings when developing on android platform. Especially if we were to
try make the project as testable as possible with unit tests, which
means dependencies should be done using dependency inversion
principle. One such problem emerges when using anything that
needs context. Such as using the SQLite database that android
platform provides. When connecting to the SQLite we need to use
SQLiteOpenHelper class which needs to have the context of the
application in constructor. This creates all kinds of problems of
making the layers independent, and unit testable, because the
context then needs to be passed all the way from the UI layer to the
18
2. Presentation Layer
Presentation layer consists of all the logic that is needed for the user
interface. This includes activities, fragments, and adapters. In this
project we use Model-View-Presenter pattern. Our activities and
fragments are views in this case. The presentation layer only holds
all the logic that is used for the user interface. This includes custom
adapters.
19
3. Domain Layer
4. Data Layer
5. UML diagrams
The following UML diagram shows how the classes are related to
each other in general. Due to sheer amount of classes more precise
uml class diagrams are not provided.
6. Activities, classes
7. Product
23
24
8. Workload
sources:
http://fernandocejas.com/2014/09/03/architecting-android-the-clean-
way/
https://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-
architecture.html
https://en.wikipedia.org/wiki/Model%E2%80%93view
%E2%80%93presenter