Fundamentals of OutSystems Mobile App Development
Mobile is not just a smaller web app
A Mobile App module in OutSystems targets native mobile devices using a Reactive-like architecture. The key differences from web: screens are optimized for touch, offline capability matters, and the app is packaged and distributed through app stores. Mobile apps use Screens, Blocks, and Client Variables heavily because the client is the primary execution environment.
Concepts you must know
- Offline vs. online: Mobile apps can cache data locally using Local Storage entities and synchronize with the server. Offline data is stored on the device; server entities live in the database. A common trap is treating a Local Storage entity as if it were server-persisted across devices.
- Client-side logic: Mobile apps favor Client Actions for responsiveness. Server Actions still exist but require network connectivity.
- Navigation: Mobile apps use a stack-based navigation model (push/pop), unlike web's URL-based routing.
- Device capabilities: Plugins expose camera, GPS, and notifications; these are client-side and require permissions.
- Lifecycle: OnInitialize, OnReady, and OnDestroy behave differently on mobile; OnReady fires after the screen renders on the device.
Traps to watch
Questions often ask where data lives when offline. If the user is offline, only locally cached data is available; server entities are unreachable. Another trap: assuming a mobile app can run Server Actions without connectivity. It cannot.
Rule of thumb
"If the user has no signal, only Local Storage works." Use this to decide whether logic belongs client-side (offline-tolerant) or server-side (requires network).