See you at Lift'07

Laurent talked to World Radio Geneva about the upcoming Lift conference (February 7-9) :

http://zumbrunn.com/mochazone/wrgfm-lift07.m4a

18.1.2007, 12:11

More on Javascript Inheritance

I changed the syntax of the Mocha Inheritance code a bit, to what I think you'll agree is easier to read:

Function.prototype.inherit = function(fnc) {

    var constr = this;

    var Constructor = function(){

        if (fnc)

            fnc.apply(this, arguments);

        constr.apply(this, arguments);

    };

    Constructor.prototype = new (fnc || this)();

    Constructor.prototype.constructor = fnc || this;

    return Constructor;

 };

Prototype inheritance reduced to the max :-)

15.1.2007, 10:01

Mocha Inheritance

In its current incarnation, Javascript prototype inheritance has some shortcomings. In particular, prototypes do not inherit their parent's constructor and methods in child prototypes can not dynamically access an inherited method they override.

After Hannes' and Jürg's suggestions for improvements to Dean Edwards' Base Class approach to Javascript inheritance, I made an attempt to solve the problem by focusing more intensely on fixing Javascript's prototype inheritance than adding class sugar around it.

What I came up with is this:

name type size
mocha.js application/x-javascript     1311 bytes
mocha.html      text/html 1942 bytes

Mocha Inheritance does its magic in these 20 lines of code:

Function.prototype.inherit = function(inherit) {

    var fnc = inherit ? this : function(){};

    inherit = inherit || this;

    var Constructor = function(){

       inherit.apply(this, arguments);

       fnc.apply(this, arguments);

    };

    Constructor.prototype = new inherit();

    Constructor.prototype.constructor = inherit;

    return Constructor;

 };

 

 Function.prototype.applySuper = function(method,obj,args) {

    var that = this;

    do {

       if (that.prototype[method] && that.prototype[method] != obj[method])

          return that.prototype[method].apply(obj,args);

       that = that.prototype.constructor;

    } while (that != Object);

 };

Creating a new prototype "Mensch" with mocha inheritance from "Animal":

var Mensch = Animal.inherit();

Letting a previously created constructor "Mensch" mocha inherit from "Animal":

Mensch = Mensch.inherit(Animal);

And here an example of a Mensch method "evolve" that overrides what it inherits from Animal, but still manages to do nothing different:

Mensch.prototype.evolve = function(){

   return this.constructor.applySuper('evolve', this, arguments);

 }

With some more syntactic sugar around it, I think this is quite a nice approach.

http://dev.helma.org/wiki/Mocha+Inheritance/

12.1.2007, 13:20

Helma 1.5.3

Helma 1.5.3 makes dynamically loaded code repositories available immediately after the app.addRepository() statement and offers improved logging behavior along with several small bug fixes.

http://helma.org/download/

http://helma.org/download/changelog/1.5.3/

15.11.2006, 19:27

Fresh Rhino on Safari

The 5th edition of David Flanagan 's Javascript - The Definitive Guide is now also available on Safari and I have it on my online bookshelf :-)

I must admit that when I started reading the 5th edition, I quickly started to look forward to the 6th edition, although the 5th edition is well worth getting for anybody that works with Javascript.

The 5th edition seems to do some selective catching up and shies away even from Javascript 1.6 additions that look certain to be part of ECMA-262 version 4. Apparently, David Flanagan drew a carfully drafted line for what he wanted to include in the 5th edition and was thinking ahead to the 6th edition already. That's not a bad thing, of course. The result is a very clean 5th edition.

Too bad E4X ended up getting buried in the Client-Side section. I hope the 6th edition will treat it as an extension to Core Javascript instead. Hopefully, including mentioning it in the Literals section and in chapter 3, even-though it is an optional "standard extension".

One of the things that makes this book so great is the fact that it cleanly separates between the browser/client side and the core language, making it the best companion when working in Rhino based environments on the server-side such as Helma .

Naturally, when working in an environment like Helma, the limitations on using the newest language extensions do not apply, and the 5th edition doesn't quite cater to this niche as well as it could.

So, basically, I hope for a bit more "Rhino" in the 6th edition of the "Rhino book" ;-) ...and maybe even a chapter on existing server-side frameworks.

1.9.2006, 12:38

Truly Hooverphonic!

The belgian group Hooverphonic was clearly the highlight of this years Mont-Soleil Open Air Festival ! I already really liked their last album No More Sweet Music , but seeing them perform live was even more impressive. Unlike many groups these days, which can't match the quality of their recordings outside the studio, Hooverphonic's performance was excellent!

28.8.2006, 15:45

Helma 1.5.2

Hot on the heels of Helma 1.5.1 and in order to clear the slate for Helma/Rhino 1.6, which will bring us E4X support amongst other goodies, Helma 1.5.2 has been released , fixing a potentially annoying error logging issue.

18.8.2006, 18:45

RFC 4329 application-ecmascript

From RFC 4329 - Scripting Media Types ...

Various unregistered media types have been used in an ad-hoc fashion

   to label and exchange programs written in ECMAScript and JavaScript.

   These include:



      +-----------------------------------------------------+

      | text/javascript          | text/ecmascript          |

      | text/javascript1.0       | text/javascript1.1       |

      | text/javascript1.2       | text/javascript1.3       |

      | text/javascript1.4       | text/javascript1.5       |

      | text/jscript             | text/livescript          |

      | text/x-javascript        | text/x-ecmascript        |

      | application/x-javascript | application/x-ecmascript |

      | application/javascript   | application/ecmascript   |

      +-----------------------------------------------------+



   Use of the "text" top-level type for this kind of content is known to

   be problematic.  This document thus defines text/javascript and text/

   ecmascript but marks them as "obsolete".  Use of experimental and

   unregistered media types, as listed in part above, is discouraged.

   The media types,



      * application/javascript

      * application/ecmascript



   which are also defined in this document, are intended for common use

   and should be used instead.



   This document defines equivalent processing requirements for the

   types text/javascript, text/ecmascript, and application/javascript.

   Use of and support for the media type application/ecmascript is

   considerably less widespread than for other media types defined in

   this document.  Using that to its advantage, this document defines

   stricter processing rules for this type to foster more interoperable

   processing.
17.8.2006, 11:03

>>> Helma 1.5.1 ready to download

> Aptana - Eclipse reincarnated as a Javascript IDE
> Building the Conversational Web
> Drosera steps in to debug Safari
> Helma 1.5.0 has been released!
> Helma 1.5 RC2 is ready
> Helma 1.5.0 Release Candidate 1 available for download
> FreeBSD Jails the brand new easy way
> Javascript 2 and the Future of the Web
> Frodo takes on chapter 3
> No Rough Cut :-(
> Welcome to Helma!
> 40th Montreux Jazz Festival
> trackAllComments
> Rails' greatest contribution
> Consensus vs Direct Democracy
> A candidate for CSCSJS or a Mocha Fetchlet
> A (Re)-Introduction to JavaScript
> coComment Roundup
> Track your comments
> Sketching image queries and reinventing email
> ECMAScript - The Switzerland of development environments
> I love E4X
> Tutorial D, Industrial D and the relational model
> Stop bashing Java
> E4X Mocha Objects
> Logging and other antimatters
> Stronger types in Javascript 2
> Javascript Diagnosis & Testing
> Homo Oxymora
> Yeah, why not Javascript?
> Moving beyond Java
> Spidermonkey Javascript 1.5 finally final
> Helma Trivia
> Finding Java Packages
> JSEclipse Javascript plug-in for Eclipse
> Catching up to Continuations
> Mighty and Beastie Licenses
> Tasting the OpenMocha Console
> "Who am I?", asks Helma
> Savety vs Freedom and other recent ramblings
> Mont-Soleil Open Air Lineup
> Rhinola - Mocha reduced to the minimum
> OpenMocha 0.6 available for download
> E4X presentation by Brendan Eich
> What is Mocha?
> Do you remember Gopher?
> The current.tv disappointment
> OpenMocha Project Roadmap
> MochiKit Javascript Library
> Getting your feet wet with OpenMocha
> People flocking to see global warming
> Rails vs Struts vs Mocha
> The JavaScript Manifesto
> OpenMocha is ready for a spin
> The limits of harmonization
> Le Conseil fédéral au Mont-Soleil
> Amiga History Guide
> The people must lead the executive, control the legislature and be the military
> Copyback License
> Looking at FreeBSD 6 and Beyond
> Qualified Minority Veto
> The Doom of Representative Democracy
> Violence in a real democracy
> Concordance and Subsidiarity
> Wrapping Aspects around Mocha Objects?
> Future of Javascript Roadmap
> Baby steps towards Javascript heaven
> Mac OS X spreading like wildfire
> Trois petits filous à Faoug
> Jackrabbit JSR 170
> Rich components for HTML 5
> More Java Harmony
> Mac goes Intel
> Google goes Rumantsch
> Oxymoronic Swiss-EU relations
> Rico and Prototype Javascript libraries
> Paul Klee - An intangible man and artist
> Incrementalism in the Mozilla roadmap
> Mocha multi-threading
> Moving towards OpenMocha
> Google goes Portal
> What Bush doesn't get
> Unique and limited window of opportunity
> Persisting Client-side Errors to your Server
> Dive Into Greasemonkey
> Brown bears knock on Switzerland's door
> The experience to make what people want
> "Just" use HTTP
> Yes, what is gather?
> A Free Song for Every Swiss Citizen
> Java in Harmony
> Jan getting carried away
> Evil Google Web Accelerator?
> JSON.stringify and JSON.parse
> Ajax for Java
> The launching of launchd
> Timeless RSS
> Kupu
> SNIFE goes Victorinox
> AJAX is everywhere
> Papa Ratzi
> How Software Patents Work
> Ten good practices for writing Javascript
> Free-trade accord with japan edges closer
> Mocha at a glance
> Adobe acquires Macromedia
> Safari 1.3
> View complexity is usually higher than model complexity
> Free Trade Neutrality
> SQL for Java Objects
> Security Bypass
> Exactly 1111111111 seconds
> Kurt goes Chopper
> Choosing a Java scripting language
> Spamalot's will get spammed a lot
> The visual Rhino debugger
> The Unix wars
> EU-Council adopts software patent directive
> FreeBSD baby step "1j"
> Never trust a man who can count to 1024 on his fingers
> Visiting the world's smallest city
> Finally some non-MS, non-nonsense SPF news
> Swiss cows banned from eating grass
> Ludivines, the "Green Fairy" of absinthe
> First Look At Solaris 10
> EU Commission Declines Patent Debate Restart
> Alan Kay's wisdom guiding the OpenLaszlo roadmap towards Mocha?
> 1 Kilo
> Re: FreeBSD logo design competition
> Schweizer Sagen
> Europas Eidgenossen
> XMLHttpRequest glory
> Art Nouveau La Chaux-de-Fonds 2005-2006
> The Beastie Silhouette
> The Number One Nightmare
> Safe and Idempotent Methods such as HEAD and TRACE
> Sorry, you have been verizoned.
> Daemons and Pixies and Fairies, Oh My!
> Sentient life forms as MIME-attachments: RFC 1437
> Web Developer Extension for Firefox
> Refactoring until nothing is left
> Brendan, never tired of providing Javascript support
> Catching XP in just 20 Minutes
> Designing the Star User Interface
> Rhino, Mono, IKVM. Or: JavaScript the hard way
> Re: SCO
> Judo
> Convergence on abstraction and on browser-based Console evaluation
> Today found out that inifinite uptimes are still an oxymoron
> New aspects of woven apps
> Original Contribution License (OCL) 1.0
> Unified SPF: a grand unified theory of MARID
> BSD is designed. Linux is grown.
> 5 vor 12 bei 10 vor 10
> Mocha vs Helma?
> Schattenwahrheit: Coup d'etat underway against the Cheney Circle?
> Abschluss Bilaterale II Schweiz-EU
> From Adam Smith to Open Source
> Linux - the desktop for the rest of them
> Big Bang
> Leaky Hop Objects
> Return Path Rewriting (RPR) - Mail Forwarding in the Spam Age
> Microsoft Discloses Huge Number Of Windows Vulnerabilties
> Steuerungsabgabe statt Steuern
> Anno 2003: deployZone
> The war against terror
> The war against terror (continued)
> The relativity of Apple's market share
> Are humans animals?
> Anno 1999: Der Oberhasler
> Anno 1998: crossnet
> Geschwindigkeit vs Umdrehungszahl
> Anno 1997: Xmedia
> "The meaning of life is to improve the quality of all life"
> Anno 1996: CZV
> How do I set a DEFAULT HTML-DOCUMENT?
> Global Screen Design Services



Forum for Direct Democracy

Javascript server-side

Helma Project


Christoph Zumbrunn
2610 Mont-Soleil, Switzerland
+41 329 41 41 41
chris@zumbrunn.com
IRC: zumbrunn on freenode.net
Jabber: chris@zumbrunn.com
Skype: ChrisZumbrunn
Listening to: worldradio.ch
Xing profile



Chris Zumbrunn's Mochazone
> Helma turns 1.6.3
> Helma 1.6.3-rc3 ready for testing
> Helma 1.6.3 Release Candidate 2
> Release Candidate 1 of Helma 1.6.3
> Helma at the 2008 OpenExpo in Zurich
> Large Hadron Collider
> Ecmascript Harmony
> The A-Z of Programming Languages jumps to Javascript
> Fresh Javascript IDE in Ganymede Eclipse release
> Helma at the Linuxwochen in Linz
> Brendan on the state of Javascript evolution
> Is AppleScript done?
> ES4 Draft 1 and ES3.1 Draft 1
> Want ES4 in Helma today?
> SquirrelFish!
> ES4 comes to IE via Screaming Monkey
> Apple's position on ECMAScript 4 proposals
> Helma Meeting Spring 2008
> Attila Szegedi about Rhino, Helma and Server-Side Javascript, and scripting on the JVM in general
> Helma 1.6.2 ready to download
> Larry Lessig's case for creative freedom
> Earthlings - Can you face the truth?
> The Story of Stuff
> A Quick Start to Hello World
> The Overlooked Power of Javascript
> Adobe's position on ES4 features, plus the Flex 3 SDK source code is now available under the MPL
> Solar cell directly splits water for hydrogen
> Asynchronous Beer and Geeking and other opportunities to talk about Helma, Rhino and Javascript on the server-side
> Openmocha and Jhino updated to 0.8
> Even more Server-side Javascript with Jaxer
> e4xd and jhino - javascript server-side soft-coding
> Additional Filename Conventions
> Update to Helma 1.6.1
> Netscape, the browser, to live one more month
> SimpleDB vs CouchDB
> Helma powered AppJet - Takeoff!
> CouchDB for Helma
> Bubble bursting friendship bracelets
> Evolving ES4 as the universal scripting language
> Helmablog and an article in Linux Pro Magazine
> More praise for Helma
> Javascript as Universal Scripting Language
> So, what's up with World Radio Switzerland?
> Helma Conspiracy Theory
> JSONPath and CouchDB
> Hold the whole program in your head, and you can manipulate it at will
> Keeping track of localhost:8080
> Rhino 1.6R6 with E4X fix and patches for Helma
> Helma 1.6 is ready!
> Junction brings Rhino on Rails to Helma
> Javascript for Java programmers
> The server-side advantage
> John Resig on Javascript as a language
> Rhino on Rails
> Release Candidate 3 of Helma 1.6.0
> ECMAScript 4 Reference Implementation
> Antville Summer Of Code 2007
> Helma 1.6.0-rc2
> Using H2 with Helma
> Helma warped around existing db schemas
> Rocket the Super Rabbit
> Bootstrap is out of the bag
> The last mention of Microsoft
> Helma 1.6.0-rc1
> Introducing Planet Helma
> Helma ante portas
> Fixing Javascript inheritance
> Shutdown-Day the Helma way
> Upcoming Helma 1.6, new reference docs and IRC channel
> Making Higgs where the Web was born
> Jala for Helma
> See you at Lift'07
> More on Javascript Inheritance
> Mocha Inheritance
> Helma 1.5.3
> Fresh Rhino on Safari
> Truly Hooverphonic!
> Helma 1.5.2
> RFC 4329 application-ecmascript
> More >>>