Recent Posts
Archives

Posts Tagged ‘CrossPlatform’

PostHeaderIcon [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:

PostHeaderIcon [NDCOslo2024] Smarter, Not Harder: Scaling Without Burning Out in an Always-More Landscape – Marion Løken

Amid the relentless crescendo of expectations—ever-expanding portfolios, dwindling headcounts—Marion Løken, a product manager at FINN.no, chronicles a odyssey of astute adaptation. As FINN merged with Nordic kin like Blocket and DBA, Marion’s lean cadre of four developers and a designer scaled offerings from Norwegian dealer portals to pan-Nordic private and financial forays, all while safeguarding sanity. Her manifesto: intelligence over intensity, leveraging toolchains and toolboxes to transmute toil into triumph, ensuring expansion exhilarates rather than exhausts.

Marion’s narrative unfolds against FINN’s tectonic shift: from solitary insight apps to embedded analytics across platforms, reinventing for diverse demographics. This “more with less” maelstrom, she concedes, could crush spirits, yet a smarter ethos—component curation, documentation dynamism—drove delight. By embracing mainstream stacks like Kotlin and Spring, augmented by FINN’s Podium toggles, her team doubled revenues annually, sans burnout’s bite.

Cultivating Resilience: Buffers Against Overload

Stress, Marion posits, stems from workload, control, and reward imbalances. Her buffers: processes fortify all facets—planning preempts panic, frequent releases reclaim rhythm. Culture cascades calm: transparent retrospectives temper tensions, fostering feedback loops that affirm agency.

Tools tame tasks: reusable libraries liberate from reinvention, Swagger’s specs streamline specs. Marion’s metric: fun’s stability, tracked longitudinally, underscores sustainability’s success. Her heuristic: under duress, deliberate—rethink routines, not redouble efforts.

Toolbox Transformation: From Niche to Nimble

FINN’s evolution eschewed esoterica for ubiquity: Kotlin supplanted Kotlin Multiplatform, OpenAPI supplanted bespoke bindings. Marion marvels at Podium’s prowess—feature flags flipping functionalities fleetly—enabling A/B artistry without architectural upheaval. Documentation, once dormant, danced dynamically via auto-generated APIs, accelerating assimilation for newcomers.

This pivot propelled progress: a pricing tool, inherited and iterated, burgeoned from parity to prowess, yielding fiscal fruits. Marion’s mantra: mainstream multiplicity multiplies might, marrying maturity with maneuverability.

Embedding Efficiency: Innovation Amid Integration

Embedding insights into journeys demanded deft design: component catalogs curbed custom code, promoting parity across portals. Marion’s lean legion—four coders, one crafter—conquered complexity through collaboration, cross-pollinating with Nordic nests.

Her horizon: stress as signal, prompting smarter strides. By buffering buffers, teams transcend thresholds, turning “always more” into ample achievement.

Links:

PostHeaderIcon [NDCOslo2024] Running .NET on the NES – Jonathan Peppers

In a whimsical fusion of nostalgia and innovation, Jonathan Peppers, a principal software engineer at Microsoft, embarks on an audacious quest: running .NET on the Nintendo Entertainment System (NES), a 1985 gaming relic powered by a 6502 microprocessor. With a career steeped in .NET for Android and .NET MAUI, Jonathan’s side project is a playful yet profound exploration of cross-platform ingenuity, blending reverse engineering, opcode alchemy, and MSIL wizardry. His journey, shared with infectious enthusiasm, unveils the intricacies of adapting modern frameworks to vintage hardware, offering lessons in creativity and constraint.

Jonathan opens with a nod to the NES’s cultural cachet—a living room arcade for a generation. Its modest specs—less than 2 MHz, 52 colors, and minuscule cartridges—contrast starkly with today’s computational behemoths. Yet, this disparity fuels his ambition: to compile C# into 6502 assembly, enabling .NET to animate pixels on a 256×240 canvas. Through meticulous reverse engineering and bespoke compilers, Jonathan bridges eras, inviting developers to ponder the portability of modern tools.

Decoding the NES: Reverse Engineering and Opcode Orchestration

The NES’s heart, the 6502 microprocessor, speaks a language of opcodes—terse instructions dictating arithmetic and flow. Jonathan recounts his reverse-engineering odyssey, dissecting ROMs to map their logic. His approach: transform C#’s intermediate language (MSIL) into 6502 opcodes, navigating the absence of high-level constructs like methods or garbage collection. By crafting a custom compiler, he translates simple C# programs—think console outputs—into assembly, leveraging the NES’s 2KB RAM and 8-bit constraints.

Challenges abound: switch statements falter, branching logic stumbles, and closures remain elusive. Yet, Jonathan’s demos—a flickering sprite, a basic loop—prove viability. His toolkit, open-sourced on GitHub, invites contributions, with a human-crafted logo replacing an AI-generated predecessor. This endeavor, while not production-ready, showcases the power of constraints to spark innovation, echoing the NES’s own era of elegant simplicity.

Bridging Eras: Lessons in Cross-Platform Creativity

Jonathan’s experiment transcends mere novelty, illuminating cross-platform principles. The NES, with its rigid architecture, mirrors edge devices where resources are scarce. His compiler, mapping .NET’s abstractions to 6502’s austerity, mirrors modern efforts in WebAssembly or IoT. Structs, feasible sans garbage collection, hint at future expansions, while his call for pull requests fosters a collaborative ethos.

His reflection: constraints breed clarity. By stripping .NET to its essence, Jonathan uncovers universal truths about code portability, urging developers to question assumptions and embrace unconventional platforms. His vision—a C# Mario clone—remains aspirational, yet the journey underscores that even vintage hardware can host modern marvels with enough ingenuity.

Links:

PostHeaderIcon [KotlinConf2023] Compose Multiplatform on iOS: Sharing UIs Across Ecosystems with Sebastian Aigner and Nikita Lipsky

At KotlinConf’23, Sebastian Aigner (Developer Advocate at JetBrains) and Nikita Lipsky (Software Developer for Kotlin at JetBrains) presented an exciting overview of Compose Multiplatform, focusing on its then-Alpha support for iOS. Their session detailed how this JetBrains initiative enables developers to write their user interface once in Kotlin and deploy it across Android, iOS, desktop, and web, fostering significant code sharing and development efficiency. The official documentation for Compose Multiplatform offers further insights.

The presentation began by recapping the classic Kotlin Multiplatform (KMP) use case, which allows sharing of business logic while retaining access to platform-specific APIs. Compose Multiplatform builds upon this by providing a solution for sharing the UI layer itself, addressing scenarios where building and maintaining separate native UIs for each platform is not feasible due to time, resources, or the desire for rapid market entry. While the talk focused on iOS and Android, the speakers emphasized that Compose Multiplatform also supports desktop (stabilized in late 2021) and web targets.

Architecture and Jetpack Compose Foundations

A key point underscored by Sebastian and Nikita was that Compose Multiplatform is built upon Jetpack Compose, Google’s modern declarative UI toolkit for Android, which is 100% Kotlin. This means developers familiar with Jetpack Compose can leverage their existing knowledge and skills to build UIs for iOS and other platforms. The JetBrains team collaborates closely with Google, regularly upstreaming changes to the Jetpack Compose repositories.

Nikita Lipsky delved into the architecture, explaining that official Jetpack Compose itself is already a Kotlin Multiplatform project at its core, with its lowest levels defining Kotlin Multiplatform sources. The composable function concept is an extension to the Kotlin language requiring compiler support, and the entire Compose system is managed by the Compose Runtime. For iOS, Compose Multiplatform renders UI elements by drawing directly onto a CAPI (Canvas API) provided by Skiko, a graphics library that abstracts over Skia (for Android and desktop) and CoreGraphics (for iOS). This allows for consistent rendering across platforms.

Live Demos and iOS Integration

The session featured live demonstrations showcasing the capabilities of Compose Multiplatform on iOS. Sebastian Aigner walked through a sample application, highlighting how standard Jetpack Compose code for UI elements, state management (using remember), layouts (like Column), and modifiers can be shared and run on iOS simulators and devices. He demonstrated features like text input, button interactions, and even integration with iOS-specific functionalities like the share sheet, emphasizing the goal of seamless interoperability.

The speakers also discussed the importance of providing solid accessibility integrations and ensuring smooth performance, even on high-refresh-rate displays, which is an ongoing area of focus for the Kotlin/Native and Compose Multiplatform teams. Interoperability with existing iOS UI code (SwiftUI and UIKit) was also presented as a key feature, allowing for gradual adoption. Developers can embed Compose Multiplatform views within existing SwiftUI applications or, conversely, embed native iOS views within a Compose Multiplatform UI. This flexibility is crucial for teams looking to integrate Compose into their established projects incrementally.

Getting Started and Future Outlook

Sebastian and Nikita provided clear guidance on how developers can start experimenting with Compose Multiplatform for iOS. They pointed to project templates, sample applications available on the Compose Multiplatform GitHub repository (including to-do list apps and code viewers), and updated KMP production samples that now include branches with Compose-based UI implementations. The new memory manager in Kotlin/Native was also mentioned as a significant improvement, simplifying multi-threaded programming for all Kotlin targets, including iOS.

While acknowledging that the iOS target was in Alpha and some areas were still works in progress, the overall message was one of excitement and a call to action for the community. They encouraged developers to explore the technology, provide feedback, and contribute to its evolution. The vision is a future where developers can agree on a delightful way to write UIs for all their target platforms using Kotlin.

Links:

PostHeaderIcon [KotlinConf2019] Kotlin Multiplatform Programming: Present and Future with Dmitry Savvinov and Liliia Abdulina

Kotlin Multiplatform Programming (MPP) has been a significant focus for JetBrains, aiming to extend Kotlin’s reach beyond traditional JVM and Android development. At KotlinConf 2019, Dmitry Savvinov and Liliia Abdulina, both from the Kotlin team at JetBrains, delivered an insightful overview of MPP’s capabilities in version 1.3.X and offered a glimpse into its future direction. Dmitry Savvinov, a key contributor to Kotlin Contracts and heavily involved in MPP, brought his compiler expertise to the discussion. The official Kotlin language website, the central hub for MPP information, is kotlinlang.org.

Their talk was structured to cover the fundamentals of multiplatform projects, illustrate these basics with examples, provide guidelines for designing first multiplatform projects, and showcase a production-like application to demonstrate design principles in action. This comprehensive approach aimed to equip developers with the knowledge needed to start leveraging MPP effectively.

Core Concepts of Kotlin Multiplatform

Dmitry Savvinov and Liliia Abdulina began by explaining the core building blocks of Kotlin Multiplatform projects. These foundational concepts are crucial for understanding how code can be shared and specialized across different platforms:
* Source Sets: The fundamental unit of code organization in MPP. A project is typically structured with a commonMain source set containing platform-agnostic Kotlin code. Platform-specific source sets (e.g., jvmMain, jsMain, iosMain) contain code tailored for each target and can depend on commonMain.
* Targets: These define the platforms the project will compile for, such as JVM, Android, JavaScript, iOS (Native), Linux, Windows, and macOS. Each target has its own compilations.
* Compilations: A compilation process for a specific target that produces the appropriate artifacts (e.g., JVM bytecode, JavaScript files, native executables).
* expect and actual Declarations: This powerful mechanism allows common code in commonMain to declare an expect class, function, or property. Platform-specific source sets must then provide an actual implementation for that declaration, bridging the gap between shared logic and platform-specific APIs. For example, a common module might expect a function to generate a UUID, and the JVM and Native modules would provide actual implementations using their respective platform libraries.

These concepts enable developers to write shared business logic, data models, and algorithms once in commonMain and then reuse them across multiple platforms, significantly reducing code duplication and improving consistency.

Designing and Implementing Multiplatform Projects

Beyond the basic syntax, Dmitry and Liliia provided guidance on how to approach the design of a multiplatform project. This involved discussing strategies for identifying what code can and should be shared, how to structure modules for optimal maintainability, and best practices for using expect/actual effectively.

They used toy examples to illustrate these basics in a clear and understandable manner, helping attendees grasp how these pieces fit together in a real project. The presentation then progressed to showcase a “more or less production-like application”. This larger example would have served to demonstrate how the design principles discussed could be applied to build a substantial, real-world multiplatform application, highlighting how to manage dependencies, handle platform-specific interactions, and structure a scalable MPP architecture. The focus was on providing practical insights that developers could apply to their own projects, whether starting from scratch or integrating MPP into existing applications.

The Trajectory of Kotlin Multiplatform: Beyond 1.3.X

While detailing the state of MPP in Kotlin 1.3.X, Dmitry Savvinov and Liliia Abdulina also looked towards its future development. At KotlinConf 2019, MPP was still evolving, with ongoing improvements to tooling, library support, and the overall developer experience. Their talk touched upon the roadmap for MPP, including planned enhancements to areas like Kotlin/Native (for performance and interoperability), library ecosystem growth, and further refinements to the build system and IDE support within IntelliJ IDEA and Android Studio.

The vision presented was one of Kotlin as a truly universal language, enabling developers to target a wide array of platforms with a unified codebase and skillset. The commitment from JetBrains to invest heavily in MPP was clear, with the aim of making it a robust and production-ready solution for cross-platform development. The session would have encouraged developers to explore MPP, provide feedback, and contribute to its growing ecosystem, reinforcing the community-driven aspect of Kotlin’s development.

Links:

PostHeaderIcon [KotlinConf2019] Sharing Is Caring: Kotlin Multiplatform for Android Developers with Britt Barak

The vision of writing code once and running it across multiple platforms is a long-held dream in software development. Britt Barak, an experienced Android and Kotlin developer, and Google Developer Expert, brought this vision closer to reality for Android developers at KotlinConf 2019. Her talk, “Sharing Is Caring – Kotlin Multiplatform for Android Developers,” explored the exciting, albeit then-experimental, capabilities of Kotlin Multiplatform (KMP) and how it could revolutionize the way Android developers collaborate with teams working on iOS, backend, or JavaScript projects.

Britt Barak emphasized the common scenario where Android developers work alongside backend services or with iOS and JavaScript teams developing similar functionalities. The ability to share Kotlin code across these platforms promised significant savings in implementation time, testing effort, and overall development efficiency. Her session focused on creating a full-stack Kotlin project, demonstrating how to share code between an Android app and a backend Kotlin component, ultimately leading to more efficient and robust applications.

The Promise of Kotlin Multiplatform

Kotlin Multiplatform (KMP) allows developers to write common logic in Kotlin and compile it for various targets, including JVM (for Android and backend), JavaScript (for web frontends), and Native (for iOS and other native applications). Britt Barak highlighted the power of this approach: sharing business logic, data models, and even presentation logic (in some architectures) can drastically reduce redundancy and inconsistencies between different platform implementations.

The core idea is to isolate platform-agnostic code in a “common” module. This module can then be consumed by platform-specific modules (e.g., Android, iOS, JVM backend) which implement the platform-dependent parts, such as UI or interactions with platform-specific APIs. This separation allows teams to leverage Kotlin’s strengths across their entire stack while still catering to the unique requirements of each platform. Britt’s presentation aimed to show Android developers how they could take the lead in initiating such code-sharing efforts, benefiting not only their own workflow but also that of their teammates on other platforms.

Practical Implementation and Considerations

Britt Barak’s session was hands-on, guiding attendees through the process of setting up and building a Kotlin Multiplatform project. She covered key KMP concepts such as:
* Common Modules: Where shared Kotlin code resides, free of platform-specific dependencies.
* Platform-Specific Modules: Modules targeting specific platforms (Android, JVM, JS, Native) that can depend on common modules and implement platform-specific functionalities using expect/actual declarations.
* expect and actual Keywords: A powerful mechanism in KMP that allows common code to declare an expected functionality (expect), which platform-specific modules then provide concrete implementations for (actual). This is crucial for accessing platform-specific APIs (like device sensors, file systems, or UI elements) from shared code.

She demonstrated how to structure a project to share code effectively between an Android application and a backend Kotlin component, showcasing the potential for building more cohesive and maintainable full-stack applications. This practical approach would have involved setting up the build system (Gradle), defining dependencies, and writing shared business logic that could be consumed by both the Android client and the server. The goal was to illustrate how to build “more efficient and robust applications” through strategic code sharing.

Navigating the Experimental Landscape and Community Support

At the time of KotlinConf 2019, Kotlin Multiplatform was still an experimental feature. Britt Barak acknowledged this, preparing attendees for a landscape where documentation might sometimes be a bit dated, and tooling was rapidly evolving. However, she also pointed to the strong and growing community support as a significant asset. The official Kotlin Slack and various online forums were highlighted as valuable resources for troubleshooting and learning from others’ experiences.

She shared the sentiment that KMP was gaining popularity in a positive way, with many developers interested and actively contributing to its growth. This collaborative environment was seen as a good sign for the future development and stabilization of KMP. Britt encouraged developers to embrace this journey, start experimenting with multiplatform projects, and contribute to the community by sharing their own code and experiences. Her message was clear: despite its experimental nature, Kotlin Multiplatform offered a powerful and awesome way to achieve cross-platform code sharing, and it was a “really good time to jump on on the ride”.

Links:

PostHeaderIcon [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.

Links

PostHeaderIcon [DevoxxFR2012] .NET for the Java Developer: A Source of Inspiration? A Profound Cross-Platform Exploration of Language Design, Ecosystem Evolution, and the Future of Enterprise Programming

Lecturers

Cyrille Martraire stands as one of the most influential figures in the French software craftsmanship movement, having co-founded Arolla, a boutique consultancy that has redefined how enterprise teams approach code quality, domain-driven design, and technical excellence. With nearly two decades of experience building mission-critical financial systems at investment banks and fintech startups, Cyrille has cultivated a philosophy that places expressiveness, readability, and long-term maintainability at the heart of software development. He is the founder of the Software Craftsmanship Paris community, a regular speaker at international conferences, and a passionate advocate for learning across technological boundaries. His ability to draw meaningful insights from seemingly disparate ecosystems—such as .NET—stems from a deep curiosity about how different platforms solve similar problems, and how those solutions can inform better practices in Java.

Rui Carvalho, a veteran .NET architect and ASP.NET MVC specialist, brings a complementary perspective rooted in over fifteen years of web development across startups, agencies, and large-scale enterprise platforms. A fixture in the ALT.NET Paris community and a recurring speaker at Microsoft TechDays, Rui has witnessed the entire arc of .NET’s evolution—from the monolithic WebForms era to the open-source, cross-platform renaissance of .NET Core and beyond. His expertise lies not merely in mastering Microsoft’s tooling, but in understanding how framework design influences developer productivity, application architecture, and long-term system evolution. Together, Martraire and Carvalho form a dynamic duo capable of transcending platform tribalism to deliver a nuanced, humorous, and technically rigorous comparison that resonates deeply with developers on both sides of the Java–.NET divide.

Abstract

This article represents a comprehensive, elaborately expanded re-interpretation of Cyrille Martraire and Rui Carvalho’s landmark 2012 DevoxxFR presentation, “.NET pour le développeur Java : une source d’inspiration ?”, transformed into a definitive treatise on the parallel evolution of Java and C# and their mutual influence over nearly three decades of enterprise software development. Delivered with wit, mutual respect, and a spirit of ecumenical dialogue, the original talk challenged the audience to look beyond platform loyalty and recognize that Java and C# have been engaged in a continuous, productive exchange of ideas since their inception. From the introduction of lambda expressions in C# 3.0 (2007) to Java 8 (2014), from LINQ’s revolutionary query comprehension to Java’s Streams API, from async/await to Project Loom’s virtual threads, the presenters traced a lineage of innovation where each platform borrowed, refined, and occasionally surpassed the other.

This expanded analysis delves far beyond surface-level syntax comparisons to explore the philosophical underpinnings of language design decisions, the ecosystem implications of framework choices, and the cultural forces that shaped adoption. It examines how .NET’s bold experimentation with expression trees, dynamic types, extension methods, and Razor templating offered Java developers a vision of what was possible—and in many cases, what Java later adopted or still lacks.

EDIT
Updated for the 2025 landscape, this piece integrates the latest advancements: C# 13’s primary constructors and source generators, Java 21’s pattern matching and virtual threads, Spring Fu’s functional web framework, GraalVM’s native compilation, and the convergence of both platforms under cloud-native, polyglot architectures. Through rich code examples, architectural deep dives, performance analyses, and forward-looking speculation, this work offers not just a historical retrospective, but a roadmap for cross-platform inspiration in the age of cloud, AI, and real-time systems.

The Shared Heritage: A Tale of Two Languages in Constant Dialogue

To fully appreciate the depth of inspiration between Java and C#, one must first understand their shared origin story. Java was released in 1995 as Sun Microsystems’ answer to the complexity of C++, promising “write once, run anywhere” through the JVM. C#, announced by Microsoft in 2000, was explicitly positioned as a modern, type-safe, component-oriented language for the .NET Framework, but its syntax, garbage collection, exception handling, and metadata system bore an uncanny resemblance to Java. This was no coincidence. Anders Hejlsberg, the architect of C#, had previously designed Turbo Pascal and Delphi, but he openly acknowledged Java’s influence. As Cyrille humorously remarked during the talk, “C# didn’t just look like Java—it was Java’s younger brother who went to a different school, wore cooler clothes, and occasionally got better grades.”

This fraternal relationship manifested in a decade-long game of leapfrog. When Java 5 introduced generics in 2004, C# 2.0 responded with generics, nullable types, and anonymous methods in 2005. When C# 3.0 unveiled LINQ and lambda expressions in 2007, Java remained silent until Java 8 in 2014. When Java 7 introduced the invokedynamic bytecode in 2011 to support dynamic languages, C# 4.0 had already shipped the dynamic keyword in 2010. This back-and-forth was not mere imitation—it was a refinement cycle where each platform stress-tested ideas in production before the other adopted and improved them.

Lambda Expressions and Functional Programming: From Verbosity to Elegance

One of the most visible and impactful areas of cross-pollination was the introduction of lambda expressions and functional programming constructs. In the pre-lambda era, both Java and C# relied on verbose anonymous inner classes to implement single-method interfaces. A simple event handler in Java 6 looked like this:

button.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
        System.out.println("Button clicked at " + e.getWhen());
    }
});

The equivalent in C# 2.0 was only marginally better, using anonymous delegates:

button.Click += delegate(object sender, EventArgs e) {
    Console.WriteLine("Button clicked");
};

But in 2007, C# 3.0 introduced lambda expressions with a syntax so clean it felt revolutionary:

button.Click += (sender, e) => Console.WriteLine("Clicked!");

This wasn’t just syntactic sugar. It was a paradigm shift toward functional programming, enabling higher-order functions, collection processing, and deferred execution. Rui demonstrated how this simplicity extended to LINQ:

var recentOrders = orders
    .Where(o => o.Date > DateTime.Today.AddDays(-30))
    .OrderBy(o => o.Total)
    .Select(o => o.CustomerName);

Java developers watched with envy. It took seven years for Java 8 to deliver lambda expressions in 2014, but when it did, it came with a more rigorous type system based on functional interfaces and default methods:

button.addActionListener(e -> System.out.println("Clicked!"));

The Java version was arguably more type-safe and extensible, but it lacked C#’s expression-bodied members and local functions.

EDIT:
In 2021, Java 21 has closed the gap further with pattern matching and unnamed variables, but C# 13’s primary constructors in records remain unmatched:

public record Person(string Name, int Age);

LINQ: The Query Comprehension Revolution That Java Never Fully Embraced

Perhaps the most profound inspiration from .NET—and the one Java has still not fully replicated—is LINQ (Language Integrated Query). Introduced in C# 3.0, LINQ was not merely a querying library; it was a language-level integration of query comprehension into the type system. Using a SQL-like syntax, developers could write:

var result = from p in people
             where p.Age >= 18
             orderby p.LastName
             select new { p.FirstName, p.LastName };

This syntax was compiled into method calls on IEnumerable<T>, but more importantly, it was extensible. Providers could translate LINQ expressions into SQL, XML, or in-memory operations. The secret sauce? Expression trees.

Expression<Func<Person, bool>> predicate = p => p.Age > 18;
var sql = SqlTranslator.Translate(predicate); // "SELECT * FROM People WHERE Age > 18"

Java’s Streams API in Java 8 was the closest analog:

List<Person> adults = people.stream()
    .filter(p -> p.getAge() >= 18)
    .sorted(Comparator.comparing(Person::getLastName))
    .map(p -> new PersonDto(p.getFirstName(), p.getLastName()))
    .toList();

But Streams are imperative in spirit, lack query syntax, and cannot be translated to SQL without external tools like jOOQ. Cyrille lamented: “Java gave us the pipeline, but not the language.”

Asynchronous Programming: async/await vs. the Java Journey

Concurrency has been another arena of inspiration. C# 5.0 introduced async/await in 2012, allowing developers to write asynchronous code that looked synchronous:

public async Task<string> FetchDataAsync()
{
    var client = new HttpClient();
    var html = await client.GetStringAsync("https://example.com");
    return Process(html);
}

The compiler transformed this into a state machine, eliminating callback hell. Java’s journey was more fragmented: Futures, CompletableFuture, Reactive Streams, and finally Project Loom’s virtual threads in Java 21:

try (var executor = Executors.newVirtualThreadPerTaskExecutor()) {
    return executor.submit(() -> client.get(url)).get();
}

Virtual threads are a game-changer, but they don’t offer the syntactic elegance of await. As Rui quipped, “In C#, you write synchronous code that runs asynchronously. In Java, you write asynchronous code that hopes to run efficiently.”

Web Frameworks: From WebForms to Razor and the Templating Renaissance

Rui traced .NET’s web framework evolution with particular passion. The early 2000s were dominated by ASP.NET WebForms, a drag-and-drop, event-driven model that promised rapid development but delivered ViewState bloat, postback hell, and untestable code. It was, in Rui’s words, “a productivity trap disguised as a framework.”

The community rebelled, giving rise to ALT.NET and frameworks like MonoRail. Microsoft responded with ASP.NET MVC in 2009, embracing separation of concerns, testability, and clean URLs. Then came Razor in 2010—a templating engine that felt like a revelation:

@model List<Person>
<h1>Welcome, @ViewBag.User!</h1>
<ul>
@foreach(var p in Model) {
    <li>@p.Name <em>(@p.Age)</em></li>
}
</ul>

No XML. No JSP-style scriptlets. Just C# and HTML in harmony. Java’s JSP, JSF, and even Thymeleaf felt antiquated by comparison. But in 2020, Spring Boot with Thymeleaf or Micronaut Views has narrowed the gap, though Razor’s layout system and tag helpers remain superior.

The Cutting Edge in 2025: Where Java and C# Stand Today

EDIT:
C# 13 and .NET 9 continue to innovate with source generators, record structs, and minimal APIs:

var builder = WebApplication.CreateBuilder();
var app = builder.Build();
app.MapGet("/", () => "Hello World");
app.Run();

Java 21 counters with pattern matching for switch, records, and virtual threads, but lacks native metaprogramming. Projects like Spring Fu and Quarkus are pushing functional and reactive paradigms, but the expressive gap remains.

Conclusion: Inspiration Without Imitation

Martraire and Carvalho’s core message endures: Java and .NET are not rivals—they are collaborators in the advancement of managed languages. The inspiration flows both ways, and the future belongs to developers who can transcend platform boundaries to build better systems.

EDIT:
In 2025, as cloud-native, AI-augmented, and real-time applications dominate, the lessons from this 2012 dialogue are more relevant than ever.

Links