I was exploring Dart, and wanted to create a small project using it to compare it with JavaScript. I was searching for ideas and then I thought of using YQL in Dart, to see how easy or difficult it is.

After poking around a bit, I found that Dart supports making Rest calls using XMLHttpRequest object, similar to JavaScript. I quickly tried to make a YQL call using that object.

The following is the bulk of the code. It is exactly how you do it in plain JavaScript.

I then posted about it in stackoverflow and then later found that, right now the only way to do URLEncoding is to emulate the encodeURL() function of JavaScript. Someone from Google has already done it. I just copied the file and placed inside my Dart project and then used the following line in my dart file.

#import("EncodeDecode.dart");

Although it works right now, I would really like to see this as part of the dart:uri package. Let’s see if someone from the Dart team is listening to this.

Just wrote quick some code sample to show how to access YQL (Yahoo Query Language) queries from PHP.

You can use the following code sample to fetch results from YQL from any standard PHP file. You would require the curl extension to be installed. If you are behind a proxy, uncomment the 3 lines and replace it with proper proxy values

Geo Mark WordPress Plugin

Geo Mark will automatically locate Geo information in your WordPress posts using Yahoo Placemaker and YQL API’s. Once the Geo location is located, it will add this information as custom fields to the post. The information stored in the custom field can be displayed anywhere in the post using the build in get_post_meta() function. The Plugin also exposes template functions which can be used to generate GEO Microformats based on the location information found in the post.

Geo enabled RSS feeds

The Geo Mark Plugin also lets you to expose the location based information in RSS feeds. The Geo information stored in the custom field can be used to create Geo tags in the RSS feed. The Plugin supports the following Geo RSS formats as shown in the screenshot.

Simple (georss:point)

GML (gml:pos)

W3C (geo:lat)

Why Geo marking posts is important

Adding Geo information to posts has lot of benefits. It enables data mining for location and also enables you to display information about the post on a map.