Targeting Javascript
with Haxe
Dublin, May 7 2012

But why?

Flash is in decline and Javascript is on the rise (Ignore it at your peril!).

Quick reference

Compare Source

Introducing Haxe

  • Cross platform
  • Compiles to javascript, flash, C++, etc
  • Open Source
  • Strictly Typed
  • Ecma Script

Why use Haxe?

The following are some day-to-day benefits

hello world (demo)

Language Feature; Type inference

You don't need to explicitly declare the type of a variable
- let the compiler figure it out.
More info

Language Feature; Anonymous Objects

Is this strictly typed?

Language Feature; Typedefs

Language Feature; Typedefs

Typedefs can be used as aliases for any type.

Language Feature; Conditional compilation

Language Feature; Native Js Libs

Externs (JQuery example)

Language Feature; Js magic

The __js__ construct enables you to directly embed
Javascript code into your Haxe code.
More info

Language Feature; Typed Functions

Killer Feature; JS Source Mapping

Sourcemapping
Maps Haxe source code to javascript output
'The biggest thing to happen to javascript
debugging in years' Paul Irish

Manipulating the DOM

UI libraries

MVC

2 ports of Robot Legs (Robot Haxe and Cube)

Support

Twitter

  • @Haxelang @Haxejs @Haxenme
  • @ncannasse @cwaneck @elsassph @andy_li @BrunoFonzi
  • @skial

Tooling

Selling Haxe to your boss*

  • Reduce overall in-life cost of ownership
  • Reduce time and effort (target both html5 and native)
  • Avoid duplicated development streams per device
  • Implement features and enhancements once
  • Keep you options open (avoid the risk of investing in just one platform)
Thanks