Projects tagged ‘js2’


[3 total ]

5 Users
 

maashaack is a set of framework, libraries and utilities that have the goal to provide a standard set of tools than can work with any host supporting ActionScript 3.0 * Flash Player 9.0+ * AIR ... [More] 1.0+ * Tamarin 1.0+ our mission statement: Making programming in AS3 better [Less]
Created about 1 year ago.

2 Users

This project is a little extension of the Tamarin project. see: http://www.mozilla.org/projects/tamarin/ The Tamarin shell comes with very few access to the system, File I/O, etc. and the goal ... [More] of redtamarin is to add more low level access as process pipes, sockets, etc. in C/C++ mapped to AS3/ES4 classes. ---- 99% of the C/C++ source code have been written by the Adobe Team, I'm just adding very few code to add very few native functionalities. I had to use a special setup to be able to combine tamarin-central using mercurial with my setup which use subversion, in short don't believe the stats it's not me who wrote all that beautiful C/C++ codes. [Less]
Created about 1 year ago.

0 Users

Features (simple documentation) Installation OO Frustrations using JavascriptFor every Javascript developer that has ever wanted to create a library for his/her project, there comes a time when ... [More] an Object Oriented approach is necessary (or extremely desired). Fortunately, there are a plethora of options to choose from: using prototype (not the framework) and hashes: var MyClass = function () { this.member1 = "member"; }; MyClass.prototype = { method1: function () { alert('method1 called'); } }embedding functions right in the instantiator: function MyClass () { this.member1 = "member1"; function method1 () { alert("method1 called"); } }using jQuery (or any of the js OO frameworks) by passing in hashes: var MyClass = Class.create({ member1: "member1", method1: function(){ alert("method1 called") }, });Unfortunately, these solutions are unnatural as far as Object Oriented languages go. JS2 SolutionJS2 language that is a superset of Javascript and the problem it tries to solve is bringing "natural" OO syntax to Javascript by adding a compilation layer. So in myClass.js2 one could write: class MyClass { var member1 = "member1"; function method1 () { alert("method1 called"); }And after compilation myClass.js (notice the .js extension vs the .js2) would be: var MyClass = function () { }; MyClass.prototype = { member1: "member1", method1: function () { alert("method1 called"); } }One of the nice things about this solution is that it allows us to "calculate" things like mixins and inheritance at compile time rather than runtime. This compilation layer opens the doors for features such as: Inheritance Mixins (Ruby's multiple inheritance solution) getters and setters IoC (Dependency Injection) AOP (Aspect Oriented Programming) foreach currying More Features InspirationHAML, SASS, Ruby, Perl, jQuery, Prototype.js [Less]
Created about 1 month ago.