Mobile Application Development - How it should be organised

Emixam23Emixam23 ✭✭✭USMember ✭✭✭

Hi,

I'm comming today because I never had, as student, any courses about how should I organise the sequences of a mobile application. Same on internet, I can't find anything really interesting about it. So I'm opening this question!


First Page

When I use launch an application, how does it works in background?

-> Does the app starts on the LoginPage() and try to connect to the API/SERVER? Once it's did, the user stays on LoginPage() or the app goes on the MainPage() then?

-> Does the app starts on RedirectionPage() and try to connect to the API/SERVER? Once it's did, the user is either redirected on the LoginPage() on the MainPage() then?

-> Does the app starts on MainPage() and try to connect to the API/SERVER? Once it's did, the user stays on MainPage() or the app goes on the LoginPage() if the user isn't connected then?

Of course, the idea is to have to user already stored on the phone storage (see below).


MainPage which contains multiple Page/View/Fragment

As Android & Xamarin.Forms developer, I know that for Android you have a FragmentManager in order to manage multiple views on the same page (i.e. When you have to provide a form to make fill by the User). On Xamarin.Forms, it doesn't exists at the moment (but Xamarin put it on their white list) so maybe for some other language, it doesn't exist too.

-> So How to organize it? I mean, you can have 3 Views (3 mainLayout) and make them Visible/Invisible. But it means you only have 1 Controler for the 3 Views.

-> I also tought that Maybe, we could load in background each pages to avoid the load at the Navigation time? But it would be to much of information in the dynamic memory no?


Deal with TCP/IP Connection

Today, it's not that hard to create a socket to connect itself to a TCP/UDP server, but how can you handle the different disconnection?

-> Socket Errors. When you got a problem such as the server which stops, the internet connection of the device which is stops or which got problem to get signals etc. How does you deal with it?. I mean by that, do you make a pop-up to alert the user or do you make an infinite while(true) to try to reconnect yourself?

-> Let say that now, the device cannot connect itself to the server due to internet signal problem, the device would never be able to connect to the server then. Can you tell it to the User or the app will just continue to trying to connect without timeout?


Stored Data

Lot of app today has data saved on the phone storage, but about it, does a security has to be create for some of those files?

-> User: In my way, I store the user name/password on the phone storage to escape a reconnection all of the time when the app starts. But, these data are personal so, Does they has to be encrypted?

-> Preferences/Settings and Stored Cache: I think for them, a simple file write in something such as XML can be store directly whithout any encryption. But, to escape to each time, load data, angain and again, Does it's better to store a part of them directly on the phone?. If this solution is cheaper about the data exchanges with internet, then How to organize their proper save?. In much, the size of these files can begin really important and then, a storage on the external storage could be better, isn't? But if the user hasn't something as a SD CARD, then is it possible to change programmaticaly, the path for the save to the Internal Storage?

-> Framework/Language options: I know in Android, the SharedPreferences can be used in order to save some Values by using Keys. In Xamarin Forms, something similar exists with Properties Dictonary. But two questions comes in my mind: Does the data access is possible from another app? and Does the data are encrypted?. Also, the using of these functions, is it optimized to store thousand value by example? If no, so what range of data it's optimized?


I know it's a lot of questions, maybe stupid, maybe they are really common I don't know, but these questions are some point I never really understand carefully and today, I would like an explanation.

A simple answer could be: Read the Application Development Manual but it's a big reading which just confuse myself more than how I am today.

Thank you for this reading, either if you just read or answer. I also hope, these question will be very helpful for people who are in the same confusion as I am :)

Sign In or Register to comment.