Lesson 28. Architecting hybrid language applications

 

This final lesson of this unit presents all the elements we’ve discussed so far within the context of a larger, cohesive element. This lesson doesn’t have specific step-by-step exercises, as we’ll be reviewing a prebuilt code base. After this lesson, a capstone exercise will build on this information in the context of the banking application you’ve been writing throughout this book. This lesson covers

  • Crossing the boundaries from F# and C#
  • Playing to the strengths of a language
  • Case study—driving a WPF application from F#

28.1. Crossing language boundaries

We touched on this briefly earlier in this unit, but it’s worth reviewing this point in more depth. Although beneath the covers F# and C# share the same runtime, at compile time F# affords us much more safety, thus allowing us to focus on solving business problems rather than checking for nulls and so on throughout our code base. Let’s look briefly at how to work between the two languages in an attempt to get the best of both worlds, taking advantage of the F# type system while still being friendly to C#.

28.1.1. Accepting data from external systems

28.2. Case study—WPF monopoly

Summary