• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Typescript for grails
 

Typescript for grails

on

  • 605 views

 

Statistics

Views

Total Views
605
Views on SlideShare
561
Embed Views
44

Actions

Likes
0
Downloads
2
Comments
0

1 Embed 44

http://www.scoop.it 44

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Typescript for grails Typescript for grails Presentation Transcript

    • TypeScript&&Grails
    • RailWayJSExpressTower.jsDerbyMeteorSocket IOGeddy.jsFlatiron.jsLocomotiveSocketStream
    • 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
    • TypeScript has
    • ClearJSfunction Greeter(greeting) {this.greeting = greeting;}Greeter.prototype.greet = function () {return "Hello, " + this.greeting;};var greeter = new Greeter("world");
    • Typesfunction Greeter(greeting: string) {this.greeting = greeting;}var greeter = new Greeter("world");
    • Typesfunction Greeter(greeting: string) {this.greeting = greeting;}var greeter = new Greeter("world"); // okvar bad = new Greeter(5); // bad
    • MoreTypes✤ Numbers✤ Boolean✤ Null✤ Undefined✤ Object✤ Void✤ Any
    • Classesclass Greeter {greeting: string;constructor(message: string) {this.greeting = message;}greet() {return "Hello, " + this.greeting;}}var greeter = new Greeter("world");
    • 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();
    • Modulesmodule Sayings {export class Greeter {greeting: string;constructor(message: string) {this.greeting = message;}greet() {return "Hello, " + this.greeting;}}}var greeter = new Sayings.Greeter("world");
    • Interface
    • 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
    • InstallNode.jsonMacif (homebrew) {brew upgradebrew install nodenode -v} else {https://github.com/mxcl/homebrew/wiki/installation}
    • InstallNode.jsonWindowshttp://nodejs.org/#download
    • 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
    • InstallTypeScript##Ubuntu && ##Mac && ##Win$ npm install -g typescript$ ts -v
    • IDE
    • Grailsintegration✤ Manual with console ($ ts path/to/your/ts/file)✤ IDE compilation✤ TypeScript Resource plugin
    • Resourceplugin
    • Questions???
    • Thanks for yourattention!