Showing posts with label API. Show all posts
Showing posts with label API. Show all posts

Apr 16, 2010

Success!!

I have been working hard trying to get my site to work. I have only been able to retrieve data using the proxy pass-through and return the XML in raw format. I wasn't able to get anything to display properly.

Initially I used the Chronicling America API which gives newspaper information. Since I couldn't make it work and display, I tried the Wine Blog API. Then I had success! I was able to retrieve the XML with the proxy pass-through and parse it in my JavaScript to display the title and description.


It may not seem much to some, but I'm very excited that I finally got something, anything, to display properly. I plan to continue to see what other things I can do with this. The endless hours of working on this has paid off.

Group Iteration 3

Although things didn't go so well for my individual iteration3, the group site turned out great. Adam really went above and beyond with this project. Of course he has a lot of prior knowledge and experience. Here is what our site looks like:


Our site uses several API's to create a place for users to find jobs by location, get detailed information for a career, see housing and weather information for that location, and view the location and career on the map. Our group has completed all of the requirements for iteration 3 and maybe a little more. The site is better than our original ideas.

I am very happy that we completed our iteration and how everyone worked well together. As we have seen in this class, all of the groups came up with great ideas for their projects. I look forward to finding other ways to use API's and create different sites.

Individual Iteration 3

Well I was not as successful as I wanted to be for this iteration. My plan for my project was to use the Chronicling America API with the Google Maps API to display newspapers by location. This is how my site looked for iteration 2.



I started to parse the XML but I had a lot of difficulty getting it to work. The information would not display properly. I tried to parse the XML in JavaScript without success so I am now trying to parse in the PHP instead.

Besides completing the requirements for this course, I would still like to complete this iteration for myself. Creating Mashups and integrating web services is a great skill to have. I plan to continue working on my project and hope that I can get it to display successfully.

Mar 17, 2010

Chronicling America API

For my individual iteration 2 I am am using the Chronicling America API. This API gives information about historic newspapers and select digitized newspaper pages. It is produced by the National Digital Newspaper Program (NDNP), a partnership between the National Endowment for the Humanities (NEH) and the Library of Congress (LC).

The site allows you to search and view newspaper pages from 1880-1922 and find information about American newspapers published between 1690-present. To encourage a wide range of potential uses, they designed several different views of the data which are publicly visible and do not require an API key to use them.

This API allows you to:
  • Search - the newspaper directory and digitized page contents using OpenSearch.
  • Link - using stable URL pattern for titles, issues, editions, and pages.
  • Linked Data - views of information about titles, batches, issues, and pages in RDF/XML.
  • Aggregations - of items, like all the pages that make one issue, are related using OAI-ORE
Compared to the old methods of looking up newspaper pages, this is a convinient way to view historic data. Here is an example of a newspaper page:

Indivudual Iteration 2

For iteration 2 I changed my plans for the API's I was planning to use. Originally, I wanted to create a site using the Blogger API in combination with the Google Talk API to allow users to have live chat with others that were in the blog site. However, this seems to be more complicated than I expected. Google Talk API uses XMPP or Extensible Messaging and Presence Protocol. In order to connect to Google Talk or any other service that supports the Jabber/XMPP protocol, you'll need to purchase Trillian Pro. So I decided to go a different direction with my project.

The new plans for my site is to use the Chronicling America API along with the Google Maps API. The Chronicling America API gives information about historic American newspapers. So far I have completed the iteration 2 requirements and have set up the Google Map API and am able to return the XML for the Chronicling America API using an onClick button.



The next step is to complete iteration 3. I plan to take the XML that is returned and parse the information to display the newspapers by location on the Google Map for Michigan. This iteration seems like it will be more difficult than the others, and I hope that I will be able to complete this task.

Mar 8, 2010

Work on iteration 2

Iteration 2 has been more of a challenge for me then iteration 1. The reason it is more challenging is because I am making it more challenging. The only problem is now I am the frustrating period and not getting past it.

The first thing I attacked was including the api fanfeedr to my iteration 1. I started coding and then decided to learn more about css and format instead of staying on topic with the project. After getting back to fanfeedr, I registered for my api key. The good news was the key was free and didn’t take very long for the key to be sent to my e-mail. After looking at more code and trying to incorporate fanfeedr, I have realized that fanfeedr code is in the form of JSON and not XML.

So, this marks my first problem. I looked around and could not find how to parse the format JSON. I am going to try and do a search on the blog and maybe someone from last semester had a similar situation. I then ran into the problem that my original iteration decided not to work. So, I then proceeded to create a test folder for the fanfeedr. So, I just about started over but was not too hard with copying most of my code. I then didn’t have to worry about ruining something that already works. Once I get it to work then I can just slide it into my working original iteration.


For Wednesday, I am going to just try and use an easier API that I will hopefully be able to produce. I am going to keep holding onto the fanfeedr information and try and incorporate it into my project for possibly iteration 3.

Does anyone have any experience with Google Maps and getting it to work? My question is how do you the maps that you have in your my maps folder?

Mar 5, 2010

FixWire News API

So one of the other services that we wanted to provide on our group project was a local news service so I picked the FixWire API to do this. Documentation for the AP can be found Here. This API requires two steps. First you will need to find the Geo (as FixWire calls it) which is a location ID for all of the locations throughout the us. The URL for doing this is:

http://api.fwix.com/general/geos.xml

This provides the following output:



Once you have this output you can get the geoId for the locations that you want to search. From there you will need to provide three things for the search. The GeoID, a latitude and a longitude. You then form this into a url which will look like the following:

http://api.fwix.com/fetch/nearby.xml?geo_id=117&lat=34.2257255&lon=-77.9447102&radius=3

You will get an output that looks something like this:



I then took this data and parsed it using SimpleXML and Xpath methods to extract the stories and the data that I needed. I did it using a series of for loops and then formatted it using HTML in the PHP script before it was sent back to the Javascript. Here is the code:




What I did here was to create a function that grabbed only the first 250 characters of a story and then I checked to see if the XML had a image tag. If it did then I printed different HTML that included the image. Then I just went to a for loop to print out all the stories with their title, summary, and source, as well as the picture if it had one. Here is the final output.

Zillow Real Estate API

For our group project we wanted to provide some housing statistics for people who were looking to relocate.The API that we chose to do this was the Zillow API which is a real estate API that allows you to do all kinds of searches for housing information in different areas. The types of info I was looking for was median home prices as well as other pertinent info. I used the following URL to get the data:

$zip = $_REQUEST['zipID'];
$url = 'http://www.zillow.com/webservice/GetDemographics.htm?zws-id=X1-ZWz1c2hu5r9fd7_5f91a&zip=';
$fullUrl = $url.$zip;

This basically provides a XML output that I used to grab the data. Below is the output from the query.



Once I had the data I then grabbed the Zip code returned as well as all of the attribute tags and its child tags. I did this withe the following code.

$zip = $xml->xpath('/Demographics:demographics/response/region/zip/text()');

$attr = $xml->xpath('//attribute');

Once I had all of the attribute tags into the array I was able to access them by using a for loop in order to iterate through all of them and return them back to the Javascript code and finally to the users browser.

for($i=0; $i<10;>name
echo $attr[$i]->values->zip->value[0]
echo $attr[$i]->values->nation->value[0]
}

You can see that the Xpath methods use a object type of structure to access the child nodes. The -> denotes a child node and once you know the path you can traverse all of the tags. For instance the query echo $attr[$i]->values->zip->value[0] is used to access the following data:



Once you have grabbed all of the data you can simply use a series of echos from the PHP script to send the data to the Javascript in a nicely formated string.



Anyway, the final output looks like this. I is not to fancy but it provides the data necessary.

7 Day Forcast WeatherBug

For my individual project I used a simple current conditions search to retrieve the current conditions for an area. However, for our group project I wanted to provide a 5 or 7 day forcast. While this wasn't much different for getting the data, parsing through the results was much different as I had to create loops to search through the iterations. See my previous posts to see the code behind in order to return the data but for this post I'm going to show you how to search through the data and parse the XML. First I used the following URL to get the data.

http://A6357896562.api.wxbug.net/getForecastRSS.aspx?ACode=A6357896562&OutputType=1&zipCode=48189.

This returns the following data:




After I get the data it is time for parsing. I use the SimpleXML Xpath function to get the data into a searchable variable.

$xml = new SimpleXMLElement($data);

Then I simply create a for loop to iterate through the data and diplay the results in HTML format. Since there are HTML tags I can't cut and paste the text into the blog as it tries to interpret the tags. However, I have put up a screenshot of the for loop and the methods used to optain the XML tag info HERE.

Here is the final output:

More on Parsing XML

I have been working quite a bit more on the parsing portion of Iteration 3 for the projects and I have found that using Xpath is both a very simple as well as a effective method of parsing the XML. So far I have been able to find tons of documentation as well of examples of how to search for the tags that you need as well as using that data. I used the weather example in my last post but for this on I will use the CareerBuilder API as the example. Here is the beginning of the PHP script:

$zip = $_REQUEST['zipID']; //Here I get the variables from the Javascript
$job = $_REQUEST['jobID'];

$url = 'http://api.careerbuilder.com/v1/jobsearch?&DeveloperKey=WDhb6SR73QBGH8TTJV4T&Location=';
$url2 = '&Keywords=';
$fullUrl = $url.$zip.$url2.$job; //Here I concatenate the strings into one URL

Here I pass the PHP script two variables from my Javascirpt, a job to search for as well as a zip code to search within a given location. Here is the javascript so it makes a bit more sense. I pass the job variable as a parameter while the zip variable is a global so it can be accessed anywhere in the Javascript.

//*********************************************************************************

function getJob(job) { //Here I'm passing the job variable to the function
jbRequest = jobRequest();
if (jbRequest == null) {
return;
}

url= "scripts/career.php?zipID=" + escape(zip) +"&jobID=" + escape(job); //Passing to PHP
jbRequest.open("GET", url, true);
jbRequest.onreadystatechange = displayJob;
jbRequest.send(null);

}


Once in the PHP script I do the standard request for the data

$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $fullUrl); //Here is the full URL variable
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch); //Here I put the request return into the data variable
curl_close($ch);


Next I use SimpleXML to get the $data variable into an accessible variable.

$xml = new SimpleXMLElement($data);

Next I start searching for the data. Here is the output from the URL that is passed to the API.

http://api.careerbuilder.com/v1/jobsearch?&DeveloperKey=WDhb6SR73QBGH8TTJV4T&Location=48189&Keywords=Computer%20Programmer




Next I begin the the search. Here I search for all tags=JobSearchResults

$attr = $xml->xpath('//JobSearchResult'); //Search for all tags JobSearchResults and put them in an Array

This data is put into an array called $attr (for attributes) I made this up and it can be anything that you want. Once the data is there I can begin getting the info that I need.

$count = count($attr); //Count the number of results and use that in the for loop

for($i=0; $i<$count; $i++){ echo $attr[$i]->Company; //Access the data in the JobSearchResults/Company tag
echo $attr[$i]->JobTitle /Access the data in the JobSearchResults/JobTitle
echo $attr[$i]->Pay
echo $attr[$i]->Location

}

Well I hope that this information is helpful for someone. Here is the output from the parse.



Multiple API requests

So one of the problems that I ran into when working on my iteration 2 was that when I was creating multiple proxy requests, I could only get one of the API to return data. After some research and talking with professor Drake, he was able to point out that it was possibly because I was using the same createRequest() function to make the calls. After thinking about it for a bit, it became perfectly clear. The createRequest() function uses global variable and what was happening was that I was overwriting the globals with the second results when calling the function twice. So what I had to do was this. Create a function for the weather request.

function weatherRequest() {
try {
weatRequest = new XMLHttpRequest();
} catch (tryMS) {
try {
weatRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (otherMS) {
try {
weatRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
weatRequest = null;
}
}
}
return weatRequest;
}

I then had to create another function with different global variables.

function descriptionRequest() {
try {
descRequest = new XMLHttpRequest();
} catch (tryMS) {
try {
descRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (otherMS) {
try {
descRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
descRequest = null;
}
}
}
return descRequest;
}

Once this was accomplished I also had to create a different proxy script for each API that I wanted to call. This is because of the fact that each proxy is returning data and if you try to use the same proxy you either need to create all new variable and requests within the proxy script or you just need to have separate proxy files for each request. I chose the latter for simplicity and separation fo the code for troubleshooting purposes.

//*********************************************************************************

function getDesc(itemName) {
descRequest = descriptionRequest();
if (descRequest == null) {
return;
}
//alert("getDesc()");
url= "scripts/description.php?ImageID=" + escape(itemName);
descRequest.open("GET", url, true);
descRequest.onreadystatechange = displayDetails;
descRequest.send(null);

}

//*********************************************************************************

function getWeather(zip) {
weatRequest = weatherRequest();
if (weatRequest == null) {
return;
}

url= "scripts/weather.php?zipID=" + escape(zip);
weatRequest.open("GET", url, true);
weatRequest.onreadystatechange = displayWeather;
weatRequest.send(null);

}

Then it was just a matter of displaying the results to each of the div tags assigned. This was also accomplished using separate functions.

//*********************************************************************************

function displayDetails() {
if (descRequest.readyState == 4) {
if (descRequest.status == 200) {

document.getElementById("description").innerHTML = descRequest.responseText;
}
}
}

//*********************************************************************************

function displayWeather() {
if (weatRequest.readyState == 4) {
if (weatRequest.status == 200) {
//alert(request.responseText);

document.getElementById("weather").innerHTML = weatRequest.responseText;
}
}
}

That's it. So essentially for each API that you use you will need to have a set of separate functions to handle the requests and the displaying of the data all with different global variable. You can check out the results of this HERE.

Google Map API

I was able to play around with the Google Maps API for my Iteration 2 Individual Project. What I found was that the API is very well documented and there are plenty of examples of code for you to choose from. I wanted the map to key off of two coordinates, longitude and latitude and then return the map to my DIV tag called "googlemap" the first thing I had to do was apply for a key from google in order to use the maps. I did that here. Next, once I received the key I had to put in two different script tag elements into the web page.



Once that was done I then had to create the javascript that was necessary in order to grab the coordinates and return the map to my div tag. I wanted a couple different options for users; to be able to zoom in and out of the map and to place a marker at the coordinates given to the api. I found that this was not too difficult to do.

function setupMap(lat, long) {

if (GBrowserIsCompatible()) {
var center = new GLatLng(lat, long);
map = new GMap2(document.getElementById("googlemap"));
map.addControl(new GLargeMapControl());
map.setCenter(center, 09);

var marker = new GMarker(center, {draggable: true});

GEvent.addListener(marker, "dragstart", function() {
map.closeInfoWindow();
});

GEvent.addListener(marker, "dragend", function() {
marker.openInfoWindowHtml("Just bouncing along...");
});

map.addOverlay(marker);
}
}

You'll notice that I added a couple variables to pass to the program that were filled in another function based on my user input from the web page.

function getCoord(itemName){
var lat;
var long;
if (itemName == 'snowbird')
{
lat = '40.5768173605448';
long = '-111.651607579098';
}
if (itemName == 'alta')
{
lat = '40.58889';
long = '-111.63722';
}
if (itemName == 'solitude')
{
lat = '40.621159';
long = '-111.592499';
}
if (itemName == 'vail')
{
lat = '39.3944';
long = '-106.2150';
}
if (itemName == 'taos')
{
lat = '36.39';
long = '-105.58';
}
if (itemName == 'kill')
{
lat = '43.6775';
long = '-72.7803';
}
setupMap(lat, long);
}

At the bottom of this function is where I call the setupMap() function. It then returns the following data/picture:

SimpleXML Paring the Data

In my last post I should you how I was able to get the data from the xml dump to be displayed in the browser. The problem with that was that it was just data. It was unorganized and in no logical format that the user could discern, well all that is about to change. While it took a little time for me to understand how to parse the data, once I figured it out, things moved along fairly quickly. I chose to parse the data using SimpleXML and Xpath in my PHP proxy function. I found that was the easiest way to get the data formatted for proper display. More can be found on the Internet about SimpleXML and Xpath.

The most important part of this process is to get the data into a variable so it can be parsed. If you look at my last post you will see the process of creating the curl session. Once the session is complete you need to take that $data variable and use it to create the $xml variable.

$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $fullUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);

$xml = new SimpleXMLElement($data);

This simple line takes the $data returned from the curl session and puts it into a SimpleXML format so that we can parse it. THe next step is to look through your xml by taking the url in your request and putting that into the firefox browser. This will show you the tags and their attributes that are returned so you can figure out what you need. For this instance I used:

http://a6357896562.api.wxbug.net/getLiveWeatherRSS.aspx?ACode=A6357896562&OutputType=1&zipCode=48189

I ended up with the following output:




From here I can start to figure out the tags I want to grab. I do this by using a object type structure. I created variables in the PHP script to hold the resutls of the query. In this one $zip = $xml->xpath('//aws:city-state/@zipcode'); I search for the aws:city-state tag and then I grab the attribute "zipcode".

$timezone = $xml->xpath('//aws:time-zone/@text');
$temphigh = $xml->xpath('/aws:weather/aws:ob/aws:temp-high/text()');
$templow = $xml->xpath('/aws:weather/aws:ob/aws:temp-low/text()');
$feelslike = $xml->xpath('/aws:weather/aws:ob/aws:feels-like/text()');
$city = $xml->xpath('/aws:weather/aws:ob/aws:city-state/text()');
$zip = $xml->xpath('//aws:city-state/@zipcode');
$current_temp = $xml->xpath('/aws:weather/aws:ob/aws:temp /text()');
$elevation = $xml->xpath('/aws:weather/aws:ob/aws:elevation/text()');
$wind = $xml->xpath('/aws:weather/aws:ob/aws:wind-speed/text()');
$lat = $xml->xpath('/aws:weather/aws:ob/aws:latitude/text()');
$long = $xml->xpath('/aws:weather/aws:ob/aws:longitude/text()');
$icon = $xml->xpath('//aws:current-condition/@icon');

Once I had all the data that I need I then format the data into a nice presentable form by using a series of HTML Table tags. This allows me to creat the format and then just hand the JAvascript function something that it needs to spit out. Unfortunately the blog is freaking out and wont let me upload a picture so I put it on my emich site instead Here...Good Luck

Here is the finished Product:

Weatherbug Proxy Pass through

So I managed to get the proxy pass through working and returning data for iteration 2 of the individual project. Since it took me a while to figure it out I thought that I would pass on my experience in case others are running into the same difficulties. I used the WeatherBug API, and the documentation can be found at WeatherBug.

The first thing I did was to use the createRequest method that was provided to us in class.



Next I had to create the getWeather function to call the proxy. I handed it a zip as a parameter so it could find the weather for a location.




Next I created the proxy script. I did this a bit differently than professor Drake showed us but I was able to find quite a bit of documentation and sample code out there to choose from. This one first takes the zip code that I passed to it and puts it in the zip variable. It then takes the cll url and puts it into the $url vaiable. Then I append the zip to the end of the $url variable by concatenating the strings $fullUrl = $url.$zip. The reset is the call to the API and thn it puts the data into the $data variable.




I then just echo the $data variable and it then sends that data to the displayWeather() function in my javascript.




This function then takes the return data variable and then displays it in my web page in the div id=weather tag. While it took me a while to figure out how to get this to work, it was pretty easy to recreate for my other APIs. I literaly just needed to change all of the global variables and then just call the different URL. I was able to use this same code with 3 other APIs for the group project.

Feb 26, 2010

API's bringing big cash to Mashery

Now a days every website is cashing on using APIs to become a platform. Mashery, a company that has hosted APIs for companies and helped manage them, was rewarded with a $5.5 million series of funding. The huge technology company, Cisco, as well as some other companies are the investors in this round of funding.

CEO of Mashery, Oren Michels, stated in the article that so many companies are beginning to test the waters of API and are seeing significant raises in revenue as well as the growth of their companies. Michels goes on to say that companies are seeing the importance of letting their customers interact with they services instead of forcing them to do everything at the companies website. I would say that companies willingness to develop APIs are also very important to education, such as the students of IS449w being able to complete there projects for the course!

Mashery will use this new money to hire more people in sales and marketing to be able to expand their product. Currently there are 40,000 developers connected to the website. Some of the bigger names being: Bestbuy, Netflix and New York Times. I think this is another great website, other than programmable web, that we can use to gather information of our APIs. Also check out 3scale. The article lists them as Mashery's competitor.

The Original article was Posted on TechCrunch

Feb 3, 2010

The AJAAAXXXX effect !!


AJAX - The Great !
So finally I have started working with concept of AJAX. I think I am the only one in class who is struggling to understand this concept of coding. I did a very easy demo for the Individual project 1 because I was already struggling with the code part so I wanted it to be plain simple so that I can concentrate on the system integration concept works.

Even after completing the initial part of my project, I was not sure if I was doing the right thing. I think there are different ways to use this concept and still get the same result. It took me seven hours to understand this concept. I am not able to understand the concept from this head first book so I referred different books to understand its working. And when I referred the Head first book, things started to make sense.

After that I started thinking about the APIs for my next project and I am planning to use an API for pulling stock quotes for different companies. So here's the link to the API I am planning to use:

API Example :

Let me know what do you guys think?


Feb 2, 2010

Just what is a Free API look like?


I have been search through the lists of API out on the www.programmableweb.com. I am now wondering what all the different check boxes of information mean. The picture is a screen shot of one the lists I am talking about.

Ok I understand if you need an API key. If that Key works the way I am thinking. I am guessing it is more like a security key that matches your page up with theirs. Traffic control is important to keep your servers from being over loaded.

But if they require an account does that mean you have to pay. Or is it a way to have you just register for their site? I guess it could run both ways.

I wanted to use Shopping.com and Etsy for my individual project. Both require accounts and API keys. Now the terms of services for either of them say nothing about a fee for the service.

Does anyone have an explanation of what I should be looking for?

Jan 27, 2010

Professional AJAX

Alright, so last week I blogged about the Head First Ajax book. For the last three weeks I have been trying to get thought the first couple chapters and try to retain some of the information without success. One of the problems that I had with the book were the "pictures" that the author uses to show the flow of the information through the site. For some reason when I opened the book my brain immediately went into sensory overload. I had a very difficult time trying to follow the methodology that the author was trying to present.

This weekend I decided to go pick up the other Ajax book that the professor recommended and after tow chapters all I really have to say is Ahhhhhhhhhhhhh! No this is a programming book! In depth coverage of the material as well as a very logical and analytic approach to the material. After reading the two chapters (approx. 1 hr) I was able to grasp the concepts that the author of the Head First book had been trying to teach me for the last 5 hrs.

The one thing I noticed is that the reviews of the book overall are not quiet as good as the Head First series (reviews), but if you struggling with the head first book, I encourage you to give this a look through. One thing that I need is an understanding of the code as you see it. Unfortunately the Head First series pretty much shows you the code and then much later provides the explantion of what it actually means. The Professional Ajax book takes a much different approach. They Show the code and then go through a step-by-step decomposition in order to show you the functionality, something I need to retain the info.

API Trends




Web 2.0 introduced a whole new level of functionality to the average internet user and developer. Applications like Google Maps, Flickr, PhotoBucket, del.icio.us, and Facebook have started trends that many say are irreversible in web behavior. The internet has turned into more than a scientific, fact-finding tool - it has become an ever-changing monster that has infiltrated our daily lifestyles and routines. Many would assume that with this growth, a wide array of API's would be spread across the market and used evenly... but it seems to be more of a first come, first serve basis.

Google is dominating the API usage index. Over 1000 mashups use a Google API (webmaster tools, analytics, Google Maps). 43% of all API mashups are involved with mapping locations, with the second most used API is used for photography purposes. Google maps alone is used in 50% of mashups that are commonly used today - that is no small feat.

It seems that many of the API's that have been released to the market are actually created for entertainment purposes rather than business related activities. This may be one of the driving forces that is shaping the internet as we know it today. It is turning into a toy and the API's are helping this transformation move right along. The mashups that are created by the use of API's, however, will eventually allow for extremely fast and convenient applications and utilities that are solely web based... I hope.

Jan 12, 2010

Information Overload on Ajax


My first question is what this “ajax” is we are supposed to be learning in this class. So I decided to make my first blog on what I found out about Ajax on the web.

Ajax is short for asynchronous JavaScript and XML according to Wikipedia. This not so new language is responsible for the mixed content pages we have gotten used to seeing from Google to Weather.com. It works by using retrieving data via XMLHTTPRequest object. Hmmm.. What is that and how does it work?

An XHR or XMLHTTPRequest is a domain object model application programming interface. Now I have worked with API in a sense of using calling routines when I have written programs. XHR works by bringing more data up in to the webpage as the user interacts with the page. That is really cool and to believe that developers for Outlook actually had a good idea.

There was a nice historical flow on the development of XHR with the different browser programs each trying to have the best version. Then XHR Wikipedia site got in to the hard core coding examples that my brain wasn’t going to understand at Midnight. I will be back to this site and many of the others I ran in to just by typing ajax in the google search. I hit information overload at this point.