WLCM’s Mobile App Development
Best Practices
This page outlines the core principles and best practices WLCM follows when building mobile applications.
It covers key areas such as performance, authentication, offline support, error handling, analytics, and architecture to ensure apps are efficient, reliable, and maintainable.
Performance
Image Format
Preferred: WebP for best compression and quality balance.
Alternatives: JPEG (for photos), PNG (for transparent UI elements).
Vector formats (e.g., SVG or PDF) are ideal for scalable assets like icons.
Picture Size
Match image width to its display context:
Full-width images: max ~1080px.
Thumbnails: typically 300–600px.
Avoid high-resolution images that exceed render needs.
Payload Size
Keep API and asset payloads as small as possible.
Paginate large datasets
Compress JSON responses and enable lazy loading or infinite scroll where appropriate.
Image Loading
Use loaders or placeholders to improve perceived performance.
Cache both static and network-loaded images for instant reuse.
Preload critical assets at app start or during onboarding.
Authentication
Verification Methods
Email and password with optional two-factor authentication (OTP or authenticator app).
Social login (Google, Apple, Facebook) for simplified user onboarding.
Biometric login (Face ID, Touch ID) for quick and secure returning access.
Session Management
Use platform-secure storage for authentication tokens (Keychain or Keystore).
Implement token expiration and refresh logic.
Monitor for suspicious activity and handle token revocation appropriately.
Offline Support
Sync Strategy
Implement a local-first data model with background sync when connectivity returns.
Queue and retry offline actions automatically.
Detect and respond to network state changes in real time.
Data Storage
Use local databases such as SQLite, Room, or Realm.
Maintain a versioned schema to support migrations and upgrades.
User Experience Considerations
Provide clear UI indicators for offline status.
Disable or modify features that require an active connection.
Gracefully resolve data conflicts during sync.
Error Handling
User-Facing Handling
Display clear and non-technical error messages.
Provide retry options for recoverable issues.
API Error Management
Interpret and handle various HTTP error codes explicitly.
Include structured error logging with context for debugging.
Crash Prevention
Guard against null references, race conditions, and improper app states.
Use exception handling selectively and appropriately.
Analytics
Event Tracking
Track user actions like screen views, purchases, and feature engagement.
Use consistent naming conventions (e.g., checkout_screen_view, signup_complete).
Record device and user-level context to support segmentation.
Tools
Integrate analytics platforms such as Firebase, Amplitude, or Segment.
Ensure that sensitive data (PII) is never captured in analytics events.
Batch and throttle analytics events to optimize performance.
A/B Testing
Run experiments on UI, pricing, or flows using feature flags or remote config.
Track experiment results with appropriate attribution and statistical rigor.
Code Architecture
Structure
Use a clear separation between business logic, UI, and data handling.
Organize code by features or domains to make it easier to scale and maintain.
Modularity
Build reusable components and utilities to avoid code duplication.
Keep core logic isolated from UI code to make updates and testing easier.
Testing
Write automated tests to ensure reliability and reduce regressions.
Test both user-facing screens and critical business logic.
Tooling and CI
Use automated tools to check code quality and formatting.
Set up continuous integration (CI) to run builds, tests, and deployments on every change.
Maintain consistent standards across the team through code reviews and shared practices.
Building high-quality mobile applications requires a thoughtful balance of performance, security, reliability, and maintainability.
By following these best practices across image handling, authentication, offline capability, error management, analytics, and architecture, we deliver apps that are efficient, scalable, and user-centered.