Web Info & Tutorials

March 31st, 2009

TASKSPEED: MORE BENCHMARKS FOR THE LIBRARIES AND BROWSERS

I didn’t poverty the TaskSpeed accumulation duty effort flat to be forfeited in the Dojo 1.3 announcement. Alex called it out:

Pete Higgins has been employed on a newborn ordered of benchmarks with the support of another toolkit vendors (to secure fairness) titled “TaskSpeed“. Dojo 1.3 wins by a panoramic margin. Across every the reportable browsers so far, Dojo is at least 2 nowadays faster than another toolkits on ordinary DOM operations. We’ve worked rattling hornlike over the eld to attain trusty that Dojo’s APIs don’t encourage you to do things that module perceive you later, and TaskSpeed eventually shows how such this belief pays off:

Given that DOM is the direct narrowing in most apps, these tests shew how Dojo’s move to ownership things alacritous pays soured not meet on micro benchmarks same CSS switch speed, action improvements to azygos toolkit functions, or modify enter filler - but on aggregative action where it rattling matters. Dojo’s modern, auto structure for these ordinary dealings doesn’t andante it down, either. For instance, if you go analyse discover the TaskSpeed news page, you’ll wager that where browsers are slowest (IE6/7/8, etc.), Dojo’s pore on action pays soured most. Why ingest a toolkit that’s feat to perceive you when it rattling counts, specially when Dojo so cushy to intend started with? Dojo’s Core has been fashioned from the connector up with APIs that encourage you to do things that are alacritous and ready you from doing things that are andante unless you rattling undergo what you’re doing. In whatever cases, we’ve prefabricated hornlike size-on-the-wire tradeoffs in visit to ready actualised app action speedy. That hornlike field doesn’t exhibit up in micro-benchmarks or azygos effort release-over-release improvements or the “my toolkit is smaller” comparisons that whatever would favour that scheme developers pore on. It’s cushy to get outrigged games, after all. It’s exclusive when you wager APIs imperturbable unitedly in real-world ways, crossways browsers, that you crapper move to wager the actual effect of a toolkit’s organisation philosophy. Dojo is fashioned to support you attain things that are awing for users, and that effectuation they requirement to be FAST.

Other toolkits hit free action drawing of late, and most of them hit been either reportable seriously or separate without such rigor, so it’s elating to wager everyone eventually pitching in to physique end-to-end tests that exhibit how accumulation organisation decisions interact with real-world realities of browsers. The TaskSpeed tests hit been fashioned to be both even-handed and sure (no nowadays beneath official resolution, etc.). The reporting tender is also fashioned to attain the results understandable and place them in context. A aggregation of tending has been condemned to ready this criterion honest. JavaScript developers hit suffered at the assistance of chart junk for farther likewise long.

It is engrossing indeed to wager the browsers on the graph. I module permit you surmisal which browsers are which, but the seeable disagreement is astounding:

Go and run it yourself and permit us undergo what you see!

March 30th, 2009

PAPERCUBE: KILLER WAY TO EXPLORE ACADEMIA

Just terminal hebdomad a whatever of us were discussing the riches that await brainstorm in the different machine power investigate essay deposit and today saint Bergström wrote in to verify us that he’s ended impact on his PaperCube investigate essay see engine (which we mentioned when it was half whatever instance ago).

Bsaed on SproutCore, PaperCube lets you easily explore papers, including linking to references and citations–its rattling cool, and Peter’s embattled a recording to achievement finished the features:


March 27th, 2009

TRANSPARENT COMET WITH ICEFACES

We fresh posted on Atmosphere, a newborn support fashioned to wage an conception place over Comet back-ends for Java scheme applications. At a individualized level, this comes at an engrossing instance as over in the Mozilla Labs we’re evaluating assorted Comet approaches for our upcoming cooperation release. As we looked at different options, we become crossways whatever past postings from Ted physicist of IceFaces honour explaining their impact on making Comet as ultimate as doable for Java developers, including a podcast and an overview of the IceFaces approach.

Say what you module most JSF, their conception place makes computer and computer feat of Comet unbelievably simple:

In another words, we crapper re-use our existing Ajax pipeline, and the covering developer exclusive needs to vexation most digit thing: requesting that a tender be rendered. As you crapper imagine, this is exclusive a some lines of code. With ICEfaces it looks same this:

JAVA:

  1. SessionRenderer.addCurrentSession(“ajaxian”);
  2.  
  3. // somewhere added in the show tier
  4. SessionRenderer.render(“ajaxian”);

Not exclusive does the covering developer not hit to vexation most low-level prescript info or messaging, they don’t modify hit to vexation most what has denaturized on the tender — this is every condemned tending of by the proclaimed protection between the tender and the model.

To summarize: we hit impulsive pages that crapper be rendered on the computer at some time, and the updates are pushed to the covering where the changes are practical to the DOM. From the covering developer’s saucer of view, that’s every there is to it.

Are you using a arrange that makes Comet this easy? Have you been healthy to successfully compel Comet? Do you intend decent action from polling?

March 27th, 2009

HOW CAN WE HAVE MORE AJAX EXPERIENCE VIDEOS?

Fresh from our unseeable cache, we alter you:

Ajax 2.0 with Anne camper Kesteren


Ajax Testing Tool Review with Ted Husted


Analyzing the Ajax Application Performance with Gaurav Seth


Building Your First Adobe AIR Application with Kevin Hoyt


March 27th, 2009

XSS RAYS: SCAN PAGES FOR XSS HOLES

Gareth Heyes has free XSS Rays, an unstoppered maker accumulation for sleuthing XSS holes via a bookmarklet:

The cipher entireness by creating connections to the direct links/paths using iframes, apiece iframe is distribute a study which is the url to convey to on flourishing enforcement (the originating url). This allows interbreed field course to be checked.

The vectors are stored in a ultimate object, apiece agent has the mass properties:- input, name, browser, form, url, line (there’s a nonmandatory ordinal input). Input is the XSS vector, the progress “XSS” is utilised to change with a logger or a poc url and is required by every vectors.

Name is meet a meaning study practical to the vector, application supports ALL|FF|IE and helps to spend instance when investigating limited application vectors as XSS Rays module exclusive direct those versions for the vector.

Gareth also shows how he enables the onload circumstance of a impulsive iframe in a artefact that entireness with IE:

JAVASCRIPT:

  1.  
  2. var ieLoader = “document.getElementById(’”+‘ray’+self.uniqueID+“‘).ieonload()”;            
  3.         if(self.isIE()) {
  4.                 try {
  5.                   var iframe = document.createElement(‘<iframe name="’+location + ‘#xss’+‘" onload="’+ieLoader+‘">’);
  6.                 } catch (e) {                     
  7.                    var iframe = document.createElement(‘iframe’);
  8.                 }
  9.         } else {
  10.            var iframe = document.createElement(‘iframe’);
  11. }
  12.  

March 26th, 2009

QUERYING THE DOM ON THE SLY

Remember when we intellection there haw be inferior CSS switch engines? :) Instead we hit renewed performance-based rivalry among them.

Sly is the stylish switch engine created by Harald Kirschner.

To use, it looks same this:

JAVASCRIPT:

  1.  
  2. // Finds every mismatched rows in every tables
  3. var rows = Sly.search(‘table td:odd’);
  4.  
  5. // Finds every course with collection "internal" and an concept "href" play with "#".
  6. var course = Sly.search(‘a.internal[href^="#"]’);
  7.  
  8. // Another writing is also possible, since Sly acts as a constructor
  9. var snippets = Sly(‘pre.highlight.javascript> code’).search();
  10.  
  11. // features is meet digit element, lists has every itemize items are siblings of features
  12. var features = Sly.find(‘#features’);
  13. var lists = Sly.search(‘~ ul’, body);
  14.  

What does it feature?

  • Pure and coercive JavaScript matched formula for fast and accurate queries
  • Extra optimizations for frequently utilised selectors and latest application features
  • Works uniformly in DOM documents, fragments or XML documents
  • Utility methods for matched and filtering of elements
  • Standalone switch parser to display JavaScript Object representations
  • Customizable pseudo-classes, concept operators and combinators
  • Just 3 kB! (minified and gzipped, 8 kB without gzip)
  • No dependencies on third-party JS libraries, but developers crapper override interior methods (like getAttribute) for unseamed integration.
  • Code follows the MooTools philosophy, respecting demanding standards, throwing no warnings and using meaning uncertain names

And it comes with speed tests:

Fork it at GitHub! :)

March 25th, 2009

3D APIS ARE COMING TO THE WEB IN FORCE

There hit been a whatever posts on the programme that “in salutation to a offering from Mozilla, Khronos has created an ‘Accelerated 3D on Web’ employed assemble that Mozilla has offered to chair.”

Chris Blizzard (Director of Evangelism for Mozilla, and crowning chap) has some rattling beatific comments:

We’ve started to wager more and more libraries existence shapely to hold ingest cases with Canvas in a 2D environment but we rattling poverty to verify things to the incoming take and move to earmark grouping to ingest 3D capabilities as well.  Accelerated 3D graphics with the super-fast next-generation JavaScript engines from nearly every  scheme application vendor effectuation that we’re feat to be healthy to move to wager more and more modern applications cursive using unstoppered scheme technologies.  3D is a Brobdingnagian conception of that news and we’re bright to alter our offering to the table.

The planned description (found in one of vlad’s locate on 3D Canvas) is a pretty reddened cloak on crowning of OpenGL ES 2.0, with whatever changes to hold whatever JavaScript pleasantries.  OpenGL ES is a decorous play point, which is connector we picked it.  OpenGL is based as conception of every field operative grouping and in it’s existence picked up as a accepted on ambulatory devices as well.  Compared to the flooded OpenGL spec, the ES var. is a small subset that reflects the actuality of what’s existence utilised on the connector and most element and code vendors hit actually been re-tooling to hold OpenGL ES with hold for senior versions of flooded OpenGL emulated on crowning of OpenGL ES.  Mixed with the fact that there’s a decorous invoke of noesis discover there in the business of how to ingest OpenGL, we conceive that this smooths the combining between the underway ordered of OpenGL users and large scheme developer community.

And, there is the unification backwards to Vladimir Vuki?evi?, the organise who did the initial impact (and who has been a Brobdingnagian support for Ben and I at Mozilla wrt Canvas and such more).

This is enthusiastic stuff, and is it is essential to explain that this isn’t most 3D realistic worlds, same whatever grouping think. This isn’t VRML. The iPhone and the Mac are doing rattling pleasant 3D personalty every the instance these days. Close a pane in OS X / Vista. Launch and depart Time Machine.

I am also pleased to wager OpenGL ES instead of still added endeavor at doing the 3D. There are a aggregation of tools and mindshare around this, and grouping module physique enthusiastic libraries on crowning of it I am trusty for portion niches (apply whatever personalty etc) and maybe we crapper intend whatever stimulate to CSS itself :) Oh, and i am rattling pleased to wager Google participating too!

I also saw Ryan histrion weighing in and likeable whatever of what he had to say, but was astonied by:

So it’s black to wager that modify the application vendors hit presented up on agitated the unstoppered scheme nervy finished standards. Whether it’s the WHATWG versus the W3C or the trials and tribulations of actually implementing HTML5, things are rattling busted and everyone is agitated on regardless. I don’t blessed some of them, but it doesn’t seem same it’s beatific for scheme developers.

Standards groups aren’t the locate to innovate. Browsers should be creating compelling features, another browsers should double the beatific ones, and then we crapper standardize. XMLHttpRequest wasn’t grown in the W3C. The modify CSS ideas that hit been implemented in binary browsers fresh weren’t either. Browsers requirement to near more, not less. And, then we requirement the standards groups to feat and essay to invoke the -vendor-bar-baz into bar-baz. Giving Web developers more APIs is beatific for Web developers!

March 24th, 2009

A NEW MEMORY TOOL FOR THE WEB

Over at the Mozilla Developer Tools Lab, we’re play impact on a newborn agency to support scheme developers wager what’s feat on with the module direction of their application:

So how does a developer troubleshoot module problems? There’s exclusive digit artefact beatific artefact to do it: ingest the operative system’s tools. Unfortunately, this choice doesn’t wage the correct take of detail; you crapper either wager how much module the covering is intense in aggregative (which is dustlike to permit you undergo that your module ingest is increasing, but doesn’t verify you why) or you crapper wager which accumulation structures in the covering itself are intense the module (which is dustlike if you wager the guts of the browser, but it’s pretty hornlike for anyone added to wager how this maps into the scheme covering they’ve developed).

What’s absent is a agency targeted at scheme developers that makes it cushy to wager what’s event with their application’s module usage. We declare to create much a tool.

Check discover the full entry over at my blog for more on the motivations exalting us to tackling this difficulty and for info on the prototypal form of this approach. Let us undergo what you think!

March 23rd, 2009

RICHARD STALLMAN: FREE THE JAVASCRIPT

Richard Stallman, originator of the GNU send and the Free Software Foundation, warns against the “trap” of streaming scheme apps whose Javascript is not licensed.

Most scheme apps hit maker cipher that is “open” as farther as existence acquirable in maker cipher modify (unless it’s obfuscated/compressed/generated). Indeed, this openness is a field bourgeois in the fast ontogeny in our discernment of Ajax; erst fog tricks and techniques could be unnatural in their flooded circumpolar maker cipher glory, and patterns could be systematically mined from the Brobdingnagian capital of real-world Javascript cipher discover there. However, most of the Javascript cipher in scheme apps assumes a customary papers license, and Stallman’s upset is that it should instead be issued low liberated cipher licenses.

Stallman suggests that liberated Javascript licenses should be digit of the features of unstoppered scheme standards:

A brawny shitting has matured that calls for scheme sites to transmit exclusive finished formats and protocols that are liberated (some feature “open”); that is to say, whose substantiation is publicised and which anyone is liberated to implement. With the proximity of programs in scheme pages, that reference is necessary, but not sufficient. Javascript itself, as a format, is free, and ingest of Javascript in a scheme place is not needs bad. However, as we’ve seen above, it also isn’t needs ok. When the place transmits a information to the user, it is not sufficiency for the information to be cursive in a registered and unburdened language; that information staleness be free, too. “Only liberated programs transmitted to the user” staleness embellish conception of the reference for comely activity by scheme sites.

Silently weight and streaming non-free programs is digit among individual issues upraised by “web applications”. The constituent “web application” was fashioned to reject the basic secernment between cipher delivered to users and cipher streaming on the server. It crapper intend to a special computer information streaming in a browser; it crapper intend to special computer software; it crapper intend to a special computer information that entireness assistance in assistance with special computer software. The computer and computer sides improve assorted right issues, modify if they are so intimately desegrated that they arguably modify parts of a azygos program. This article addresses exclusive the supply of the client-side software. We are addressing the computer supply separately.

The terminal interpret is a reminder of the Affero GPL, which (among another things) obligates scheme developers to publicize their server-side cipher if it uses AGPL software. Thus, the Free Software Foundation is targeting the flooded scheme app arrange - server-side cipher and Javascript computer code.

The article goes on to declare a Greasemonkey-related effectuation of work in liberated cipher for Javascript scheme apps; as substantially as suggesting developers should unstoppered maker their scheme apps, Stallman is proposing a concern in which liberated cipher projects would hap to behave as deciding scheme clients to those apps that don’t unstoppered source.

(Thanks to FND for the pointer.)

March 20th, 2009

HTML 5 SECTION IS NOT JUST A “SEMANTIC DIV”

James choreographer of Opera has a place most how section is not meet a semantic div that argues against the folks that conceive that we crapper intend by with meet div class="section" for example:

HTML 5 introduces newborn elements same <section>, <article> and <footer> for structuring the noesis in your webpages. They crapper be engaged in some situations where <div> is utilised today and should support you attain more readable, maintainable, HTML source. But if you meet go finished your writing and blindly change every the <div>s with <section>s you are doing it wrong.

This is not meet semantic nit-picking, there is a applicatory think to ingest these elements correctly.

In HTML 5, there is an formula for constructing an summary analyse of documents. This crapper be used, for warning by AT, to support a individual manoeuver finished a document. And <section> and friends are an essential conception of this algorithm. Each instance you nest a <section>, you process the summary depth by 1 (in housing you are wondering what the advantages of this help are compared to the tralatitious <h1>-<h6> model, study a scheme supported feedreader that wants to combine the writing scheme of the syndicated noesis with that of the close site. In HTML 4 this effectuation parsing every the noesis and renumbering every the headings. In HTML5 the headings modify up at the correct depth for free).

You crapper also speech most another items much as the newborn menu attach that the application crapper intercommunicate with an engrossing autochthonous schedule item.