These instruction are for downloading and running the app LBTechTest
.
-
Run pod install in folder with xcodeproj run in console POD command
pod install
to install all external dependancies -
Open workspace in XCode use file
LBTechTestApp.xcworkspace
-
Hit
Run
-
Performance
- didReceiveMemoryWarning() coded to reduce memory footprint - will automatically redownload from google when necessary
- Async download of data from google
- Alternative data in bundle for quick UI check
-
Readability
- Markup comments used on main functions
- Helper functions do only 1 thing.
- Use of swift extensions to simplify main code see
Extensions.swift
-
Maintainability
- Strings file for adjusting any string on 1 place
- Depend on interface not concrete object (dependency inversion principle) - see DataProvider.swift. This can easily be swopped out for, say, and Amazon backend, with no effect on the App.
- AppSettings - configure json settings file to effect running. e.g. changing
readsamplesfrombundleonload
to false will load from google. - Datasources are general enough to be reused by different ViewControllers, see
ViewControllerDataSource
. - Helper functions have only 1 reason to change (single-responsibility principle).
- Libraries hold similar code for an area - see
LibraryFilesystem
andSortLibrary
. - Use of Constants file - centralize constants in use see
Constants.swift
andFirebaseConstants.swift
- Use of small Global area protected by a singleton design pattern - for App scoped data.
-
testability
- Seperate entities (see
LBEntities.xcodeproj
) have their own unit tests seperate from main iOS app. - iOS app has seperate set of tests.
- Set of json data in bundle - ready for object testing
- Seperate entities (see
-
Scalability
- Strings file system for using a completly different set of strings for another target
- Reading groups and items from the google database will expand to however many are required
- The 2 Objects (Groups and Items) are joined at load time to flexibly scale upwards.
- mp3s are stored, and read from 1 of 3 locations - memory, mp3 file in documents folder, from Google's DB. All 3 are automatically utilised.
- If any more items are added to Google's DB offline - they will appear in the app on next load.
-
Simplicity
- Only 2 model objects - items and groups (RecallItem and RecallGroup)
- These 2 entity level objects are included to a seperate project. These can be included into Mac App/Web App if necessary.
- ViewControllers are relativly small, outsourcing processing tableview to datasources
- Offloading of functions to static libraries so no side effects on ivar/global data. These can be further isolated in to out-of-app entities if necessary
-
Robust
- Usage of
Guard
statements to protect routines. e.g. all NetworkingFirebase functions require a valid google userid
- Usage of
-
Further changes yet to be made
- Expand all tests to cover all functionality.
- Add UI testing see
testPerformanceExample
. - Make
LibraryFilesystem
depend on an interface - similar toDataProvider
- Make a ViewModel object for each ViewController to simplify ViewController testing.