Wednesday, March 21, 2007

Assignment #9

After playing around with Yahoo Pipes for a while, I realized that there is a lot of power behind such a simple idea. Create one web page that has the power to search for anything. Using these pipes you can gather a lot of information from multiple sources, from a centralized location. At first I found Yahoo Pipes to be a bit confusing. While I understood what was being done, I had a problem creating my own working Pipe. After searching and studying previously created Pipes, I finally grasped enough of how they worked to make my own. The pipe I created, which can be found at This Page brings together Flickr and Google to do a variety of different searches.

With the introduction of Web 2.0 the world is able to upload and share information with everyone in the world. Instead of companies and other web sites telling us what to look at, we are able to upload our own information and create our own websites. Yahoo Pipes is helping us gather information from different blogs and other various Web 2.0 sites, along with non Web 2.0 sites. The user will type in what he/she wants to search for, and the search looks for all items that have been tagged with the same information.

AJAX is somewhat the same, yet different at the same time. AJAX, or Asynchronous JavaScript, is used to help create interactive web pages. Instead of reloading whole web pages, AJAX exchanges small bits of information with the server, behind the scenes, which gives web pages much faster load time. This also gives the creator/user a much more enjoyable time, as they don’t have to constantly wait for their information to stay updated.

So, how does Yahoo Pipes incorporate both of these new ways of thinking? Well, after you have created your Pipes, you can publish it and let the world see and use your newest creation. This satisfies the Web 2.0 portion, so how does AJAX fit in? Yahoo has made creating various Pipes very easy. You simply drag and drop different pieces and connect the pieces with pipes. This method of construction is using AJAX. You are adding new content to the web page constantly, but the whole page doesn’t keep reloading. That is because each time you move part of your design, small amounts of information is sent to the server, updating your page to work seamlessly.

This fits in nicely with our conversations about Service Oriented Architecture as it is very user friendly, and will work for anyone who can run the Internet. There is no special program that needs to be installed on your machine to have this work, which in turn, benefits the most people.

It is amazing how we use this technology every day, but most people don’t understand a thing about it. As long as it works, people are happy. Really though, if it wasn’t for Web 2.0 and AJAX being implemented in this project, it wouldn’t have quite the same effect on as many people as it is.

Thursday, March 8, 2007

Assignment #8

The Difference between REST and SOAP Web Services

There are many differences between REST and SOAP Services. First off, SOAP uses envelopes combined with the HTTP POST request. REST communicates directly with the URL using a HTTP GET request. This should make the whole communication process go a little quicker. It is also common for SOAP vendors to route all their HTTP POST requests through one URL. This is now creating a place for a bottleneck, depending on how much traffic there is at any given time. One feature that REST uses is the ability to use specific URL’s to get detailed information on different searches, whereas SOAP doesn’t use links at all. This ability is what sites like Amazon.com uses to give detailed information about their products to their customers or potential customers. SOAP users are forced to find the information elsewhere, which would be a headache to most online shoppers.

REST, like SOAP can also be used with Proxy Servers. The difference between the two is how this is implemented. Using REST, the request is made, but the proxy server recognizes that it is not allowed, thus not fulfilling the request. SOAP on the other hand doesn’t use specific URL’s so the Proxy Server is unsure what to do with the request. Therefore, companies that want to restrict certain areas of the Internet would use the REST/Proxy Server combination to keep their employees in check.

REST also speeds up requests by caching information more quickly. As the request is being processed, it is determined if it is cacheable. If it is, servers will make a local copy, thus speeding up the whole process for the user. SOAP servers do not know what is being requested buy the user, so there is no caching possible using SOAP.

All in all, with REST using URL’s to keep track of information and to help use the user delve deeper into their search of interest, it seems to be a better option to use in most cases.


Exploring RESTful API

I wanted to find a website that I was familiar with when searching for this RESTful API question. I figured that way I might be able to understand what I was reading about better. I chose the website www.facebook.com. Facebook is networking website that started off only allowing people with designated .edu email addresses. It has since opened its doors to let anyone in, acting along the same lines as Myspace. Within this vast website there are many different commands or methods that must be followed.

Starting off, the user has to enter their username and password which will create a token which will be checked certain records. There could also be a number of error messages that could be displayed if there is an error. Facebook will then take the user to a designated URL, which is a feature of REST. After the token is created, a getsession command is started which will return the session key that was created after the user signed in.

Facebook also has the ability to show people who your friends are. It does this using an array which compares to profiles and determines if each of them has each other as a friend. A list of friend_info is then returned if the situation is true. A big feature of Facebook is the ability to create a photo album for your friends to view. This is done by calling the Facebook API photos.createAlbum, photos.upload, and photos.addTag. The pictures are then able to be tagged, using the photos.addTag, which creates boxes over individual faces. These boxes are then linked to that persons specific URL of their Facebook profile. if they have one.

The API of Facebook makes it very easy to call these functions. You simply click and type your way to whatever meets you desire. Luckily for us, each command that is requested of Facebook is translated into meaningful information for the computers. We simply fill in text boxes and forms.

One nice feature that Facebook offers is the ability to use their API Test Console. If you have an account, you can call all of their methods, and it will give you the output code from each method. It doesn’t just give you generic code either. It will allow you to see the code that it would actually use when calling information from your account. That way you can see specifically how it works.

While this website doesn’t serve a purpose to everyone who has access to the web, it serves a great purpose to many college students. This program allows people to get in touch with old friends, stay in touch with current friends, and view other people’s profiles who are in the same network. This is just one of the many online communities that have become popular in the past years. REST is important to Facebook because as you are searching for your lost friend, it must have the ability direct you to specific URL’s as necessary, something SOAP is incapable of doing.

Reference:

http://developers.facebook.com/documentation.php

Thursday, March 1, 2007

Assignment #7

1. The line is telling us that it is using Cocoon, while using a component called XmlHttpTransformer.
The next lines are defining the action that is requested which are a stock quotes.
The following lines are the body of the code which is a soap request. It is calling the methods-delayed-quotes SOAP method to get the quote for IBM. This will be in string format.
The next lines are defining yet another method which will be currency exchange.
The exchange rates for the United States and Japan are required for this, which are also strings.
All of this code is the request of the information.

2. Once again it is telling us that we are using Cocoon while using a component called XmlHttpTransformer.
This time though, we are calling for the information that number 1 requested.
The result, which is now calling for a float command, is 82.92 in US currency.
After using the Japan exchange rate, we see that the stock is worth 122.52

3.1 WSDL uses the following elements:
Types – a container for data type definitions using some type system (such as XSD).
Message – an abstract, typed definition of the data being communicated.
Operation – an abstract description of an action supported by the service.
Port Type – an abstract set of operations supported by one or more endpoints.
Binding – a concrete protocol and data format specification for a particular port type.
Port – a single endpoint defined as a combination of a binding and a network address.
Service – a collection of related endpoints.

3.2 The code for a soap request and response is almost identical according to this article. The only difference is the middle lines. In the request, we see that it is requesting the lasttradeprice for the stock matching DIS. In the response, we are asking for the result which was 34.5.

3.3 A port type is a named set of abstract operations and the abstract messages involved. It is also one of the elements that WSDL uses.

3.4 An error message or status information for SOAP message is contained within a fault element.

3.5 MIME Binding is used to bind different types of data together. The following are defined:
multipart/related
text/xml
application/x-www-form-urlencoded (the format used to submit a form in HTML)
Others (by specifying the MIME type string)

4. #!perl -w
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI

-> dispatch_to('Calculator')

-> handle;


package Calculator;


sub add {

my ($class, $a, $b) = @_;

return $a+$b;

}


sub subtract {

my ($class, $a, $b) = @_;

return $a-$b;

}


sub multiply {

my ($class, $a, $b) = @_;

return $a*$b;

}


sub divide {

my ($class, $a, $b) = @_;

return $a/$b;

}

Thursday, February 22, 2007

Assignment #6

As last week was the first time I ever came in contact with Perl, I didn't understand this assignment. I spent far too long searching the Internet looking for help, only to come up with a half working Part 1. In turn I don't have anything for part two or three. Something isn't clicking for me yet, hopefully I will catch on soon.

Part 1 (Working, but incomplete code)

# 6.pl
# Reads characters


print "What file?";
$a = <STDIN>
chop $a;

#opens file
open (FILE, "$a") or die "File Missing. Find It!!";


while ($record =
<FILE>) {
print "This file has ", length($record), " characters!";

#makes each printed line on a seperate line
print "$record[-10]\n";

}

close(FILE);

Thursday, February 15, 2007

Assignment #5

Middleware and Service Oriented Architecture

In today’s fast paced computer world, we as computer users expect everything to work every time we use it. This means that programs that should work together, which allows us to get the most out of our programs, systems, and networks. Linda Rosencrance of Computerworld.com says this about middleware, “Middleware, software that functions as a translation layer, sits between an application residing on one server and any number of clients that want access to that application. In short, middleware allows users to interact with one another and with applications in a heterogeneous computing environment.” This is a very important feature that computers use, a feature that we as users never see.

This “cyberinfrastructure” as Educause likes to refer to it as, is the backbone of every system. The need for such software is not coming to a close any time soon either. More and more different systems are being implemented every day, and each of those will have the need to communicate with other systems on a daily basis. Whether companies will be able to use existing middleware or have to create their own is up in the air though. As Service Oriented Architectures become larger and faster each day, middleware is going to have to keep up with the pace. People expect their computers to react instantly, and if they don’t they will move on to another piece of hardware/software.

A very important feature of middleware is that it helps connect old legacy systems to new, updated systems. This way, companies do not have to lose out on millions of dollars every time a computer needs to be updated. This also aids in connecting different parts of a company together to flawlessly act as a whole. A company must understand its system before using some middleware. Some middleware will be packaged within a new system if it is a well known item. If the company has designed its own system, the new middleware might also have to be designed from the beginning. Luckily, each company has different types of middleware to choose from so it will fit their needs perfectly.

Some of the different types of middleware are database middleware, message-oriented middleware, transaction-processing monitors and Web middleware. An example of database middleware is any middleware that connects an application to a database, or a database to another database. Accessing an Oracle database using a transaction application would be one way to use this particular type of middleware. Message-oriented middleware according to the SEI is middleware that “increases the interoperability, portability, and flexibility of an application by allowing the application to be distributed over multiple heterogeneous platforms”. What makes this middleware useful is that messages sent over a network are stored if the receiver is not currently on the network. The sender however can send as many messages as it wants to though. Transaction-processing monitors allow a client/server to properly run and operate transaction applications. This middleware can work with many different clients which all need to talk to the server. It organizes the data into processing routines which is then routed to different services. Web middleware connects different data and applications to the Internet, where our different browsers can access them. Without web middleware we would not be able to work or play the way we do now. While there might be another way to connect ourselves to the vast amounts of information that is available, it might not be as easily done.

Martin Treiber and Schahram Dustdar of the Vienna University of Technology have the following to say about SOA and middlware:

“It can be seen that middleware and SOA have some overlapping goals, both aim at

• integration of distributed software systems

• support of heterogeneity concerning implementation

• support of different (distributed) architectures

Nevertheless, SOA and middleware take different approaches, since

• Middleware operates on a more concrete level (e. g. message passing, message

queuing, etc.)

• SOA provides ‘only’ a conceptual model”

This being said, it is easy to see the link between middleware and Service Oriented Architecture as at times, they are both trying to accomplish the same tasks. Integration with other software and the support of different architectures are essential to our daily computing. How else would a Mac user and a Windows user be able to communicate with one another? This world would surely be divided if this middleware didn’t exist.

One question that can be asked is, “Is middleware reliable?”. The answer to that varies from company to company, but Ebay would not be in business without it. Ebay uses middleware to enable its users to pay using PayPal. This is a very big deal for Ebay, so in turn middleware is very reliable, and very necessary to them. Vice President of systems design James Barrese says, "The integration tier is the keystone in this solution. This allows us to efficiently scale and manage our back-end resources." as well as, "Our abstraction layers make it easier to train new engineers, constantly improve the availability of the site and make live data architecture changes with no code changes and no downtime”. Oracle also seems happy with middleware as they announced their new concept of SOA 2.0 called Event Driven Architecture would include middleware that allowed their customers to react with data in real time. This goes back to people wanting information instantly, and companies are realizing that this is quickly becoming a reality.

Middleware seems like the perfect compliment to any Service Oriented Architecture that needed to expand and increase profits. Currently, and in the past, middleware has acted as the “glue” that holds the entire computer world together. As the years pass, improvements to middleware will be designed, and new ideas for completely different ways to connect different systems will become available. Until then, we use what we have and try to enjoy every minute of it. It worked for Ebay and Oracle, it could work for you too.


http://www.computerworld.com/softwaretopics/software/appdev/story/0,10801,52066,00.html

http://www.infosys.tuwien.ac.at/staff/treiber/Overview.pdf

http://www.educause.edu/ir/library/pdf/erm0241.pdf

http://blogs.zdnet.com/service-oriented/?p=675

http://www.infoworld.com/article/06/06/19/79432_HNoracleda_1.html

http://www.sei.cmu.edu/str/descriptions/momt.html

http://www.sei.cmu.edu/str/descriptions/tpmt.html

http://www.gcn.com/state/vol6_no6/guide/748-1.html

Wednesday, February 7, 2007

Assignment #4

CGI (Common Gateway Interface)

CGI is a very widely used standard for running external programs on a HTTP server. Like anything that is implemented on a computer, there are going to be problems and solutions to those problems everywhere. The following is a list stating some of these problems and solutions.

Coding a script wrong is probably one of the most common mistakes. If a CGI script doesn’t perform the way you expect it or you get an error message when executing it, then there is a problem somewhere. Another problem might be locating the error in your code. It could be that the script settings are incorrect, or your permissions are wrong. Make sure you double and triple check your code to make sure it will execute flawlessly. Another problem is that some scripts are too long, creating different problems. Testing and debugging is directly related to the size of the script. If the script size is manageable, then all related maintenance will also be manageable.

According to Webopedia, every time a new CGI script is run, it in turn starts a new process. This is bad news for slower older servers or high traffic servers. This will severely decrease the performance of your server. One solution to this problem is to use the server’s API (Application Program Interface). Using this aspect of the server will greatly increase the productivity since the applications are more integrated with the server. This also leads to a very large lag time between the server and the external program which can be somewhat fixed by keeping the CGI script in memory. This will only decrease the lag time, not eliminate it completely. Another time saving solution is to use cookies. Cookies will eliminate the unnecessary validations that must take place each time a page is accessed. Other problems include the fact that CGI scripts are stateless, meaning they exit as soon as their task is completed. Having to reconnect every time adds a considerable amount of time and has a large impact on performance. Scalability is also a problem when it comes to CGI since some systems can not handle a large number of processes started by each script.

There are ways to help ease the pain of these problems. One way is to use special CGI tools. A particular tool called CGI Tester will measure the performance of the scripts, along with statistics, error reporting, and server speed. Such tools will aid you in making your machine run at its best possible speed. Another solution that will help ease the pain of the server is to make the client-side do some of the work. JavaScript can be used to allow the browser to do some of the work, and also can be used for validation. You can also use the web server to keep the CGI scripts running all the time as co-processes. This way, when a script is called it will easily be able to complete its task without the lengthy start up time. This however puts a strain on the server’s memory, and utilities should be used to help reduce the stress on the machine.

Security is also a problem that must be addressed when using CGI. CGI is used to process user input, and this can be a very helpful addition to any website. However, users can trick CGI scripts into performing a command on the server which could result in a breach of your system. This can be remedied by using servlets. These servlets are used because they are not at risk of running forced, unintended commands. This will help prevent hackers from making their way into your system.

If you are going to use CGI scripts, you must understand how they work, and understand the risks that are involved. I believe CGI scripts are a good addition to an SOA, if they are used properly and are understood. Also, no script should be bigger than it has to be. The scripts should be kept to a smaller size to help in all aspects of coding and debugging. If there is extra code all over the place, it will appear messy, and it will surely show up when a customer tries to use your scripts. They could become unhappy with your service and you could lose them forever, just because you had too much going on at once. You must also make sure your server can handle the activities you want it to perform. If your site is heavily trafficked, you must have a server that will not collapse under all of the stress of running CGI scripts.


References

http://www.webopedia.com/TERM/C/CGI.html

http://www.k5n.us/article.php?id=0001


http://www.irt.org/articles/js172/index.htm#cgi_optimization

Thursday, January 25, 2007

Assignment #2

Part One

Both concepts want to make using the web an easy process, which leads to differences between the two concepts.

Jakob Neilson concentrates more on the visual aspects of the website. He uses usability as an example of this. The users must be able to learn the website as easily and quickly as possible and to also remember how to use it for future uses. He clearly states that if a website doesn’t have complete usability that most users will exit the site and continue their search elsewhere. For an eCommerce site this concept is very important. If a customer can’t find their way around your website easily, they will stop using your page, go elsewhere for their products, and not recommend your site to their friends.

Donna Maurer on the other hand concentrates on the behind the scenes design of the website. If the website doesn’t have a good hierarchy it won’t be easily understood which in turn will drive away your visitors. When creating your website you must understand and relay to your visitors the commonalities between the different topics on you will display. Maurer also concentrates on the importance of incorporating databases into your website. Users must be able to search your database using tags which will help your users locate topics on your website much easier.

While both researchers have different ideas about how a website should be built, they always seem to agree on the end goal. Users must be able to use your website, and enjoy using your website at the same time. If topics are buried under countless links the user will go elsewhere. If you are an eCommerce website, incorporating both of these techniques will surely give you a chance in today’s business world.

Part Two

Usability & IA Assessment

At first glance www.Goodwill.org is pleasing to the eyes, it is easy to read, and has a layout that is easy to follow. Although, once you start navigating through various pages it would be hard to say that both Nielson and Maurer would be happy about the way this website was designed and built.

I believe Nielson would be happy with www.Goodwill.org. It is easy to accomplish tasks as there are clear links everywhere. Even being my first time visiting, I was able to learn much about Goodwill and the type of activities they perform. It seems as if this website would be easy to navigate in the future as well. Links are clearly set up, which lead the user further into the topic. A far as memorability is concerned it doesn’t have anything that will help me remember it either way, but this isn’t necessarily a bad thing. Some websites have such a horrible design that people will complain to others about it, which will deter future users from even visiting it. Although, I feel as if the next time I visit www.Goodwill.org, I would be able to continue using it like I never left after a quick refresher.

I went looking for errors on this website and I noticed one main problem. There is a search bar on every page, to help locate topics easier. I searched for keywords such as Careers and About. These searches brought up no information for me. On the main page, they advertised this story about a man named Javier. It was one of the many success stories that the page has, and I was interested in searching for it to read about his story. I searched for Javier, and it couldn’t find anything on the site. I just thought that if it was important enough to make it onto the homepage, it would be important enough to be searched for. Other than the searching, in the short amount of time I had to browse the website, everything else seemed to be in working order.

Overall, I didn’t have a disappointing time navigating through www.Goodwill.org. The colors complemented each other making it easy on the eyes, and right from the start I knew what Goodwill wanted to do with their website. If I were to have a problem, under the Contact Us page, they provided me with all the necessary information to get in contact with someone at Goodwill. At that point I could voice my opinion and hopefully the company would look at my opinion and see if it was something that would work better for their website.

It seems like www.Goodwill.org also follows Maurer’s findings as well. There are well thought out hierarchies that are used in this website. When I click on About Goodwill, it brings up topics such as “What We Do”, “How We Operate”, and “Careers at Goodwill”. They are topics one would expect to see when they are just learning about Goodwill as I was. The hierarchies appeared planned as I didn’t have to search the whole site for the information I needed. For the most part it seems as if www.Goodwill.org follows a very strict hierarchy. Information seems to be placed in only one location on the website. This helps keep the amount of errors on the website to a minimum, as data will not be mistyped in various locations.

Unfortunately, www.Goodwill.org doesn’t seem to be tagged properly. This problem was discovered while searching for various topics. If web pages were properly tagged, they would have been brought up in my search. I know for sure that there are About pages, and Career pages. It doesn’t make sense that users couldn’t search for them. Looking at the source code for this website, it appears that meta tags were used, but this will not be helpful for the current user. These tags will assist people who use various search engines to initially locate the website.

It appears as if Goodwill’s website doesn’t utilize a database at this time. All the information they feel is important to their customers can be written as html. If the time comes that a database must be incorporated into the website I hope they use someone who has a great understanding of databases. There are very specific ways that databases must be utilized, or incorrect data will be displayed to users. You would not want your customer to search the database for public information and have them accidentally stumble across sensitive documents.

Along with pages not being tagged correctly, www.Goodwill.org doesn’t seem to use faceted classification. I cannot get to information more than one way. I have to follow a certain path of links before I can get to the Online Learning section. This may deter users from returning to this website if they felt this was a difficult task to perform. Also, when pages are deleted or new pages are added, links may become disabled because of a mistake in coding the pages. This will lead to information being lost in the internet until the code is corrected.

Getting the reactions of Jakob Nielson and Donna Maurer would be interesting. Most everything Nielson talked about is implemented in the design of www.Goodwill.org. This website was easy to use from the very beginning and would be easy to use in the future as well. It also is pleasant to use, and doesn’t make you want to leave and find another source of information. Maurer on the other hand would probably have a few problems with the design of the website. While if follows a type of hierarchy that makes the website flow nicely with clearly labeled links, that is the only way you can find the information. Searches are useless as nothing is tagged correctly, which could make some users very discouraged. Overall though, I felt www.Goodwill.org did a good job getting their information to both their current and potential customers. Fortunately for them I would gladly visit their site again when I needed to, which is ultimately the main goal of any website.



Edit: Since writing this blog entry, the search feature is now functioning properly. Everything I search for produces results. I now have no errors to report about this website.

Thursday, January 18, 2007