Mar192010
File Under: JavaScript, Programming

Code Optimizers Can Make View Source Useless

Image: Wikipedia/CC

Image: Wikipedia/CC

HTML, CSS and JavaScript have always been visible to the interested end user. Whether through the good old view source option in your browser, or something a bit more sophisticated — like developer favorite Firebug — the code has always been there to learn from.

It’s part of what makes the open web open. But when it comes to JavaScript, it’s possible that openness may soon be a thing of the past.

Alex Russell, developer of Dojo JavaScript Library, recently posted a follow up to his SXSW panel, worrying that tools like Closure obfuscate code to the point that it renders view source meaningless.

What’s different from some tools in other languages (like ActionScript obsfucation tools) is that Closure and others of its ilk aren’t primarily designed to obfuscate, they’re simply optimizing code, making it smaller and faster. As Russell writes, “the Closure Compiler can deliver code that’s much, much smaller than I can wring out by hand and that performs better to boot.”

In other words Closure creates better, faster JavaScript.

However, there’s a trade off that most of us generally ignore — the code generated by such tools is useless from the perspective of curious users trying to learn JavaScript by viewing your source code.

As Russell writes in a followup comment, “poll any average group of web developers and they’ll tell you straight-up that that’s how they learned… not be stealing, but by dissecting and inspecting and tweaking and then re-implementing a technique in a new and unique situation.”

Webmonkey’s own seminal JavaScript tutorial advises: “the best way to learn JavaScript is to look at scripts other people have written. JavaScript, just like HTML, can be viewed by selecting View Source on your browser. Do it frequently!”

Tools like Closure make the source you view of little use. True there are some “de-obfuscation” tools out there — like jsbeautifier.org — but none of them work with tools as sophisticated as Closure.

Now curious newbies trying to teach themselves JavaScript may not be top of your list of concerns when writing code for your website, but Russell is right when he suggests that these “second-order beneficial effects,” that is, the ability to view source and learn from it, are part of what has made the web a success.

The danger is that in taking away the usefulness of view source we’re creating a much less democratic environment for those trying to learn HTML, CSS and JavaScript from tomorrow’s web. And as Russell writes, that’s not “a vision of the web that holds my interest.”

So what’s the answer? Well, there isn’t one really. Some ideas floated by Russell and commenters on his post include letting browsers do the Closure-style byte code compiling before the script is rendered, building better de-obfuscation tools or simply serving up uncompiled versions of the same JavaScript for interested users.

See Also:

Mar182010

Mozilla Labs Seeks to Tame Your Address Book With ‘Contacts’

labs-logo

Mozilla Labs has a new goal — saving your contacts list from the chaos of the web.

If you’re like most of us, your contacts are probably spread out all over the place — in your webmail provider, on social networks like Twitter or Facebook, on your mobile and maybe even hiding in a desktop address book app.

In short, your contacts are a vast, sprawling jungle. Mozilla Labs wants to solve that problem and a new project, dubbed, appropriately enough, Contacts is aiming to help you centralize and organize your various lists.

The Contacts project works by using the browser to sort, organize, access and share your contact data. The information is stored in a local database and — should the project take flight — will eventually be synced across platforms by the Weave add-on.

contactsA prototype of the Contacts interface. Click the image for a larger view.

For now, the most notable features of the Contacts add-on is some very nice auto-completion in web forms. The features is roughly analogous to what Gmail does in the To field of your e-mails, but obviously Contacts’ auto-completion works on any website.

To build the database, Contacts will pull your info from GMail, Twitter and the Mac address book. Mozilla has promised that the list of supported apps and web services will be expanded shortly thanks to the importer API (which eventually will be public, meaning other add-ons can access it).

The other nice thing about Contacts is the per-site privacy control which make it relatively easy to control which sites can grab which data.

Like Mozilla’s Raindrop experiment, Contacts has loads of potential and might one day be another must-have part of Firefox, but for now the add-on is very rough.

If you’d like to take it for a spin there’s an experimental, pre-alpha version of Contacts available for download. Just keep in mind that Contacts is very experimental code and could crash your browser.

If you like what you see in Contacts or you have ideas on how to improve it, be sure to let Mozilla know.

See Also:

Mar182010

Chrome Web Browser Adds Automatic Translation, Better Privacy Controls

The stable versions of Google’s Chrome web browser have been updated, including some important security fixes for users of the Windows version.

Among the feature highlights in the recent update are better privacy controls, automatic translation of sites not in your native language, and the ability to selectively block JavaScript, pop-up windows, cookies and images by domain.

The new features included in these updates have been available in the beta channel for some time (see our earlier review), but if you’ve been sticking with the stable channel now you to can enjoy the new toys.

While the new features mentioned above only apply to the Windows version of Chrome, Google did recently release some bug fixes and features upgrades to the development channel of the Mac version of Chrome.

Chrome for Mac recently gained a much-improved bookmarks panel that makes it easier to save and edit bookmarks than the previous, virtually non-existent bookmark manager. The Chrome for Mac development team cautions that the new bookmark manager still has bugs, but if you’re desperate for better bookmark tools, it’s definitely worth switching to the development channel.

Google has also released an update for its controversial Chrome Frame, which injects Chrome’s rendering engine into Internet Explorer. The latest version of Chrome Frame is more tightly integrated with IE — it now uses IE’s built-in pop-up blocker — and fixes a number of crashing bugs. You can grab the latest version of the Chrome Frame download page.

See Also:

Mar172010

Internet Explorer 9 Shows Up Faster, But Still Lacking

5e1680db-782f-401c-b71f-9adc8f7b7836

Microsoft has announced more details about Internet Explorer 9 the next version of the company’s much-maligned, but still dominant web browser. The highlights for IE’s update include much-needed performance improvements, hardware acceleration for graphics, as well as support for a number of new HTML5 elements and CSS 3 features.

If you’d like to take the developer preview version of IE 9 for a spin, head over to Microsoft’s new IE 9 website.

Of course with any new IE release, there is some inevitable disappointment, and IE9 is no exception — like it’s predecessors, IE9 is playing catch up rather than pushing the web browser envelope.

While there is reason to be excited about IE9, the browser is just as notable for what’s missing, namely features Firefox, Chrome, Opera and Safari are already shipping — the HTML5 Canvas element, support for HTML5 Web Workers and open web font support. Open web advocates will also be disappointed to here that IE9 will support the H.264 video codec instead of Ogg Theora. H.264 is a patented video technology (the same used by Flash), but Ogg Theora is believed to be unencumbered by patents, which is why open web advocates prefer it.

The H.264 news is especially disappointing given that speed at which IE updates, or rather doesn’t update. Web developers now know that, even if a better, more open and free video codec comes along, they’ll most likely have to support H.264 anyway since IE rarely releases updates at the speed of the web.

But rather than dwelling on what IE9 doesn’t do, let’s concentrate on the good news.

Based on what we’ve seen at this stage, IE9 is much, much faster than IE8 thanks to improvements in IE’s rendering engine. IE9 will also include a new JavaScript engine that puts the browser on par with script performance in Safari 4, Chrome 4 and Opera 10.5. Although all four other browsers are still marginally faster, IE 9 eliminates one the biggest gripes about IE 8 — it’s dog slow.

In other words, while IE9 still isn’t top dog in the speed race, at least it will have a somewhat respectable spot in the browser pack.

Also welcome news is IE9’s intention to support much of the CSS 3 spec, including advanced CSS selectors, fonts, colors, rounded corners and borders. As far as we’ve been able to discover, CSS 3 transitions and transformations are not part of IE 9.

Microsoft is also touting IE9’s “hardware accelerated” HTML5 capabilities. However, in our testing, IE9 was not significantly faster or smoother rendering the demo page on Microsoft’s site than were Firefox, Safari or Opera. Google Chrome does, however, completely fall apart on that particular demo page.

More good news in IE9 can be found in the hardware-accelerated SVG rendering, which, similar to what is available in beta version of Firefox, promises to improve native SVG graphics.

Sadly, the SVG support also highlights what many already consider the biggest oversight in IE9 — no support for the HTML5 Canvas tag. Lacking support for the canvas tag, which can be used to display SVG-based animations, IE9’s SVG support is considerably less appealing to web developers.

Of course, given that the canvas tag (along with the video tag) is essentially designed to get rid of the need for the Flash and Silverlight plug-ins, it isn’t to surprising that Microsoft is in no hurry to drive any nails into Silverlight’s coffin.

It was also announced that IE9 will not work with Windows XP. Given that Vista and Windows 7 have been out for some time, not supporting XP isn’t entirely surprising, but it’s still disappointing — especially since Windows XP remains a popular option on netbooks.

Provided you’re not using Windows XP and you’d like to help make IE9 better, you can head over to the IE Platform Preview for developers and download your copy today.

See Also:

Mar132010
File Under: Browsers, Mobile

Opera on the iPhone? Yes, and Soon

mini-iphone

AUSTIN, Texas — Opera Software has a version of its Mini browser prepped and ready for the iPhone. Opera Mini 5 for the iPhone will be available in the App Store in a matter of weeks, but the company is demoing a beta version of the tiny mobile browser here at South by Southwest Interactive.

We got to see a live demo of the app in action, but we weren’t allowed to photograph it due to the company’s agreement with Apple. The screenshot at left is all that’s been approved for distribution.

Opera Mini 5 has the same features as all other implementations of Opera Mini for other mobiles. It syncs history and preferences data (like Speed Dial), it has a customizable search field, and it can discover and subscribe to RSS feeds. It also has an elegant tab switcher that lets you browse your open tabs like you’re shuffling a stack of cards.

All versions of Opera Mini use proxy servers to squish pages and images before they’re delivered to your phone, greatly speeding up page loads over slower connections. Opera claims a 90% compression rate, which is impressive, but the trade off is that you lose one of the iPhone’s special features. There’s no multi-touch on the iPhone version of Opera Mini. You can double-tap to zoom, but not pinch to zoom. Even so, it’s nice to have the option to load an alternative browser onto the iPhone, which right now only has Mobile Safari.

Look for it in the App Store some time in the next few weeks. An Android version was recently released as well. Try it out at Opera’s site.

Mar122010
File Under: Events, Location

SXSW: See All Austin Check-ins in One Place

picture-1

Cliqset has produced this nifty web app that aggregates status updates and check-ins sent from people in and around Austin to all of the different major location-sharing services — Gowalla, Foursquare, Twitter, Brightkite and of course Cliqset. It’s called Cliqset Crowd

It’s a nice tool you can use to get in on the location sharing game if you, like me, are one of those people who prefers to observe from the outside. With this all inclusive map, you certainly won’t miss anything big.

Mar102010
File Under: Events

Webmonkey Goes South, Then West, for SXSWi

sxsw2010logo

We’re headed to Austin, Texas tomorrow along with the crew from Wired’s Underwire blog to attend South By Southwest Interactive. The week-long nerd fest starts Friday, and we’ll be reporting from the trenches.

If you’re headed down to SXSWi, here’s what Webmonkey will be checking out. If you’re not going this year, you’ll be able to follow along from home here on the blog and everywhere else on the intertubes using the hashtags #sxsw, #sxswi and #sxsw2010.

The Wired Party, of course. Monday, March 15th at 5pm.

Molly Holzschlag from Opera leading a discussion about the current issues surrounding web browsers. Saturday, March 13 at 12:30pm.

The ActivityStrea.ms crew talks up their data format, which aims to let real-time status updates work across the entire social web. Saturday, March 13 at 9:30am.

The Beauty in Web Design panel, where designers will contemplate what it takes to move beyond usability and into real beauty on the web. Friday, March 12 at 2pm

New Publishing and Web Content, Jeff Zeldman’s panel about the use of web standards in e-books, e-magazines and the future formats of digital publishing. Saturday, March 13 at 5pm.

The Mozilla Party, happening right after the e-publishing panel. Saturday, March 13 at 6pm.

The SXSW Web Awards on Sunday night.

Google’s Hackathon, a hands-on app-building workshop. Sunday, March 14, all day.

Evan Williams’ keynote. We think he’s going to talk about Twitter or something. Monday, March 15 at 2pm.

Fun with HTML5 Video. As messy as the landscape is, there’s still some cool, creative stuff being done on the bleeding edge. You’ll see some of it here, Sunday, March 14 at 3:30pm.

Google Talks About Gmail and Buzz on Sunday, March 14 at 5pm.

The Bigg Digg Shindigg, with a live Diggnation broadcast and a live set from The Walkmen. Saturday night at Stubb’s BBQ

Scott Gilbertson will be holding down the daily coverage on the blog while I’m attending these (and other) fabulous SXSW events. I’ll also be tweeting as @webmonkey whenever anything interesting happens, which should be often. So stay tuned!

Mar102010
File Under: Browsers, HTML5, Multimedia

Shocker: New Study Shows Web Video Is Still a Mess

Flash: quick or dead?

Flash: quick or dead?

A new study released Wednesday pits Flash Player’s video performance against that of native HTML5 video playback in several different web browsers.

The verdict? Flash is a CPU hog in some cases, and native H.264 video is a CPU hog in some cases. That’s right — both options threw strikes and gutters.

Video playback in the browser has been a central issue of discussion in the tech world of late. The forthcoming HTML5 spec allows for native video in the browser. But with patent issues causing squabbles between browser vendors over which codec to support, and with Apple rallying against Adobe’s Flash Player — which none of Apple’s mobile devices, including the iPad, will support — there’s been a great deal of debate over what the future of video on the web will look like.

Continuing that debate, Jan Ozer of the website Streaming Learning Center has posted a study of the performance differences between Flash video player and H.264 video playback in Safari and Chrome on both Windows and Mac.

H.264 video playback through HTML5 performs admirably on Mac Safari, but was neck-and-neck with Flash on Chrome for Mac. On other platforms, Flash outperformed native H.264 video. Ozer notes the latest version of the Flash Player is actually quite efficient at video playback on platforms where it can access hardware acceleration. On systems where it can’t, it tends to gobble up resources just like Flash Players of old.

Flash Player 10.1 can access a system’s GPU on Windows, giving a large boost to performance. But Mac OS X users are left out, because Apple doesn’t allow browser plug-ins to access the proper APIs. So, as Ozer argues, “the ball is in Apple’s court” to fix that limitation.

This study essentially backs up the arguments we’ve been making since the debate began — that the current crop of web browsers are not ready for native video playback and that Flash isn’t going anywhere anytime soon.

However, there’s one troubling omission here: Ozer’s study leaves Firefox out. He chose YouTube’s HTML5 demo pages to do his testing, and YouTube is currently pumping out H.264 videos on those pages, which Firefox can’t view. Firefox only supports videos in the Ogg Theora format. He does include Firefox in the study, but only uses it to measure Flash performance.

It doesn’t help that the author keeps referring to H.264 video as “HTML5″, when they are certainly not the same thing. H.264 is a patent-encumbered video format, so it’s disingenuous to treat the format as a fair test subject for measuring native video performance across browsers.

This isn’t ignorance on Ozer’s part, just an oversight — the man has written numerous books and articles about video codecs, after all. It’s an interesting study, but be aware that it doesn’t provide a complete picture of where native video playback is today.

[via Read/Write Web]

Mar102010
File Under: Software, Web Apps

Google Launches Web Store for Cloud-Based Apps

Google Apps Marketplace logo

If you have Google Apps running on your domain, now you can install third-party apps that fully integrate with Google’s apps.

Google has debuted the Google Apps Marketplace, an online store where Google Apps users can browse different cloud-based applications and add the ones they like to their suite of online tools. The apps can share data with the standard Google apps like Gmail and Docs on whatever hosting environment you’re using. Basically, you get to build your own web-based productivity suite.

The apps currently in the store (Google launched with 50) are skewed towards the business and education customers, which make up the vast majority of hosted Google Apps users right now. If you browse the store, you’ll find gobs of apps for things like project management, customer retention and administration. No games just yet, sorry.

There’s a significant amount of buzz around Manymoon, one of the handful of companies that demoed at Google’s launch event Tuesday night and currently the most-installed app in the store. It’s a team collaboration app that divvies up tasks, sets project goals and tracks the progress of team members. The browser-based image editing tools from Aviary are cool, too.

Personally, I’m most fond of eFax — certainly an app with its eye on the future of communication.


Continue Reading “Google Launches Web Store for Cloud-Based Apps” »

Mar92010
File Under: Location, Social

Facebook Finds its Place in the Location-Sharing Landscape

Photo by Mr Ush via Flickr/CCThe biggest social network on the web — that’s Facebook, by the way — is getting ready to unveil a location sharing service of its own, according to a report Tuesday.

Citing unnamed sources, The New York Times’ Bits blog says there will be two components, “a service offered directly by Facebook that will allow users to share their location information with friends,” and a set of APIs other location-sharing services can employ to allow Facebookers to update their location info using outside services.

NYT’s Nick Bilton says Facebook will shed light on the new service at the company’s upcoming f8 developer conference in April.

Facebook has certainly taken its sweet time getting in on the location-sharing game — services like Foursquare, Gowalla, Google Latitude and Yahoo Fire Eagle have been blowing up over the last year. But the whole idea of “check-ins” raise new privacy concerns for many social network users. Some view it as over-sharing, others have concerns about invasion of privacy or cyberstalking — which is why all of the most popular location-sharing apps have extensive privacy controls built in to their opt-in services.

Earlier this week, reports surfaced that Google is experimenting with rolling location-based features into Buzz activity streams, and that the company is even working on a new location-based ad format.

Photo: Mr Ush/Flickr/CC