Posts Tagged ‘MobileDevelopment’
[DevoxxFR2025] Winamax’s Journey Towards Cross-Platform
In today’s multi-device world, providing a consistent and high-quality user experience across various platforms is a significant challenge for software companies. For online gaming and betting platforms like Winamax, reaching users on desktop, web, and mobile devices is paramount. Anthony Maffert and Florian Yger from Winamax shared their insightful experience report detailing the company’s ambitious journey to unify their frontend applications onto a single cross-platform engine. Their presentation explored the technical challenges, the architectural decisions, and the concrete lessons learned during this migration, showcasing how they leveraged modern web technologies like JavaScript, React, and WebGL to achieve a unified codebase for their desktop and mobile applications.
The Challenge of a Fragmented Frontend
Winamax initially faced a fragmented frontend landscape, with separate native applications for desktop (Windows, macOS) and mobile (iOS, Android), alongside their web platform. Maintaining and developing features across these disparate codebases was inefficient, leading to duplicated efforts, inconsistencies in user experience, and slower delivery of new features. The technical debt associated with supporting multiple platforms became a significant hurdle. Anthony and Florian highlighted the clear business and technical need to consolidate their frontend development onto a single platform that could target all the required devices while maintaining performance and a rich user experience, especially crucial for a real-time application like online poker.
Choosing a Cross-Platform Engine
After evaluating various options, Winamax made the strategic decision to adopt a cross-platform approach based on web technologies. They chose to leverage JavaScript, specifically within the React framework, for building their user interfaces. For rendering the complex and dynamic visuals required for a poker client, they opted for WebGL, a web standard for rendering 2D and 3D graphics within a browser, which can also be utilized in cross-platform frameworks. Their previous experience with JavaScript on their web platform played a role in this decision. The core idea was to build a single application logic and UI layer using these web technologies and then deploy it across desktop and mobile using wrapper technologies (like Electron for desktop and potentially variations for mobile, although the primary focus of this talk seemed to be the desktop migration).
The Migration Process and Lessons Learned
Anthony and Florian shared their experience with the migration process, which was a phased approach given the complexity of a live gaming platform. They discussed the technical challenges encountered, such as integrating native device functionalities (like file system access for desktop) within the web technology stack, optimizing WebGL rendering performance for different hardware, and ensuring a smooth transition for existing users. They touched upon the architectural changes required to support a unified codebase, potentially involving a clear separation between the cross-platform UI logic and any platform-specific native modules or integrations. Key lessons learned included the importance of careful planning, thorough testing on all target platforms, investing in performance optimization, and managing the technical debt during the transition. They also highlighted the benefits reaped from this migration, including faster feature development, reduced maintenance overhead, improved consistency across platforms, and the ability to leverage a larger pool of web developers. The presentation offered a valuable case study for other organizations considering a similar move towards cross-platform development using web technologies.
Links:
- Anthony Maffert: https://www.linkedin.com/in/anthonymaffert/
- Florian Yger: https://www.linkedin.com/in/florianyger/
- Winamax: https://www.winamax.fr/
- Devoxx France LinkedIn: https://www.linkedin.com/company/devoxx-france/
- Devoxx France Bluesky: https://bsky.app/profile/devoxx.fr
- Devoxx France Website: https://www.devoxx.fr/
[KotlinConf2025] Two Years with Kotlin Multiplatform: From Zero to 55% Shared Code
The journey to unified mobile applications is a complex one, fraught with technical and organizational challenges. Rodrigo Sicarelli, a staff software engineer at StoneCo, a leading Latin American fintech company, shared a compelling real-world account of his company’s two-year transition to Kotlin Multiplatform (KMP). This exploration revealed the strategic decisions, hurdles, and impressive achievements that led to a remarkable 55% code sharing across two large-scale mobile applications.
The initial challenge for StoneCo was to evaluate various cross-platform frameworks to find one that could balance the efficiency of code sharing with the critical need for a seamless user experience in the financial sector. Rodrigo detailed the exhaustive process of assessment and the ultimate decision to adopt KMP, a choice that promised to unify their mobile development efforts. A key part of the journey was the organizational shift, which involved training 130 mobile engineers to embrace a new paradigm. Rodrigo emphasized that this was not merely a technical migration but a cultural and educational one, fostering a collaborative spirit and promoting knowledge sharing across teams.
As the adoption matured, the teams faced a number of technical hurdles. One of the primary challenges was ensuring consistent data models and a unified network layer. Rodrigo outlined how they tackled this by consolidating data sources and creating a shared codebase for networking logic, which streamlined development and reduced errors. Another significant obstacle was the integration of KMP into their iOS CI/CD pipeline. He provided a clear explanation of how they overcame this by creating custom Gradle tasks and optimizing their build process, which dramatically improved build times. He also touched upon the importance of addressing the specific needs of iOS developers, particularly concerning the generation of idiomatic Swift APIs from the shared Kotlin code.
A major win for the team was the development of a custom Gradle plugin to manage Kotlin Multiplatform dependencies. This innovation was designed to solve a problem with exposing external libraries to Swift, where the linker would sometimes struggle with duplicate symbols. By adding annotations, the team was able to improve the linking process and reduce build times. This solution not only streamlined their internal workflow but is also planned for open-sourcing, showcasing StoneCo’s commitment to giving back to the community.
Rodrigo concluded by looking to the future, outlining a vision for a single, unified application repository that is user-segment-aware and built with Compose Multiplatform. This forward-looking approach demonstrates a long-term commitment to KMP and a desire to continue pushing the boundaries of shared code. His talk provided invaluable, actionable insights for any organization considering or already in the process of scaling Kotlin Multiplatform.
Links:
- StoneCo website
- Two Years with Kotlin Multiplatform: From Zero to 55% Shared Code | Rodrigo Sicarelli
[DevoxxBE2023] Build a Generative AI App in Project IDX and Firebase by Prakhar Srivastav
At Devoxx Belgium 2023, Prakhar Srivastav, a software engineer at Google, unveiled the power of Project IDX and Firebase in crafting a generative AI mobile application. His session illuminated how developers can harness these tools to streamline full-stack, multiplatform app development directly from the browser, eliminating cumbersome local setups. Through a live demonstration, Prakhar showcased the creation of “Listed,” a Flutter-based app that leverages Google’s PaLM API to break down user-defined goals into actionable subtasks, offering a practical tool for task management. His engaging presentation, enriched with real-time coding, highlighted the synergy of cloud-based development environments and AI-driven solutions.
Introducing Project IDX: A Cloud-Based Development Revolution
Prakhar introduced Project IDX as a transformative cloud-based development environment designed to simplify the creation of multiplatform applications. Unlike traditional setups requiring hefty binaries like Xcode or Android Studio, Project IDX enables developers to work entirely in the browser. Prakhar demonstrated this by running Android and iOS emulators side-by-side within the browser, showcasing a Flutter app that compiles to multiple platforms—Android, iOS, web, Linux, and macOS—from a single codebase. This eliminates the need for platform-specific configurations, making development accessible even on lightweight devices like Chromebooks.
The live demo featured “Listed,” a mobile app where users input a goal, such as preparing for a tech talk, and receive AI-generated subtasks and tips. For instance, entering “give a tech talk at a conference” yielded steps like choosing a relevant topic and practicing the presentation, with a tip to have a backup plan for technical issues. Prakhar’s real-time tweak—changing the app’s color scheme from green to red—illustrated the iterative development flow, where changes are instantly reflected in the emulator, enhancing productivity and experimentation.
Harnessing the PaLM API for Generative AI
Central to the app’s functionality is Google’s PaLM API, which Prakhar utilized to integrate generative AI capabilities. He explained that large language models (LLMs), like those powering the PaLM API, act as sophisticated autocomplete systems, predicting likely text outputs based on extensive training data. For “Listed,” the text API was chosen for its suitability in single-turn interactions, such as generating subtasks from a user’s query. Prakhar emphasized the importance of crafting effective prompts, comparing a vague prompt like “the sky is” to a precise one like “complete the sentence: the sky is,” which yields more relevant results.
To enhance the AI’s output, Prakhar employed few-shot prompting, providing the model with examples of desired responses. For instance, for the query “go camping,” the prompt included sample subtasks like choosing a campsite and packing meals, along with a tip about wildlife safety. This structured approach ensured the model generated contextually accurate and actionable suggestions, making the app intuitive for users tackling complex tasks.
Securing AI Integration with Firebase Extensions
Integrating the PaLM API into a mobile app poses security challenges, particularly around API key exposure. Prakhar addressed this by leveraging Firebase Extensions, which provide pre-packaged solutions to streamline backend integration. Specifically, he used a Firebase Extension to securely call the PaLM API via Cloud Functions, avoiding the need to embed sensitive API keys in the client-side Flutter app. This setup not only enhances security but also simplifies infrastructure management, as the extension handles logging, monitoring, and optional AppCheck for client verification.
In the live demo, Prakhar navigated the Firebase Extensions Marketplace, selecting the “Call PaLM API Securely” extension. With a few clicks, he deployed Cloud Functions that exposed a POST API for sending prompts and receiving AI-generated responses. The code walkthrough revealed a straightforward implementation in Dart, where the app constructs a JSON payload with the prompt, model name (text-bison-001), and temperature (0.25 for deterministic outputs), ensuring seamless and secure communication with the backend.
Building the Flutter App: Simplicity and Collaboration
The Flutter app’s architecture, built within Project IDX, was designed for simplicity and collaboration. Prakhar walked through the main.dart file, which scaffolds the app’s UI with a material-themed interface, an input field for user queries, and a list to display AI-generated tasks. The app uses anonymous Firebase authentication to secure backend calls without requiring user logins, enhancing accessibility. A PromptBuilder class dynamically constructs prompts by combining predefined prefixes and examples, ensuring flexibility in handling varied user inputs.
Project IDX’s integration with Visual Studio Code’s open-source framework added collaborative features. Prakhar demonstrated how developers can invite colleagues to a shared workspace, enabling real-time collaboration. Additionally, the IDE’s AI capabilities allow users to explain selected code or generate new snippets, streamlining development. For instance, selecting the PromptBuilder class and requesting an explanation provided detailed insights into its parameters, showcasing how Project IDX enhances developer productivity.
Links:
[KotlinConf2019] Ktor for Mobile Developers: Conquering the Server with Dan Kim
For many mobile developers, the thought of venturing into server-side development can be daunting, often perceived as a realm of unfamiliar languages, complex frameworks, and different programming paradigms. Dan Kim, an experienced developer, aimed to demystify this process at KotlinConf 2019 with his talk, “Ktor for Mobile Developers: Fear the server no more!”. He showcased Ktor, a Kotlin-based framework for building asynchronous servers and clients, as an accessible and powerful tool for mobile developers looking to create backend components for their applications. The official website for Ktor is ktor.io.
Dan Kim’s session was designed to demonstrate how existing Kotlin knowledge could be leveraged to easily build server-side applications with Ktor. He promised a practical, real-world example, walking attendees through everything needed to get a server up and running: authentication, data retrieval, data posting, and deployment, ultimately aiming to give mobile developers the confidence to build their own backend services.
Introducing Ktor: Simplicity and Power in Kotlin
Ktor is a framework built by JetBrains, designed from the ground up with Kotlin and coroutines in mind, making it inherently asynchronous and well-suited for building scalable network applications. Dan Kim introduced Ktor’s core concepts, such as its flexible pipeline architecture, routing capabilities, and features for handling HTTP requests and responses. A key appeal of Ktor for mobile developers is that it allows them to stay within the Kotlin ecosystem, using a language and paradigms they are already familiar with from Android development.
The presentation would have highlighted Ktor’s ease of use and minimal boilerplate. Unlike some larger, more opinionated server-side frameworks, Ktor offers a more unopinionated and lightweight approach, allowing developers to choose and configure only the features they need. This can include functionalities like authentication, content negotiation (e.g., for JSON or XML), templating engines, and session management, all installable as “features” or plugins within a Ktor application.
Building a Real-World Server-Side Component
The core of Dan Kim’s talk was a hands-on demonstration of building a server-side component. He aimed to build a RESTful API and a web application, complete with authentication, and deploy it to Google Cloud, all within an impressively small amount of code (around 350 lines, as he mentioned). This practical example would have covered essential aspects of backend development:
* Routing: Defining endpoints to handle different HTTP methods (GET, POST, etc.) and URL paths.
* Request Handling: Processing incoming requests, extracting parameters, and validating data.
* Authentication: Implementing mechanisms to secure endpoints and manage user identity, possibly integrating with external services.
* Data Interaction: Showing how to get data from and post data to other services or a database (though the specifics of database interaction might vary).
* Deployment: Walking through the process of deploying the Ktor application to a cloud platform like Google Cloud, making the backend accessible to mobile clients.
By tackling these common server-side tasks using Ktor and Kotlin, Dan aimed to alleviate the fears mobile developers might have about backend development and demonstrate that they already possess many of the necessary skills.
Empowering Mobile Developers to Go Full-Stack
The overarching message of Dan Kim’s presentation was one of empowerment. He sought to show that with Ktor, mobile developers no longer need to “fear the server”. The framework provides a gentle learning curve and a productive environment for building robust and efficient backend services. This capability is increasingly valuable as mobile applications become more sophisticated and often require custom backend logic to support their features.
Dan Kim’s practical demonstration, from basic Ktor setup to cloud deployment, was intended to give attendees a clear understanding of how to connect their own server-side components to virtually any API. By simplifying the backend development process, Ktor enables mobile developers to potentially take on more full-stack responsibilities, leading to greater control over their application’s entire architecture and a faster development cycle for new features. He hoped his session would provide the confidence needed for mobile developers to start building their own server-side solutions with Kotlin and Ktor.
Links:
[KotlinConf2017] My Transition from Swift to Kotlin
Lecturer
Hector Matos is a senior iOS developer at Twitter, with extensive experience in Swift and a growing expertise in Kotlin for Android development. Raised in Texas, Hector maintains a technical blog at KrakenDev.io, attracting nearly 10,000 weekly views, and has spoken internationally on iOS and Swift across three continents. His passion for mobile UI/UX drives his work on high-quality applications, and his transition from Swift to Kotlin reflects his commitment to exploring cross-platform development solutions.
Abstract
The similarities between Swift and Kotlin offer a unique opportunity to unify mobile development communities. This article analyzes Hector Matos’s presentation at KotlinConf 2017, which details his transition from Swift to Kotlin and compares their features. It explores the context of cross-platform mobile development, the methodology of comparing language constructs, key differences in exception handling and extensions, and the implications for fostering collaboration between iOS and Android developers. Hector’s insights highlight Kotlin’s potential to bridge divides, enhancing productivity across mobile ecosystems.
Context of Cross-Platform Mobile Development
At KotlinConf 2017, Hector Matos shared his journey from being a dedicated Swift developer to embracing Kotlin, challenging his initial perception of Android as “the dark side.” As a senior iOS developer at Twitter, Hector’s expertise in Swift, a language designed for iOS, provided a strong foundation for evaluating Kotlin’s capabilities in Android development. The context of his talk reflects the growing need for cross-platform solutions in mobile development, where developers seek to leverage skills across iOS and Android to reduce fragmentation and improve efficiency.
Kotlin’s rise, particularly after Google’s 2017 endorsement for Android, positioned it as a counterpart to Swift, with both languages emphasizing type safety and modern syntax. Hector’s presentation aimed to bridge the divide between these communities, highlighting similarities that enable developers to transition seamlessly while addressing differences that impact development workflows. His personal narrative, rooted in a passion for UI/UX, underscored the potential for Kotlin and Swift to unify mobile development practices, fostering collaboration in a divided ecosystem.
Methodology of Language Comparison
Hector’s methodology involved a detailed comparison of Swift and Kotlin, focusing on their shared strengths and distinct features. Both languages offer type-safe, concise syntax, reducing boilerplate and enhancing readability. Hector demonstrated how Kotlin’s interfaces with default implementations mirror Swift’s protocol extensions, allowing developers to provide default behavior for functions. For example, Kotlin enables defining function bodies within interface declarations, similar to Swift’s ability to extend protocols, streamlining code reuse and modularity.
He also explored structural similarities, such as both languages’ support for functional programming constructs like map and filter. Hector’s approach included live examples, showcasing how common tasks, such as data transformations, are implemented similarly in both languages. By comparing code snippets, he illustrated how developers familiar with Swift can quickly adapt to Kotlin, leveraging familiar paradigms to build Android applications with minimal learning overhead.
Key Differences and Exception Handling
Despite their similarities, Hector highlighted critical differences, particularly in exception handling. Swift treats exceptions as first-class citizens, using a do-try-catch construct that allows multiple try statements within a single block, enabling fine-grained error handling without nested blocks. Kotlin, inheriting Java’s approach, relies on traditional try-catch blocks, which Hector noted can feel less elegant due to potential nesting. This difference impacts developer experience, with Swift offering a more streamlined approach for handling errors in complex workflows.
Another distinction lies in Kotlin’s handling of extensions, which are declared in separate files without requiring curly braces, unlike Swift’s protocol extensions. This syntactic difference enhances readability in Kotlin, allowing developers to organize extensions cleanly. Hector’s analysis emphasized that while both languages achieve similar outcomes, these differences influence code organization and error management strategies, requiring developers to adapt their mental models when transitioning between platforms.
Implications for Mobile Development
Hector’s presentation has significant implications for mobile development, particularly in fostering collaboration between iOS and Android communities. By highlighting Swift and Kotlin’s similarities, he demonstrated that developers can leverage existing skills to work across platforms, reducing the learning curve and enabling cross-platform projects. This unification is critical for companies like Twitter, where consistent UI/UX across iOS and Android is paramount, and Kotlin’s interoperability with Java ensures seamless integration with existing Android ecosystems.
The broader implication is the potential for a unified mobile development culture. Hector’s call for community engagement, evidenced by his interactive Q&A, encourages developers to share knowledge and explore both languages. As Kotlin and Swift continue to evolve, their shared design philosophies could lead to standardized tools and practices, enhancing productivity and reducing fragmentation. For developers, this transition opens opportunities to work on diverse projects, while for the industry, it promotes innovation in mobile application development.
Conclusion
Hector Matos’s presentation at KotlinConf 2017 offered a compelling case for bridging the Swift and Kotlin communities through their shared strengths. By comparing their syntax, exception handling, and extension mechanisms, Hector illuminated Kotlin’s potential to attract Swift developers to Android. The methodology’s focus on practical examples and community engagement underscores the feasibility of cross-platform expertise. As mobile development demands increase, Hector’s insights pave the way for a unified approach, leveraging Kotlin’s and Swift’s modern features to create robust, user-focused applications.