Typescript: Javascript senza problemi by Andrea Boschin

Preview:

DESCRIPTION

Javascript è un linguaggio che, grazie alla sua flessibilità e disponibilità su tutte le piattaforme, sta sempre più prendendo il sopravvento, guadagnando spazio anche fuori del browser. Chi lo conosce sa che si tratta di un linguaggio completo, che può essere un potente alleato ma anche un temibile nemico. Di recente Microsoft ha presentato Typescript, un nuovo compilatore, che ha l*intento di fornire a Javascript i paradigmi classici della programmazione type-safe tipica dei linguaggi evoluti. Typescript è un superset di Javascript ma viene eseguito come Javascript, ma senza problemi

Citation preview

Typescript: Javascript senza problemi.

Andrea Boschin

adam|factoryandrea@boschin.it

2013

json html5

Typescript: Javascript senza problemi.andrea boschin

Javascript Story

andrea@boschin.it – adam|factory

1995rel. 1.0Netscape 2.0IE 3.0

1998rel. 1.3ECMA 1 e 2.0IE 4.0

2000rel. 1.5ECMA 3.0IE 5.0 (jscript)

2005rel. 1.6ECMA 4.0 (ritirato)

2010rel. 1.8.2ECMA 5.0

????rel. ?ECMA 6.0

blackberry internetexplorer

chromefirefox

iPadnode.js

operaiPhone

Typescript: Javascript senza problemi.andrea boschin andrea@boschin.it – adam|factory

WinRT

azure

windows phonemacintosh

linux android

Javascript Today

Any BrowserAny HostAny OS

Typescript: Javascript senza problemi.andrea boschin andrea@boschin.it – adam|factory

Javascript Development

pro

• potente• estensibile• molte

librerie

contro

• difficile• poco

manutenibile• type unsafe• oop incompleto

poco adatto ad applicazioni reali

Except where otherwise noted, this work is licensed under: http://creativecommon.org/licenses/by-nc-sa/3.0/

Typescript: Javascript senza problemi.andrea boschin

• E' un superset tipizzato di Javascript

• E' Open Source!• il compilatore stesso è scritto in Typescript

andrea@boschin.it – adam|factory

Except where otherwise noted, this work is licensed under: http://creativecommon.org/licenses/by-nc-sa/3.0/

Typescript: Javascript senza problemi.andrea boschin

•starts with javascript•tutto il codice javascript è anche codice typescript

•optional static types, classes and modules•migliora leggibilità e manutenibilità del codice•supporta sviluppo di applicazioni scalabili•tutto il codice sparisce a runtime

•ends with javascript•la compilazione genera Javascript

andrea@boschin.it – adam|factory

Except where otherwise noted, this work is licensed under: http://creativecommon.org/licenses/by-nc-sa/3.0/

blackberry internetexplorer

chromefirefox

iPadnode.js

operaiPhone

Typescript: Javascript senza problemi.andrea boschin

Any Browser!Any Host!Any OS!

andrea@boschin.it – adam|factory

WinRT

azure

windows phonemacintosh

linux android

Except where otherwise noted, this work is licensed under: http://creativecommon.org/licenses/by-nc-sa/3.0/

Typescript: Javascript senza problemi.andrea boschin andrea@boschin.it – adam|factory

•allineato agli standard emergenti•la sintassi è allineata con la proposta di Ecmascript 6.0

•output in Ecmascript 3.0/5.0•è possibile scegliere l'outout mediante switch di compilazione

Except where otherwise noted, this work is licensed under: http://creativecommon.org/licenses/by-nc-sa/3.0/

Typescript: Javascript senza problemi.andrea boschin andrea@boschin.it – adam|factory

ace | amcharts | angularjs | async | backbone | bootbox | bootstrap | box2d | breeze | casperjs | cheerio | chosen | chrome | codemirror | commander | d3 | domo | durandal | easeljs | ember | express | fabricjs | fancybox | filesystem | flexslider | flot | foundation | gamepad | globalize | google | hammerjs | history | i18next | impress | jake | jasmine | jquery | jqueryui | knockout | kolite | linq | marked | modernizr | mousetrap | mustache | node | preloadjs | phonegap | platform | quinit | raphael | requirejs | restify | rxjs | scroller | signalr | sinon | spin | storejs | sugar | swipeview | threejs | teechart | toastr | tween | underscore | unity | urijs | videojs | winjs

può usare qualunque libreria esistente!https://github.com/borisyankov/DefinitelyTyped

Except where otherwise noted, this work is licensed under: http://creativecommon.org/licenses/by-nc-sa/3.0/

DEMO

Except where otherwise noted, this work is licensed under: http://creativecommon.org/licenses/by-nc-sa/3.0/

Typescript: Javascript senza problemi.andrea boschin andrea@boschin.it – adam|factory

•play•http://typescriptlang.org/playground

•download & docs•http://www.typescriptlang.org/

•plugin Visual Studio 2012•http://www.microsoft.com/en-us/download/details.aspx?id=34790

•source code•http://typescript.codeplex.com/

@Typescript: Javascript senza problemi.andrea boschin

Contact me:

Company: adam | factory

UG http://xedotnet.org XeDotNet (Venezia Mestre) email andrea@boschin.ittwitter @aboschinfacebook http://www.facebook.com/thelittlegroveblog http://blog.boschin.itsite http://xamlplayground.org

xbox codeblock68

andrea@boschin.it – adam|factory