SlideShare una empresa de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Similar 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
 

Similar 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

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Último (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

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 del 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