Your SlideShare is downloading. ×
Typescript for grails
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Typescript for grails

326
views

Published on

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
326
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. TypeScript&&Grails
  • 2. RailWayJSExpressTower.jsDerbyMeteorSocket IOGeddy.jsFlatiron.jsLocomotiveSocketStream
  • 3. TypeScript is✤ Language for application-scale JavaScript development✤ Typed superset of JavaScript that compiles to plain JavaScript✤ Any browser. Any host. Any OS. Open Source.✤ Strong Tools for Large Applications✤ Scalable✤ ES6 based
  • 4. TypeScript has
  • 5. ClearJSfunction Greeter(greeting) {this.greeting = greeting;}Greeter.prototype.greet = function () {return "Hello, " + this.greeting;};var greeter = new Greeter("world");
  • 6. Typesfunction Greeter(greeting: string) {this.greeting = greeting;}var greeter = new Greeter("world");
  • 7. Typesfunction Greeter(greeting: string) {this.greeting = greeting;}var greeter = new Greeter("world"); // okvar bad = new Greeter(5); // bad
  • 8. MoreTypes✤ Numbers✤ Boolean✤ Null✤ Undefined✤ Object✤ Void✤ Any
  • 9. Classesclass Greeter {greeting: string;constructor(message: string) {this.greeting = message;}greet() {return "Hello, " + this.greeting;}}var greeter = new Greeter("world");
  • 10. Inheritanceclass Animal {constructor(public name: string) { }move(meters: number) {alert(this.name + " moved " + meters + "m.");}}class Snake extends Animal {constructor(name: string) { super(name); }move() {alert("Slithering...");super.move(5);}}var sam = new Snake("Sammy the Python");sam.move();
  • 11. Modulesmodule Sayings {export class Greeter {greeting: string;constructor(message: string) {this.greeting = message;}greet() {return "Hello, " + this.greeting;}}}var greeter = new Sayings.Greeter("world");
  • 12. Interface
  • 13. InstallNode.jsonUbuntu##Install the dependencies:$ sudo apt-get install g++ curl libssl-dev apache2-utils$ sudo apt-get install git-core##Run the following commands:$ git clone git://github.com/ry/node.git$ cd node$ ./configure$ make && sudo make install##Check node:$ node -v
  • 14. InstallNode.jsonMacif (homebrew) {brew upgradebrew install nodenode -v} else {https://github.com/mxcl/homebrew/wiki/installation}
  • 15. InstallNode.jsonWindowshttp://nodejs.org/#download
  • 16. InstallNPM##Ubuntu:$ curl http://npmjs.org/install.sh | sh##Mac$ brew upgrade$ brew install npm##Windows:$ http://npmjs.org/doc/README.html#Installing-on-Windows-Experimental
  • 17. InstallTypeScript##Ubuntu && ##Mac && ##Win$ npm install -g typescript$ ts -v
  • 18. IDE
  • 19. Grailsintegration✤ Manual with console ($ ts path/to/your/ts/file)✤ IDE compilation✤ TypeScript Resource plugin
  • 20. Resourceplugin
  • 21. Questions???
  • 22. Thanks for yourattention!