| AjaxLife: A Second Life Ajax client |
[08 Oct 2007|07:41pm] |
11:30 08.10.2007
AjaxLife: A Second Life Ajax client
Apparently, boredom breeds inspiration and innovation as displayed by 15-year old Katharine Berry, the creator of the AjaxLife Second Life Ajax client.
Due to some combination of boredom, wanting to talk to people in SL, and inspiration from a vague memory of something Interfect Sonic did, I decided to start work on an AJAX based SL client.
It’s still under heavy development, but the result so far is an application/page/site called AjaxLife.
Leveraging resources from libsecondlife, an open source project which aims to pinpoint how Second Life's client and servers tie-in together, Katharine was able to create a web application using the Ext JS framework that ties into the 3-D virtual world and provides the following features:
- Basic map
- Teleports
- Accepting/declining teleport offers
- Local chat, instant messages (now fully supported)
- Inventory received notifications
- Friend on/offline notifications
- Balance change notifications, etc.
- Person search
- Partial profile viewing
- Inventory browsing
- Viewing of notecards, scripts and textures
- Teleporting to landmarks in your inventory
- Doesn’t Ruth any more, generally speaking.
- Region stats window
- Nearby avatars window
- Offering teleports via profiles
- MobileSafari (iPhone/iPod touch) gets a different login screen.



Overall, I think this is very impressive work for such a young developer who is solely doing this in her spare time. It's garnered her tremendous attention and even a writeup in Reuters.
The web application has also been setup on Google Code and the code is available for download via SVN:
http://code.google.com/p/ajaxlife/
If you're a Second Life community member, you can see the application in action at Ajaxlife.net.
read more at Ajaxian
|
|
| $: Now with more magic! |
[08 Oct 2007|07:41pm] |
11:47 08.10.2007
$: Now with more magic!
Dustin Diaz is on a roll :) He has posted about Roll out your own JavaScript Interfaces in which he discusses the desire to use style from libraries such as prototype, jquery and friends, yet in a small bit of code where you don't want to use the library:
There are times when using a JavaScript library is called for. Building large web applications that use a wide array of utility functions that help aid in developing multi-tiered class systems, advanced UI components, complex event models, and heavy use of DOM scripting helpers. Yep. Those are all great.
However, there are other times when you don’t need all that. And often what we end up doing is just importing a few of our favorite functions as globals, and work off those. But what ends up happening in this case is that we lose the particular style that these libraries offer. For instance, I’d still like to be able to do something like this without a library.
Dustin would like to write something like this:
JAVASCRIPT:
-
-
$('foo', 'bar').on('click', function(e) {
-
$(this).css({
-
color: 'green',
-
fontSize: '2em'
-
}).addClass('active');
-
});
-
And to implement the magic he takes Prototypes $() and makes it a special object that can do much more:
JAVASCRIPT:
-
-
(function() {
-
// private constructor
-
function _$(els) {
-
this.elements = [];
-
for (var i=0; i<els .length; i++) {
-
var element = els[i];
-
if (typeof element == 'string') {
-
element = document.getElementById(element);
-
}
-
this.elements.push(element);
-
}
-
return this;
-
}
-
-
_$.prototype = {
-
each: function(fn) {
-
for ( var i = 0, len = this.elements.length; i<len; ++i ) {
-
fn.call(this, this.elements[i]);
-
}
-
return this;
-
},
-
setStyle: function(prop, val) {
-
this.each(function(el) {
-
el.style[prop] = val;
-
});
-
return this;
-
},
-
addClass: function(className) {
-
this.each(function(el) {
-
el.className += ‘ ‘+className;
-
});
-
return this;
-
},
-
on: function(type, fn) {
-
var listen = function(el) {
-
if (window.addEventListener) {
-
el.addEventListener(type, fn, false);
-
} else if (window.attachEvent) {
-
el.attachEvent(’on’+type, function() {
-
fn.call(el, window.event);
-
});
-
}
-
};
-
this.each(function(el) {
-
listen(el);
-
});
-
return this;
-
},
-
css: function(o) {
-
var that = this;
-
this.each(function(el) {
-
for (var prop in o) {
-
console.log(prop);
-
that.setStyle(prop, o[prop]);
-
}
-
});
-
return this;
-
}
-
};
-
window.$ = function() {
-
return new _$(arguments);
-
}
-
})();
-
You can see a demonstration at work.</els>
read more at Ajaxian
|
|
| Multi-Safari: Testing with 10 versions of Safari at once |
[08 Oct 2007|07:41pm] |
11:53 08.10.2007
Multi-Safari: Testing with 10 versions of Safari at once
Michel Fortin has created special versions of Safari that allow you to run them all on the same machine. This allows you to test your Ajax application in a variety of versions.
Safari normally use the Web Kit framework found inside Mac OS X to render web pages and execute javascript. This means that if you preserve an old version of Safari to run it on a newer version of Mac OS, it will use the newer Web Kit found in the system and you will get the same results as with the newer version. Thus, you would normally need a separate installation of Mac OS X for each version of Safari you want to test a website into.
These special versions of Safari use the original Web Kit framework that came with them, bundled inside the application. They will mimic original Safari rendering and javascript behaviours. HTTP requests and cookies however are still handled by the system and may not work exactly the same.
read more at Ajaxian
|
|
| GPSGate: Access GPS location information through JavaScript |
[08 Oct 2007|07:41pm] |
12:46 08.10.2007
GPSGate: Access GPS location information through JavaScript
Johan Franson has developed a solution to access a local GPS through Javascript /
cross-scripting. His library works in all browsers with that dynamically can include
.js script files. Including Firefox, Opera, Opera Mobile and IE.
You need to install a program called GpsGate on the client computer which currently only works for Windows and Pocket PC:
"GPS in browser" uses cross scripting. GpsGate runs a small local web server from which your page can request GPS information. A javascript library is included to make this really simple.
HTML:
-
-
<script type="text/javascript" src="http://localhost:12175/javascript/GpsGate.js"></a></script>
-
-
<script type="text/javascript"></a>
-
//<</a>![CDATA[
-
-
// That is the callback function that is specified in getGpsInfo() and
-
// executed after the data is returned
-
// See more info on the returned "gps" object below.
-
-
if (typeof(GpsGate) == 'undefined' || typeof(GpsGate.Client) == 'undefined')
-
{
-
alert('GpsGate not installed or not started!');
-
}
-
-
function gpsGateCallback(gps)
-
{
-
var resultTag = document.getElementById('position');
-
resultTag.innerHTML = 'longitude:' + gps.trackPoint.position.longitude +
-
' latitude:' + gps.trackPoint.position.latitude;
-
-
var d = new Date(gps.trackPoint.utc);
-
-
resultTag = document.getElementById('time');
-
resultTag.innerHTML = d.toLocaleString();
-
}
-
-
//]]></a>
-
</script>
-
-
<div id="position"></a></div>
-
-
<div id="time"></a></div>
-
-
-
<input value="GPS info" type="button"
-
onclick='JavaScript:GpsGate.Client.getGpsInfo(gpsGateCallback)'
-
id=button1 name=button1/></a>
-
</form>
-
read more at Ajaxian
|
|
| Automated security scanners choke on Ajax |
[08 Oct 2007|07:41pm] |
13:30 08.10.2007
Automated security scanners choke on Ajax
It looks like some of the most expensive security scanners can’t handle Ajax code. Information Week reviewed and tested 5 pricey application scanners, including software from IBM & HP, and all, sans IBM’s scanner, failed to pinpoint vulnerabilities with Ajax code:
With the exception of IBM(IBM)’s Watchfire AppScan, automated Web application scanners are simply not yet up to the task of finding security flaws in Ajax code. And it’s not like we made it hard on them: The Ajax applications we used in testing were relatively simple. None of the vulnerabilities we expected our scanners to find was advanced or required complex analysis of client-side code. Rather, they were traditional Web application security vulnerabilities, just exposed through an updated Ajax interface. As long as the scanners being tested could navigate the application, identifying the vulnerabilities should have been a walk in the park.
This doesn’t bode well for companies that are relying on some form of automated testing to provide a baseline for their application security assessment efforts.
The full 5-page review can be found on Information Week’s site.
read more at Ajaxian
|
|
| Sun Labs Lively Kernel: Morphic UI for the Web (Self and Squeak) |
[08 Oct 2007|07:41pm] |
14:01 08.10.2007
Sun Labs Lively Kernel: Morphic UI for the Web (Self and Squeak)
Sun Labs has released a new Lively Kernel project that takes the Morphic UI framework that Sun developed for Self, and implements it in JavaScript.
This enables you to run the kernel and start interacting with the world. There is one world.
Why did they do it?
The Lively Kernel places a special emphasis on treating web applications as real applications, as opposed to the document-oriented nature of most web applications today. In general, we want to put programming into web development, as opposed to the current weaving of HTML, XML and CSS documents that is also sometimes referred to as programming.
A key difference between the Lively Kernel and other systems in the same area is our focus on uniformity. Our goal is to build a platform using a minimum number of underlying technologies. This is in contrast with many current web technologies that utilize a diverse array of technologies such as HTML, CSS, DOM, JavaScript, PHP, XML, and so on. In the Lively Kernel we attempt to do as much as possible using a single technology: JavaScript. We have chosen JavaScript primarily because of its ubiquitous availability in the web browsers today and because of its syntactic similarity to other highly popular languages such as C, C++ and Java. However, we also want to leverage the dynamic aspects of JavaScript, especially the ability to modify applications at runtime. Such capabilities are an essential ingredient in building a malleable web programming environment that allows applications to be developed interactively and collaboratively.
Boot up Safari 3, and check out the interactive tutorial, and read the FAQ.
read more at Ajaxian
|
|
|
|