You searched for: 'native'

Monday, February 25th, 2008

Ext Releases v2.0.2 with Adobe AIR Support

Category: Adobe, Ajax, Sencha

To coincide with the release of Adobe’s AIR v1.0, the Ext team released v2.0.2 of the Ext framework with enhanced support for the new AIR runtime. The Ext and Adobe teams collaborated during the AIR beta process to ensure that support for the updated AIR API and security sandbox would be available to Ext users from day one.

To demonstrate Ext’s AIR capabilities, founder Jack Slocum went about updating the Simple Tasks application he initially created during the early AIR beta process.

Making extensive use of the newly updated AIR API, the Ext team enhanced the Ext.air package to handle such functionality as:

  • Managing native windows, event listeners and automatic state management for the windows.
  • Use of the new synchronous database access introduced in AIR beta 3.
  • Native drag and drop and clipboard access.
  • Playing sounds.
  • Minimizing AIR applications to the system tray.

Adding an icon to the system tray is now a trivial task as can be seen in this code sample:

javascript

  1. var win = new Ext.air.NativeWindow({
  2.     id: 'mainWindow',
  3.     instance: window.nativeWindow,
  4.  
  5.     // System tray config
  6.     minimizeToTray: true,
  7.     trayIcon: 'ext-air/resources/icons/extlogo16.png',
  8.     trayTip: 'Simple Tasks',
  9.     trayMenu : [{
  10.         text: 'Open Simple Tasks',
  11.         handler: function(){
  12.             win.activate();
  13.         }
  14.     }, '-', {
  15.         text: 'Exit',
  16.         handler: function(){
  17.             air.NativeApplication.nativeApplication.exit();
  18.         }
  19.     }]
  20. });

In addition to demonstrating AIR apis, Simple Tasks v2 also includes several advanced samples to demonstrate creating custom Ext components. These samples include:

ListTree – Allows for a hierarchical list of options, similar to a treeview, but within a drop-down listbox

Custom Grid Columns – Allows for grid columns to be represented as buttons or menus

Switch – Provides a collection of buttons, one of which can be “pressed” at a time. This is used as an alternative for radio buttons.

Ext v2.0.2 is immediately available for download as is Adobe AIR v1.0

Posted by Rey Bango at 8:00 am
2 Comments

++++-
4.5 rating from 79 votes

Adobe AIR v1.0 & Flex 3.0 Released; New Adobe Open Source Site Launched

Category: Adobe, Ajaxian.com Announcements, Flash

Continuing their march into the RIA space, Adobe announced today the official release of AIR v1.0 and Flex 3.0.

Adobe has taken the beta off of the wrapper as their have released both AIR 1.0 and Flex 3.0.

As Ajax developers, Adobe is trying hard to get us developing applications, not just Flash folks. They have a place for us to start with AIR:

The new Adobe AIR runtime enables Ajax developers to build rich Internet applications (RIAs) that deploy on the desktop. AIR applications run across operating systems on the WebKit HTML engine and are easily delivered using a single installer file. With Adobe AIR, Ajax developers can use their existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web.

Adobe AIR

The AIR runtime and SDK has gone through an especially long beta cycle (since June 2007) to ensure that both security and compatibility with existing frameworks was achieved. Some key new and/or updated features include:

  • Enhanced Desktop Fucntionality: Drag and drop to the operating system, copy and paste between applications, launching of AIR applications from the desktop or the browser, and run in the background with notifications.
  • Data Access: Adobe AIR now provides both synchronous and asynchronous access to the local file system, as well as structured data within a local database. This database is implemented using the open source SQLite database.
  • JS Library Support: Most major Ajax frameworks can be used to build AIR applications. Supported frameworks include jQuery, Ext JS, Dojo, and Spry. Adobe AIR integrates JavaScript and ActionScript to allow cross-scripting between the two languages, and integrated rendering of Flash and HTML content.
  • Security: Applications built on Adobe AIR can only be installed through a trustworthy install process that verifies that the application is signed via industry standard certificates, providing users with information about the source and capabilities of the application.

Flex 3.0

Adobe’s Flash-based RIA development platform, Flex, continues to mature and has been picking up steam in both the corporate space as well as sites such as blist and Scrapblog who have embraced Flex whole-heartedly. Some of the new features in Flex 3.0 include:

  • Intelligent coding, interactive step-through debugging, and visual design of user interface layout
  • New capabilities for creating RIAs and building applications on Adobe AIR
  • Integrates with Adobe Creative Suite® 3 making it easy for designers and developers to work together more efficiently.
  • New testing tools, including memory and performance profilers and integrated support for automated functional testing, speed up development and lead to higher performing RIAs.

One of the most compelling parts of the Flex announcement is the fact that Adobe has released the Flex SDK under the open source Mozilla Public License.

Adobe Open Source Site Launch

Finally, Adobe announced the launch of their new Adobe Open Source site which aims to “presents the definitive view into open source activities at Adobe, including details regarding projects that Adobe participates in and hosts.”

The new…website is designed to keep you up to date on Adobe open source activities, within Adobe as well as with the larger world. It will also be the point of entry to our source code contributions, including Flex, BlazeDS and others. We’ll post news items, tell you where to see us, and keep you in touch with some of our favorite bloggers.

Currently, the site houses the Flex SDK, BlazeDS and Tamarin projects, all of which have been open-sourced by Adobe.

Aptana has coordinated the release of their AIR plugin that includes support for Jaxer which allows you to write AIR apps that run on the desktop that include server-side code, written in JS, that can run on your backend server.

Adobe also put together a list of featured applications that you can check out.

Hitting a “1.0” release is a big deal (as is a 1.0.1 ;), so congratulations to the entire Air team. Adobe is working hard to raise the bar in the RIA space by giving developers more tools with great functionality. 2008 is panning out to be an interesting year in web development.

Ben and I are at Adobe Engage today, and hope to find out more about Adobes plans in the coming year. We are live twittering using the #engage hash tag.

To end with something a little fun, and since it was the Oscars tonight:

Lisa Awards: Most Overloaded Product Name

NOTE: Rey and I both wrote a post on this big release. This post is a conjoining of both posts into one

Posted by Dion Almaer at 2:02 am
6 Comments

++++-
4.2 rating from 41 votes

Thursday, February 21st, 2008

DOMAssistant 2.6 Released

Category: JavaScript, Library

DOMAssistant 2.6 has been released and the team focused on performance for this version.

They have their own version of slickspeed which includes their library.

The CSS changes include:

Where querySelectorAll and getElementsByClassName aren’t available, DOMAssistant resorts to XPath to select elements, which is an approach that also has very impressive performance results, not to mention native web browser support. The only web browser not supporting XPath is Internet Explorer, where the only option is “regular” looping through elements.

The new version includes a new plugin architecture and an update of the magic methods:

The $ method

Accepts either a CSS selector or an object reference. E.g. $("#container .external-links"), $(document). Fails silently if you try to call a method when the selector didn’t return any matches; i.e., $("input[type=text]").addClass("text-fields") won’t throw an error trying to call the addClass method, even if the $ selector didn’t match any elements.

Returns: A collection of one or several nodes for CSS selectors/object reference when an object was sent in.

The $$ method

Accepts a string parameter, expected to be the id of an element. E.g. $$("container"), $$("navigation"). Will throw an error if you try to call a method, if there wasn’t any match.

Returns: A direct reference to the DOM element.

Posted by Dion Almaer at 7:55 am
1 Comment

+++--
3.5 rating from 25 votes

Wednesday, February 13th, 2008

Is easy implementation the same as good code?

Category: Accessibility, Examples, JavaScript, Security, Unobtrusive JS

I’ve just come across a solution for badges on web sites that makes it terribly easy for implementers. The idea is that the implementer could add a badge wherever they want in an HTML document, choose the look and feel and add a message to be shown. The implementation code is the following:

  1. <script src="badge.js" size="small" skin="blue">Brandname</script>

The badge script then replaces the script node with the badge using the settings defined for each script include. Clever, right? Well, almost. Security concerns and invalid HTML aside (the attributes – content inside a script is valid and should be ignored according to the W3C when a src attribute is present) there are many more issues with this:

  • you need to loop through all script nodes, read the info and create the correct badge – this can get slow
  • the badge.js script gets called over and over again, even if it is only needed once (granted, it will be cached)
  • every script inside a body makes the rendering engine stop, pull the src and try to execute either that or the content of the node – this makes for terrible performance.

I’ve written up an example of how the above works and three alternative solutions that work around these issues.

What do you think? Should the ease of implementation be the success factor or the performance for the end user?

Posted by Chris Heilmann at 7:45 am
12 Comments

+++--
3.2 rating from 26 votes

Tuesday, February 12th, 2008

Dojo Roundup: A/V, Animation, and a lot more

Category: Dojo

A lot of news came together at the Dojo Developer Days event.

Below is my meta-roundup based on Alex’s wrapup, and other news.

Animation

Eugene Lazutkin (SitePen) has been a busy man. His impressive work on dojox.gfx, dojox.gfx3d, and dojox.charting made Dojo 1.0 the best tool around for portably drawing vector graphics in a browser without plugins, and for 1.1 he’s updating dojox.gfx to include animations, based loosely on easy-to-use Dojo Core animation APIs. Shapes, transformations, colors, and other dojox.gfx properties can be animated, chained, and eased on any 2D drawing object in Dojo 1.1, all using the high-performance, single-timer animation system from Dojo Core.

Speaking of animations, Peter Higgins gave us a tour of some of the great components he’s been whipping up now that Robert Penner’s awesome easing function set has landed under CLA in dojox.fx.easing. Of course, you can plug these great easing functions into any Dojo animation, but examples like dojo.moj.oe really give them life.

Adobe AIR and Dojo

Rob Christensen and another of his colleagues from Adobe were kind enough to give us a thorough walk-through of Adobe AIR as well as showing off Dojo 1.1’s comprehensive support for AIR. This work was done by SitePen and Chris Barber with financial support from Adobe. Not only does the Dojo package system work as expected in AIR, new dojox.storage providers for AIR give a simpler interface onto AIR’s database, including for encrypted data. The demo showing a full Dojo-based application inside of AIR for quickly taking notes started to show the potential.

More

  • DojoX A/V: Starts as a way to embed flash and quicktime, but will also have a Jukebox and a Tuner. The bigger news here is that there is the beginnings of a partial port of some of the Dojo base to AS2 (including console pass-throughs, the event system (i.e. connect), and a number of the lang constructs) in order to support some of the A/V stuff well, all compiled using MTASC.
  • CSS Selectors: a new tutorial on how to use dojo.query to get fast selection fun. Also, Dojo 1.1 already has a patch that uses the new WebKit native selectors
  • Crypto: Blowfish now performs about 4 times faster than it used to
  • Charting: curves… mmm
  • DojoX Sketch: We reported about the Comet version
  • Color: In addition to adding conversion methods to HSL, HSV, CMY and CMYK, there is a Generator that allows you to create a palette of colors based on several well-known generation rules
  • Flash storage: Brad Neuberg started hacking and found that Adobe has fixed the serialization problems with Flash’s ExternalInterface, so a clean up is coming for dojox.flash, and Dojo Offline
  • A next-gen JSON-RPC for Dojo which supports pluggable back-ends

Posted by Dion Almaer at 8:01 am
10 Comments

+++--
3.8 rating from 34 votes

Tuesday, February 5th, 2008

MySpace Announces Developer Platform

Category: Ajax, JavaScript

In an obvious move to counter FaceBook’s expanding developer platform, MySpace, the top trafficked social network announced today the availability of the MySpace Developer Platform. News of the imminent release had been circulating for weeks and MySpace finally gave developers the keys to its playground.

The MySpace Developer Platform (MDP) allows developers to create applications that interact with MySpace members and their social data. With MDP you will be able to create compelling new products that integrate directly into MySpace pages and get exposure to millions of people around the world.

While still in it’s early stages, the sandbox will allow developers to start getting their apps ready. The fact that they’ve chosen to support the OpenSocial API should make it extremely attractive to developers that want to have some level of cross-social network integration.

JavaScript at the Forefront

As with FaceBook, JavaScript-based technology, especially Ajax, will play a crucial role in building MySpace applications. Acknowledging their issues with JavaScript exploits in the past, MySpace has tapped OpenSocial as a means to provide a rich development environment while protecting it’s users from the spammers and hackers that have plagued the site in the past.

As spammers propagated through the site, MySpace began blacklisting certain types of JavaScript, HTML, and CSS. We tried very hard to keep as much JavaScript as possible, but slowly and surely illegitimate users hacked away at our filters until finally JavaScript was banned entirely. That left third party application developers with only one dyanmic alternative: Flash. Sites like YouTube saw their birth as widely disseminated Flash decorations for MySpace profiles. Unfortunately, by this time such applications were completely locked out of the MySpace data stream.

So–why is MySpace doing OpenSocial? Because every time we locked down a new JavaScript exploit we were sad, because we knew that legitimate application developers were getting hobbled as a result. For every ten spammers we blocked, we were blocking at least a few people trying to make a living by entertaining our users in a positive way. The OpenSocial platform gives us a chance to let MySpace users play again–this time in a safer, more structured, but at the same time more flexible way.

Providing this level of abstraction should “hopefully” provide much greater flexibility for an expanded user experience especially with the new set of capabilities that will be included in the MySpace API. These include:

  • A suite of online tools for creating and publishing applications (and debugging them).set of RESTful APIs (provided in json, xml, and other formats as needed) that provide endpoints for browser-to-site and site-to-site interaction. These are implemented over the http protocol using a simple, intuitive uri scheme.
  • A mechanism for your application to exchange data with your own site.
  • A system for end users to find and install applications on their profiles.
  • Security mechanisms for protecting end users’ identity, as well as communications verification between MySpace servers and your site.

Apart from the security benefits, the use of OpenSocial is a big enticement as developers will now have the hooks to integrate between MySpace and other social networks such as Bebo, Ning, Plaxo and Six Apart. This alone could be a huge factor in future growth for MySpace which has seen FaceBook slowly cut away at it’s dominance. It will be interesting to see how FaceBook replies to this. While they’ve recently released their JavaScript library to the development community at large and have opened up their “walled garden”, their lack of support for a “standard” social network API and MySpace’s announcement may force them to reconsider integrating with OpenSocial; much to the pleasure of Google.

You can see a video demonstration of an OpenSocial MySpace Application, presented by Chris Bissell, Chief Software Architect at MySpace, here:


Posted by Rey Bango at 10:48 am
6 Comments

+++--
3 rating from 15 votes

Monday, February 4th, 2008

Adobe Tamarin Tracing JIT for JavaScript

Category: JavaScript, Performance

Chris Double attended the Tamarin Tech summit, and gives us some information about Tamarin Tracing the new trace based JIT experiment:

‘Tamarin Tracing’ is an implementation that uses a ‘tracing jit’. This type of ‘just in time compiler’ traces code executing during hotspots and compiles it so when those hotspots are entered again the compiled code is run instead. It traces each statement executed, including within other function calls, and this entire execution path is compiled. This is different from compiling individual functions. You can gain more information for the optimizer to operate on, and remove some of the overhead of the calls. Anytime the compiled code makes a call to code that has not been jitted, the interpreter is called to continue.

Apparently the JIT for Lua is also being written using a tracing jit method and a post by Mike Pall describes the approach they are taking in some detail and lists references. A followup post provides more information and mentions Tamarin Tracing.

Brendan Eich talked about trace based JIT’s as being the future of JavaScript VM’s, and a reason why we will see insanely fast JavaScript without needing all of the type fun.

Here is one simple benchmark of a fibonaci equation solution that doesn’t do any caching tricks:

# Turn off the tracer
$ shell/avmshell -lifespan -interp fib.abc
fib 30 = 1346269
Run time was 26249 msec = 26.25 sec

# Turn on the tracer
$ shell/avmshell -lifespan fib.abc
fib 30 = 1346269
Run time was 1967 msec = 1.97 sec

Chris finishes with some fun facts:

  • The interpreter is written in Forth. There are .fs files in the ‘core’ subdirectory that contains the Forth source code. Each ‘abc’ bytecode is implemented in lower level instructions which are implemented in Forth. The tracing jit operates on these lower level instructions. The system can be extended with Forth code to call native C functions. The compiler from Forth to C++ is written in Python and is in ‘utils/fc.py’
  • The jit has two backends. One for Intel x86 32 bit, and the other for ARM. See the ‘nanojit’ subdirectory.
  • The complete interpreter source can be rebuilt from the Forth using ‘core/builtin.py’. This requires ‘asc.jar’ to be placed in the ‘utils’ subdirectory of Tamarin Tracing.

Posted by Dion Almaer at 9:33 am
Comment here

++++-
4 rating from 27 votes

Functional Programming with JavaScript and Dojo

Category: Dojo, JavaScript

Eugene Lazutkin has written a piece on Functional fun in JavaScript with Dojo where he delves into the land of functional and how it is available in JavaScript.

Eugene maps out some of the helpful functions that JavaScript itself has added over time:

  • JS 1.6 (in Firefox 1.5) introduced
    so-called Array extras:
    special Array methods, which help to simulate lists with arrays:
    indexOf(), lastIndexOf(), every(), some(), filter(), map(),
    forEach(). The last five methods are especially important because
    they help to eliminate the most common direct loops.
  • JS 1.7 (in Firefox 2) introduced Array comprehensions borrowed from Python. The new syntax allows to generate arrays using
    a compact yet clear notation reducing the possibility of errors. And
    of course iterators and generators will helps us with cleaner loops
    too. Another goody is the block scope with “let”.
  • JS 1.8 (in Firefox 3) brought us
    more Array extras:
    reduce() and reduceRight(). They give us a native support for
    all-important folds. Another notable additions are expression
    closures (simplified one-line functions), and generator expressions.
  • JS 2 (ES4 PDF)
    takes us even farther: for each statement, tail calls, and the whole
    raft of language improvements. Presumably JS 2 will come with the
    next generation of JavaScript virtual machines helping to reduce
    penalties for using new abstractions.

… and how Dojo implements many so you have cross browser access.

He goes into detail on his favourite five: filter(), map(), forEach(), every(), and some().

E.g.

javascript

  1. var percents = dojo.map(values, function(val){ return val / sum; });
  2.  
  3. var sum = 0;
  4. dojo.forEach(values, function(val){ sum += val; });

Next he goes beyond core to dojox.lang.functional where lambda is your friend:

javascript

  1. var div2 = df.lambda("/2");

What about performance? We get a nice run down on the performance of the Dojo functions compared to native ones if they are available.

Very thorough indeed.

Posted by Dion Almaer at 8:18 am
7 Comments

+++--
3.7 rating from 30 votes

Saturday, February 2nd, 2008

Ajaxian Roundup for January, 2008: JavaScript Turtles and IE 8

Category: Roundup

January has started the month out in some style. We are seeing a lot of news that shows the Web may actually be moving forward a little. One sign of that is the trickle of news that comes out of Redmond on IE 8. IE8 Compatibility with X-UA-Compatible sparked debate throughout the entire Web community, and when all is said and done, it shows you what happens when you do not have good early communication. Just work with us. Before you ship. Chat with Hixie and get involved in HTML 5 now.

JavaScript continues to thrive and move throughout the stack. First we had the news of Aptana Jaxer, which allows you to write your Ajax code and have it run on the server. This even means munging with the DOM and having it all work and spit out HTML. This isn’t your old ASP JScript.

I also had the pleasure of chatting with Steve Yegge on Rhino on Rails: JavaScript MVC on the server where we discussed the implications of having a Rails port in JavaScript.

The browsers keep getting better, and we saw real support for Cross-Site XMLHttpRequest in Firefox 3 and the like. I have been talking over Google Gears future APIs that may be in early stage work, or just ideas in my head. I think that we are getting the word out about Gears not being just about Offline, but a tool to upgrade the Web on the fly.

We are seeing more of the social networks getting into the mix. Facebook released an Animation library and then followed that up with a full JavaScript Client Library.

And then Google just released the Social Graph API.

A great month, and here is to the next one:

JavaScript

Prototype

Dojo

Ext

jQuery

GWT

YUI

DWR

Gears

Flash / AIR

JSON

Browsers / HTML Standards

CSS / Design

Comet

Security

Editorial

Showcase

Posted by Dion Almaer at 12:58 am
3 Comments

++++-
4.1 rating from 14 votes

Thursday, January 31st, 2008

Secure String Interpolation in JavaScript

Category: JavaScript, Library, Security

Mike Samuel of the Google Caja team (and much more) has a fantastically detailed document on the choices for secure String interpolation in JavaScript.

He spends a lot of time discussing:

There are a large number of examples a long the way:

javascript

  1. var ids = [1, 2, 3, 4];
  2. var column = 'value';
  3. var foo = 'foo';
  4.  
  5. open(Template("SELECT $column FROM Table WHERE id IN $ids AND foo LIKE $foo"))
  6. // === "SELECT `value` FROM Table WHERE id IN (1, 2, 3, 4) AND foo LIKE 'foo'"

Posted by Dion Almaer at 10:46 am
5 Comments

+++--
3.7 rating from 25 votes

JSON 2.0: Libraries and browser support

Category: Browsers, JavaScript, JSON, Library

John is at it again, writing a piece on recent news surrounding JSON.

He links to an updated library by Douglas Crockford,

  1. JSON.stringify({name: "John", location: "Boston"});
  2. // => "{'name':'John','location':'Boston'}"
  3. JSON.parse("{'name':'John','location':'Boston'}");
  4. // => {name: "John", location: "Boston"}

It also turns out that Mozilla implemented this functionality in the browser (time for a wrapper):

javascript

  1. var nativeJSON = Components.classes["@mozilla.org/dom/json;1"]
  2.     .createInstance(Components.interfaces.nsIJSON);
  3. nativeJSON.encode({name: "John", location: "Boston"});
  4. // => "{'name':'John','location':'Boston'}"
  5. nativeJSON.decode("{'name':'John','location':'Boston'}");
  6. // => {name: "John", location: "Boston"}

And in conclusion:

The final, and most important, step is being worked on right now – a way to access native JSON encoding and decoding from web pages. How it’ll be accessible is up to some debate (as having its naming conflict with an existing object would be a really bad thing). Regardless, there should be something within the browser by the time the Firefox 3 betas wrap-up.

Posted by Dion Almaer at 5:00 am
2 Comments

++++-
4.5 rating from 17 votes

Tuesday, January 29th, 2008

You Used JavaScript to Write WHAT?

Category: Articles

Michael Morrison, author of Head First JavaScript, has written a piece for CIO magazine titled You Used JavaScript to Write WHAT? which is part of a series of articles on when to use a particular language or platform.

It is always interesting to see what the CXO folks are reading wrt our beloved Web :)

The other side of the coin is the mentality of viewing a Web application as a program, as opposed to a page. In this scenario, the application is utterly dependent on the active functionality made possible by JavaScript, which means it’s okay to forego users who lack JavaScript support. Google has embraced this philosophy in several marquee products, two of which are extremely popular: Gmail and Google Maps. Both applications make extensive use of Ajax (JavaScript), and neither apologizes to users who can’t run them due to a lack of JavaScript. If this article had been written just a few short years ago, I might have used an e-mail application as the ridiculous example of when not to use JavaScript, instead of Halo. But Gmail has pushed through that barrier.

Even if JavaScript-powered, web-based e-mail ultimately takes hold, surely there are other stand-alone applications that will just never make sense in Web form. Two such applications that come to mind are video and photo editing. Similar to games, these are such media-intensive applications that they just can’t make sense in JavaScript, right? Yet Adobe has already released Premiere Express for online video editing and is putting the finishing touches on Photoshop Express for Web-based photo editing. What’s interesting about these applications is that they aren’t technically built in JavaScript; they’re built in ActionScript, a close cousin of JavaScript used in Adobe’s Flex development environment. But the ActionScript in these applications is compiled, so the net effect is more akin to a native application. Adobe may be foreshadowing the future of Web scripting to some degree, at least in terms of building more feature-rich applications. And in doing so, they’re forcing us to rethink just what is possible with scripting languages.

Posted by Dion Almaer at 6:32 am
9 Comments

+----
1.9 rating from 33 votes

Monday, January 28th, 2008

A Study of Ajax Performance Issues

Category: Ajax, Articles

Coach Wei, of Nexaweb and Apache, has published a study of Ajax performance issues in browsers, and they won’t surprise you:

Obviously, we would like to see browser vendors take a serious look into the following issues and put them on their roadmap:

  1. In all major browsers, performance with Array and HTML DOM needs improvement in general.
  2. Browsers need to provide API support for Computed Box Model and Style;
  3. FireFox needs to improve performance of “eval”, object creation and “in” operation
  4. Internet Explorer needs to improve performance in general to be at least on par with other browsers. Beyond that, “String” manipulation on IE needs continued improvements;
  5. Safari: “pop” operation performance needs improvement
  6. Just-in-time (JIT) compiler: This maybe a bigger task than an incremental fix of some existing features, however, it is worthy of every penny. JIT will not only fix the String manipulation issue, it will enable JavaScript to truly shine in matching the performance of native applications. The amount of client side logic (aka, JavaScript code) needs to grow in order to accommodate the growth of application complexity, for which JavaScript runtime performance problem can be a major bottleneck.

Read the study to get the details on each item. It includes the results such as the DOM operation performance information:

Ajax Performance Study

Posted by Dion Almaer at 5:18 am
11 Comments

+++--
3 rating from 42 votes

Thursday, January 17th, 2008

CommandProxy: Integrating AIR and .NET

Category: .NET, Adobe

CommandProxy is a proof of concept by Mike Chambers (Adobe AIR team) that offers a solution to a feature that Ben and I have wanted in AIR…. the ability to talk to native code:

Two of the most requested features for Adobe AIR have been the ability to launch native executables from an AIR application, and the ability to integrate native libraries into an AIR application. Unfortunately, neither feature will be included in Adobe AIR 1.0.

However, this does not mean that you cannot build an AIR application that has closer / tighter integration with the underlying operating system. This lower level of integration is possible, but it requires some work on your part. I have put together a proof of concept project, which shows how to integrate Adobe AIR applications with c# / .NET code on any operating system that Adobe AIR currently runs on (Mac and Windows). The project is called CommandProxy. It provides a communication proxy between an AIR application and the underlying operating system and could theoretically work with other web based desktop runtimes (such as Mozilla Prism).

How does it work?

The general concept behind the project is similar to the now defunct Artemis project (which was Java based). The AIR application communicates with the CommandProxy process to communicate and integrate with the underlying operating system. Currently the command proxy supports launching processes (and getting the output from the processes) as well as taking a screenshot of the user’s current screen. However, the framework is built in such a manner that it is possible to add new functionality to the proxy.

The project is opensource and more info is available on the project page on Google Code.

Posted by Dion Almaer at 1:27 pm
3 Comments

+++--
3.2 rating from 26 votes

Wednesday, January 2nd, 2008

Google Gears Future APIs

Category: Editorial, Gears, Google, JavaScript

Gears Monster

Over on my personal blog I kicked off a series of articles on some future APIs that are on the table for Gears, and how in my opinion, Gears is mistakenly seen to be about “offline”, when that is just the surface.

I started off by discussing the Image Manipulation API, “is a module to give Javascript a way to resize, crop and compose images together on the client side. This will allow, for example, images to be resized into a web-friendly format before being uploaded to a photo album. Another use is for composition of images together as an efficient alternative to server-side composition or CSS layering. Yet another use is for basic photo editing – a user can edit a photo with instantly applied changes before uploading it to the server.”

Then I went on to the Desktop Shortcut API where you can:

javascript

  1. <br /> var desktop = google.gears.factory.create('beta.desktop');<br /> desktop.createShortcut("Test Application",<br /> "An application at http://www.test.com/index.html",<br /> "http://www.test.com/index.html",<br /> {"16x16": "http://www.test.com/icon16x16.png",<br /> "32x32": "http://www.test.com/icon32x32.png",<br /> "48x48": "http://www.test.com/icon48x48.png",<br /> "128x128": "http://www.test.com/icon128x128.png"});<br />

The Location API provides a means to fetch the location of a device running a Web browser with Gears:

The Location API is an abstraction for the various LBS APIs that currently exist on mobile platforms (GPS-based, network/cellid-based). The API consists of the Location class, which encapsulates various location attributes (latitude, longitude, etc), and also provides the means to query the platform for a location fix. This API also adds a new event type that is fired every time the location changes. Location implementations can be straightforward mappings to native LBS APIs (e.g the S60 Location Acquisition API) or have a more complex design that combines several location providers (e.g a GPS-based provider and a cell id-based provider) and returns the location from the most accurate provider at any given time.

The Messaging API fits in with the current WorkerPool API to give you cross domain rich messaging:

javascript

  1. <br /> var port = google.gears.factory.create('beta.messageport', '1.0');<br /> port.onmessage = function(port, msg, sender) {<br /> alert("message: " + msg);<br /> };<br /> port.listen("name");   // Omit for anonymous listener.</p> <p>// and having a way to send it a message:</p> <p>var port = google.gears.factory.create('beta.messageport', '1.0');<br /> port.open("name");<br /> port.sendMessage("hello there");<br />

There there were smaller fry such as a Logging API, the Blob API, and Factory API updates.

To finish off we have the issue of developer tools. We need to make sure developers have the tools they need to enable successful app development using the APIs, so we want to first add:

  • Database
  • List databases per origin
  • Create new
  • Delete
  • Interactive DB command line (can just use existing /sdk/tools/dbquery.html)
  • LocalServer
    • List ResourceStores (and ManagedResourceStores) per origin
    • ResourceStore and ManagedResourceStore status (last error, update history, etc)
    • command line (like db command line, but pointed at localserver DBs)
  • WorkerPool
    • Show running workers
    • Interactive JS prompt to run JS inside a worker
    • Interactive prompt to send messages to a worker
  • Logging (requires LoggingModule)
    • Show logging in real time as it happens
    • Show historical logging
    • Sort/filter by origin/page of source page

    I would love to see what you would like to see, and these thoughts will be the subject of future posts.

    Posted by Dion Almaer at 8:32 am
    Comment here

    +++--
    3.3 rating from 37 votes

    Tuesday, January 1st, 2008

    Ajaxian Roundup for December, 2007: It’s the end of the year as we know it

    Category: Roundup

    Happy New Year. I was tempted to post a top ten list of the best aggregators of top ten lists, but decided against it ;)

    I hope that 2008 finds everyone well, and the Web in a better place. In 2007, the Web development community has jumped a lot, but at the same time, hasn’t changed at all.

    We have seen the browsers really kick into gear. Firefox 3 beta is looking surprisingly fast and good. WebKit has taken the browser world by storm from the stand point of so many companies hacking away on it. From Adobe AIR, to Android, to Nokia, and beyond. Opera gives us a good experience on the Wii.

    And IE…. they have a name for the next browser, and showed a smiley face with the promise of good CSS.

    The major libraries are all pretty solid, and the core features are all matched. It is hard to go wrong with your choice now if you keep to the main track. We had the promise of more tools, and Aptana has stepped up a little as well as others. In 2008, we should be seeing many more projects coming out of stealth mode. This is so needed as it is still too hard to develop web applications. For tonight, it is time to hope. Tomorrow, we try to make it happen.

    Cheers to all. Here is the roundup:

    Browser

    JavaScript

    Prototype

    Ext

    YUI

    jQuery

    Microsoft

    DWR

    Editorial

    Security

    Performance

    Showcase

    GWT

    Comet

    CSS

    iPhone

    Posted by Dion Almaer at 12:47 am
    7 Comments

    +++--
    3.8 rating from 18 votes