All Articles Tagged javascript

SquirrelFish Javascript Engine Goes Extreme!

WebKit, the open source foundation behind Apple’s Safari for Mac and MobileSafari on the iPhone (not to mention Google Chrome, Nokia, and Adobe) introduced the SquirrelFish JavaScript engine a while back, and billed it as the fastest on the planet. Then came Mozilla’s (Firefox) TraceMonkey. Then came Google’s V8. But you just can’t keep a good SquirrelFish down — not when it’s willing to go… Extreme!

Surfin’ Safari, the WebKit blog, made the announcement this week. But what does it mean for iPhone users? Muchfasterwebsiterendering.

As WebApp’s (browser-based productivity tools like Google Docs and MobileMe, or Web 2.0 social sites like Facebook and Twitter) grow not only in popularity but in function, they become heavier to load and slower to run, largely because of all the JavaScript being processed in the background. This is especially true for a mobile device like the iPhone. The ability to tear through those pages — without crashing! — becomes incredibly important in the growing “cloud” based computing world.

In other words, this will make future versions of MobileSafari screaming fast.

Can we have it now please?

(For those interested in how SFX compares with TraceMonkey and V8, check out the stats!)



How To: Disable Javascript to Speed up MobileSafari on the iPhone

Dieter just told us about Crackberry Kevin’s uber-frustrating experiences trying to pit the iPhone 3G and Blackberry Bold head to head in the browser war to end all browser wars. But — silver lining — for iPhone users, not only did we snag bragging rights, but a handy tip as well!

Unlike the Blackberry Bold, the iPhone defaults to having Javascript enabled. As anyone who’s waited — and waited — for an overstuffed Facebook profile to load already knows, Javascript can be heavy lifting for a browser. For WebApps, it’s a necessary sacrifice, but if all you want is casual browsing, you can turn Javascript off and send MobileSafari into turbo mode.

Here’s how:

From the iPhone home screen, tap Settings. Scroll down and tap the Safari button. Under Security, slide Javascript to Off.

There you go, you’ve just switched to light, clean HTML and CSS mode (still technically “just the internet” — unless you’re in the UK…). In Crackberry.com’s tests, it made a big difference on some sites. Let us know how it works for you!

(Thanks to Crackberry Kevin!)

iPhone vs. BlackBerry Bold Browser Showdown Part Four: The Revenge of the Javascript

9F4FA668-A352-4EC3-AFB8-F3A5BDD83D51.jpg

After all the persistent questions about whether or not the BlackBerry Bold’s improved browser could compete with the iPhone, our friend CrackBerry Kevin decided to try to provide the definitive, final smackdown.

Go on and read the entire saga, but take heed, it’s not a pretty sight. Under ideal conditions, the Bold comes this close to competing with the iPhone on speed. Those idea conditions: 3G, Javascript off, strong signal, fresh reset, and WiFi off. Wait — WiFi off? That’s right, Kevin has two BlackBerry Bolds and both of them are five different kinds of screwed up — they fail with Javascript off, they fail with WiFi entirely. Now — not everybody is reporting the same hassles, but it’s starting to look like it’s a pretty serious problem.

The Javascript issue is very interesting, by the by. The iPhone defaults to leaving it on. One could argue that Javascript support helps make the iPhone able to browse the “Real Internet,” but one would be wrong about what makes up the “Real Internet”. The Bold, however, defaults to leaving Javascript off, and given Kevin’s results, it looks like a good thing they did.

What does this mean for iPhone users — besides bragging rights? Well, actually, bragging rights are enough for us. But there’s another tip you’re definitely going to be interested in, iPhone faithful. Can you guess it? Rene will let you know what it is very shortly.

SproutCore Another Nail in the iPhone Flash Web App Coffin?

iPhone SDK: Smashing Flash Rumors

If the next great future of computing in the Cloud, as many pundits — not to mention Google — think, then the next great race is delivering that future via Rich Internet Applications. Right now, there are two major ways of doing this. The first involves using a proprietary, locked in technology (admittedly with increasing “openness”) like Adobe’s Air/Flex/Flash trifecta, or Microsoft’s .Net/Silverlight double team. The second is with truly open standards such as HTML, CSS, and AJAX (Asynchronous Javascript and XML) like Google, Yahoo, and many others use.

With the iPhone Apple has squarely planted itself in the second category. They even promoted them as a pseudo-SDK for a time! (And maybe gave up too soon?)

Flash-free, Silverlight-less, but full of interactivity and cloud-based applications, Apple just unleashed .Mac upgrade MobileMe complete with “desktop class” mail, calendar, contacts, and photo gallery web apps.

And according to this year’s WWDC buzz, they used SproutCore’s Javascript frameworks to do it? Why?

SproutCore not only makes it easy to build real applications for the web using menus, toolbars, drag and drop support, and foreign language localization, but it also provides a full Model View Controller application stack like Rails (and Cocoa), with bindings, key value observing, and view controls. It also exposes the latent features of JavaScript, including late binding, closures, and lambda functions. Developers will also appreciate tools for code documentation generation, fixtures, and unit testing. A key component of its clean MVC philosophy that roots SproutCore into Cocoa goodness is bindings, which allows developers to write JavaScript that automatically runs any time a property value changes. With bindings, very complex applications with highly consistent behavior can be created with very little “glue” code.

Check out the read link for more on Apple’s use of SproutCore, and how it might just be part of a growing trend for open standards-based web interactivity.

Read