As a (Full-Stack Native) Mobile Technical Lead I lead teams and work on projects consisting of native Android and iOS apps with a dedicated Backend as part of the same team. One of my primary responsibilities is deciding what functionality should reside in the frontend versus what should be handled by the backend when building new systems and features.
My guiding principle is to keep the frontend as simple/dumb as possible, focused on delivering an excellent user experience, while the backend takes care of business logic, data processing, and other heavy lifting. This approach allows us to push updates and fixes on the backend without relying on app store approvals, which can be slow and inconsistent.
A question I (surprisingly) often get is whether we create separate APIs for Android and iOS. The answer is always no. A scalable backend should always provide a unified API that serves all platforms, ensuring consistency and reducing complexity. Creating app-specific APIs defeats the purpose of having a centralized backend, and in my experience, I’ve never found it necessary.
The Importance of Frontend Teams
One interesting thing I’ve noticed while leading high-performing frontend mobile teams is that when I advocate for moving business logic to the backend, some developers feel that the frontend is being undervalued. However, I always emphasize that this couldn’t be further from the truth.
Native platforms like Android and iOS are beasts in their own right, with their own complexities and challenges. Building stable, responsive, and user-friendly apps is no small feat — arguably more intricate than the business logic we’re extracting to the backend.
By letting the backend handle the heavy lifting, the frontend can focus entirely on delivering the best possible user experience, which is ultimately what users care most about. This focused approach allows frontend teams to shine by creating interfaces that feel seamless and intuitive.
What to Move to the Backend
Business Logic
Any complex calculations or decision-making should be handled by the backend. This ensures consistency across platforms and allows for real-time adjustments without requiring app releases.
Example: A ride-sharing app calculating fare estimates should do this on the backend so that both Android and iOS apps get the same result.
Data Management
Data storage and management should reside on the backend. The frontend can cache data locally for performance, but the backend remains the source of truth.
Example: A task management app that syncs tasks across devices should store all data in the backend to ensure consistency.
Authentication and Security
Authentication and session management should always be handled by the backend to ensure user security and prevent sensitive data from being stored in the frontend.
Example: A social media app should handle login, token management, and session expiry on the backend to maintain security.
3rd-Party API Integrations
Direct API integrations should go through the backend to protect API keys, simplify rate limits, and centralize logic.
Example: An e-commerce app integrating with multiple payment providers should handle all payment requests through the backend for security and efficiency.
What to Keep in the Frontend
UI Logic and Presentation
The frontend should be responsible for anything related to how data is presented or how users interact with the app. This includes animations, transitions, and real-time interactions.
Example: A weather app should display forecast data and animations on the frontend, while the backend supplies the raw weather data.
Basic Input Validation
Simple checks like required fields and email formatting should happen on the frontend for faster feedback, but deeper validation (such as checking for unique usernames) should be handled by the backend.
Example: A registration form can check if the user has entered all the required fields before sending the data to the backend for further processing.
Local Caching and Offline Support
Frontend caching helps improve performance and enables offline functionality, but the backend remains the authoritative source of data, especially when the app goes back online.
Example: A news app can cache articles locally for offline reading but refresh the data from the backend once the connection is restored.
Striking the Right Balance
Building a mobile app with a solid architecture requires understanding that not everything should be handled by the frontend or the backend exclusively. It’s a collaborative relationship. The backend’s strength lies in handling security, data processing, and business logic, while the frontend should focus on delivering a smooth, user-friendly experience.
When considering whether to move something to the backend, think about the complexity, security risks, and performance implications. If the operation could expose sensitive logic, is resource-intensive, or should remain consistent across devices, it belongs in the backend. Conversely, anything that enhances user interactivity or affects how data is displayed belongs in the frontend.
By carefully dividing responsibilities between the frontend and backend, you create an app that not only performs better but also scales with fewer headaches in the long run.
Happy coding! 💻
Related Posts
Giving Feedback That Matters: Lessons from a Technical Lead
Apr 01, 2025