coffeescriptandnodejs.blogspot.com
Coffeescript, NodeJS and others: Anonymous classes
http://coffeescriptandnodejs.blogspot.com/2012/09/anonymous-classes.html
Coffeescript, NodeJS and others. I must apologise for the long silence. Every time I make a plan of what I want to tell about in some blog, I miss lots of things I could tell but didn't because they are not planned, and do not tell about planned things because do not have an appropriate mood for that. Anyway, I've decided to post here what I want to in every moment, though it will be a mess. Let's take the same example as in the previous post but with anonymous classes:. Class Animal name: undefined @num...
coffeescriptandnodejs.blogspot.com
Coffeescript, NodeJS and others: March 2012
http://coffeescriptandnodejs.blogspot.com/2012_03_01_archive.html
Coffeescript, NodeJS and others. First of all, I want to say several words about classes in CoffeeScript. In fact, any class here is just a map, where keys are field names and values are anything you want - numbers, strings, functions. Here is very simple example:. Class Dog extends Animal voice: () - return woof! Posted by Mariya Davydova. I open this blog to share my experience of programming on CoffeeScript with NodeJS and doing other things. As it is said. The one more funny thing in my project is th...
coffeescriptandnodejs.blogspot.com
Coffeescript, NodeJS and others: Interfaces, nested classes and inheritance
http://coffeescriptandnodejs.blogspot.com/2012/09/interfaces-nested-classes-and.html
Coffeescript, NodeJS and others. Interfaces, nested classes and inheritance. In one of my previous posts I said that interfaces in CoffeeScript can be written as usual classes and extended by other classes (if only you want to write Java-style interface, of course). I was wrong. There are two main problems with Java-style interfaces in CoffeeScript:. Every class in Java is instance of all the interfaces it implements. In CoffeeScript. So, I've tried to solve both of this problems. This method takes any n...
coffeescriptandnodejs.blogspot.com
Coffeescript, NodeJS and others: Just few words
http://coffeescriptandnodejs.blogspot.com/2012/09/just-some-words.html
Coffeescript, NodeJS and others. I just want to tell two things. Firstly, I've create git repository for my examples. You can find them now at http:/ github.com/mariyadavydova/coffeescript nodejs examples. The link is always available above, in list of pages). And secondly, I've changed syntax highlighter. I use SyntaxHighlighter. Hope these innovations make my blog more useful for you! Posted by Mariya Davydova. Subscribe to: Post Comments (Atom). View my complete profile. The Little Book on CoffeeScript.
coffeescriptandnodejs.blogspot.com
Coffeescript, NodeJS and others: Enums
http://coffeescriptandnodejs.blogspot.com/2012/09/enums.html
Coffeescript, NodeJS and others. Enums are the next problem in Java to CoffeeScript conversion. Let's see, how to write a enum in CoffeeScript. The first way is quite simple and obvious. If the only thing that we want from enum is providing a set of values that we can compare with each other, we can write it as follows:. Seasons = {WINTER : 0, SPRING : 1, SUMMER : 2, AUTUMN : 3}. Simple, isn't it? We just declare a new. That contains several properties - our enum constants. Now we can use it:. Java enum ...
coffeescriptandnodejs.blogspot.com
Coffeescript, NodeJS and others: Classes: introduction
http://coffeescriptandnodejs.blogspot.com/2012/03/classes-introduction.html
Coffeescript, NodeJS and others. First of all, I want to say several words about classes in CoffeeScript. In fact, any class here is just a map, where keys are field names and values are anything you want - numbers, strings, functions. Here is very simple example:. Class Dog extends Animal voice: () - return "woof! The number of registered animals is equal to 0 My name is Kuzya, meow! The number of registered animals is equal to 1 My name is Sharik, woof! The number of registered animals is equal to 2.
coffeescriptandnodejs.blogspot.com
Coffeescript, NodeJS and others: September 2012
http://coffeescriptandnodejs.blogspot.com/2012_09_01_archive.html
Coffeescript, NodeJS and others. Interfaces, nested classes and inheritance. In one of my previous posts I said that interfaces in CoffeeScript can be written as usual classes and extended by other classes (if only you want to write Java-style interface, of course). I was wrong. There are two main problems with Java-style interfaces in CoffeeScript:. Every class in Java is instance of all the interfaces it implements. In CoffeeScript. So, Ive tried to solve both of this problems. Posted by Mariya Davydova.
coffeescriptandnodejs.blogspot.com
Coffeescript, NodeJS and others: Why?
http://coffeescriptandnodejs.blogspot.com/2012/03/why.html
Coffeescript, NodeJS and others. I open this blog to share my experience of programming on CoffeeScript with NodeJS and doing other things. As you probably know, CoffeeScript is a little language that compiles into JavaScript. As it is said. As for NodeJS, it is a platform built on Chrome's JavaScript runtime. For easily building fast, scalable network applications. There are tons of blogs, articles and tutorials devoted to both of them. Why do I open a new one? Posted by Mariya Davydova. The Little Book...
coffeescriptandnodejs.blogspot.com
Coffeescript, NodeJS and others: Nested classes
http://coffeescriptandnodejs.blogspot.com/2012/09/nested-classes.html
Coffeescript, NodeJS and others. So, you need somehow tell the nested class instance who created it. I've found two ways of solution. The first one is C# way. You pass outer class instance reference to nested class constructor. This works fine. I do not like this way because you need to modify every constructor in every nested class (CoffeeScript allows you to determine only one constructor for each class, but you can use static methods as constructor; I will tell about this later). Is not a field of.