SlideShare uma empresa Scribd logo
1 de 26
developers




PIERGIORGIO NIERO & LUCA MEZZALIRA
@matterhaxe
PG   MEZZA
Flash, Javascript o ...
Haxe targets
• Desktop App (C++, Neko, AIR...)
• Web (JS, Flash, HTML)
• Server Side (PHP, NodeJS, C#, Java...)
• iOS
• Android
• Playbook
Roadmap Haxe
• Attualmente è scaricabile Haxe 2.09
                   haxe 2.09 compilazione su ser ver +
                   interactive debugging JS su Chrome e
                   Firefox grazie al source mapping +
                   haxe --dead-code-

haxe 3:



• Estate 2012 Haxe 3


• Si sta già lavorando ad Haxe 4 con la
  rivoluzione di avere 1 unico linguaggio di
  programmazione per ogni target
Non è tutto oro quel che luccica
• Implementazione Editor

• DEBUGGER (!!!!!)

• Integrazione “Adobbiana” verso i
  programmi grafici e non solo

• DOCUMENTAZIONE (!!!!!)
Differenze Haxe vs AS3
package org.matterhaxe;                            package org.matterhaxe
                                                   {
import nme.display.Sprite;                         	    import flash.display.Sprite;	
import nme.Lib;
                                                   	    [SWF]
class MyClass extends Sprite                       	    public class MyClass extends Sprite
{                                                  	    {
	    private var myVar1: Bool;                     	    	     private var myVar1:Boolean
	    private var myVar2:Int;                       	    	     protected var myVar2:int
	    private var myVar3:Float;;                    	    	     internal var myVar3:Number

	    inline public static var CIAO:String = "CIAO"; 	   	    public static const CIAO:String = "CIAO";
	
       public function new()                       	    	    public function MyClass()
	    {                                             	    	    {
	    	    super();                                 	    	    	    // constructor
	    }                                             	    	    }
	    function myMethod():Void                      	    	    private function myMethod1():void
	    {                                             	    	    {
	    	    trace(CIAO);                             	    	    	    trace(CIAO)
	    }                                             	    	    }
	    // static main function                       	    }
	    public static function main()                 }
	    {
	    	    Lib.current.addChild( new MyClass() );
	    }
}
Package & Classes
 package org.matterhaxe;

import nme.display.Sprite;
import nme.display.*;   <<<< NOOO!!!!

class MyClass extends Sprite, implements
IMyInterface
Access Modifier & Keywords
 - solo private e public

- default è private

- non c'è const, c'è solo var

- c'è inline per variabili e metodi
inline static var CICCIO:String = "Ciao";
Basic Types
 - Void, Int, Bool, Float

- Dynamic
	 var ciccio:   Dynamic = "Ciccio";
	 ciccio = 4;
	 ciccio = new Ciccio();


- Solo lettera maiuscola!!!
Constructor & Main
 Costruttore di classe
public function new() {}



static public function main():Void {
	 Lib.current.addChild(new MyClass);
}
Type Parameters
         (generics & beyond)
  AS3:
- Vector.<T>

Haxe:
- Built in: Array<T>, Vector<T>, Hash<T>
- Custom: MyClass<T>
- Type Constraints!!! MyClass<T: (ClassA,
InterfaceB)>
Typedefs
  typedef MyType {
	 var field1:Int;
	 var field2:Bool;
}
var pippo: MyType = { 4, true };

typedef Ugo = MyVeryVeryLongNamedClass;
var ugo:Ugo = new Ugo();
Iterators
  for( i in 0...100){
	 trace(i);
}

for( i in myStringsArray){
	 trace(i);
}
custom: implementare i metodi del tipo
"Iterator" nella classe
       function hasNext() : Bool;
     function next() : T;
Function Pointers
 AS3
function myFunction (a:int,b:Number):void{}
var myVar:Function = myFunction;


Haxe
function myFunction(a:Int,b:Float):Void{};
var myVar:Int->Float->Void = myFunction;
Cast
 Tom Cruise        -
    Maverick
Kelly McGillis   -     Charlie
Val Kilmer       -     Iceman
Anthony Edwards -      Goose
Tom Skerrit      -     Viper
Michael Ironside -     Jester
John Stockwell   -     Cougar
Barry Tubb       -     Wolfman
Cast
 - safe casting:
var car:Car = cast(vehicle,Car);
- unsafe casting:
var car:Car = cast vehicle;
- Std casting:
var toString = Std.string(10);
var toNumber = Std.parseFloat("10");
var toInteger = Std.int(10.1);
NME is a free, open-source framework that
enables development for iOS, Android, webOS,
BlackBerry, Windows, Mac, Linux and Flash
Player from a single codebase
file nmml di configurazione
<?xml version="1.0" encoding="utf-8"?>
<project>

	     <app title="HaXeList" main="HaXeList"
	     	    package="" version="1.0.0"
	     	    company="NME" ></app>

	      <window width="320" height="480" fps="36" orientation="portrait" resizable="false"
if="target_flash"/>
	      <window width="320" height="480" fps="100" orientation="portrait" resizable="false"
if="unless_flash"/>

	     <set name="BUILD_DIR" value="Export" ></set>

	     <classpath name="src"/>
	     <haxelib name="nme"/>

	     <assets path="Assets" rename="assets" include="*"/>
	     <library path="assets/lib.swf" rename="assets/lib.swf" />

	     <ndll   name="std" ></ndll>
	     <ndll   name="regexp" ></ndll>
	     <ndll   name="zlib" ></ndll>
	     <ndll   name="nme" haxelib="nme" ></ndll>

</project>
come compilare progetti NME
  nme test project.nmml ios
nme test project.nmml ios -simulator
nme test project.nmml android
nme test project.nmml webos
nme test project.nmml blackberry
nme test project.nmml windows
nme test project.nmml mac
nme test project.nmml linux
nme test project.nmml linux -64
nme test project.nmml flash
nme test project.nmml html5
How to install HAXE
IDE & Plugins
• FDT 5
• Textmate
• Sublime Text 2
• MonoDevelop
• FlashDevelop 4
• Intellij Idea

• altri: http://haxe.org/com/ide
Haxe Books
Online references
• haxe.org
• haxenme.org
• haxejs.org
• nekovm.org
• weblob.net
• ncannasse.fr
• haxelearning.wikispaces.com
[Teo]     [eh...]



            CU & A
w: matterhaxe.wordpress.com
t: @matterhaxe
e: matterhaxe@gmail.com

Mais conteúdo relacionado

Mais procurados

Unleash your inner console cowboy
Unleash your inner console cowboyUnleash your inner console cowboy
Unleash your inner console cowboyKenneth Geisshirt
 
Writing native bindings to node.js in C++
Writing native bindings to node.js in C++Writing native bindings to node.js in C++
Writing native bindings to node.js in C++nsm.nikhil
 
Type script, for dummies
Type script, for dummiesType script, for dummies
Type script, for dummiessantiagoaguiar
 
High Performance XQuery Processing in PHP with Zorba by Vikram Vaswani
High Performance XQuery Processing in PHP with Zorba by Vikram VaswaniHigh Performance XQuery Processing in PHP with Zorba by Vikram Vaswani
High Performance XQuery Processing in PHP with Zorba by Vikram Vaswanivvaswani
 
Vue.js + Django - configuración para desarrollo con webpack y HMR
Vue.js + Django - configuración para desarrollo con webpack y HMRVue.js + Django - configuración para desarrollo con webpack y HMR
Vue.js + Django - configuración para desarrollo con webpack y HMRJavier Abadía
 
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...Mail.ru Group
 
20141011 mastering mysqlnd
20141011 mastering mysqlnd20141011 mastering mysqlnd
20141011 mastering mysqlnddo_aki
 
JavaScript Everywhere! Creating a 100% JavaScript web stack
JavaScript Everywhere! Creating a 100% JavaScript web stackJavaScript Everywhere! Creating a 100% JavaScript web stack
JavaScript Everywhere! Creating a 100% JavaScript web stackTom Croucher
 
The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88Mahmoud Samir Fayed
 
Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8XSolve
 
Objective-C for Java Developers
Objective-C for Java DevelopersObjective-C for Java Developers
Objective-C for Java DevelopersBob McCune
 
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, Puppet
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, PuppetPuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, Puppet
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, PuppetPuppet
 
Virtual machine and javascript engine
Virtual machine and javascript engineVirtual machine and javascript engine
Virtual machine and javascript engineDuoyi Wu
 
PHP Language Trivia
PHP Language TriviaPHP Language Trivia
PHP Language TriviaNikita Popov
 

Mais procurados (20)

Hello scala
Hello scalaHello scala
Hello scala
 
Unleash your inner console cowboy
Unleash your inner console cowboyUnleash your inner console cowboy
Unleash your inner console cowboy
 
Rust ⇋ JavaScript
Rust ⇋ JavaScriptRust ⇋ JavaScript
Rust ⇋ JavaScript
 
Writing native bindings to node.js in C++
Writing native bindings to node.js in C++Writing native bindings to node.js in C++
Writing native bindings to node.js in C++
 
Type script, for dummies
Type script, for dummiesType script, for dummies
Type script, for dummies
 
High Performance XQuery Processing in PHP with Zorba by Vikram Vaswani
High Performance XQuery Processing in PHP with Zorba by Vikram VaswaniHigh Performance XQuery Processing in PHP with Zorba by Vikram Vaswani
High Performance XQuery Processing in PHP with Zorba by Vikram Vaswani
 
Vue.js + Django - configuración para desarrollo con webpack y HMR
Vue.js + Django - configuración para desarrollo con webpack y HMRVue.js + Django - configuración para desarrollo con webpack y HMR
Vue.js + Django - configuración para desarrollo con webpack y HMR
 
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
 
20141011 mastering mysqlnd
20141011 mastering mysqlnd20141011 mastering mysqlnd
20141011 mastering mysqlnd
 
JavaScript Everywhere! Creating a 100% JavaScript web stack
JavaScript Everywhere! Creating a 100% JavaScript web stackJavaScript Everywhere! Creating a 100% JavaScript web stack
JavaScript Everywhere! Creating a 100% JavaScript web stack
 
The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88
 
JavaScript ES6
JavaScript ES6JavaScript ES6
JavaScript ES6
 
Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8
 
Objective-C for Java Developers
Objective-C for Java DevelopersObjective-C for Java Developers
Objective-C for Java Developers
 
YUI Tidbits
YUI TidbitsYUI Tidbits
YUI Tidbits
 
Ricky Bobby's World
Ricky Bobby's WorldRicky Bobby's World
Ricky Bobby's World
 
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, Puppet
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, PuppetPuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, Puppet
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, Puppet
 
Virtual machine and javascript engine
Virtual machine and javascript engineVirtual machine and javascript engine
Virtual machine and javascript engine
 
V8
V8V8
V8
 
PHP Language Trivia
PHP Language TriviaPHP Language Trivia
PHP Language Trivia
 

Semelhante a Haxe for Flash Platform developer

IstSec'14 - İbrahim BALİÇ - Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ -  Automated Malware AnalysisIstSec'14 - İbrahim BALİÇ -  Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ - Automated Malware AnalysisBGA Cyber Security
 
A la découverte de TypeScript
A la découverte de TypeScriptA la découverte de TypeScript
A la découverte de TypeScriptDenis Voituron
 
Automated malware analysis
Automated malware analysisAutomated malware analysis
Automated malware analysisIbrahim Baliç
 
Refresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End StoryRefresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End StoryRachael L Moore
 
Automatically Assessing Code Understandability: How Far Are We?
Automatically Assessing Code Understandability: How Far Are We?Automatically Assessing Code Understandability: How Far Are We?
Automatically Assessing Code Understandability: How Far Are We?sscalabrino
 
Front-end Modular & Autmomated Development
Front-end Modular & Autmomated Development Front-end Modular & Autmomated Development
Front-end Modular & Autmomated Development Joseph Chiang
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Tsuyoshi Yamamoto
 
Catch a spider monkey
Catch a spider monkeyCatch a spider monkey
Catch a spider monkeyChengHui Weng
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)Theo Jungeblut
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Clean Code for East Bay .NET User Group
Clean Code for East Bay .NET User GroupClean Code for East Bay .NET User Group
Clean Code for East Bay .NET User GroupTheo Jungeblut
 
What Makes Objective C Dynamic?
What Makes Objective C Dynamic?What Makes Objective C Dynamic?
What Makes Objective C Dynamic?Kyle Oba
 
HTML5って必要?
HTML5って必要?HTML5って必要?
HTML5って必要?GCS2013
 

Semelhante a Haxe for Flash Platform developer (20)

IstSec'14 - İbrahim BALİÇ - Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ -  Automated Malware AnalysisIstSec'14 - İbrahim BALİÇ -  Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ - Automated Malware Analysis
 
A la découverte de TypeScript
A la découverte de TypeScriptA la découverte de TypeScript
A la découverte de TypeScript
 
20151224-games
20151224-games20151224-games
20151224-games
 
Automated malware analysis
Automated malware analysisAutomated malware analysis
Automated malware analysis
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Refresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End StoryRefresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End Story
 
Dynamic virtual evironments
Dynamic virtual evironmentsDynamic virtual evironments
Dynamic virtual evironments
 
Automatically Assessing Code Understandability: How Far Are We?
Automatically Assessing Code Understandability: How Far Are We?Automatically Assessing Code Understandability: How Far Are We?
Automatically Assessing Code Understandability: How Far Are We?
 
Front-end Modular & Autmomated Development
Front-end Modular & Autmomated Development Front-end Modular & Autmomated Development
Front-end Modular & Autmomated Development
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
 
Catch a spider monkey
Catch a spider monkeyCatch a spider monkey
Catch a spider monkey
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)
 
W-JAX 09 - Lift
W-JAX 09 - LiftW-JAX 09 - Lift
W-JAX 09 - Lift
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Clean Code for East Bay .NET User Group
Clean Code for East Bay .NET User GroupClean Code for East Bay .NET User Group
Clean Code for East Bay .NET User Group
 
XAML/C# to HTML/JS
XAML/C# to HTML/JSXAML/C# to HTML/JS
XAML/C# to HTML/JS
 
What Makes Objective C Dynamic?
What Makes Objective C Dynamic?What Makes Objective C Dynamic?
What Makes Objective C Dynamic?
 
HTML5って必要?
HTML5って必要?HTML5って必要?
HTML5って必要?
 
Swift core
Swift coreSwift core
Swift core
 

Último

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Último (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Haxe for Flash Platform developer

  • 1. developers PIERGIORGIO NIERO & LUCA MEZZALIRA @matterhaxe
  • 2. PG MEZZA
  • 4.
  • 5. Haxe targets • Desktop App (C++, Neko, AIR...) • Web (JS, Flash, HTML) • Server Side (PHP, NodeJS, C#, Java...) • iOS • Android • Playbook
  • 6. Roadmap Haxe • Attualmente è scaricabile Haxe 2.09 haxe 2.09 compilazione su ser ver + interactive debugging JS su Chrome e Firefox grazie al source mapping + haxe --dead-code- haxe 3: • Estate 2012 Haxe 3 • Si sta già lavorando ad Haxe 4 con la rivoluzione di avere 1 unico linguaggio di programmazione per ogni target
  • 7. Non è tutto oro quel che luccica • Implementazione Editor • DEBUGGER (!!!!!) • Integrazione “Adobbiana” verso i programmi grafici e non solo • DOCUMENTAZIONE (!!!!!)
  • 8. Differenze Haxe vs AS3 package org.matterhaxe; package org.matterhaxe { import nme.display.Sprite; import flash.display.Sprite; import nme.Lib; [SWF] class MyClass extends Sprite public class MyClass extends Sprite { { private var myVar1: Bool; private var myVar1:Boolean private var myVar2:Int; protected var myVar2:int private var myVar3:Float;; internal var myVar3:Number inline public static var CIAO:String = "CIAO"; public static const CIAO:String = "CIAO"; public function new() public function MyClass() { { super(); // constructor } } function myMethod():Void private function myMethod1():void { { trace(CIAO); trace(CIAO) } } // static main function } public static function main() } { Lib.current.addChild( new MyClass() ); } }
  • 9. Package & Classes package org.matterhaxe; import nme.display.Sprite; import nme.display.*; <<<< NOOO!!!! class MyClass extends Sprite, implements IMyInterface
  • 10. Access Modifier & Keywords - solo private e public - default è private - non c'è const, c'è solo var - c'è inline per variabili e metodi inline static var CICCIO:String = "Ciao";
  • 11. Basic Types - Void, Int, Bool, Float - Dynamic var ciccio: Dynamic = "Ciccio"; ciccio = 4; ciccio = new Ciccio(); - Solo lettera maiuscola!!!
  • 12. Constructor & Main Costruttore di classe public function new() {} static public function main():Void { Lib.current.addChild(new MyClass); }
  • 13. Type Parameters (generics & beyond) AS3: - Vector.<T> Haxe: - Built in: Array<T>, Vector<T>, Hash<T> - Custom: MyClass<T> - Type Constraints!!! MyClass<T: (ClassA, InterfaceB)>
  • 14. Typedefs typedef MyType { var field1:Int; var field2:Bool; } var pippo: MyType = { 4, true }; typedef Ugo = MyVeryVeryLongNamedClass; var ugo:Ugo = new Ugo();
  • 15. Iterators for( i in 0...100){ trace(i); } for( i in myStringsArray){ trace(i); } custom: implementare i metodi del tipo "Iterator" nella classe       function hasNext() : Bool;     function next() : T;
  • 16. Function Pointers AS3 function myFunction (a:int,b:Number):void{} var myVar:Function = myFunction; Haxe function myFunction(a:Int,b:Float):Void{}; var myVar:Int->Float->Void = myFunction;
  • 17. Cast Tom Cruise - Maverick Kelly McGillis - Charlie Val Kilmer - Iceman Anthony Edwards - Goose Tom Skerrit - Viper Michael Ironside - Jester John Stockwell - Cougar Barry Tubb - Wolfman
  • 18. Cast - safe casting: var car:Car = cast(vehicle,Car); - unsafe casting: var car:Car = cast vehicle; - Std casting: var toString = Std.string(10); var toNumber = Std.parseFloat("10"); var toInteger = Std.int(10.1);
  • 19. NME is a free, open-source framework that enables development for iOS, Android, webOS, BlackBerry, Windows, Mac, Linux and Flash Player from a single codebase
  • 20. file nmml di configurazione <?xml version="1.0" encoding="utf-8"?> <project> <app title="HaXeList" main="HaXeList" package="" version="1.0.0" company="NME" ></app> <window width="320" height="480" fps="36" orientation="portrait" resizable="false" if="target_flash"/> <window width="320" height="480" fps="100" orientation="portrait" resizable="false" if="unless_flash"/> <set name="BUILD_DIR" value="Export" ></set> <classpath name="src"/> <haxelib name="nme"/> <assets path="Assets" rename="assets" include="*"/> <library path="assets/lib.swf" rename="assets/lib.swf" /> <ndll name="std" ></ndll> <ndll name="regexp" ></ndll> <ndll name="zlib" ></ndll> <ndll name="nme" haxelib="nme" ></ndll> </project>
  • 21. come compilare progetti NME nme test project.nmml ios nme test project.nmml ios -simulator nme test project.nmml android nme test project.nmml webos nme test project.nmml blackberry nme test project.nmml windows nme test project.nmml mac nme test project.nmml linux nme test project.nmml linux -64 nme test project.nmml flash nme test project.nmml html5
  • 23. IDE & Plugins • FDT 5 • Textmate • Sublime Text 2 • MonoDevelop • FlashDevelop 4 • Intellij Idea • altri: http://haxe.org/com/ide
  • 25. Online references • haxe.org • haxenme.org • haxejs.org • nekovm.org • weblob.net • ncannasse.fr • haxelearning.wikispaces.com
  • 26. [Teo] [eh...] CU & A w: matterhaxe.wordpress.com t: @matterhaxe e: matterhaxe@gmail.com

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n