In today's fiercely competitive eCommerce landscape, a standout mobile app is essential for success. With industry giants like Amazon and Alibaba dominating the online retail sector, emerging businesses must find their edge. But how can you develop an eCommerce mobile app that stands out and remains cost-effective?
In this post, you’ll follow the process of building a sleek and user-friendly mobile eCommerce app. Drawing from their experience, the nopCommerce core team explores key features, technology stack, design, and architecture using their mobile app case study as a reference.
The main focus will be breaking down the mobile app development process into easily understandable steps. This guide will be valuable for developers who want to replicate the process or for those who wish to gain insights into the nopCommerce development experience from an insider’s perspective.
Before embarking on the exciting journey of developing your mobile eCommerce app, it's crucial to set the stage with a comprehensive analysis of your competitors and the current market trends. This step will provide you with invaluable insights into the industry’s successful strategies and potential opportunities for your own app to thrive.
As you embark on this venture, remember that a user-friendly and professional approach throughout the development process will lead to a successful and captivating mobile eCommerce app, primed to leave a lasting impression on your target audience.
When it comes to developing an eCommerce app, one of the critical decisions for a developer's team is choosing the right platform/framework to build upon. While technical aspects are essential, it's equally vital to consider the unique business needs of the project.
The first major consideration is whether to go for native app development or opt for a cross-platform approach.
If you decide to go the cross-platform route, there are several frameworks to consider, such as React Native, Ionic, and Flutter. For the nopCommerce mobile app, the team engaged in thorough discussions before selecting Flutter.
Here are some reasons for choosing Flutter (that can help you swing the pendulum to this framework, in case you’re still in the agony of choosing):
a. Shallow learning curve and technical maturity: Flutter offers a user-friendly learning curve and is technically mature, making it easier for developers to master the framework quickly.
b. Seamless integration with code editors: Flutter seamlessly integrates with popular code editors like VSCode, which is widely used among .NET developers. This integration simplified coding, debugging, viewing the widget tree, and analyzing memory leaks, enhancing the development experience.
c. Hot reload feature: Flutter's hot reload feature allows developers to view changes made to the code instantly within the app. This significantly speeds up the development process compared to native app development, where the build process can be time-consuming.
d. Lightning-fast performance: Flutter boasts exceptional performance, delivering 60 FPS. This allows developers to create mobile applications that rival native ones in terms of performance, using Swift and Kotlin.
By carefully assessing the business requirements, time to market, and development resources, the nopCommerce team opted for Flutter. This decision enabled them to create a flexible and fully-functional product in a shorter timeframe while enjoying the benefits of a well-rounded development environment.
When embarking on the journey of developing an eCommerce app from the ground up, selecting the right architecture is paramount. The chosen architecture not only influences the initial development process but also plays a significant role in the project's scalability, code structure, and the team's coordination.
To ensure a maintainable and scalable codebase, our approach involved adhering to generally accepted standards described in the Android documentation. However, we encountered a challenge with Flutter, as the standard architecture did not fully account for its specificities.
As a result, we made modifications and introduced an additional level, achieving a well-organized and efficient architecture for our app.
UI layer: This level deals with the UI components and their interactions with the user. It includes widgets and UI-related logic.
Domain layer: The layer holds the application's business logic, separating it from the UI layer. It contains controllers and business logic objects.
Data layer: The data layer focuses on data access and management, such as repositories and data sources.
To adapt the architecture for Flutter, we introduced the Riverpod library for state management and dependency injection, resulting in a modified structure as follows:
By reorganizing the architecture to accommodate Flutter's unique requirements and integrating Riverpod, we achieved a structure that not only promotes code maintainability and scalability but also enhances team collaboration. The domain-specific modifications enabled a seamless development process while ensuring that the app remains adaptable to future expansions and enhancements.
Among the many reasons we chose Flutter for the nopCommerce mobile app, its extensive widget library stood out as a key advantage. With this powerful library, creating a user-friendly interface became remarkably efficient. Flutter's unique rendering engine, Impeller, ensures that the app's visual appeal remains consistent across all devices.
For the nopCommerce app, we based our design on Material 3 (also known as Material You), the latest version of Google's design system. Material 3 brings revamped component renderings, fresh color palettes, and captivating animations, all of which seamlessly integrate with Flutter.
To maintain a unified and consistent look across devices, we harnessed the potential of design tokens provided by Material 3. These tokens allow for storing styles, fonts, and animation values, enabling us to use the same style values in both design files and code.
Our primary objective was to create an eCommerce app that exhibits a consistent visual identity across various devices, offering users a seamless and immersive experience. By leveraging design tokens, we could achieve just that.
To create design tokens, we utilized the Material Theme Builder, which automatically generates a theme with default colors and styles. From this foundation, we crafted a custom theme tailored to the nopCommerce app's branding and requirements.
When determining brand colors, we had two options:
By implementing Material You's concept, the design tokens enabled us to generate a full palette of styles, maintaining visual coherence throughout the app while still allowing for personalized tweaks and adjustments.
One of the most significant advantages of design tokens lies in their flexibility and versatility. The nopCommerce app could seamlessly adapt to different application modes, such as Dark mode and Light mode, without compromising on style or user experience.
Here are some key benefits of utilizing design tokens:
With these strategies in place, creating a visually appealing eCommerce app on any device became a seamless and rewarding process. Our choice of Flutter and Material 3, along with the implementation of design tokens, ensured a visually cohesive and delightful user interface for the nopCommerce mobile app.
The nopCommerce mobile app prioritizes the safeguarding of transmitted data by employing Bearer tokens. These tokens are exclusively issued to authorized users and play a vital role in facilitating secure communication between the client (mobile application) and the server.
Bearer tokens serve as a means of authentication and authorization, allowing clients to access protected resources on the server side. Should the need arise, the server-side token can be revoked, necessitating the client to undergo the authorization procedure once again to obtain a new token. This mechanism ensures that only authenticated users have access to sensitive data.
However, equally crucial is the secure storage of tokens on the client side. As tokens do not require explicit proof of ownership from the bearer, it is imperative to keep this information well-protected. For this purpose, Flutter employs secure local storage mechanisms.
Local storage retains user data until the application is uninstalled. The implementation of local storage differs across various mobile operating systems:
iOS security: In the case of iOS, the KeyChain serves as a secure storage mechanism for accessing the application's cryptographic keys, thereby providing a high level of security for the stored tokens.
By leveraging these secure local storage technologies, our eCommerce mobile app adheres to industry best practices and maintains the utmost confidentiality of the security tokens.
When creating an eCommerce app that requires regular automatic updates, the most effective solution lies in establishing a connection with an API. Our mobile app is thoughtfully designed to seamlessly integrate with the nopCommerce ecosystem, including its CMS, additional extensions, and the official Web API plugin.
To ensure flexibility and transparency, we have included the Web API plugin in the mobile app package, with the source code readily available.
Interacting with an API often presents challenges in implementing an access client and keeping it up to date. However, we have streamlined this process to simplify adaptation to changes in the API.
To achieve this, we ensure that our API adheres to the OpenAPI 3 specification, which allows us to store a comprehensive description of the API in JSON format. By utilizing the OpenAPI Generator, we can efficiently generate a client in the necessary language, in our case, Dart for Flutter, using the dart-dio Generator.
The API Flutter connection is established by setting up the generated client as a package within the app. With this setup, we gain access to all the methods supported by the API, and it only requires integrating these methods into the repositories to leverage their functionality within the app.
When the API methods undergo changes in their signature or encounter structural modifications, the client can be easily rebuilt, ensuring seamless updates and smooth operation of the mobile app.
In addition to the "Web API Frontend" plugin, the "nopCommerce mobile app" plugin empowers users to manage specific application settings directly from the admin panel of their nopCommerce webshop. For instance, administrators can configure a slider on the main screen to showcase selected products or transfer certain settings to the mobile application.
Our primary focus was on evaluating the speed and efficiency of the advertising slider rendering with animation. To achieve this, we employed the GameBench automation interface tool to track critical metrics such as memory consumption, FPS and CPU load.
For testing purposes, we implemented an identical interface natively on an Android device using both React Native and Flutter. The test duration was standardized, and image caching libraries were utilized in each language to ensure consistent conditions.
Below are the results obtained from the performance testing, where lower values indicate better performance:
Although native Android apps exhibited better battery consumption optimization, Flutter's stable performance and efficiency made it a strong runner-up in this aspect.
It is essential to recognize that the comparison of these approaches reveals significant differences in their performance characteristics. Nevertheless, while performance is crucial, it is not the sole determinant in eCommerce mobile app development.
If you're seeking guidance on how to develop an eCommerce app for your online store, our comprehensive guide covers all the essential steps taken during the development process, providing valuable insights into the creation of the final product.
You can also take the ready-made nopCommerce mobile app (with the source code available) and customize it to your business needs.
Stay tuned for future updates, as we continuously enhance our mobile app to provide even more value and functionality. Don't forget to explore our detailed mobile app documentation for additional support and information.