Showing posts with label xmlhttprequest. Show all posts
Showing posts with label xmlhttprequest. Show all posts

Mar 24, 2010

Dynamic Web Interfaces


As I am still working with my individual projects http requests, I have been looking for some more information out on the web.

Well I found this site that talks about http requests, XML, DOM and parsing all in one!
XML.com has several sub-chapters on topics near and dear to our hearts. But the one I found most interesting was the one on Ajax.

The article starts with the history of XML and its interplay with JavaScript. The codes examples start with the basics, then it turns to "The Form," "Handling the Input," "HTTP Heavy Lifting," and the "The Server Script." There are examples on the parsing, xmlDocloading, and server requests.

And as with all good teaching blogs, there is a link to a book for more reading. In this case the book is "No Nonsense XML Web Development With PHP" by Thomas Myer.

Feb 18, 2010

Proxy-pass through

I decided to write a blog about the Proxy-pass through because I know that it can be a little difficult to understand the first time you look at it. I think the most important thing to know is that it really isn't too complicated. Based on Dr. Drakes PowerPoint I will explain some steps to follow.

To get started create a basic html web page like this. Remember to include the script type in the head. This is shown in slide 5 in Dr. Drakes PowerPoint. Just remember that for iteration 2 we will need to have an event handler like a button onClick and a div for display.


Next create a JavaScript file and name it ajax and save it as a js file. All you have to do is copy slides 6,7, and 8 in Dr. Drakes PowerPoint like below. Note that for iteration 2 we won't use the window.onload because we will have an event handler. You will have to change the function displayDetails beacuse we can't use an alert box. Also, in the function getDetails is where we call the proxy file.


Then all you need to do is create one more file and name it proxy and save it as a php document. Just copy slides 9-13 in Dr. Drakes PowerPoint. In the highlighted area is where we will define a hostname. For iteration 2 we will need to insert our own hostname from a web service we have chosen. Some API's will require a KEY and some parameters along with the hostname.



This is only a way to call on a web service using Proxy-pass through and to return the information as xml. This is the requirement for iteration 2. As we continue in the semester we will take this xml and parse the information to display only the tags we need. I hope this will be helpful and make iteration 2 a little easier to complete.

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.

Oct 14, 2009

Group Project

For our group project iteration 1 we had to do something very similar to our individual project. We needed to fetch a static file from our web server and integrate it into our web page using xmlhttprequest, identify use cases, state what web service API's we plan to use, and a project plan.

When our group was first formed we had some trouble deciding what type of site to create. Initially we thought of working with the game API's but it was difficult to find ones that we could actually use. After some time we came up with a new idea for our site. We found a great API about wine and wineries that we can use. Our plan is to take the Wine.com API with the Google Maps API and form a mashup to show winery locations over the map, and the Blogger Data API with ZoomClouds API as a mashup for blogging with a tag cloud.

Iteration 1 is now complete and we are looking forward to incorporating the API's into our web page. We are happy that we have an idea that will hopefully work for our group project. Here is an image of how our site looks so far.