You searched for: 'native'

Monday, December 31st, 2007

Fluid puts hat in the “Site Specific Browser” ring

Category: Browsers

Todd Ditchendorf has released Fluid, a Site Specific Browser that allows you to ditch the 30 tabbed browser, and run web applications in the own world (icon etc):

Fluid 0.4 includes Dock badges and Dock menus for Gmail, Google Reader, and Yahoo! Mail, auto-software updates via the Sparkle Update framework, custom SSB installation paths, and custom SSB icons.

And, how cool is this… a Flickr group for shared Fluid SSB icons!

How does it work?

Fluid itself is a very small application. When launched, Fluid displays a small window where you specify the URL of a webapp you’d like to run in a Site Specific Browser. Provide an application name, click ‘Create’ and you’ll be prompted to launch the new native Mac app you’ve just created.

What makes Fluid different from Prism?

Fluid is very similar in nature to Prism, but is based on Safari’s WebKit rendering engine. And SSBs created by Fluid are true, native Cocoa OS X applications offering seamless integration into the Mac OS.

Posted by Dion Almaer at 8:10 am

3.1 rating from 12 votes

Monday, December 24th, 2007

Infamous IE hasLayout is toast

Category: CSS, IE

We are slowly finding more and more out about how nice IE8 is going to play. Markus Mielke
came out to tell us that hasLayout is a goner:

I do not think I am disclosing too much by saying that HasLayout will be history with IE8 (it was an internal data-structure to begin with and should have never been exposed). See for more details.

So what does “having a Layout” mean?

  • In short, having a layout means that an element is responsible for sizing and
    positioning itself and possibly any child elements. (If a child element has its
    own layout, it sizes itself and its descendents, but the original layout
    positions the child.)
  • Some elements have a “fixed” size or otherwise have special sizing constraints.
    They always have layout—for example, buttons, images, inputs, selects, and
    marquee elements have always a native size even if width and height are not
  • Sometimes elements that do not normally require layout information, like a div
    or a span, may have properties specified that force a layout to be
    applied in order to support the property—for example, the element must
    have a layout in order to get scrollbars.
  • Once a layout is applied the “hasLayout” flag is set. This property returns
    true if queried.

Read more on hasLayout.

Posted by Dion Almaer at 6:57 am

3.9 rating from 20 votes

Thursday, December 20th, 2007

JavaScript Benchmarks

Category: JavaScript

Can JavaScript performance become a big selling point for browser acceptance? That’s what Jeff Atwood is speculating as he put several browsers through the WebKit SunSpider JavaScript Benchmark. The tests evaluate the performance of a browser’s implementation of JS language only and claims to be a real world, balanced and statistically sound testing suite.

Jeff put IE 7, Firefox 2, Opera 9.5 & Safari 3.0.4 through the benchmark to determine who had the best performance.

Image from Jeff Atwood’s posting.

What surprised me here is that Firefox is substantially slower than IE, once you factor out that wildly anomalous string result. I had to use a beta version of Opera to get something other than invalid (NaN) results for this benchmark, which coincidentally summarizes my opinion of Opera. Great when it works! I expected Opera to do well; it was handily winning JavaScript benchmarks way back in 2005. The new kid on the block, Safari, shows extremely well particularly considering that it is running outside its native OS X environment. Kudos to Apple. Well, except for that whole font thing.

More results are available for review here and you can run your own benchmark tests via WebKit’s SunSpider site.

Posted by Rey Bango at 10:35 am

4.1 rating from 31 votes

Tuesday, December 18th, 2007

Working aroung the instanceof memory leak

Category: JavaScript, Tip

Gino Cochuyt spent some hours to find the cause of memory leaks in IE when using instanceof.

He found at least 3 Objects that cause the memory leaks:

  • window
  • document
  • element

Just using – if (window instanceof Object) – for example causes a memory leak! that grows by 50 KB per refresh; the reason for this is because these 3 Objects are not really objects in IE (they don’t have a constructor); the same reason why they don’t have the Native Object methods:

  • hasOwnProperty
  • valueOf

where in other Browsers like FF, Opera and Safari … (the ones that i tested!)
a div elemement for example is an instanceof HTMLDivElement – HTMLElement – Node etc..

To prevent these memory leaks:


  1. function MyClass(){};
  3. function testIt (obj) {
  4.         if (!obj || !obj.hasOwnProperty || !(obj instanceof MyClass)) {...}
  5.         // IE will fail on the second statement if obj == window || document.... so the instanceof statement doesn't get tested!!
  6. };

Posted by Dion Almaer at 2:50 am

2.7 rating from 121 votes

Friday, December 14th, 2007

Opera sues Microsoft of standards compliance

Category: Microsoft, Opera

Ah, the courts. The latest case aimed at Microsoft is from Opera, as they urge Microsoft to give consumers a genuine choice of standards—compliant Web browsers:

The complaint describes how Microsoft is abusing its dominant position by tying its browser, Internet Explorer, to the Windows operating system and by hindering interoperability by not following accepted Web standards. Opera has requested the Commission to take the necessary actions to compel Microsoft to give consumers a real choice and to support open Web standards in Internet Explorer.

“We are filing this complaint on behalf of all consumers who are tired of having a monopolist make choices for them,” said Jon von Tetzchner, CEO of Opera. “In addition to promoting the free choice of individual consumers, we are a champion of open Web standards and cross-platform innovation. We cannot rest until we’ve brought fair and equitable options to consumers worldwide.”

Opera requests the Commission to implement two remedies to Microsoft’s abusive actions. First, it requests the Commission to obligate Microsoft to unbundle Internet Explorer from Windows and/or carry alternative browsers pre-installed on the desktop. Second, it asks the European Commission to require Microsoft to follow fundamental and open Web standards accepted by the Web-authoring communities. The complaint calls on Microsoft to adhere to its own public pronouncements to support these standards, instead of stifling them with its notorious “Embrace, Extend and Extinguish” strategy. Microsoft’s unilateral control over standards in some markets creates a de facto standard that is more costly to support, harder to maintain, and technologically inferior and that can even expose users to security risks.

Mary Jo Foley quickly chimed in on why it is a bad idea:

  1. Should antitrust courts be the ones in charge of determining which versions of Cascading Style Sheets (CSS), XHTML, Document Object Model (DOM) and other Web standards are the ones to which all browser/Web developers should be writing? Participants in various standards bodies can’t even agree among themselves which version of these standards is the best. How are judges supposed to wade through the browser-standards confusion in a good/fair way?
  2. Would it be positive for customers if Microsoft were suddenly forced to create a version of IE that looked good on paper, in terms of more complete standards compliance, but which broke third-party and custom Web applications? Microsoft has argued that it is trying to avoid this situation with IE and is working on various ways it can make IE more standards-complaint without breaking existing apps, completely upsetting the partner/customer universe.
  3. With Mozilla, Firefox has proved you don’t need government intervention to wrest a substantial percentage of the browser market from Microsoft. You just friends with deep pockets (like Google) and a community of dedicated developers — plus a guaranteed customer base who prefer anything other than Microsoft technologies.

    In the end, Microsoft’s own inertia, browser-security problems and inability to react quickly to market changes (where, oh where, is IE 8?) will continue to help its browser competitors more than a ruling by the EU or other antitrust body would.

    What do you think? Is Opera’s attempt to get the European Commission to force the unbundling of IE from Windows too late? And what’s your take on Opera’s attempt to get the courts involved in enforcing Web-standards compliance?

Posted by Dion Almaer at 12:01 am

4.3 rating from 49 votes

Tuesday, December 11th, 2007

GWT Voices: Cross browser sound API

Category: GWT, Library, Sound

We featured SoundManager 2 awhile back, and we just ran across GWT Voices, an open source GWT module that abstracts away sound management so you can just do this:

  1. package com.mycompany.client;
  3. import;
  5. import com.allen_sauer.gwt.voices.client.Sound;
  6. import com.allen_sauer.gwt.voices.client.SoundController;
  8. public class SimpleApplication implements EntryPoint {
  9.   public void onModuleLoad() {
  10.     SoundController soundController = new SoundController();
  11.     Sound sound = soundController.createSound(Sound.MIME_TYPE_AUDIO_MPEG,
  12.         "url/to/your/sound/file.mp3");
  15.   }
  16. }

… and your file will be played across browsers. Voices supports native formats, and drops to Flash for others.

GWT Voices

Posted by Dion Almaer at 7:05 am

3.6 rating from 29 votes

Thursday, December 6th, 2007

Microsoft Labs Volta: .NET Web Toolkit

Category: Microsoft

Microsoft Labs has announced a new project called Volta that looks like GWT for .NET.

Erik Meijer (Mr. LINQ) is behind this one:

“The idea is that you start out building your application, focusing on the functionality, the look and feel, until you’re satisfied with it and then you repurpose it into an AJAX application or whatever,” Erik Meijer, Volta’s principal architect and a member of Microsoft’s SQL Server team, said in an interview. “You incrementally morph a standard client-only application into a Web application. The programmer specifies the intent and then we’re going to insert all the necessary code to do the ‘how.'”

Apps written with Volta can be debugged from within Visual Studio, something that’s not always easy for multi-tier apps that run across client and server. “One of the unique opportunities provided for us is to debug across different forms of code, whether client or server,” Alex Daley, Microsoft’s group product manager for Live Labs, said in an interview. Volta, meanwhile, can also instrument code so developers can collect information on performance from Microsoft Service Trace Viewer.

You have a full API to talk into the browser side of things… E.g.:

  1. partial void InitializeComponent() {
  2.    nameElement = Document.GetById<input>("Text1");
  3.    greetingElement = Document.GetById<div>("Greeting");
  4.    button1 = Document.GetById<button>("Button1");
  5.    public VoltaPage1() {
  6.      InitializeComponent();
  8.      var greeter = new Greeter();
  9.      button1.Click += delegate {
  10.         var name = nameElement.Value;
  11.     };
  12. }

You can also call out to “native” JavaScript code via annotations:

  1. [Import("function(id) { return new VEMap(id); }")]
  2. public extern Map(string id);

I have seen teams have great success with GWT, and it is especially nice when a new version comes out that has huge speed improvements (which seems to happen each time), so there is probably a market for people who are .NET shops who think JavaScript is “icky” :/

I definitely want to check out the Ruby side of things…

Posted by Dion Almaer at 7:15 am

2.9 rating from 39 votes

Adobe AMF and Flash Media Server

Category: Adobe

One thing that I learned being on the Adobe bus tour was that Ted Patrick has good taste in reggae. He just put a blog post up about the ABCs of AMF in which he details the format and has a little hint at the end:

The AMF file format is a binary file format representing a serialized ActionScript object. This file type is used in many places within the Flash Player and AIR for data storage and data exchange. In Flash Player 9 and AIR, the flash.utils.ByteArray class is the primary way AMF is handled.

I would encourage you to take a deeper look at AMF. There are some low level benefits to using it that are hard to beat. With all distributed computing systems, serialized object formats are essential and AMF is the native format for Flash Player.

There is some big AMF news coming in December…. :)

Several people are alluding to an opening up of that format.

Adobe also made the Flash Media Server less that a bazillion dollars, and we can probably thank Microsoft for the price slash.

Posted by Dion Almaer at 6:31 am
Comment here

3.2 rating from 17 votes

Tuesday, December 4th, 2007

Nintendo ES Operating System on JavaScript

Category: JavaScript

Jon Hartmann pointed us to the new Nintendo ES Operating System that “is a fairly interesting looking open source research OS created by Nintendo. Runs natively on x86 (and qemu of course), kernel is written in C++, uses an ECMAScript interpreter for all of the userland, uses Cairo for graphics, and even has a port of Squeak.”

You can read a translated homepage and download ES 0.1.

It is interesting to see projects like this and Lively Kernel pop up, and benefitting from faster JavaScript as it becomes available.

Posted by Dion Almaer at 12:11 am
Comment here

4.1 rating from 19 votes

Monday, November 26th, 2007

Kevin Hoyt on the AIR Experience

Category: Adobe, Flash, JavaScript, Presentation

Kevin Hoyt of Adobe gives a personal tour of how you can take your web development skills to the desktop using the Adobe Integrated Runtime (AIR) in his presentation from The Ajax Experience, which was recorded, and shown here.

Kevin is a top notch guy, and really gets Ajax. One good example is his latest post on Ajax and Flash in which he sticks up for Ajax, and its future, while showing that Flash has its place too:

For as far ahead as Flash may be in some areas, Google took Ajax and made a calendaring system, collaborative spreadsheet and even a decent word processor. Flash is only just now getting around to the word processor, and still lacks examples of a spreadsheet and calendaring system used on the same scale as the Google suite.

It’s true that standards bodies move slow. Committees and political agendas abound. There’s something to be said for that vision though. What happens for Flash if all the aforementioned standards (proposals really) actually do become standards? HTML 5 even includes an embedded database, for which Flash has to go to the desktop (i.e. AIR). ECMAScript 4 and the Tamarin VM could put the browser on the whole on the same playing field as Flash, and it would all be standard.

An interesting side note about solutions and alternatives is approachability. Richard alludes to this, but when it comes to making Flash support deep-linking, testing and even accessibility, there’s a fair amount of additional work that really requires the developer be “in the know.” SDK’s and IDE alternatives for Flash may also be available, but Notepad/TextEdit is always right there.

Turning the conversation 180 degrees, let’s not forget that for all of Flash Player’s ubiquity, there’s nothing that comes close to the vast amount of standards-based HTML content out there. Most Flash in fact still requires HTML to at least setup where on a page that content will reside, and to specify what content will act as the root. HTML rendering in Flash Player is extremely limited, but there’s no more ubiquitous format anywhere.

I also find it amusing when Flash developers tout Flash Player 9’s VM and AS3 as a language. Let’s not forget where Flash came from, and remember that Flashers have struggled with component development in Flash since scripting was introduced the Player. It is only recently that this has become mature, and that component development in Flash has a long ways to go to match what Microsoft has across the board.

Posted by Dion Almaer at 9:00 am

3.2 rating from 33 votes

Wednesday, November 21st, 2007

Firefox 3 beta: Fonts and Colors

Category: Browsers, Firefox

Firefox 3 beta 1 is in the wild for developers to test with:

  • Improved security features such as: better presentation of website identity and security, malware protection, stricter SSL error pages, anti-virus integration in the download manager, and version checking for insecure plugins.
  • Improved ease of use through: better password management, easier add-on installation, new download manager with resumable downloading, full page zoom, animated tab strip, and better integration with Windows Vista and Mac OS X.
  • Richer personalization through: one-click bookmarking, smart search bookmark folders, direct typing in location bar searches your history and bookmarks for URLs and page titles, ability to register web applications as protocol handlers, and better customization of download actions for file types.
  • Improved platform features such as: new graphics and font rendering architecture, major changes to the HTML rendering engine to provide better CSS, float-, and table layout support, native web page form controls, colour profile management, and offline application support.
  • Performance improvements such as: better data reliability for user profiles, architectural improvements to speed up page rendering, over 300 memory leak fixes, and a new XPCOM cycle collector to reduce entire classes of leaks.

Stuart Parmenter has discussed what he is excited about which includes:

  1. Vastly improved font selection and complex script support.
    – I’ll be going in to more detail than you probably wanted to know on the improvements here soon.
  2. Color profile support for images and CSS colors
    – This is disabled by default currently. We still need to add prefs for it. Set gfx.color_management.enabled to true in about:config and restart the browser to enable.

Both of these are fairly subtle improvements but should both make a big improvement to large sets of people.

While I’m really excited about this milestone, I think the memory work currently going on will make the next couple betas that much better.

Posted by Dion Almaer at 6:50 am

2.7 rating from 66 votes

Friday, November 16th, 2007

GWT Conference: December 3-6, 2007

Category: Conferences, GWT

Addison-Wesley and Prentice Hall are putting on a conference dedicated to GWT on December 3-6 in San Francisco.

Meet and learn from the folks, both Google engineers and community members, who have developed GWT. Speakers will share their experiences in building real-world applications with GWT. Speakers include many of the GWT team members, including Bruce Johnson and Joel Webber. They will be joined by Billy Hoffman, Jeet Kaul, Josh Bloch, David Geary, and other members of the GWT community.

Introductory Topics

  • Getting started with GWT
  • Solving traditional web usability problems with AJAX and GWT
  • Building user interfaces
  • Client/server communication, including RPC, JSON, and XML
  • Integration and interoperation with existing applications and libraries
  • Unit testing and benchmarking
  • Deploying GWT applications effectively

Advanced Topics

  • Advanced UI programming: Widgets, Panels, DOM, and JSNI
  • Using deferred binding for dependency injection and code generation
  • Designing for no-compromise usability, including tips for maximizing responsiveness, supporting history, and internationalizing well
  • Maximizing code reuse
  • Understanding compilation, the JavaScript Native Interface (JSNI), and optimizations
  • Security considerations for AJAX and GWT
  • Architecting big applications with GWT

Network with colleagues and GWT team members to discuss the underlying promise of GWT as well as its current challenges:

  • How can I integrate GWT into my existing application?
  • How have others added functionality to GWT?
  • How can one best take advantage of Java
    design patterns in GWT?
  • For large projects, how can we handle multiple entry points?
  • What are the best practices for debugging
    GWT applications?
  • Which IDEs work best with GWT?
  • How have others integrated Spring and Hibernate?
  • How can you contribute to the Google Web Toolkit project?

To whet your appetite they put together a couple of interviews with the founders of GWT that are worth a lesson:

Posted by Dion Almaer at 7:38 am
Comment here

2.8 rating from 26 votes

WebKit 3 shows up with the new Safari

Category: WebKit

With the OS X push of 10.5.1 and 10.4.11, and a new Safari/Win beta, we see the latest and greatest of WebKit in Safari itself.

To kick this off, Maciej Stachowiak has blogged 10 new things in WebKit 3:

  • Enhanced Rich Text Editing: And RTE needs help!
  • Faster JavaScript and DOM: ~2 times faster
  • Faster Page Loading: WebKit 3 is 1.4 times as fast
  • SVG: Yay
  • XPath: Yay
  • New and Improved XML Technologies: XSLTProcessor, DOMParser, XMLSerializer, a better XHR (“incremental updates for persistent server connections”)
  • Styleable Form Controls: No more native
  • Advanced CSS Styling: Text-stroke, text-shadow, and more
  • Reduced Memory Use: WebKit 3 uses 14% less memory
  • Web Developer Tools: Web Inspector, Drosera

Posted by Dion Almaer at 2:23 am

3.8 rating from 37 votes

Thursday, November 15th, 2007

Ajax, Browsers, Running Out of Time

Category: Browsers, Editorial

History repeats itself, first as tragedy, second as farce. — Karl Marx

I can remember the day, back in 1994, when I abandoned the Mac for Windows. It was a gloomy, overcast day when I made that bittersweet decision — I was a Mac and Unix nerd all through college — but after my twelfth or thirteenth crash of the day, I had had enough. Photoshop, Netscape, Secure Shell and Word were just not meant to run more than one at a time on Mac OS 7. Had I stayed with Apple through that rough patch I’m sure I would have been slimmer, sexier and happier, but NT 3.51 only crashed twice a day, so my hand was forced. I ran out and bought a PC that very day.

Now I fear history may be repeating itself. Yesterday, I had Firefox 2 for linux crash 5 times, and IE7 for XP crash 7 times. The cause? Too many fat Ajax applications. Zimbra, the whole Google bestiary of applications, Yahoo Mail, etc.. These are all long running applications that I keep open for most of the day. Then all of a sudden the Browser is gone and I have to relaunch and login all over again.

I’m not alone in this. Colleagues and friends report similar problems with Safari/Mac, IE7/Vista, Firefox/Mac. I’ve even checked with a friend that runs the helpdesk for a large firm: reported problems with browsers are up. The only one who seems blissfully unaffected is the lone Opera nerd in my office. He just keeps chugging along with what seem like 200 open tabs.

The cause should be evident to everyone. We’ve taken what was first called LiveScript — a crufty embedding just good enough to validate a form or two — and we’ve abused it into being the foundation for a whole new kind of application platform. The browsers have just not kept up and the situation will only get worse with the accelerated proliferation of Web 2.0 apps.

Help is on the way, in the form of bytecode interpreters and vm’s for Safari and Mozilla, though the future of IE is still cloudy (still, there is a plan to bring Tamarin to IE). But if the new Browser version don’t arrive quickly enough, or if they don’t fully solve the problem of browsers crashing once an hour, then a mass migration to Opera may be the best we can hope for. At worst, content and application producers will opt for more stable non-Ajax alternatives such as Flash or Silverlight.

Ajax and the browsers it depends on are running out of time. If the notion spreads that it isn’t reliable, it will be as dead as the Java Applet, never to be heard from again.

Posted by Dietrich Kappe at 10:33 am

4.2 rating from 111 votes

Wednesday, November 14th, 2007

MooTools 1.2 beta 1

Category: MooTools

The MooTools team has just released MooTools 1.2 beta 1 for public review. Some new items include:

The list of changes is WAY too long for this post so be sure to head on over to the MooTools blog for the full details.

Posted by Rey Bango at 10:20 am

3.9 rating from 62 votes

Tuesday, November 13th, 2007

Mozilla hunting for memory

Category: Debugging, Firefox, Performance

Firefox used to be the lean mean fast browser. Well, definitely fast. People flocked to it, in part, due to its speed. These days it seems like it is falling back and people are jumping on WebKit nightly, Opera, and even IE 7 as faster alternatives.

Mozilla is a little flummoxed by the birds memory appetite, and is going on a crusade to hunt down the issues, which are even more of an issue in mobile.

Stuart Parmenter, a Moz developer, has been doing some painful hard work for us. He started out discussing the memory fragmentation issue:

I’ve been doing a lot of work trying to figure out why after loading a lot of pages much of your memory seems to disappear. I’ve tested all sorts of things — disabling extensions, plugins, images, etc. I’ve run leak tools over and over looking for things we might be leaking. Occasionally I’ll find something small we’re actually leaking but more often than not I don’t see any real leaks. This lead me to wonder where our memory went. Firefox has a lot of caches internally for performance reasons. These include things like the back/forward cache (which helps speed up loading pages when you hit back), the image cache (keeps images in memory to help load them faster), font cache, textrun cache (short lived, but used to cache computed glyph indicies and metrics and such), etc. We also introduced in Gecko 1.9 the cycle collector which hopes to avoid cycles in XPCOM objects that we might hit. We’ve also got the JS garbage collector. All of these things mean we could be holding on to a bunch of objects that could be taking up space so we want to eliminate those from the picture. I released the RAMBack extension earlier this week which clears most of these things.

So, if it is none of these things, what is going on? Why after a while do we end up using more memory than we should be if we aren’t leaking and our caches are clear? At least part of it seems to be due to memory fragmentation.

At this point he tests the browser by opening up the browser on certain sites and taking them off. He then takes a peek at the heap:

He just followed up this post with another on Windows Low Fragmentation Heap which has some surprising results.

Knowing that someone is actively working on the issue is psychologically huge, so kudos to Stuart for sharing some of his initial findings, and good luck hunting!

Posted by Dion Almaer at 7:09 am

4.1 rating from 30 votes