Author Archive

August 3rd, 2007

A homepage for the web 1.0 nostalgic

After a number of requests by our users, we’ve decided to offer a lighter version of our homepage; containing simply a search field. You can access this page via the link “Vintage Homepage”.

Vintage

Exalead will then remember your choice and use this page during future visits. At any time, you can go back to the personalized version and your shortcuts via the link “Personalized Homepage”.

The Vintage Homepage gets its name from its look; a bit old school. It’s kind of a tribute to the era when web pages were much less interactive.

So, this one’s for the nostalgic!

- Damucho, for the webdev team

June 13th, 2007

Learning Javascript - Part I

Many developers hate Javascript. Nevertheless, they are asked every day to “add a bit of AJAX on the website”.

This post is dedicated to these developers.

Javascript is a rich language, it is object oriented and easy to learn.

The basics
The Mozilla Developer Connection is the best documentation source for Javascript. To learn the syntax and the basic data types, read A re-introduction to Javascript.

Objects
In Javascript, an object is basically a hash. The simplest way to create an object is:

var o = {};
o.name = "hello";
o.setName = function(name) {
  this.name = name;
}

In this example, o is an object, its name property is set to hello, and its setName property is a function.

Classes and inheritance.
Javascript handles the notion of class in an unusual way:

  • a Class is an object of type Function
  • this object has a magic member called prototype
  • when invoked with the new operator, a new empty object is created and the prototype is copied inside.

Example:

var MyClass = function() {
  //contructor
  this.name = "default name";
};
MyClass.prototype = {
  //prototype
  setName: function(name) {
    this.name = name;
  }
};

var o = new MyClass();
alert(o.name); // "default name"
o.setName("new name");
alert(o.name); // "new name"

There are multiple ways to write classes. For a full overview, read the excellent Classical inheritance in Javascript.

Access control
In Javascript, everything is public. The best way to preserve the notion of privacy is through convention. For instance, at Exalead we prefix private members with an underscore.

Everything Dynamic
In Javascript, everything can be changed at all times. Even methods. This is particularly useful when coding event based User Interfaces:

o.onReceiveSomeEvent = function() {
// do something
};

It is even possible to enrich basic data types with your own methods by adding methods to their prototype.

Example:

String.prototype.blank = function() {
  return /^s*$/.test(this);
}
"hello".blank(); // false
"     ".blank(); // true

The DOM - Document Object Model

Javascript runs in the browser in an HTML page. A representation of that page - the DOM - is available to Javascript through the global window object. Of course, it would be too easy if the DOM were identical between browsers. How then, do people write cross browser code? There are 2 approaches at least:

Approach #1:

if (navigator.appName == "Microsoft Internet Explorer"
    && navigator.appVersion >= "4.0") {
  element.attachEvent("onclick", function() {alert("click")});
}

if (navigator.appName != "Microsoft Internet Explorer"
    && navigator.appName != "Netscape") {
  element.addEventListener("click", function() {alert("click")});
}

This is the most trivial approach and the least elegant and scalable. It makes sharing code a nightmare and will inevitably make you hate Javascript. Don’t use it, ever.

Approach #2:

if (element.attachEvent) {
  element.attachEvent("onclick", function() {alert("click")});
}
if (element.addEventListener) {
  element.addEventListener("click", function() {alert("click")});
}

This is a lot better. This approach uses one of javascript’s strengths: testing the existence of a function. It provides maximal compatibility with minimum browser knowledge.

That’s all for today folks! In my next post, we’ll dissect the Prototype Javascript Framework.

- Damucho, for the WebDev team

June 6th, 2007

Save your search results

Did you know that every search result can be saved on your Exalead Homepage ?

Saving a result is easy: just click the link “Add to shortcuts” next to it:

Addtoshortcuts1

And the result is saved on your Homepage:

Addtoshortcuts2_2
This trick is applicable to all Exalead searches: Web, Images, Wikipedia and Video.

Those who wish to keep track of the sites they find on Exalead should appreciate it.

- Damucho, WebDev Team

May 21st, 2007

New Exalead Video Search Launched (Beta)

We’re happy to announce that you can now use Exalead to easily and quickly search
all your favorite videos from YouTube, Dailymotion, Metacafe, Kewego
and IFILM web sites.

To date we’ve indexed over 4 million videos using classification information
including author, title, date, description, duration, tags and categories,
and we’re adding new titles to our index each second!

In spite of the huge number of videos indexed, navigating the search results
is a snap with easy sort and filter options.

Use the pull-down box at the top right of your search results
(Pulldownbox) to sort the results by:

· Relevance,
· Most recent,
· Most rated,
· Most viewed, or
· Length.

You can also use the “Narrow your search” panel to refine your search by
source (website) or video length:

Narrow your search

And just below the “Narrow your search” panel is a ‘cloud’ of keywords that
synthesizes the tags and categories of the videos appearing in your search
results, allowing you to refine your search across all video sites with a
single click.

Imag Tag Clouds

Each search result listing includes a thumbnail image of the video, a title,
a summary description, and details such as author, duration, upload date,
and a viewer score represented by stars. Place your cursor over the stars
for more details about the score.

Selecting the detailed view gives you instant access to related videos by
associated tags and categories:

Image Results

You can also click on an author’s name to discover other videos by that
author.

So no more hopping from site to site to find what you seek: simply go to
Exalead and let the cameras roll!

The Exalead Web Team

April 13th, 2007

Beta Wikipedia Search Launched

The Wikipedia search option, our latest feature (with plenty more to come!), has been released in a beta version in English, German, French, Spanish, Italian and Dutch.

With a new presentation of the search results and a completely new “Narrow your search” panel, this research module offers an intriguing new access to the famous online encyclopedia. Not only can you easily find the Wikipedia article you’re seeking, you
can also refine your search by tapping into the rich cascade of ‘tags’
in the “Narrow your search” panel, choosing among language, geography,
famous people, names of organizations, related keywords or Wikipedia
categories to refine your search.

Wikipedia1_en

In addition to the “Narrow your search” tags, each search result listing
offers instant access to:

  • The Wikipedia categories associated with the article,
  • Famous people mentioned in the article,
  • The organizations and geographical locations associated with the article (available by clicking on the “Show images, text and extra info” icon at the top right-hand side of the results).

Follow your curiosity from one click to another as you explore the riches of the Wikipedia encyclopedia with an ease, simplicity and efficiency never before possible.

Wikipedia2_en

We send out our special thanks to our feedbackers who helped make this new feature a reality, and who keep us working night and day ;-) . Don’t hesitate to join us at http://feedback.exalead.com.

Happy Searching!

The Web Team