June 17

Haxe: The Big Secret of Cross-Platform Development

The modern Haxe programming language is well known, but many of those reading this article may never have heard of it. But don’t let its niche status fool you. Since it first appeared in 2005, it has been tested in combat by its loyal, albeit rather quiet, followers. It features a pragmatic and thoughtful mix of features suitable for business, gaming, and even academic development. This article will help you understand the topic and the expertise area of a company providing cross platform app development services.

So why haven’t most developers heard of it? Perhaps Haxe’s versatility means there’s no single killer feature for it.

Or perhaps the reason is that one of Haxe’s earliest uses – as a means of migration from the dying Flash platform – is quite a niche. For the past few years, the casual games market has been in limbo, but now it has become known that by 2020 Flash has officially ceased to be supported.

Business software engineers, web developers, and many game developers hearing the word “Flash” simply lost interest in the topic at hand. This attitude, for example, was the reason for the emergence of HaxeDevelop – an IDE for Haxe, which is essentially FlashDevelop, but specialized for development under Haxe, and components for development under ActionScript were removed from the distribution.

Getting rid of associations and calling Haxe a haven for former Flash developers is still quite difficult, especially when they remain relevant. For example, FlowPlay, which has 75 million users on its social games, selected Haxe over Unity or pure JavaScript to translate its apps.

Perhaps that’s why it’s hard to highlight successful Haxe use cases and get non-gaming developers interested in doing so. But let’s do a little research anyway.

So what is it about Haxe?

In general, using the Haxe language means being able to reuse (good) code. Meaning that is that Haxe code is reusable across many platforms, it can be integrated with existing Haxe code and other languages, and the good news is that Haxe provides a lot of proven paradigms such as type safety.

Continuing the topic of versatility, here are the main categories of Haxe use cases (except migrating from Flash, of course).

Development of a cross-platform application or game. Cross-platform programming languages are nothing new, and besides Haxe, there are other special solutions for cross-platform desktop and mobile applications and games. But Haxe is different in this regard. The same code will not just work on different platforms, but in different paradigms, for example, as an HTML5 application and a native executable.

One language “to rule them all.” Apologies for the Tolkien reference, but just as Node.js ushered in the era of a single language for both the front-end and back-end of websites, so Haxe can be used for both pieces of client-server applications (while the client and server can run on different platforms).

For example, the FontStruct web application uses Haxe to render graphics both on the client side (in an HTML5 canvas) and on the server side (using Java2D). But, as already mentioned, it is not necessary to follow this path – Haxe does not restrict your options and allows you to work in conjunction with existing code written in any other language. This approach makes it much easier to maintain consistent logic and even render graphics across all contexts, platforms, and target languages.

Pretty fast compilation and testing process. The recently added cross-platform virtual machine (VM) HashLink to the Haxe ecosystem allows you to strike a balance between compilation time (compiling under HashLink is much faster than compiling under C ++) and code execution speed. It is sufficient for areas such as creating 3D games (previously, it could use the Neko virtual machine, which, however, is significantly inferior to HashLink in terms of speed). But even in the field of web development, Haxe can outperform TypeScript in both compilation speed and generated code execution speed.

Who Uses Haxe?

Game developers, of course: Madden NFL Mobile, Evoland II, Double Kick Heroes… these and hundreds of other games have been developed using Haxe. 


You may also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Get in touch