Android or IOS?

We are going to develop our application SoSporty on both android and IOS. This is because both android and IOS have a large number of users. The IOS and android are two different platforms and also have their own similarities.

Here are some comparisons of android and IOS from technical aspect.

  • Language

Android: Java, C

IOS: C, OC, Swift

  • Environment:

Android: JDK, android SDK, Eclipse/Studio, NDK

IOS: Xcode

  • Company:

Android: Google

IOS: Apple

  • Design:

Android:Ā easy to be changed to the preferable look

IOS: cannot be changed, strict on customizing

  • Online market:

Android: Play Store and more

IOS: Apple Store only

 

 

 

SoSporty!

SQL vs NoSQL

In our application SoSporty, we would like to choose relational database. In this post I will put advantages and disadvantages of SQL and NoSQL.

SQL:

  • Strength:
  1. Easy to understand: two-dimensional table structure is a concept very close to the logical world. Relational model is relatively easy to understand;
  2. Easy to use: a common SQL language makes it very convenient to operate relational database;
  3. Easy to maintain: rich integrity (entity integrity, referential integrity, and user-defined integrity) greatly reduces the Ā probability of data redundancy and data inconsistency;
  4. Can be used for complex queries;
  5. Maturity and stability;
  6. Good compatibility.
  • Weakness:
  1. Its read and write performance is relatively poor;
  2. A fixed table structure;
  3. High concurrent reading and writing requirements;
  4. High-efficiency reading and writing of massive data.

NoSQL:

  • Strength:
  1. Without parsing the sql layer, read and write performance is high;
  2. Based on the key-value pairs, the data is not coupled, easy to expand;
  3. The format of stored data: NoSQL storage format is key, value form, document format, picture format, etc., while the relational database only supports the basic type;
  4. Relatively cheap.
  • Weakness:
  1. Does not provide sql support and the cost of learning and use is high;
  2. No transaction processing, additional features such as BI support and reports are not good;
  3. Not mature;

Summary: SQL database and NoSQL database both have their strengths and shortcomings. In general, the advantages of one are the disadvantages of the other. Currently, the techniques of using and maintaining NoSQL databases are relatively limited thus we choose to use relational SQL database.

SoSporty!

Several technical choices in our software

 

Database: The database will be kept as a table format file in local sever, and the table will contains users’ nickname, e-mail, age, etc, which should be kept safe and only can’t be shown to other users only if user chooses to do that. Also, the table of users should contain columns named ‘ParticipantScore’ and ‘OrganiseScore’, which will show to other users in the profile, and this table should be changeable, cause the table data will change each time after each participants rate others after activities. (calculate the average)

User Experience:

We decided to have a welcome page to give users a brief introduction and direction to our app. And login button should be their to provide users an easy way to use, also, users can use google account or facebook account to login, so this two logos should just under the login button.

We put the notification function in the user’s profile page. It will be easier for users to go through all the activities they are going to join, and the activities shown there should include time, location and chat room button. So in the technical parts, this interface should get all the data from the activity table and the link from chatroom button to chat room page should be set. Below activities table is logout button, users can logout with that.

Continueā€¦ā€¦

SoSporty!
/ / Daily Work, Technical Research

Data storage

Data storage

Our approach to data storage differs according to the operating system used with our SoSporty application.

Android provides several options to save application data. Android provides 2 storage options for files ā€“ Internal and External. Internal is private to the app. External is world readable and accessible to all. External can be a partition of the internal memory or a removable storage media (like an SD card) or both.Ā the different data storage options available on Android are:

  • internal file storage: Store app-private files on the device file system.
  • External file storage: Store files on the shared external file system. This is for shared user files, such as photos and videos.
  • Shared preferences: Store private primitive data in key-value pairs.
  • Databases: Store structured data in a private database.

iOS Data Storage Everything in appā€™s home directory is backed up, with the exception of the application bundle itself, the caches directory, and temp directory. Anything is Purchased is backed up as well. Because backups are done wirelessly and stored in iCloud for each user, itā€™s best to minimize the amount of data thatā€™s stored in our app. Large files will lengthen the time it takes to perform a backup and consume more of a userā€™s available iCloud storage. To ensure efficient as possible, appā€™s data will be stored according to these options:

  1. Only documents and other data that is user-generated, or that cannot otherwise be recreated by the application, should be stored in the Documents directory and will be automatically backed up by iCloud.
  2. Data that can be downloaded again or regenerated should be stored in the Caches directory. Examples of that include database cache files and downloadable content, such as map applications.
  3. Data that is used only temporarily should be stored in the temporary directory. Although these files are not backed up to iCloud they should be deleted when done with them so that they do not continue to consume space on the userā€™sĀ device.
  4. Use the attribute “do not back up” for specifying files that should remain on the device. Usable with data that can be recreated but needs to persist even in low storage situations for a proper functioning of the app or because users expect it to be available during offline use. these files do use on-device storage space, your app is responsible for monitoring and purging these files periodically.

 

References

https://developer.android.com/guide/topics/data/data-storage

http://codetheory.in/android-saving-files-on-internal-and-external-storage/

https://developer.apple.com/icloud/documentation/data-storage/index.html

 

SoSporty!

The database used in SoSporty

The database used in SoSporty

There are many database systems to be used such as LevelDB and Couchbase Lite but they are compatible with android systems only. Since we are using both platforms and operating systems (android-IOS) for developing our application for the benefits and the convenience of our users. As our previous post mentioned. We will choose to produce and use SQLite as our database system since it is available in most mainstream programming languages. In addition, SQLite is included in both iPhone and Android operating systems.

SQLite has many additional advantages since it is an open-source C library for managing relational databases that can be stored both on disk and in memory. It supports transactions, full-text search, single-writer/multiple-reader access, efficient range queries (useful when storing geographical data), and shared caching (across connections opened by a single thread to the same database).

Ā 

you can create an SQLite database on one machine and then use it on another machine with an entirely different architecture by simply copying the corresponding file. It is believed that it is ā€œthe most widely deployed SQL databaseā€.

our database diagram is introduced in another blogpost.

https://www.developereconomics.com/five-popular-databases-for-mobile

SoSporty!
SoSporty!