Posts

Showing posts with the label Xamarin

Mobile view lifecycle. Fixing Xamarin.Forms Page lifecycle

Image
For mobile applications the highest priority is user. What user can see and interacts with. Application should react not only on user interacting with it but also user interacting with operating system. That's why not only application has it's own lifecycle but also "view" has it's own lifecycle. In Android view is represented by activity, or a fragment (the right side of android diagram). In iOS view has it's own set of lifecycle methods. In both cases view has the information that application(in this case view itself)  is being suspended and reactivated. View know quite a lot about outside world and view lifecycle is very similar to application lifecycle. Compare below first application and then view lifecycle diagrams: In Android view is represented by activity, or a fragment (the right side of android diagram). In iOS view has it's own set of lifecycle methods. In both cases view has the information that application(in this case view itself)  is...

Mobile application life-cycle Android vs iOS vs Xamarin.Forms

Image
Lifecycle. One of the most common recruitment questions. No matter what technology you work with this is something that should be well known and understood. It's good to know how application behaves, what it is allowed depending on its state and when to react on specific lifecycle events. In mobile world lifecycle is even more complicated because there is no 1 answer but 3 in this case: Android. iOS. Xamarin.Forms. I use also Xamarin.iOS event names in my diagrams, but the sequence is the same. Lifecycle is the definition when your application have access to resources and when react on state change. For mobile the biggest priority is what user can see and interacts with, so active application have priority in using system resources. System has limited pool of resources, so  applications running in background (not visible to user) is limited by system in how much resources can it use and also system decides when application needs to release all resources (be closed/killed/end o...