katiaru / apps-android-wikipedia

The official Wikipedia Android app. This is a mirror from gerrit.wikimedia.org.
https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/Android/App_hacking
Apache License 2.0
0 stars 0 forks source link

Create UML architechture diagrams #6

Closed Ricklig closed 6 years ago

Ricklig commented 6 years ago

Write and implement testing for issue 3

Ricklig commented 6 years ago

As a developer, I would to view architecture diagrams to visualize the system, and to further my knowledge about the cohesion of essential classes pertaining language selections

SP: 8 Priority: High Risk: Medium Ideal time: 20 hours Demo steps:

Ricklig commented 6 years ago

27708132_10213593772933218_1509493287_o 27711343_10213593772893217_171274101_o 27591306_10213593772813215_80671903_n 27604240_10213593772853216_1610622801_o

Kyerine commented 6 years ago

Activity classes:

Every Activity class focuses on something that a user can do. Most subclasses of Activity implement onCreate() and onPause(). The onCreate() method is used to initialize the activity and onPause() deals with the user leaving the activity. Activities of the app are managed as an activity stack. The active activity is always placed on the top. The activities below will always remain below unless the running activity exits. Activities of the Wikipedia app include: edit description, change settings, create account, login,...

Fragment classes: Parts of the application placed in an Activity. They represent specific operations or interfaces that are running within a larger Activity. A Fragment and an Activity has a composition link ; When an activity is destroyed, all of its fragment will be destroyed.

Application: Base class for maintaining global application state. It is the first class to be instantiated when the process for the application is created. Application is a super class of WikipediaApp, the main class of the app.

Language specific classes:

AcceptLanguageUtil: used to obtain the languages that are used to display the articles, including the current language and the ones that the user selected before.

AppLanguageLookUpTable: a lookup table that contains all app supported languages and their details. We can find language codes, english names and natives name of the various languages. The table is statically bundled with the application.

AppLanguageState: Language lookup and state management for the application language and most recently used article and application languages. A list (mruLanguageCodes) of most recently used language list is changed whenever the user selects a language.

LangLinksActivity: Allow users to change language of articles. Search for available languages and show them.

LanguageUtil: contains method that allow the conversion of a ISO language code to a wiki code, as used by Wikipedia. Contain methods specific to Chinese language.

Kyerine commented 6 years ago

Different types of language to put into consideration:

System language: affects the user interface language for most of the app. This is the canonical way to support additional locales in Android. As of now, the user need to change his android device's language to change the language of the application.

Application language: The language of the user interface. Should be independent of the system for users that wish to use the application in a different language than the system language.

Article language: Many articles are available in multiple languages. This settings affects the current article language (and links appearing in the article often point to other articles in that language). The article also appears in that particular language on the feed. As of now, user can change the language of all displayed articles in the main settings menu. The user can change the language of a particular article in the article settings menu or using the article toolbar.