| A little Flickr hacking (in a good way) |
[23 Oct 2007|11:21pm] |
13:50 22.10.2007
A little Flickr hacking (in a good way)
Christian Heilmann is at it again posting an entry about a neat method of grabbing Flickr photos without having to using the Flickr API:
Here you’ll learn how to get Flickr photos into your JavaScript solutions without having to resort to using the full API. As this is a hack you will only get the latest 20 photos, if you need more detailed data like restricted to sets or more at once you’ll need to resort to the flickr API.
I went ahead and used his code to create a small demo and it worked like charm. Obviously, the results are unformatted but with a little help from jQuery, Ext, Prototype or YUI, you can certainly add effects to make the layout much nicer.
Here's the code. It's small and concise:
<script>
function jsonFlickrFeed(o){
var i=0;
while(o.items[i]){
document.write('<img src=\"' + o.items[i].media.m + '\" alt=\"' + o.items[i].title +'\">')
i++;
}
}
</script>
<script src=\"http://api.flickr.com/services/feeds/photos_public.gne?tags=hackdayindia&lang=en-us&format=json\"></script>
Based on the pictures, it looks like these Yahoo! guys have entirely too much fun! :)
read more at Ajaxian
|
|
| JSLoader: On Demand JavaScript Libraries |
[23 Oct 2007|11:21pm] |
14:25 22.10.2007
JSLoader: On Demand JavaScript Libraries
Dov B. Katz has released JSLoader, his open source on-demand JavaScript library. He explained to us:
It provides a methodology for organizing JS libraries, and programmatically loading them by simply “asking” for them. Example code: JSLoader.load(“ria”,”ext”,”2.0-beta1”);
I developed it as a mechanism to provide hosted Ajax libraries within a large enterprise (zero install, we maintain the latest releases) and it has been very successful. Furthermore, because no install is needed, I have leveraged TWiki to create a rapid prototyping environment, which has led to widespread adoption in the enterprise.
Ultimately, it’s just dynamically writing script and link tags onto the page… Not rocket science, but it works well, and it’s proven its value in an enterprise environment.
Why JSLoader?
- First of all, it's a zero-install solution. The goal is to eventually deploy this style of loading and file organization on a "hosted toolkit" system and allow websites to leverage the distribution of new toolkits without having to figure out how to install them.
- Second, because multiple sites will share this code the browser and proxy caches will help make things more efficent
- Finally, the maintainability of toolkits is minimized as content needs to be distributed only once, instead of having each user download a private copy
You can see some demos such as PlotKit.
Dov is going to be at The Ajax Experience this week in Boston. He is keen to meet you to discuss it!
read more at Ajaxian
|
|
| ECMAScript 4 Language Overview Final Draft |
[23 Oct 2007|11:21pm] |
05:01 23.10.2007
ECMAScript 4 Language Overview Final Draft
The final draft for the language overview of ECMAScript 4 has been released. This is not the spec itself, but the starter overview document.
The fourth edition of the ECMAScript language (ES4) represents a significant evolution of the third edition language (ES3), which Ecma approved as the standard ECMA-262 in 1999. ES4 is compatible with ES3 and adds important facilities for programming in the large (classes, interfaces, namespaces, packages, program units, optional type annotations, and optional static type checking and verification), evolutionary programming and scripting (structural types, duck typing, type definitions, and multimethods), data structure construction (parameterized types, getters and setters, and meta-level methods), control abstraction (proper tail calls, iterators, and generators), and introspection (type meta-objects and stack marks).
ES4 also upgrades ES3 in small ways by fixing bugs, improving support for regular expressions and Unicode, supplying richer libraries, and adding lightweight facilities like type-discriminating exception handlers, constant bindings, proper block scoping, destructuring binding and assignment, succinct function expressions and definitions, and array comprehensions.
We first present the goals of the ES4 working group (ECMA TC39-TG1) and discuss the key issue of compatibility between ES4 and programs written for ES3 before we describe ES4 in its entirety1. We omit tedious details. This document is not a tutorial; the reader should be familiar with ES3.
Here you read about the fun new features such as:
- Generic functions: generic function intersect(s1: Rect, s2: Rect) {}
- Let const: let const color = 0xFEFEFE
- Namespaces: namespace ns3 = "www.ecma-international.org"
- "like": var v: like { x: int, y: int }
- Packages: package org.ecmascript.experiment { internal var v; }
- Program units: use unit URLParser "http://www.mycompany.com/lib/URLParser"
- For in: for ( i in obj ) print(i)
This is just a taste. Excited or scared about ES4? :)
read more at Ajaxian
|
|
| FitFlash: Make that rectangle move |
[23 Oct 2007|11:21pm] |
10:04 23.10.2007
FitFlash: Make that rectangle move
You have seen the pain when you resize a browser and the Flash rectangle doesn't move.
FitFlash is a smart script that resizes your flash automatically if your browser window size is smaller or greater than your flash minimum desired size keeping it accessible independent of screen resolution.
It is trivial to use, you just install the JavaScript and:
JAVASCRIPT:
-
-
FitFlash ("flash ID", minimum width, minimum height);
-
read more at Ajaxian
|
|
| JDA Mashup Editor |
[23 Oct 2007|11:21pm] |
12:09 23.10.2007
JDA Mashup Editor
Peter Svensson has written a Web-based mashup editor JDA Composer.
The Composer uses JDA itself, and lets you build blocks using Blueprints. You can take it for a drive, or watch the screencast.
Features
- Visual design of page/gadget UI
- Basic styling in place (colors, fonts, background images)
- Using openJacobs draw2d graph library for UI creation and drawing component relations)
- Using Dojo 4.3 for menus, windowing and basic magic. Gotta *love* dojo :)
- JavaScript IDE for creation of JDA (Javascript Dataflow Acrchitecture) blueprint components, editable in Christofe Dolivet’s EditArea javascript-based code editor.
- “Live” components, usable on the fly when created and connected
- Exportable pages/gadgets to basic HTML+PHP backend, Joomla module and remote Google gadgets
- Basic developer key management implemented.
- All components and pages can be stored and used by all.
- Community features coming… “soon” :)
read more at Ajaxian
|
|
| MRI: CSS Selector Inpage Tester |
[23 Oct 2007|11:21pm] |
12:32 23.10.2007
MRI: CSS Selector Inpage Tester
John Allsopp, who authored XRAY, has a new tool for us to play with. MRI is a bookmarklet that fires up a tool allowing you to query items on the page using CSS selectors. As you put in your queries you will see the items on the page that match. You can also click on areas of the page to show some selector queries that would find that area.
read more at Ajaxian
|
|
| Really Simple History 0.6 Beta Announced |
[23 Oct 2007|11:21pm] |
19:08 23.10.2007
Really Simple History 0.6 Beta Announced
My colleague Brian Dillard is just putting the finishing touches on the 0.6 beta release of Really Simple History (RSH). What’s new and improved?
I’ve tried to be as ambitious as possible with this release: full support of IE7/Win, Safari/Win, Safari/Mac, Opera/Win, Opera/Mac. I’ve didn’t quite get there, but I got close.
Features in the new version include:
- Full support for IE7/Windows (though my only Windows machines use IE7 Standalone, so I need help testing on “real” IE7 installs).
- Full support for Safari 2/Mac (though I’m still trying to eliminate the “infinite loading” bug before I push out the beta).
- Partial support for Safari 3/Windows (hampered by bugs in the current beta version of the browser).
- Full support for cross-platform Opera 9.22 (though you may need to hard-code an image into your markup).
- A totally revamped test page that allows you to play with the library in your browser of choice and see how it works behind the scenes.
As always, RSH works beautifully in Firefox 2 for Windows and the Mac. I hope to give it a good shakedown on Linux browsers in the next release.
What was the main source of difficulty in this release? In a word, Safari.
Plenty of people who’ve worked on Ajax bookmarking projects have
commented about this, but it only becomes clear once you’ve actually
seen it in action. Getting this thing to work in Safari 2 for the Mac
took a wildly disproportionate amount of time considering its market
share.
Hopefully these dusty corners of the browser world will get improved over time.
read more at Ajaxian
|
|
|
|