Most everyone knows that Google has really stepped up to the plate by helping many JavaScript library projects host their builds on the Google AJAX Libraries API. Apart from providing a central distribution point for these libraries, the bandwidth cost savings alone go a long way in helping frameworks service there users in a sustainable manner.
Thanks to Vadim Spivak at Google and Dion Almaer (now at Mozilla) for helping to make this additional option available to the YUI developer community. We love that Google is supporting web developers in this way — grabbing YUI files from Google’s global infrastructure is a fantastic option to have.
This is great news for YUI developers who now have a choice of linking directly to YUI via yui.yahooapis.com and ajax.googleapis.com. YUI team lead, Eric Miraglia, has a great write-up on the YUI blog about this and goes into detail on how the framework’s users can take advantage of this new hosting option.
jQuery and Amazon CloudFront
With nearly 2.5 million requests per day to the jQuery website, the jQuery project team is constantly on the look out for ways to decrease hosting costs while still managing the growing number of requests for the site’s resources. Originally leveraging Amazon S3 for many of their static pages, the project has now turned to Amazon’s new CloudFront CDN. The change has allowed for jQuery pages to be globally hosted as opposed to being centrally located in Amazon’s Seattle-based S3 hosting center.
In tests, John Resig, team lead for the jQuery project, noticed substantial performance gains based on the switch:
I ran a similar test here in Boston and even managed to see a large improvement. I was seeing latency of anywhere from 50-200ms on Amazon S3, but only a latency of 17-19ms with CloudFront.
What does all of this mean? It means that the jQuery site is going to load even faster than it does now. We already receive some excellent hosting from Media Temple but being able to off-load these static files to the fast-loading servers will only make for a better browsing experience.
In less than 24 hours the project had received almost 2.5 million requests for over 50GB of data. The only drawback is an increase in bandwidth costs but still substantially less than that of a traditional hosting plan. The jQuery project makes use of the Google AJAX API as well and recommends it as choice for linking to the jQuery and jQuery UI libraries.
The hosting is free and what makes it unique to something like the Google CDN is that it allows Ext developers a central access point for their own custom builds.
We are pleased to announce that Ext has partnered with CacheFly, a global content network, to provide free CDN hosting for the Ext JS framework. Cachefly’s globally distributed network and aggressive caching accelerate the delivery of web content like JavaScript and CSS, making for an even faster Ext experience.
This code creates a protocol handler for www.example.com that makes mailto links direct the user to the www.example.com web application, inserting the link into the URL given replacing the %s value. The final argument is the title of the protocol handler to present to the user.
There are obviously security limitations around this:
Note: Web sites may only register protocol handlers for themselves. For security reasons, it's not possible for an extension or web site to register protocol handlers targeting other sites...The URL template supplied when registering must be of the same domain as the webpage attempting to perform the registration or the registration will fail. For example, http://example.com/homepage.html can register a protocol handler for http://example.com/handle_mailto/%s, but not for http://example.org/handle_mailto/%s.
The user will be prompted on whether they want to allow this protocol handler:
Now, when the user clicks on a link that has a registered protocol handler, they will be prompted on how to work with it:
The big news this week is a major revamping of how browsers should process multimedia in the <audio> and <video> elements.
r2404 makes a number of important changes. First, the canPlayType() method has moved from the navigator object to HTMLMediaElement (i.e. a specific <audio> or <video> element), and it now returns a string rather than an integer. [canPlayType() discussion]
The canPlayType(type) method must return the string "no" if type is a type that the user agent knows it cannot render; it must return "probably" if the user agent is confident that the type represents a media resource that it can render if used in with this audio or video element; and it must return "maybe" otherwise. Implementors are encouraged to return "maybe" unless the type can be confidently established as being supported or not. Generally, a user agent should never return "probably" if the type doesn't have a codecs parameter.
Wait, what codecs parameter? That's the second major change: the <source type> attribute (which previously could only contain a MIME type like "video/mp4", which is insufficient to determine playability) can now contain a MIME type and a codecs parameter. As specified in RFC 4281, the codecs parameter specifies the specific codecs used by the individual streams within the audio/video container. The section on the type attribute contains several examples of using the codecs parameter.
Video and the Open Web is a huge issue. The idea of having video be a native object that other components can integrate with (e.g. rotate in canvas) is great. We need codecs implemented. We need penetration. We need more.
Regardless of whether you’re in the Google camp or in the Microsoft camp, I think it’s a fair statement to say that these differences of viewpoint accurately reflect each company’s core strength and focus: Google wants the browser to grow to subsume the desktop; Microsoft wants the desktop to grow to subsume the cloud.
A number of LiveFX's additional features such as synchronization and resource introspection which have no analog in GData are fairly interesting and I wouldn't be surprised to see these ideas get further traction in the industry. On the flip side, the client-side Live Operating Environment is a technology whose benefits elude me. I admit it is kind of cool but I can't see its utility.
Danny answers:
The answer, in a word, is “offline.”
The local Live Operating Environment (local LOE) is what makes running mesh-enabled web applications on the desktop, outside the browser, possible. The local LOE creates and manages a sandboxed execution environment for the mesh app, just like a browser would for an HTML+JavaScript or Silverlight application but without the browser UI frame looming overhead.
It seems like a trivial thing, whether or not the browser frame surrounds your app UI. Does it matter? The answer is yes - having your app surrounded by browser UI constantly and forcibly reminds the user that this isn’t a real app, it’s just a web page with lipstick.
The Live Framework local LOE is a client application that works like a browser. It may even create an instance of the browser internally (I don’t know the internal details of the LOE) but it is fundamentally treated as “not the browser.”
I am trying to wrap my mind around this all myself :)
I've been working on a 3D engine on canvas for some time, and as I was posting a message on our blog, I figured you guys might be interrested as well :)
Ultimately the purpose of this engine would be to provide an easy to
use platform/interface for creating 3D stuff, from degrading interface
elements for sites, to complete games. Collada support is en route,
and with squirrelfish hitting air, I'm considering trying that too :)
Aaron Iba of AppJet has announced EtherPad a very cool product that is near and dear to Ben and I as we play with dev tools on the Web. I will let Aaron talk about it in his words:
It's a realtime collaborative text editor that runs in a web browser
(IE6+, FF1.5+, Safari 3+). It's implemented entirely in JavaScript
(server, client, and database), which I think speaks to the power of
JavaScript as a language.
It's great for anyone who wants to collaborate on a text document, but
especially great for JavaScrpt programmers to collaborate because it
supports realtime text highlighting of JavaScript source code. (To
enable this feature, click on the checkbox under "options" on the
right side of the screen).
In addition to being a cool product on its own, EtherPad is also the
first product built and hosted on the AppJet Web Platform. The AppJet
Web Platform is like a "grownup" version of the current appjet. It
will feature a JavaScript framework for writing client and server code
(think "JavaScript on Jets"), an in-memory database of JavaScript
objects, and utility hosting on our grid.
For the folks that like to write AIR apps that at least have some JavaScript, you will be happy to see that WebKit has been updated:
The version of WebKit included in AIR has been updated to a newer version. The updated version includes Squirrelfish, a new bytecode interpreter that improves the execution speed of JavaScript for common actions. Our internal tests show that HTML-based AIR applications run as much as 35% faster for many types of operations. We have also added support for interactive debuggin fo Ajax-based AIR applications.
Today's release of the Adobe AIR Development Plug-in for Aptana Studio (beta) features, you guessed it — JavaScript debugging for Adobe AIR apps along with support for Adobe AIR 1.5 which Adobe announced earlier this week.
As it is Adobe MAX this week, there is a lot of talk about the Flash platform. How does this relate to the Open Web? Well, it turns out that Dion and I have been discussing how Flash can join and become a part of the Open Web.
Adobe (via Macromedia) has traditionally been a Web designer company, but developers haven’t jumped in to the same degree (note: not to say they haven’t been wildly successful!). I think that the perception is something like this:
Dion discusses how Adobe has an opportunity to position themselves relative to Silverlight much more strongly in the Open Web camp:
With Silverlight making a huge charge I worry about a world where you have “Best viewed in Silverlight and IE” (which in fact is “only viewed in…”) and people often ask: “But isn’t Flash just as bad?”
Adobe has an opportunity here. They can move to the right and Flash could become strongly in the Open Web camp. Then we would all be stronger as we come up against Silverlight :)
The next logical question related to this is open sourcing Flash:
The conversation tends to end up with opensourcing Flash, which I think will happen at some point through necessity, and the sooner the better (for everyones sake). Flex has a loyal base and has some open source help, but hasn’t gotten the love that it could get because it sits on top of something that isn’t open source itself. It is hard to get excited about an open source tech that sits on top of the same vendors proprietary platform!
I agree with Dion that open sourcing Flash and having it join the Open Web camp is a very compelling idea. Open source would just be the first step, though, so following up on Dion's post I put together an editorial titled "How Flash Can Integrate With The Open Web":
As Dion points out open sourcing Flash is one big part of making this happen, but another huge aspect would be to have Flash and Flex integrate better into the web stack and be less of a 'black box' on the screen...The important point is to integrate Flash and Flex more deeply into how the Open Web works:
Cross-Platform Standards
No Vendor Lock-in
Anyone Can Innovate
Powerful, Universal Clients
Open Source Implementations
Mashable, Searchable, and Integrated
I give a list of suggested ways to do this; the important thing is to have Flash integrate more deeply -- these are just some suggestions to kick things off. Here are some of them; click on them to read more in-depth how this might work:
At the end of the day Adobe is a tools company, a really damn good tools company actually. Doing the above should allow Adobe to continue creating powerful tools that help authors and content creators while expanding the size of the market they can target.
The above list was just a suggestion to kick things off. The real focus is on having Flash integrate into the web stack better itself (and evolving both Flash and the web stack themselves into the future).
The JavaScript below was pointed out by Aaron Newton, and it comes from SharePoint. Jim Wilson said about it: "and we wonder why windows has 40 million lines of code."
Austin Chau and I are here on the Yahoo campus for the Yahoo BrowserPlus release party. I'm going to blog the event as it happens here (Disclosure: I work for Google with the Open Web Advocacy and Gears teams).
First, Ernest Delgado, Canvas whiz here at Yahoo, sent me a cool demo showing a prototype he and Michael Johnston made of Yahoo Maps and Flickr integrating with Yahoo BrowserPlus using the native gyroscope on Macs. You just hit the side of the laptop, for example, in order to jump to the next Flickr picture, or tip your laptop to zoom around a Yahoo Map:
* Starts with some really nice demos of things you can create in the browser using YUI.
* Underlying technologies driving browsers are very complicated.
* About 7 knowledge areas needed for web development -- each is different than the standard, with bugs and specialized expert knowledge. You get about 672 different permutations of things needed for you to know and test on.
* YUI focused on "A-grade browser support".
* Good to target toolkits like YUI, since it helps you be future-compatible when new browsers appear like iPhone and Google Chrome
* Goal of YUI: Have a sophisticated widget like a rich text editor work cross-browser using just a snippet small snippet of code.
* Also want things to be automatically accessible.
* Progressive enhancement should be easy and possible, showing a cool demo of hierarchical menus still being readable on Lynx, a version of Firefox with no JavaScript, and then a full IE with CSS and JavaScript on.
* YUI is ala carte, file sizes are small, between 15 and 30K for any given component (including gziped)
* Deployed at Yahoo for three years, on every major property, 400 million users/browsers consuming YUI every month. In properties like Flickr and on the front page, well tested.
* YUI in lots of places: iGoogle, Wall Street Journal, Mozilla, LinkedIn, Southwest.com, Obama website, more
* ~1,000,000 external downloads
Now Lloyd Hilaiel is getting up to present on Yahoo BrowserPlus, the focus of today's event:
* The teams motivations: people get browsers -- browsers could be so much more -- plugins aren't working! Takes too long for new innovations to propagate (5-7 years)!
* Non-goals: no fixing web UI, no web outside the web (like AIR or Mozilla Prism), no improving JavaScript (that's the domain of YUI, JQuery, Dojo, etc.)
* YES to new web features with low overhead. Low overhead: low intellectual overhead, low overhead to implement and get it into widespread production
* Plugins have strengths (scriptable, cross-browser), but they have problems... installing them sucks, writing them is hard, sharing doesn't happen, updating is clumsy, securing them is hard
* BrowserPlus enables in-browser desktop applications
* Abstraction layer over web plugins. Implements all the stuff common to web plugs, decreasing cost of development and helping end users with management and installation
* User install core platform just once
* Page requests distinct services it wants to use, if not installed user is prompted to accept services and they are installed on the fly
* Demo of Flickr uploader working in browser using Yahoo BrowserPlus - drag and drop into browser of images, even folders for recursive uploading, 100% leveraging client-side functionality, multiple file selection.
* Demo of a BrowserPlus marble maze game using the Mac's motion sensor that exposes a single function that gives the laptop's x and y position and acceleration. Idea is that you can expose simple functions for custom hardware -- rest of app can just use web technologies.
* Demo where you can drop a file into a page and then work with the files contents, service coming out soon. Took just one day for them to create. Imagine dragging and dropping vCards or iCal files for example for a web-based calendering system.
* Demo showing desktop notifications
* Services installed on demand, no more monolithic plugins -- instead smaller services, installation seemless, no browser restarts
* Authoring of new services currently restricted to Yahoo and partners
* BrowserPlus will be Open Source! Goal is to have Service API and services open source by end of year, everything else by mid next year.
* Need to figure out how to protect end-users while removing Yahoo from the loop of handling serving up the services
* Yahoo roles: consumer of the platform and the project maintainer (bug fixes, feature requested, service adoption)
After a short break the team (Lloyd Hilaiel, Steve Spencer, David Grigsby, and Gordon Durand) did a deep dive on the Yahoo BrowserPlus architecture, security model, user-facing interaction, how web developers interact with it, and how to create your own services. There is some really impressive engineering in here; they've tackled some hard problems. There's lots of great material they went over, too much to summarize here. You can download the presentations from here in Keynote format.
Here's a snippet of using BrowserPlus from some JavaScript:
Services are either binary shared libraries (.so or .dll) or Ruby script! The Ruby interpreter itself is a Yahoo BrowserPlus service that other services can use (services can be composed together and can work with each other, similar to how Unix utilities work with piping).