Non-static method Cgn_Session::getSessionObj() should not be called statically, assuming $this from incompatible context


Non-static method Cgn_SystemRequest::getCurrentRequest() should not be called statically, assuming $this from incompatible context


Non-static method Cgn_SystemRequest::getUser() should not be called statically, assuming $this from incompatible context


Non-static method Cgn_ErrorStack::count() should not be called statically, assuming $this from incompatible context

News roundup: JavaScript under attack!

Listen to this week’s podcast
(Podcast edit: I mistakenly mention Respond.js, which is actually a media query polyfill – I’m actually talking about Responsive images)

Google Dart

By far the biggest news of the week isn’t JavaScript, but rather a language called Dart (formerly Dash?), which certain factions within Google hope will replace JavaScript, according to a leaked internal email. Never mind that none of the language has yet been revealed, but the political posturing is already happening, and battle-lines are being drawn.

It doesn’t help that the internal email obviously hasn’t been polished by Google’s PR, and offers up some seemingly damning language:

What if other browsers don’t follow us with Dash?

Lars has promised to “sweet talk” the other browser vendors and, while we
are all eager to see this, we recognize this is a very difficult road.

JavaScript heavyweights from all over have been weighing into the controversy, including Brendan Eich himself, who’s been quite active on Hacker News. Google’s own Alex Russell has also blogged about the issue and has distanced himself from the leaked comments, while also emphasizing that “…it was a draft and doesn’t reflect either the reality of what has happened in the meantime or even the decisions that were taken as a result.”

It seems this is just the start of the controversy. We’ll see more about Dart unveiled at GOTO next month.

I’ll leave you with Stoyan Stefanov’s thoughts on the matter. ;)

More info:
JSPerf, of all places, has a good summary of the situation.

Dash-ing and Dart-ing ahead of JavaScript (FunctionSource)

Google’s post-JavaScript Web plan raises hackles (CNET)

Critics call foul as Google takes aim at JavaScript with Dart (Ars Technica)

Dash/Dart (Peter van der Zee)

Responsive design on Boston Globe’s website

Responsive design has been gaining more momentum recently, and the responsive design philosophy has launched on the revamped Boston Globe website. It’s mostly CSS media queries at work, of course, but there is a bit of JavaScript magic here as well, with Modernizr and Responsive images.

A lazy approach to responsive design would be to serve the same images to all clients, regardless of the capabilities of their screens. These images would be downscaled and would display nicely, but there would be a whole lot of wasted bandwidth. Responsive images have been included here to make sure that only the appropriate images get delivered, instead of wasting bandwidth. A small image is delivered by default, then where necessary a larger version of the image gets delivered with a bit of JavaScript trickery.

There’s also a concern here about really old phones, such as old Motorola V3s (aka RAZRs) and their ilk. Though these phones are steadily being replaced, around the world there’s still a proliferation of non-smart phones (dumb phones?) with old browsers. So what happens when we send a nice brand new website like the Boston Globe to those phones? Send too much data and the phone will crash or won’t render the page. The pageweight limit is a very real concern for those phones. So unfortunately a server-side approach, meaning user-agent sniffing, still has to be taken for those old phones. If those devices still make up a significant share of traffic (they do, speaking globally), then a solution still needs to be put in place for them. We’re in a transition: if we want to send content to everyone, we can’t do everything on the client side (yet).

More info:
Introducing the new responsive-designed BostonGlobe.com

How the Boston Globe Pulled Off HTML5 Responsive Design


SugarSkull is a simple client-side router for single page apps that intends to replace backbone.js routes and aims to be lightweight and simple, and only sets out to be a client-side router and nothing more. It primarily uses a hash to keep track of page state on the client. Not even a hash-bang!

So what’s the deal? But what about hash-bang and the HTML5 history API? The author emphasizes that SugarSkull doesn’t aim to make these things work, as they require server-side routing. The aim of this library is only client-side routing, to the detriment of SEO and otherwise (a clear word of caution there, then). But if that’s what you’re looking for, then SugarSkull might be for you. It has no dependencies and, as it has to be said, it’s not a jQuery plugin.


Touchy Boilerplate is a new mobile app library aimed at iOS and Android devices

stream.js implements a new data structure: streams, which can have an infinite number of elements and are similar to arrays and linked lists

Winston is an asynchronous logging library for node.js

move.js is another helper library for CSS3 animations

concrete is a simple continuous integration server written with NodeJS and CoffeeScript

ligament.js is a tongue-in-cheek jab at JavaScript MVC frameworks by Yehuda Katz. Here’s the entire library: “M = {}, V = {}, C = {};”. The moral of the story, according to Yehuda: folks should start getting used to using Object.create. And no, there’s no jQuery plugin or support for vapor.js ;) .


jQuery 1.6.4

Node v0.5.7 (unstable)


A humorous history of JavaScript

Asynchronous Programming in JavaScript with “Promises”

WebKit Page Cache II – The unload Event – quite an old article, but useful

Creating a Javascript Templating Engine

MVC Todo (by Addy Osmani) uses the familiar “Todo list” demo to show the differences between the major JavaScript MVC frameworks out there, including SproutCore 2.0, YUILibrary, JavaScriptMVC, Spine.js, Backbone, Sammy, KnockoutJS, AngularJS, and more (phew!)

T-Mobile JavaScript comment stripper breaks websites – carrier “transcoders” do more than just strip comments. They sometimes compress images, or otherwise mangle your website. But things can go horribly wrong even when they just do something as innocuous as strip comments.

Dojo Tutorial: Using dojo.behavior

JavaScript is Not Web Assembly (Isaac Schlueter) and some responses to his post on Hacker News and elsewhere.

World Domination Using Arduinos and Websockets

WebVI is a browser-based version of vim.

Joe Hewitt is back at work on Scrollability, and claims that iOS 5 will still need it, despite natively supporting position:fixed and overflow:scroll elements. He has a new demo which now uses -webkit-keyframes for much improved performance. And a version 1.0 release with documentation is right around the corner.

Next Mobile Features is a blog post outlining some wish-list features for mobile devices, including JavaScript APIs for triggering and controlling haptic feeback (vibrating after touching the screen) and a hope that touch events will eventually get “force” and “radius” properties.

More evidence that understanding and using prototypes leads to lighter weight and more performant code, versus using the Crockford-style module pattern. More discussion on Hacker News.

It looks like the Javelin.js website has been hacked? It’s been up for at least a few days with this:

Javelin is a large, bloated library with an unintuitive, verbose syntax and very few features. It performs sluggishly and is sparsely documented. You will find that browsing its inelegant, poorly written source is an unwelcome experience. Javelin makes it quite difficult to write code that works on more than one browser. Javelin was developed at Facebook.

New JavaScript editing features for Web development in Visual Studio 11 Developer Preview

IE10 is coming with loads more HTML5/CSS3/JS goodness

Mobile HTML5 is a nice compatibility table for HTML5 support on mobile operating systems


(video) Brendan Eich – Ecma TC39: The Good, The Bad, and The Ugly (TXJS 2011)

(video) Google I/O 2011: Use Page Speed to Optimize Your Web Site For Mobile

(slides) Web Site Acceleration with Page Speed Technologies

(audio) NodeUp Episode 4

Test-Driven Development (TDD) with Node.js: video, audio, pics

GitHub Most Watched This Week (JavaScript)


Upcoming Events

Lindsey Simon: Use 10,000 Browsers (September 21, 2011 in San Francisco, CA, US)
onGameStart (September 22-23, 2011 in Warsaw, Poland)
Node.js Conference Italy (September 24, 2011 in Brescia, Italy)
Web Expo 2011 (September 22-24, 2011 in Prague, Czech Republic)
HTML5 Dev Conf (September 27, 2011 in San Francisco, CA, US)
Modernizr with Faruk Ates (September 29, 2011 in San Francisco, CA, US)
Back to the Front (From the Front) (September 29, 2011 in Cesena, Italy)
jQuery Conference Boston (October 1-2, 2011 in Boston, US)
JSConf EU (October 1-2, 2011 in Berlin, Germany)
Future of Web Apps (October 3-5, 2011 in London, UK)
Lessons learned from WSGI/Rack applied to Node (SFJS) (October 6, 2011 in San Francisco)
Fronteers 2011 (October 6-7, 2011 in Amsterdam)
HTML5.tx (October 8, 2011 in Austin, Texas, USA)
Frontend 2011 (October 10-12, 2011 in Oslo, Norway)
SenchaCon 2011 (October 23-26 in Austin, TX, USA)
NodeFest (October 29, 2011 in Tokyo, Japan)
red dirt.js (November 3, 2011 in Oklahoma City, OK, USA)
YUIConf 2011 (November 3-4, 2011 in Sunnyvale, CA, US)
Full Frontal JavaScript Conference (November 11, 2011 in Brighton, UK)
W3Conf (November 15-16, 2011 in Seattle, WA, USA)
indieconf 2011 (November 19, 2011 in North Carolina, US)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • TwitThis
  • Simpy
  • StumbleUpon


  1. JS Replace says:

    Google Dash or Dart will never make it. It’s tough enough to get support for things like CSS in all browsers let along an entirely new language. How are they going to handle browsers that are out-dated. Most users are using non-current browsers, so how would that work? Would they need a plugin. In order for something like this to get support it would take a lot of push. We’re also not mentioning things like mobile browsers. I doubt Apple will add it, they won’t even add Flash.

  2. TioLeo says:

    the real dart to javaScript is jQuery.

  3. [...] few weeks back we of course had all the controversy over a leaked Google email detailing their plans for a JavaScript replacement called Dart, as well as their plans for world domination. Ok, I made that second part up (or did [...]

Leave a Reply

© webdevpublishing 2011