SlideShare a Scribd company logo
Cross-platform Development 
Introducing the Haxe Toolkit 
by Romuald Halasz, 02.08.2014
A little bit about me 
- started work with QuickBasic, BPascal, C++ 
- Visual Studio 2005, OpenGL, DirectX 
- PHP, HTML, CSS, JavaScript 
- Flash, Flex 
- Haxe, NME 
- currently hosting TGD Meetup
Presentation structure 
Introduction to Haxe 
- language features 
Cross-platform aspects 
- specific APIs 
- target specific platforms
Getting acquainted with Haxe 
A bit of history: 
22 October 2005 by French developer Nicolas Cannasse 
Haxe 2.0 was released in July 2008, 
Haxe 3 was released in May 2013 
open source 
Toolkit: 
- language 
- standard library 
- compiler
Language Specifics 
- based on ECMAScript standard, similar to ActionScript 
- strictly typed 
- object oriented 
- conditional compilation 
- inline calls 
- metadata 
- type params, constraints, variance 
- etc. (pattern matching, abstract types, string interpolation …) 
- more info: http://haxe.org/documentation/introduction/language-features.html
What does it look like ? 
class Test { 
static function main():Void { 
var people:Array = [ 
"Elizabeth" => "Programming", 
"Joel" => "Design" 
]; 
for (name in people.keys()) { 
var job = people[name]; 
trace('$name does $job for a living!'); 
} 
} 
}
Language Architecture 
- Haxe API 
- platform-specific APIs 
- libraries 
- frameworks
Haxe Toolkit for cross-platform applications development
Haxe Standard Library 
- general classes 
- system (requires platform compilation) 
- target specific APIs 
(cpp, cs, flash, php etc.)
Haxelib 
- library manager 
- CLI tool 
- browse and download libraries: 
http://lib.haxe.org/
Haxe and multiple platforms 
Going cross-platform! 
Let’s dive right into it. 
first, a bit of context...
Haxe Toolkit for cross-platform applications development
Targets and Use Cases 
Name Kind Static typed Sys Use Cases 
Flash byte code Yes No Games, Mobile 
Neko byte code No Yes Web, CLI 
ActionScript 3 source Yes Yes Games, Mobile, API 
JavaScript source No No Web, Desktop, API 
PHP source No Yes Web 
C++ source Yes Yes Games, CLI, Mobile, Desktop 
Java source Yes Yes CLI, Mobile, Desktop 
C# source Yes Yes Mobile, Desktop 
Python source No Yes CLI, Web, Desktop
Platform Use Cases 
We will focus on: 
- Mobile 
- Desktop 
- Web 
- Games!
Library Spotlight: Lime 
“A foundational Haxe framework for cross-platform 
native development.” 
- abstraction layer 
- compile code to C++, JavaScript etc. 
Structure 
- CLI tools - platform-specific process 
- native layer (C++, Objective-C, Java) 
- Haxe wrapper
OpenFl, NME 
- provide support for creating 
cross-platform interfaces 
- flash-like API (display, events, 
text, external, net etc.)
Supported platforms 
Take your pick!
OpenFl in practice 
Targets: 
Desktop: Windows, Mac, Linux 
Mobile: iOS, Android, BlackBerry 
Web: Tizen, Emscripten, HTML5 
Exposes: 
OpenGL, Audio, Input 
Windowing 
Useful native features
Haxe and Mobile 
Targets: C++, HTML5 
Tools: 
- cross-platform APIs 
- libraries: StablexUI, HaxeUI 
For iOS and Android: Basis 
HTML5 target works with PhoneGap
Targeting iOS, Android, BlackBerry 
Android: 
- Android SDK/NDK, Apache ANT, Java JDK 
- supported by lime 
iOS: 
- Xcode required 
- target Flash, publish using AIR 
BlackBerry: 
- OpenFl is compatible with BlackBerry Tablet SDK 
- supported by lime
Desktop Targets 
Targets: C++, HTML5 
Tools: 
Libraries: Waxe (Haxe + wxW) 
HTML5 targets work with Node-socket 
- app runtime 
- based on Chromium and Node.js 
https://github.com/rogerwang/node-webkit
Targeting Windows, Mac, Linux 
Windows: 
- Neko (no dependencies) 
- C++, Visual Studio required 
Mac: 
- Neko 
- C++, requires Xcode 
Linux: 
- g++, gcc-multilib required 
!! Targeting restricted to current platform
Haxe on the Web 
Client targets: 
- JavaScript, ActionScript 3 
Server targets: 
- PHP, Node, Neko
Haxe Web - clients 
Haxe and jQuery: 
- Haxe js.jQuery API 
- jQueryExternForHaxe (library) 
- more recent jQuery version 
- https://github.com/andyli/jQueryExternForHaxe
jQuery Example 
$(document).ready(function(){ 
$("#myDiv").hide(); 
}); 
import JQuery; 
class Main { 
static public function main():Void { 
new JQuery(function():Void { 
new JQuery("#myDiv").hide(); 
}); 
} 
}
Haxe Web - servers 
Haxe JS Kit 
https://github.com/clemos/haxe-js-kit 
includes Node.js 
- NPM libraries: 
Mongoose, Connect.js, Express.js, Socket.io, Passport.js, 
Atom-shell 
Haxenode 
- Node.js port for Haxe 
http://haxenode.herokuapp.com/
Haxenode Example (node) 
Node.js: 
var http = require('http'); 
var server = http.createServer( 
function (req, res) { 
res.writeHead(200, {'Content-Type': 'text/plain'}); 
res.end('Hello Worldn'); 
} 
); 
server.listen(1337, "127.0.0.1"); 
console.log('Server running at http://127.0.0.1:1337/');
Haxenode Example (haxe) 
import js.Node; 
class Haxenode { 
public static function main() { 
var server = Node.http.createServer(function(req:NodeHttpServerReq, res: 
NodeHttpServerResp) { 
res.setHeader("Content-Type","text/plain"); 
res.writeHead(200); 
res.end('Hello Worldn'); 
} 
); 
server.listen(1337,"localhost"); 
trace('Server running at http://127.0.0.1:1337/'); 
} 
}
And last but not least, Games! 
Libraries: 
Frameworks: HaxeFlixel, awe6, HaxePunk
A close look at HaxePunk
More information 
haxe.org 
openfl.org 
haxepunk.com
Thank you very much !

More Related Content

PDF
[4developers2016] The ultimate mobile DX using JS as a primary language (Fato...
ODP
An open source flash workflow using HaXe (2009)
PPTX
Orchard 2... and why you should care
PPTX
haXe - One codebase to rule'em all
PPTX
PHP in one presentation
PDF
.NET Core Blimey! Windows Platform User Group, Manchester
PPT
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
[4developers2016] The ultimate mobile DX using JS as a primary language (Fato...
An open source flash workflow using HaXe (2009)
Orchard 2... and why you should care
haXe - One codebase to rule'em all
PHP in one presentation
.NET Core Blimey! Windows Platform User Group, Manchester
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose

What's hot (15)

PDF
Super combinators
PDF
.NET Core in the Real World
PDF
Lean Php Presentation
PDF
Front End Development Automation with Grunt
PDF
Cache in Chromium: Disk Cache
PDF
Voxxed Days Thessaloniki 2016 - Web assembly : the browser vm we were waiting...
PPTX
Net core
PPT
Tech talk php_cms
PPT
Drupal Camp2009 Asp.Net Vs Drupal
PPT
Tech talk: PHP
PPTX
Presentation php
PPTX
JS 4 U
PPTX
PHP presentation - Com 585
PPTX
.Net introduction
Super combinators
.NET Core in the Real World
Lean Php Presentation
Front End Development Automation with Grunt
Cache in Chromium: Disk Cache
Voxxed Days Thessaloniki 2016 - Web assembly : the browser vm we were waiting...
Net core
Tech talk php_cms
Drupal Camp2009 Asp.Net Vs Drupal
Tech talk: PHP
Presentation php
JS 4 U
PHP presentation - Com 585
.Net introduction
Ad

Similar to Haxe Toolkit for cross-platform applications development (20)

PDF
Haxe Toolkit and Game Development
PDF
HaXe Demo
PDF
qooxdoo - Open Source Ajax Framework
PPTX
Webdevcon Keynote hh-2012-09-18
PDF
2.28.17 Introducing DSpace 7 Webinar Slides
PDF
.NET Core on Mac
DOCX
20160201_resume_Vladimir_Chesnokov
PDF
Open Source Flash 2010
PPTX
World of Node.JS
PPT
Node.js an introduction
PPT
The future of server side JavaScript
PDF
API Platform: Full Stack Framework Resurrection
PDF
full-stack web developer (6).pdf
PPT
.Net overviewrajnish
PPT
PDF
HTML5: An Introduction To Next Generation Web Development
PDF
Add the power of the Web to your embedded devices with WPE WebKit
PDF
Flink Forward Berlin 2018: Robert Bradshaw & Maximilian Michels - "Universal ...
PPS
AJAX Frameworks
PDF
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Haxe Toolkit and Game Development
HaXe Demo
qooxdoo - Open Source Ajax Framework
Webdevcon Keynote hh-2012-09-18
2.28.17 Introducing DSpace 7 Webinar Slides
.NET Core on Mac
20160201_resume_Vladimir_Chesnokov
Open Source Flash 2010
World of Node.JS
Node.js an introduction
The future of server side JavaScript
API Platform: Full Stack Framework Resurrection
full-stack web developer (6).pdf
.Net overviewrajnish
HTML5: An Introduction To Next Generation Web Development
Add the power of the Web to your embedded devices with WPE WebKit
Flink Forward Berlin 2018: Robert Bradshaw & Maximilian Michels - "Universal ...
AJAX Frameworks
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Ad

Recently uploaded (20)

PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
history of c programming in notes for students .pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
L1 - Introduction to python Backend.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
System and Network Administraation Chapter 3
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
medical staffing services at VALiNTRY
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
wealthsignaloriginal-com-DS-text-... (1).pdf
Odoo Companies in India – Driving Business Transformation.pdf
history of c programming in notes for students .pptx
PTS Company Brochure 2025 (1).pdf.......
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Internet Downloader Manager (IDM) Crack 6.42 Build 41
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
L1 - Introduction to python Backend.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Migrate SBCGlobal Email to Yahoo Easily
Reimagine Home Health with the Power of Agentic AI​
System and Network Administraation Chapter 3
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Upgrade and Innovation Strategies for SAP ERP Customers
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
medical staffing services at VALiNTRY
Operating system designcfffgfgggggggvggggggggg
Wondershare Filmora 15 Crack With Activation Key [2025
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...

Haxe Toolkit for cross-platform applications development

  • 1. Cross-platform Development Introducing the Haxe Toolkit by Romuald Halasz, 02.08.2014
  • 2. A little bit about me - started work with QuickBasic, BPascal, C++ - Visual Studio 2005, OpenGL, DirectX - PHP, HTML, CSS, JavaScript - Flash, Flex - Haxe, NME - currently hosting TGD Meetup
  • 3. Presentation structure Introduction to Haxe - language features Cross-platform aspects - specific APIs - target specific platforms
  • 4. Getting acquainted with Haxe A bit of history: 22 October 2005 by French developer Nicolas Cannasse Haxe 2.0 was released in July 2008, Haxe 3 was released in May 2013 open source Toolkit: - language - standard library - compiler
  • 5. Language Specifics - based on ECMAScript standard, similar to ActionScript - strictly typed - object oriented - conditional compilation - inline calls - metadata - type params, constraints, variance - etc. (pattern matching, abstract types, string interpolation …) - more info: http://haxe.org/documentation/introduction/language-features.html
  • 6. What does it look like ? class Test { static function main():Void { var people:Array = [ "Elizabeth" => "Programming", "Joel" => "Design" ]; for (name in people.keys()) { var job = people[name]; trace('$name does $job for a living!'); } } }
  • 7. Language Architecture - Haxe API - platform-specific APIs - libraries - frameworks
  • 9. Haxe Standard Library - general classes - system (requires platform compilation) - target specific APIs (cpp, cs, flash, php etc.)
  • 10. Haxelib - library manager - CLI tool - browse and download libraries: http://lib.haxe.org/
  • 11. Haxe and multiple platforms Going cross-platform! Let’s dive right into it. first, a bit of context...
  • 13. Targets and Use Cases Name Kind Static typed Sys Use Cases Flash byte code Yes No Games, Mobile Neko byte code No Yes Web, CLI ActionScript 3 source Yes Yes Games, Mobile, API JavaScript source No No Web, Desktop, API PHP source No Yes Web C++ source Yes Yes Games, CLI, Mobile, Desktop Java source Yes Yes CLI, Mobile, Desktop C# source Yes Yes Mobile, Desktop Python source No Yes CLI, Web, Desktop
  • 14. Platform Use Cases We will focus on: - Mobile - Desktop - Web - Games!
  • 15. Library Spotlight: Lime “A foundational Haxe framework for cross-platform native development.” - abstraction layer - compile code to C++, JavaScript etc. Structure - CLI tools - platform-specific process - native layer (C++, Objective-C, Java) - Haxe wrapper
  • 16. OpenFl, NME - provide support for creating cross-platform interfaces - flash-like API (display, events, text, external, net etc.)
  • 18. OpenFl in practice Targets: Desktop: Windows, Mac, Linux Mobile: iOS, Android, BlackBerry Web: Tizen, Emscripten, HTML5 Exposes: OpenGL, Audio, Input Windowing Useful native features
  • 19. Haxe and Mobile Targets: C++, HTML5 Tools: - cross-platform APIs - libraries: StablexUI, HaxeUI For iOS and Android: Basis HTML5 target works with PhoneGap
  • 20. Targeting iOS, Android, BlackBerry Android: - Android SDK/NDK, Apache ANT, Java JDK - supported by lime iOS: - Xcode required - target Flash, publish using AIR BlackBerry: - OpenFl is compatible with BlackBerry Tablet SDK - supported by lime
  • 21. Desktop Targets Targets: C++, HTML5 Tools: Libraries: Waxe (Haxe + wxW) HTML5 targets work with Node-socket - app runtime - based on Chromium and Node.js https://github.com/rogerwang/node-webkit
  • 22. Targeting Windows, Mac, Linux Windows: - Neko (no dependencies) - C++, Visual Studio required Mac: - Neko - C++, requires Xcode Linux: - g++, gcc-multilib required !! Targeting restricted to current platform
  • 23. Haxe on the Web Client targets: - JavaScript, ActionScript 3 Server targets: - PHP, Node, Neko
  • 24. Haxe Web - clients Haxe and jQuery: - Haxe js.jQuery API - jQueryExternForHaxe (library) - more recent jQuery version - https://github.com/andyli/jQueryExternForHaxe
  • 25. jQuery Example $(document).ready(function(){ $("#myDiv").hide(); }); import JQuery; class Main { static public function main():Void { new JQuery(function():Void { new JQuery("#myDiv").hide(); }); } }
  • 26. Haxe Web - servers Haxe JS Kit https://github.com/clemos/haxe-js-kit includes Node.js - NPM libraries: Mongoose, Connect.js, Express.js, Socket.io, Passport.js, Atom-shell Haxenode - Node.js port for Haxe http://haxenode.herokuapp.com/
  • 27. Haxenode Example (node) Node.js: var http = require('http'); var server = http.createServer( function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn'); } ); server.listen(1337, "127.0.0.1"); console.log('Server running at http://127.0.0.1:1337/');
  • 28. Haxenode Example (haxe) import js.Node; class Haxenode { public static function main() { var server = Node.http.createServer(function(req:NodeHttpServerReq, res: NodeHttpServerResp) { res.setHeader("Content-Type","text/plain"); res.writeHead(200); res.end('Hello Worldn'); } ); server.listen(1337,"localhost"); trace('Server running at http://127.0.0.1:1337/'); } }
  • 29. And last but not least, Games! Libraries: Frameworks: HaxeFlixel, awe6, HaxePunk
  • 30. A close look at HaxePunk
  • 31. More information haxe.org openfl.org haxepunk.com
  • 32. Thank you very much !