Haxe is a powerful modern language with many compelling features. It is aimed at giving developers a tool to create websites & applications using a single unified programming language. Whether you use Haxe for its cross-platform features, or focus on a single platform, there are many reasons to adopt it:
- ECMA style programming for client-side, server-side & desktop
- Extremely fast compiling
- The benefits of type checking
- HaXe adds missing language features to target platforms
Why Target Multiple Platforms?
HaXe allows you to work across many platforms, this can be quite useful.
- Elegant Remoting between platforms
You can use remoting classes to pass objects between different platforms. Using the same codebase for different platforms means that the same classes can be compiled for many platforms. This allows for successful de-serialization making the remoting elegant and fast.
- A single syntax & features
Programming practices can often be achieved on different platforms, just with different syntax and quirks. By having a consistent syntax and feature set, there's no need to constantly switch into different programming 'modes'. This allows a developer greater focus on the logic and final output, which can greatly enhance productivity.
- Conditional compilation - Write for one target and use on many
- Deploy to the desktop with ScreenweaverHx
ScreenweaverHx allows you to embed Flash in a Neko application. This allows a Flash application to act as a desktop application & access system functionality. All of your system access is written in haxe and can communicate with your haxe SWF with ease.
- Access to many file formats
The format library (hosted on googlecode) can read/write many formats such as 'abc' (ActionScript Byte Code), SWF headers & more. These libraries are crossplatform making it accessible for many targets.
Platform Specific Features
Each platform that Haxe targets has many great features of its own
- Compile to flash 6,7,8,9,10 with the same language
You can compile back to Flash 6 if needed, without having to write AS 1 code. This makes backward compatability easy.
- Faster & more optimized than the Flex compiler and easier to use and setup than the Flex SDK
Due to inlining, generics and general compiler optimizations, haxe can generate SWFs with much better performance than the current Flex compiler.
- Haxe SWFs are fully compatible with Flex & Flash
You can load a Haxe SWF into one made by Flash or Flex or vice-versa, without any troubles.
- Support an AS3 userbase via SWC Export
Using the SWC Export feature you can generate an SWC. This can then be loaded by Flex. This will allow library makers to use Haxe for its great features, while still supporting their AS3 user-base.
- Access Alchemy OpCodes
There are OpCodes for memory allocation hidden in the SWF player which are used by Adobe Alchemy. Haxe has the ability to access them giving you low level memory access which can allow HUGE speed increases.
- Access the PixelBender Assembly
Using low level functions you can control PixelBender directly.
- Simple lightweight video streaming and recording using HaXeVideo
HaXeVideo can serve streaming video over the RTMP protocol.
- Full DOM autocompletion
- A lightweight, fast virtual machine
Neko is a lightweight virtual machine which offers great speed and features for developing command-line and desktop applications. Haxe has full access to its features, making writing crossplatform (mac, pc, linux) applications fast and easy.
- Powerful & scalable Apache plugins mod_neko & mod_tora
There are also neko plugins for Apache allowing it to run as your webserver. This allows your code to run up to 40x faster than PHP.
- Rapidly develop command-line applications
In a few lines of code you can build a small app which has full system access - great for performing many useful tasks.
- Widespread Deployment to a standard Apache Server
Everyone knows that PHP is great for its cheap deployment costs and widespread hosting. For users frustrated by its lack of API consistency and OOP features, Haxe can provide a great programming experience, without changing your server setup.
- Develop a cleaner more structured OOP website
- Easily access to PHP's full list of functionality
By writing wrapper classes, the full range of PHP libraries can be accessed - and all fully type-checked.
- Harness the power of C++
For tasks which require a little more grunt than a virtual machine like neko can provide, C++ can give you that power.