You searched for: 'native'

Monday, February 12th, 2007

parseUri: Another JavaScript URL parser

Category: JavaScript, Library

Steven Levithan saw the Poly9’s Polyvalent Javascript URL Parser and thinks he has done one better.

He created parseUri and thinks it has advantages:

  • Ability to split the directory path and file name.
  • If a path component was present in the source URL, it will always return a trailing slash as the last character in the directoryPath component (this is easy to remove if a user does not want this functionality).
  • Offers convenient, pre-concatenated commonly used component pairs (authority = domain + port; path = directoryPath + fileName).
  • Much lighter weight (literally only a few lines of code).
  • Cleaner syntax (e.g., parseUri(someUri).port).
  • Unlike the alternative code, it does not include an extemely weak and flawed attempt at validation.
  • It’s much more flexible, since all URL components are optional.
  • Uses cleaner regular expression syntax.
  • More closly follows the generic URI syntax spec set in RFC 3986
  • Available in JavaScript and ColdFusion implementations.

So, Is there any leaner, meaner URI parser out there?

Posted by Dion Almaer at 5:28 am
Comment here

4.2 rating from 49 votes

Thursday, January 25th, 2007

JDA Emulator: Spring for JavaScript

Category: JavaScript, Library

Peter Svensson liked what he saw in MAYA Design Inc.’s JDA implementation, but wanted an open source alternative.

He created a free LGPL implementation of Javascript Dataflow Acrhitecture (JDA) called the JDA Emulator.

What is JDA?

JDA is basically a javascipt microkernel along the same lines as Spring or Hivemind for Java. The wiring of the js components are done in the HTML page, inside div’s (or whatever) with special attributes, that’s all! So yuo don’t need any stinking XML anymore.

  • HTML-based black box composition specification
  • Javascript black box packaging specification
  • An asynchronous message-passing microkernel written in Javascript
  • An attempt to promote evolutionary design and to bring about seamless interoperability to the Web
  • An attempt to once again give rise to the spirit of tinkerers on the Web!

You can check out the test page.

  1. <div id="my_button"
  2.     impl="~6B5EAB0E6AD4483e84D3D5EF14C80000"
  3.     properties="name:'Foo'"
  4.     script="Button.js"
  5.     connections=" 'button_out' : [['my_infotron', 'trigger_in']]">
  6. </div>
  8. <div id="my_infotron"
  9.     impl="~6B5EAB0E6AD4483e84D3D5EF14C8AEE7"
  10.     properties="greeting:'Hello World'"
  11.     script="Greeter.js">
  12. </div>

Update from MAYA

After talking to MAYA Design: they do allow use of their upcoming 0.95 implementation of the JDA, even commercially. They are also discussing whether to publish it under some kind of GPL license.

Posted by Dion Almaer at 9:22 am

3.5 rating from 25 votes

Tuesday, January 23rd, 2007

Microsoft announces the ASP.NET Ajax 1.0 Release

Category: .NET, Ajax, Microsoft

Microsoft has announced the final 1.0 release of ASP.NET Ajax (a.k.a. Atlas).

It consists of a core platform, and a bunch of controls:


ASP.NET AJAX 1.0 delivers a rich client-side AJAX library that provides cross platform, cross browser support for a core JavaScript type-system, JSON-based network serialization stack, JavaScript component/control model, as well as common client JavaScript helper classes. ASP.NET AJAX also delivers a rich server-side library that integrates AJAX functionality within ASP.NET, and enables developers to easily AJAX-enable existing ASP.NET 2.0 sites with minimal effort.

ASP.NET AJAX is available for free, and can be used with ASP.NET 2.0 and VS 2005. It is a fully supported Microsoft product, and is backed by a standard 10 year Microsoft support license (with Microsoft Product Support available via phone 24 hours a day x 7 days a week).

ASP.NET AJAX Control Toolkit

In addition to the fully-supported ASP.NET AJAX 1.0 release, you can use the more than 30 free ASP.NET AJAX enabled controls available within the ASP.NET AJAX Control Toolkit.  The control toolkit is a shared-source collaborative project built together by a team containing both Microsoft and non-Microsoft developers (visit the CodePlex Project to learn more, or volunteer to contribute).  All source for the controls is provided completely for free (with full re-use and modification rights). 

The majority of controls within the ASP.NET AJAX Control Toolkit leverage the “Control Extender” pattern that the core ASP.NET AJAX library introduces, and which delivers a super powerful way to easily enable specific AJAX scenarios on a site with minimal effort.

Future Plans

While the core ASP.NET AJAX 1.0 release is now officially shipped, we are definitely not slowing down. :-)

All of the ASP.NET AJAX 1.0 features will be integrated directly into the next release of ASP.NET (codename: “Orcas”). Visual Studio “Orcas” will also provide client-side JavaScript intellisense, JavaScript compilation checking, and rich JavaScript debugging support for ASP.NET AJAX scenarios.

We are also already at work on the next ASP.NET AJAX release, and will continue to add new features and improvements to the supported ASP.NET AJAX core. You can already start using many of these new features with the ASP.NET AJAX Futures CTP (available for download now on the ASP.NET AJAX site – it also supports a “go live” license).

Is the Microsoft camp of developers going to listen to the ivory tower and use this? Or will you be looking for alternatives?

Posted by Dion Almaer at 4:50 pm

4 rating from 151 votes

Monday, January 22nd, 2007

Java to JavaScript Compilation with Ajax and Spring Integration

Category: Articles, Java

Ben Alex of Interface 21 has written a detailed post on Java to JavaScript compilation.

The article discusses some of the choices out there (GWT, OpenLaszlo) and goes into an open source alternative called Java2Script Pacemaker.

Spring integration is shown and available for download and it concludes:

J2S promises some attractive benefits for projects that require JavaScript compilation or a web browser implementation of SWT. It also interoperates successfully with a Spring backend. J2S’ deliberate choice to leverage proven existing technologies such as AST and SWT make it a good example of reusing existing code and developer skills, in turn lowering adoption barriers and the prospect of material API change. If you consider yourself an early adopter, SWT devotee, or need a client-centric, web-based user interface that is built upon the mature SWT UI framework, it is definitely worth taking a closer look at J2S.

Does SWT support do it for you?

Posted by Dion Almaer at 10:40 am

3.2 rating from 31 votes

Friday, January 19th, 2007

Mootools Updated Documentation for 1.0

Category: Articles, JavaScript, Library

Aaron Newton has updated his excellent Mootorial documentation for Mootools.

He has updated the docs for the near complete 1.0 release, and has migrates the docs to a wiki, so others can share his load.

The examples have the cool feature of plugging into the Firebug console, and at various points you can execute this code.

The documentation is extensive and covers:

Posted by Dion Almaer at 8:42 am

3.5 rating from 33 votes

JsHttpRequest: Low level Ajax library

Category: Library, PHP

Dmitry Koterov has written JsHttpRequest a light wrapper on top of XHR and friends that features:

  • Cross-browser compatibility. Library works with IE5.0+, Mozilla 1.7+, FireFox 1.0+, Opera 7.3+, Safari (“+” means “in specified and newer versions”). By this token, code could work without ActiveX and XMLHttpRequest support (but if these capabilities are avalilable, they are used automatically).
  • File uploads from user browser to the server without page reloading.
  • Full support of PHP debug features. If server-side script fails on an error (including fatal error, e.g., call of undefined function), client-side script can handle it correctly and show diagnostics. Besides response data, it is passed the output flow of server-side script which contains PHP error messages.
  • Multi-dimensional data structures exchange (JSON analog) in client request and server responce. At that, are used the standard PHP instruments — multi-dimensional associative arrays (request data avaliable at $_REQUEST, response data may be saved to $_RESULT), as well as JavaScript standard capabilities — nested objects and properties. No XML in the level of API: you work with “native” language variables.
  • PHP session support using usual way.
  • Optimal data loading method choosing (XMLHttpRequest, Microsoft.XMLHTTP, <SCRIPT>, <IFRAME>) depending on current browser. In particular, ability to load data from foreign hosts.
  • Interface is compatible with XMLHttpRequest.


Posted by Dion Almaer at 8:30 am

3.4 rating from 53 votes

Friday, January 12th, 2007

Rumour: Safari for Windows?

Category: WebKit

Mary Jo Foley digs deep in her reporting. This time she noticed a wiki entry on the Mozilla side that thinks Apple may have Safari on Windows with likely ties to iTunes & .Mac.

I don’t know if this makes any sense. The reason I fire up Safari is:

  • Very fast on the Mac
  • Nice, native components

Would SafariWin just use Windows components? Would it be significantly faster than the other options on Windows to make it worth while?

As of this writing, the poll on Mary’s site had the following results:

should safari win

Disclaimer: this is huge speculation

Posted by Dion Almaer at 9:42 am

3.5 rating from 40 votes

Monday, January 8th, 2007 Tag clouds meets To Do lists

Category: Showcase

InterfaceThis has launched an alternative To Do list that combines Ajax/DHTML, the power of tag clouds, and the simplicity of a whiteboard to provide a fresh approach to task management.

It features:

  • View and enter tasks quickly and easily, from anywhere.
  • Put everything on your mind in your Braindump list. Put near-term tasks in your Now list.
  • Set due dates and priorities. Categorize with tags.
  • Overdue tasks move automatically to your Now list.
  • Work with your tasks in an informative task cloud, color-coded by tag and sized by priority. Sort alphabetically, by date, or by priority.


Posted by Dion Almaer at 7:23 am

3.2 rating from 17 votes

Thursday, January 4th, 2007

JSON vs. XML: The Debate

Category: Editorial

The big debate over the winter holidays seems to be people shouting about JSON vs. XML.

Dare Obasanjo has a nice round-up, as well as his own opinions on the matter:

In the past two weeks, I’ve seen three different posts from various XML heavy hitters committing this very sin

  1. JSON and XML by Tim Bray – This kicked it off and starts off by firing some easily refutable allegations about the extensibility and unicode capabilities of JSON as a general data transfer format.
  2. Tim Bray on JSON and XML by Don Box – Refutes the allegations by Tim Bray above but still misses the point.
  3. All markup ends up looking like XML by David Megginson – argues that XML is just like JSON except with the former we use angle brackets and in the latter we use curly braces + square brackets. Thus they are “Turing” equivalent. Academically interesting but not terribly useful information if you are a Web developer trying to get things done.

This is my plea to you, if you are an XML guru and you aren’t sure why JSON seems to have come out of nowhere to threaten your precious XML, go read JSON vs. XML: Browser Security Model and JSON vs. XML: Browser Programming Models then let’s have the discussion.

If you’re too busy to read them, here’s the executive summary. JSON is a better fit for Web services that power Web mashups and AJAX widgets due to the fact that it is essentially serialized Javascript objects which makes it fit better client side scripting which is primarily done in Javascript. That’s it. XML will never fit the bill as well for these scenarios without changes to the existing browser ecosystem which I doubt are forthcoming anytime soon.

Next up: CSV vs. Fixed Width Documents.

Update: Dare’s round-up missed the real instigator of the JSON vs. XML meme: Dave Winer’s blog (here and here). Fun quotes, like this one from Dave:

As Dr Phil asks — What were they thinking?

No doubt I can write a routine to parse this, but look at how deep they went to re-invent, XML itself wasn’t good enough for them, for some reason (I’d love to hear the reason). Who did this [JSON] travesty? Let’s find a tree and string them up. Now.

And Douglas Crockford’s (JSON guy) reply:

I liked the part where Dr Phil said “What were they thinking?” I asked the same question when I first saw XML being proposed as a data format. There were obviously better alternatives.

The good thing about reinventing the wheel is that you can get a round one.

Don’t miss the two different comment threads as well, here and here. Fun times ahead as web service and Web Service APIs continue to collide. – Ben

Posted by Dion Almaer at 9:04 am

4 rating from 85 votes

Thursday, December 21st, 2006

Create cross browser vector graphics with Dojo

Category: Canvas, Dojo, UI

Dylan Schiemann, co-creator of the Dojo toolkit, has written a broad piece on creating cross browser vector graphics with Dojo.

The article delves into the new dojo.gfx library that abstracts the slight mess of SVG vs. Canvas vs. VML.

One of the examples in the article discusses drawing a clock with this snippet that shows drawing the clock hands, along with their shadows:


  1. this.shadows.hour.shadow = this._initPoly(this.surface, hP)
  2.     .setFill([0, 0, 0, 0.1]);
  3. this.hands.hour = this._initPoly(this.surface, hP)
  4.     .setStroke({color: this.handStroke, width:1 })
  5.     .setFill({
  6.         type:"linear",
  7.         x1:0, y1:0, x2:0, y2:-27,
  8.         colors:[{offset:0, color:"#fff"}, {offset:0.33, color:this.handColor}]
  9.     });
  10. this.shadows.minute.shadow = this._initPoly(this.surface, mP)
  11.     .setFill([0, 0, 0, 0.1]);
  12. this.hands.minute = this._initPoly(this.surface, mP)
  13.     .setStroke({color: this.handStroke, width:1 })
  14.     .setFill({
  15.         type:"linear",
  16.         x1:0, y1:0, x2:0, y2:-38,
  17.         colors:[{offset:0, color:"#fff"}, {offset:0.33, color:this.handColor}]
  18.     });

What features are supported

  • Strokes (borders)
  • Fills
  • Shapes and Paths
  • Opacity
  • Linear Transformations
  • Rounded Corners

If you have wanted “the ability to draw and modify non-rectangular, browser-native shapes” then check out the article and dig deeper:

Posted by Dion Almaer at 8:30 am

4.1 rating from 30 votes

Tuesday, December 19th, 2006

jQuery updates: 1.0.4, documentation, and people

Category: JavaScript, jQuery, Library

You have to hand it to the jQuery guys, they work really hard with their community.

There have been a few posts recently that relate to the jQuery world:

jQuery 1.0.4 Release

A new 1.0.4 release focused on updates to the Ajax functionality:

  • Extensions to $.ajax()
    • Add extra headers to an Ajax request using beforeSend
    • Perform a synchronous Ajax request
    • Sending a JavaScript object using processData
    • Aborting an Ajax request after a specific delay in time
  • AJAX module: The public $.ajax API is now used internally
  • New global Ajax handler: ajaxSend – called before an Ajax request is sent.
  • Extensions to global Ajax handlers: ajaxSend, ajaxSuccess, ajaxError and ajaxComplete get XMLHttpRequest and settings passed as arguments.
  • Extensions to event handling: pageX and pageY are available in all browsers now. (IE does not provide native pageX/Y).
  • Improved docs: $(String) method has now two separate descriptions, one for selecting elements, one for creating html on-the-fly.
  • FX module: Most inline styles added by animations are now removed when the animation is complete, eg. height style when animating height (exception: display styles).


The community is trying to help you understand jQuery.

Meet the team

John tries to get the names out, so you feel like the team is really part of the community. To promote this he just posted about the team behind jQuery.

Posted by Dion Almaer at 8:53 am

4.5 rating from 48 votes

Tuesday, December 12th, 2006

ThinWire 1.2 RC 1 Released

Category: Announcements, JavaScript, Toolkit

ThinWire 1.2 RC 1 has been released.

ThinWire is an LGPL open source, free for commercial use, development framework that allows you to easily build applications for the web that have responsive, expressive & interactive user interfaces without the complexity of the alternatives. While virtually any web application can be built with ThinWire, when it comes to enterprise applications, the framework excels with its highly interactive and rich user interface components. Use ThinWire to handle the view-layer of your Java EE (J2EE) application and you’ll be able to provide an unparalleled user experience, while at the same time completing your project faster than ever.

ThinWire 1.2 RC 1 has too many updates to mention, and they are detailed in the release notes.

The Playground is a dashboard that shows off all of the components.

ThinWire RC 1

Posted by Dion Almaer at 8:38 am

3.7 rating from 17 votes

Wednesday, December 6th, 2006

Dojo 0.4.1: Stability, Performance, and more

Category: Announcements, Dojo

The Dojo Toolkit has a new version 0.4.1 release.

We talked to Alex Russell about the release:

What is good about 0.4.1

It’s a stability and performance release so we recommend it for everyone who was already using 0.4.0. For those folks, it should be a very straightforward upgrade. The last major release added a lot of new features and in the intervening time we’ve had a chance to shake those things out a bit more. Notably:

  • James Burke’s excellent work (thanks to AOL) on safe cross-domain XHR has yielded a solution for IE 7. This is the best way to do serious, safe cross-domain work while we wait for something like Doug Crockford’s <module> proposal to be implemented by the browsers.
  • resource and localization “flattening” for builds makes the system perform better when using i18n.
  • a native provider for the WhatWG storage APIs. Apps that have been using the Flash storage provider don’t have to change any of their code to take advantage of it. It Just Works thanks to Brad Neuberg.
  • we spent a *lot* of time adding documentation for many of the previously opaque modules. Owen Williams, Carla Mott, and Neil Roberts have been building tools and herding cats to get this done.
  • Bill Keese and Liu Cougar closed more bugs than everyone else combined while they polished and and improved the widgets. Everyone using widgets should see the impact of their work in improved reliability.

Why should people upgrade?

If folks were holding out on 0.4.0, I think think they’ll be happy with the state of thing in 0.4.1.

What is next on the agenda?

We’re keeping the roadmap at:

What’s not outlined there right now is that we’ll be plugging the new data binding layer into the widget system and making changes to the template syntax to support that. This is exciting work and the culmination of a huge amount of background work by some very smart people.

Data binding will allow us to more quickly attach widgets to services and systems, and I’m excited that we’re in the home stretch for getting it done.

Posted by Dion Almaer at 11:37 am

3.7 rating from 29 votes

Saturday, December 2nd, 2006

Death of Page View Metrics?

Category: Business

Steve Rubel says page view metrics have four years to live.

The page view does not offer a suitable way to measure the next generation of web sites. These sites will be built with Ajax, Flash and other interactive technologies that allow the user to conduct affairs all within a single web page – like Gmail or the Google Reader. This eliminates the need to click from one page to another. The widgetization of the web will only accelerate this.

This is a dirty little secret in the advertising business that no one wants to talk about. Media companies love to promote how many page views their properties get. They’ve used the data to build equity. They will fight it tooth and nail to protect it, perhaps by not embracing interactive technologies as quickly as they should. But that’s not going to stop the revolution from coming.

As the page view platform crumbles, there’s going to be a shake out. Everyone is going to scramble to find a metric that helps them compete for ad dollars. Enjoy the show.

The question then becomes: What alternatives will be used? Ryan Stewart suggests more emphasis will be placed on how much time people spend with a website, and also an “interaction rate” – how much interactivity there is (mouseclicks etc).

Another likely trend is rotating ads – ads that change periodically and update according to page context.

Posted by Michael Mahemoff at 6:27 am

3.7 rating from 21 votes

Wednesday, November 29th, 2006

symfony 1.0 beta released

Category: Ajax, Framework, PHP

symfony, the popular PHP Ajax framework, has released a beta of their 1.0 framework.

New Features in 1.0

  • Easier installation and larger compatibility. Symfony is now compatible with magic_quotes_gpc set to on and PHP 5.2. Pake and phing are now bundled with the core classes, so symfony has no more external dependency. It is very easy to link a symfony application to the symfony libraries (through the config/config.php file), and PEAR is no more a prerequisite. The symfony command line now works out the box (for PEAR, SVN or .tgz).

  • Major performance improvement. Many parts of the code have been refactored, with performance in mind. The result is a performance increase of 50% to 500%, depending on your platform.

  • New plugin system. Extending symfony has never been easier. A plugin can package classes, modules, helpers, filters, web assets, fixtures, data models, unit tests, and so on. Plugins can be installed with one command. Check the Plugins page for a list of already available plugins.

  • New unit test library. Symfony is now bundled with its own unit and functional test framework, called lime, and a bunch of automated tests utilities, such as the sfTestBrowser and sfDomCssSelector classes. Symfony itself has more than 2800 unit and functional tests that guarantee its quality of code.

  • Updated default pages for error 404, error 500, insufficient credentials, unavailable page, and deactivated application (thanks justinm for the design!). These pages are both much nicer and much easier to customize than before.

  • Easier templating. Components and components slots now work perfectly on every situation, even with cache set to on. Their code was refactored to be fast and effective. The new temlate fragment tools, called slots, are faster than component slots, require no extra file or configuration to add a dynamic zone to a layout. And the icing on the cake: Ajax actions have no layout by default.

  • Better and more flexible Model layer. Symfony is now ORM independent: it is still bundled with Propel by default, but can work with others (such as Doctrine) in a snap. Database schemas can now be written in YAML instead of XML. Persistent support and specific database encoding are now supported natively.

  • New mixin feature. The sfMixin class introduces mixins in PHP, allowing core classes modification without inheritance, addition of new methods to existing classes, and multiple inheritance.

  • New behaviors for Propel classes. A behavior is a group of properties and methods that can alter the Propel generated classes. To make a Propel class sortable, to add a pessimistic lock, or to change the deletion by a is_deleted flag, you now need only one line of code with behaviors.

  • More user-friendly development tools. The symfony logs and the web debug toolbar now display more information about time and execution bottlenecks, thanks to the new sfTimer class. The symfony command line now has a color output (in *nix). The logging mechanism (via the sfLogger class) is more flexible and easier to extend. Logs rotation and cleaning are automated.

  • More flexible filter system. User filters can now be registered anywhere in the filter chain (even before the security filter).

  • New many-to-many relationships are now supported in the admin generator.

  • Easier deployment. The freeze task is implemented and fully functional. It transforms a symfony project into a self sufficient program by adding in the symfony libraries and assets.

  • Updated creole, Propel, (1.6.5) and prototype (1.5.0_rc1)

  • And more than 200 bug fixes and small enhancements

Posted by Dion Almaer at 1:54 pm

3.9 rating from 60 votes

Tuesday, November 28th, 2006

Opera Mini 3.0 and The Ajax Phone

Category: Mobile, Opera

Opera has announced Opera Mini 3.0 which includes:

  • Feed Reader: I’ve let this replace the native feed reader I have on my phone. The UI is better than what the Sony Ericsson M600i offers, and it actually supports a multitude of formats, including Atom 1.0
  • Photo upload. My phone has no camera, but here it is, direct photo upload from within Opera Mini.
  • Support for secure connections: You can finally use secure services and stay safe all the way.
  • Since most web authors have no regard for mobile usability (and no, dotmobi won’t help), Opera Mini 3.0 has content folding, where long navigation lists and other filler fluff is collapsed so you don’t have to scroll past 323 pages to get to your actual content.

If you want to check it out without trying it on your phone, pop over to the simulator.

There is also footage of the Aida mobile desktop, which is an R&D project tested by Opera, Telenor and FAST.

Posted by Dion Almaer at 9:53 am

3.9 rating from 20 votes