What is Hydra?
Hydra is an application framework that allows developers to create modular applications that can mix managed (.NET) and unmanaged (native Delphi) code in the same project, creating a seamless user experience while combining the best technologies available from either platform.
Hydra 4 bridges the gap between the worlds of unmanaged Delphi code and the Microsoft .NET and Silverlight platforms by letting developers integrate the 2.5 platforms seamlessly within the same application – whether by reusing Delphi code in new .NET applications or extending exiting Delphi VCL apps with new parts created in .NET, Silverlight or FireMonkey
Combining Delphi and .NET
These days, many Delphi developers consider migrating to the .NET platform, either to make use of its advanced development capabilities and better languages or to leverage new technologies such as the Windows Presentation Foundation or LINQ. At the same time, they are rightfully hesitant to leave the existing investment in their extensive Delphi code base behind.
Hydra 4 – provided in one SKU for both Delphi and .NET – enables you to keep your investment in your existing native Delphi code base, while at the same time opening your applications to managed plugins. This allows new development to happen in .NET, for example using C#, Oxygene, Visual Basic.NET or any other languages available for .NET.
At the same time, the existing code can be kept and maintained in Delphi, and both parts can contribute to what appears to the end user as a single, unified application.
This makes it possible to employ new and emerging .NET technologies within your existing Delphi-based application frame. For example, you might decide to implement fancy diagrams using the hardware-accelerated Windows Presentation Foundation (WPF) introduced in .NET 3.0 (as in the example shown on the left) or XE2's new FireMonkey. Or maybe you want to leverage technologies such as LINQ in your non-visual data processing code and show the results in your Delphi app.
Hydra is also helpful for migrating applications to .NET altogether, in a step-by-step fashion. Developers can start by modularizing their existing Win32 code base and extend it with .NET code or port selectivemodules over to .NET, where it makes most sense (for example those modules that still see most active development and would benefit most from using new, .NET-based development technologies).
Over time, they can elect to port and replace the remaining modules (and even the host application) over time and at their own pace. They can keep working on the project in mixed-mode, or eventually migrate to a fully managed solution, once all parts are ported.
Read more about building Mixed-Mode applications with Hydra, here.
Combining VCL and FireMonkey
With Delphi XE2, Embarcadero introduced FireMonkey, a new framework for building rich 3D and vector-based graphical user interfaces using unmanaged Delphi code – comparable to what WPF offers on the .NET side. Unfortunately, the VCL and FireMonkey don't mix well, so once again developers are asked to leave their existing investment in VCL application code behind to adopt the new technology.
Hydra 4 provides a solution for this problem by allowing developers tointegrate FireMonkey UI seamlessly with their existing VCL applications, or conversely add existing VCL user interfaces into new FireMonkey apps. FireMonkey code can even be used with VCL code compiled in different versions of Delphi – so they can for example extend a Delphi 7 VCL application with new FireMonkey functionality, without porting the entire project to XE2.
And of course this works together with .NET and Silverlight plugins as well, letting you combine all of VCL, FireMonkey, WinForms, WPF and Silverlight in the same application, if necessary.
Plugins and host created using different development platforms can communicate seamlessly using custom interfaces you can define, and Hydra's IDE integration in Delphi and Visual Studio lets you seamlessly port these interface definitions between the two platforms.
You can define your custom interfaces in Delphi code, and let Hydra's toolchain parse the code to generate the necessary interface definitions in C#, VB, Oxygene or any other .NET language. Or you can define your interfaces in .NET and let Hydra import them into your Delphi project.
Host and plugins can communicate using these interfaces without needing to be aware of the platform differences.