A (Re)-Introduction to JavaScript

"Why a re-introduction? Because JavaScript has a reasonable claim to being the world's most misunderstood programming language. While often derided as a toy, beneath its deceptive simplicity lie some powerful language features. The last year has seen the launch of a number of high profile JavaScript applications, showing that deeper knowledge of this technology is an important skill for any web developer."

Simon Willison's notes , leading to these slides .

17.4.2006, 15:12

coComment Roundup

Google search results for "cocomment":

  • after 4 days, from virtually zero to 200'000 
  • after a week there are now about 400'000 search results
See the buzz - at Google , at Alexa , and - for the couch potatoes amongst you - on MobuzzTV .


9.2.2006, 11:23


Track your comments

Track your comments throughout the blogosphere and keep the conversations flowing... coComment is out of the bag.

4.2.2006, 23:23

Sketching image queries and reinventing email

A first sneak peek at the things we can expect from System One in 2006: Retrievr lets you find flickr images by drawing rough sketches of them.

" This article is not intended as a proposal for a replacement for email. [...] Nevertheless, in understanding how the move to REST improves email, you will hopefully come to see how moving your own web services to it would improve them ."

In other news... 

Subversion hits 1.3.0 and brings us path-based authorization for svnserve.

In case you've been looking for it: Venkman for Firefox 1.5

And one more puzzle piece for building Mocha heaven: Banteng - leveraging GCJ and Rhino to build cross-platform native applications in Javascript.

3.1.2006, 9:23



ECMAScript - The Switzerland of development environments

Jon Udell points out that with the ongoing debate in programming circles about the pros and cons of static vs dynamic typing and class vs prototype based languages, and with ECMAScript gaining new respect and evolving at a faster pace, perhaps these styles will turn out more complementary than we suspect: a programming language can stay neutral to coding practices.

" When you already know what your types should be, [...], declare them. When you don't, don't. One language, two styles, complementary benefits. Good idea!"

29.12.2005, 13:45


I love E4X

As a reality check of my proposal for skins in Helma 2 , I so far came up with the following prototype. The idea seems to work quite nicely already with current builds of Helma 2. I thought E4X could make implementing these kinds of mocha objects very easy, but I was surprised that it really turned out that way in practice.

function handle_get() {
    // first prototype for the next incarnation of mocha objects
    
    // the render function, providing the magic
    var render = function(view) {
        // loop
        var toLoop = view..*.(@loop.toSource() != '<></>');
        for (var item in toLoop) {
            var dataName = toLoop[item].@loop.toString();
            delete toLoop[item].@loop;
            var data = eval(dataName);
            var stamp = toLoop[item].toString();
            for (var i in data) {
                var stencil = stamp.replace(
                    eval("/%% "+dataName+"\\$\\.(.+) %%/g"),
                    '{ '+dataName+'['+i+'].$1 }'
                );
                stencil = stencil.replace(
                    eval('/"'+dataName+'\\$/g'),
                    '"'+dataName+'['+i+']'
                );
                stencil = stencil.replace(
                    eval('/"%% (.*)\\$'+dataName+'(.*) %%"/g'),
                    '{ $1'+i+'$2 }'
                );
                toLoop.parent().insertChildBefore(
                    toLoop[item],
                    eval(stencil)
                );
            }
            delete toLoop[item].parent().*[toLoop[item].childIndex()];
        }
       
        // lookup
        var toLookup = view..*.(@lookup.toSource() != '<></>');
        for (var item in toLookup) {
            delete toLookup[item].@lookup;
            var lookedup = '('+toLookup[item].children()[0]+')';
            toLookup[item].setChildren(lookedup);
        }
   
        // check
        var toCheck = view..*.(@check.toSource() != '<></>');
        for (var item in toCheck) {
            if (eval(toCheck[item].@check.toString()))
                delete toCheck[item].@check;
            else
                toCheck[item] = '';
        }
        return view;
    }
   
    // an example skin
    var myview = <table border="1">
        <tr check="topics">
            <th lookup="true">Topic Name</th>
            <th lookup="true">Comment Count</th>
        </tr>
        <tr loop="topics" class="%% 'rowcolor'+ ($topics % 2) %%">
            <td>%% topics$.name %%</td>
            <td check="topics$.count == 0" lookup="true">
                No comments yet</td>
            <td check="topics$.count == 1" lookup="true">
                %% topics$.count %% comment</td>
            <td check="topics$.count > 1" lookup="true">
                %% topics$.count %% comments</td>
        </tr>
        <tr check="!topics">
            <td colspan="2" align="center" lookup="true">
                This list is empty</td>
        </tr>
    </table>;
   
    // the example data
    var topics = [
        {name : 'Peter', count : 0},
        {name : 'Wolf', count : 2},
        {name : 'John', count : 1},
        {name : 'Andy', count : 8}
    ];
   
    // rendering the list
    var listtable = render(myview.copy());

    // rendering the empty table
    topics = null;
    var emptytable = render(myview.copy());
   
    // assembling the page
    var page = <html><body>{ listtable }<hr/>{ emptytable }</body></html>;
   
    // writing the page source to the reponse buffer
    res.contentType = "text/html";
    res.write(page.toSource());
}

Resulting in the following output:

(Topic Name) (Comment Count)
Peter (No comments yet)
Wolf (2 comments)
John (1 comment)
Andy (8 comments)

(This list is empty)


  19.12.2005, 10:28

Tutorial D, Industrial D and the relational model

From this interview with Chris Date :

[...] But the trouble with the relational model is, it's never been implemented--at least, not in commercial form, not properly, and certainly not fully. So while it's true that there have been a couple of developments in the marketplace over the past few years that I do quite like, I like them primarily because I see them as attempts to implement pieces of the relational model that should have been implemented years ago but weren't. I refer here to (a) "business rules" and (b) "object/relational DBMSs." I'll take them one at a time.

  • Business rules: Business rule systems are a good idea, but they certainly aren't a new idea. Without going into a lot of detail, business rule systems can be seen as systems that attempt to implement the integrity piece of the relational model (which today's mainstream SQL products still--over 35 years after the model was first described!--so signally fail to do).
  • Object/relational DBMSs: To a first approximation, "object/relational" just means the domains over which relations are defined can be of arbitrary complexity. As a consequence, we can have attributes of relations--or columns of tables, if you prefer--that contain geometric points, or polygons, or X rays, or XML documents, or fingerprints, or arrays, or lists, or relations, or any other kinds of values you can think of. But this idea too was always part of the relational model! The idea that the relational model could handle only rather simple kinds of data (like numbers, and strings, and dates, and times) is a huge misconception, and always was. In fact, the term object/relational, as such, is just a piece of marketing hype ... As far as I'm concerned, an object/relational system done right would simply be a relational system done right, nothing more and nothing less.

[...] The next thing I want to say is that, while the relational model is certainly the foundation for "doing databases right," it's only the foundation. There are various ways we can build on top of the relational model, and various attempts have been made to do such a thing over the past 25 years or so. Here are a couple of examples:

  • Higher-level interfaces: It was never the intention that every user should have to wrestle with the complexities of something like SQL (or even the complexities, such as they are, of the relational algebra). I always rather liked the visual interfaces provided by Query-By-Example and the "visual programming" front-ends to Ingres, for instance. And there are many other attractive front-ends that simplify the business of building applications on top of a relational (or at least SQL) DBMS. 4GLs too can be regarded as a higher-level interface--but I was never very impressed by 4GLs as such, in part because they never seemed to be precisely defined anywhere; the idea might have been OK, but without a formal definition of the semantics of the language some very expensive mistakes can be (and were) made. Natural-language systems are another example; I still have an open mind about these, but I don't think anyone could claim they've been a huge success as yet.
  • Special-purpose applications: I think the right way to view things like OLAP and data mining is as special-purpose applications that run on top of the DBMS. I mean, I don't think these things should be part of the core DBMS (I could be wrong). Either way, however, I do want to complain about the CUBE stuff in SQL, which takes one of the worst aspects of SQL--its support for nulls--and "exploits" it to make it even worse. But that's a particular hobbyhorse of mine ... I think I'd better stop right here.

19.12.2005, 0:01
 


Stop bashing Java

Jürg, making the case for Java beyond J2EE :

"...there were alternatives around since years (e.g. Helma , which is surprisingly similar to Rails in a few fields), and often the people who now blame J2EE for not having been efficient were simply to lazy to really look for alternatives earlier on."

"I think it might be time to stop bashing Java and enjoy the fact that there are actually ways of working with it or any language available in its growing little universe that are enjoyable, not bound to Sun licenses, very flexible, fast and resource-saving."

18.12.2005, 20:16


>>> 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 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
> 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
> More >>>