Archive for February, 2007
Ruby
A few friends of mine really like Ruby especially Ruby on Rails. Ruby is a simple programming language that is very easy to understand and write. I followed a tutorial that allows you to try ruby inside of your browser. With simple commands such as the ones below you can see how easy that it can be.
| Command | Result |
| -199.abs | # 199 |
| “ruby is cool”.length | # 12 |
| “Rick”.index(”c”) | # 2 |
| “Jimmy”.reverse | “ymmiJ” |
I have not done a lot of research about Ruby or Ruby on Rails, but I do want to learn more about it. One problem is that I have way to much do with school and work and play.
No commentsWeather Service
I was finally able to get my weather retrieving web service to work. So apparently I had done everything correctly, but when I was calling my WSDL it was using a cached one. I needed to put the following line of code in to ini_set(”soap.wsdl_cache_enabled”, “0″); to prevent caching. After I had figured that out I tried it again and it worked fine. I then needed to format the output so that it look nice. You can test my service here. My WSDL can be accessed by following clicking here. It is really neat to have created a service that can be consumed by others with out them knowing how or what I am doing behind the scenes to serve up what they are looking for. The more layers of abstraction there are then the simpler it is to do things.
Business Case For Web Services
Web services are a wonderful way to leverage what has already been done by you or someone else. What I mean by this is that many times you write code for a piece of software you are working on and your same code might be able to work in another application why not make a web service that will allow both software packages use it. It would cut down on development costs and someones time. Also many times there are people out there who have already done what you are looking for and would be glad to let you use their service and connect to it and get what you needed. All around it is a win win situation. The bottom line is that you save money and both your developers and customers are happier.
Web Services Here I Come
Today I had the chance to sit down and really focus on this web service. I have come to better understand how it works and its practical use. I figured out part of the reason that my installation of WAMP was not working properly and it started with me running it in a virtual machine. When i was in the virtual machine I did not have it configured properly so that I could use my wireless connection from my native machine to the virtual one. Once I had that fixed I was able to test my sample code.
After creating an environment that would allow me to test the code that I was going to be writing I started to write code. I first started off by connecting to Dr. Liddle’s simple weather web service. This web service provided us with weather data for all the zip codes or cities that he had stored in his database. In calling this web service we would have arrays of data for each zip code. After successfully writing out all of these values I then needed to format the data so that the person who would be requesting my service would know what everything meant. When I called Dr. Liddle’s service it would pass back a 0 or 1 or 2 for the sky condition. I created an if statement that would figure that out and display it in text format for passing it on to the requester of my service.
In addition to formating it I had to store it in an array to send back to the requester. This was very simple by just creating and array named $data. The next part was creating a WSDL that would map correctly to the different elements in the array. Using the sample WSDL from the Zend Developer Zone I was able to make this with ease. I also followed the schemea that Dr. Liddle had in his WSDL and I was done with it.
I tried it for the first time and got the following error
“Fatal error: Uncaught SoapFault exception: [HTTP] Client Error in /home/isys532/public_html/fatbob/test.php:3 Stack trace: #0 [internal function]: SoapClient->__doRequest(’<?xml version=”…’, ‘http://ebiz2.by…’, ‘urn:xmethods-de…’, 1, 0) #1 [internal function]: SoapClient->__call(’getWeather’, Array) #2 /home/isys532/public_html/fatbob/test.php(3): SoapClient->getWeather() #3 {main} thrown in /home/isys532/public_html/fatbob/test.php on line 3“
for the life of me I couldn’t figure it out. So I tried my code with out the WSDL and was missing a “)” and had my function as a public function. After fixing that problem I tried using everything again and now I don’t get an error. Great one would think, but now I do not get anything to display on the page when I load it. At least there is no error, but at this point I would like to see some error so that I could debug it.
No commentsZion National Park
Over President’s weekend I went down to Zion National Park to go camping and hiking. It was a perfect time to get out and see what nature has to offer. I had never been to Zion although I had driven by it many times when traveling to and from California. The main reason we were going was to hike Angels Landing. The hike took us about 3 1/2 hours round trip, but we could have had it done sooner then that, but there were some people on the trail. We made it to the top and it was so amazing. Truly one of the coolest places that I have ever been.
1 commentPHP to the rescue?
So I abandoned the idea of using Visual Studio and C# to do my web service, even though I have been writing some code in C# for system administrator position in the project management department at BYU. The reason for this was because Dr. Liddle showed us in class how easy it is to use PHP with web services. Since I did not understand it fully I recruited a friend and classmate to come and help a group of us out.
Jimmy Zimmerman, who knows this stuff really well, came and taught us on Friday morning. There were about 5 of us there all trying to grasp what web services are and what we are supposed to do for the assignment. He discussed very simply how each part of a web service and how it relates to other parts.
After gaining a better understanding of web services I tried to get apache and php installed on my machine. This proved to be a little difficult even with packages out there that will install of them for you with one exe such as WAMP. The installation went perfectly, but I still can not get my simple SOAP (Simple Object Access Protocol) request to work. I followed the instructions laid out on a PHP developers website that provided some good examples, but with no luck. I need to spend more time understanding the underlying concepts that make it work. Although now is not the time for that.
No commentsWeb Services Woes
For an assignment in my class I am required to create a web service. Since I have had experience with several different computer languages I thought that this would have been a relatively easy task, but alas it has not been. I think that a good portion of my follies have come because of my lack of understanding how web services work. Don’t get me wrong I understand a high level of the purpose, but the interworkings were hanging me up.
Even though we had talked about it several times in class I could still not grasp the concept. My professor would discuss WSDL’s in class all day and this would just give me a headache. He would be editing it and I could see that it was xml and that it had some schema to it, but did not understand its purpose.
To try to help me understand this concept I got in a group with a couple of friends and we talked about it. We met on a Saturday morning for four hours and really didn’t accomplish anything. We downloaded and installed Visual Studio 2005 because we thought that was going to be the easiest out there. Well since none of us knew how to use Visual Studio we ended up abandoning that idea. Suffice it to say we really got no where that day. After seeing in class the ease of using PHP I am thinking of switching to using that. More to come.
No commentsWebsite Templates
In days past creating a website was very difficult for me to do because I have no artistic abilities, those were all given to my brother. In an effort to have a good looking site I have found several resources that help with this. I am leveraging others creativity to make my websites. Below are links to sites that have a lot of good FREE templates.
Enjoy!
No commentsPC vs. Apple
In my strategy class we had to read a Harvard Business case about Apple and what their strategy was and will be. It was a very interesting case and it seems like the result I came up with is that they will continue to be a hardware company that will supply periperphals. These periperphals will help drive customers to buy their computers to so that they have technology that was designed to go together. This is evident by the company dropping the computer in Apple Computer, Inc. and becoming Apple Inc. Toward the end of class we talked about why people buy Macs vs. PCs.
I think computers have shaped our lives in many ways. I have a Sony Vaio Z1 laptop that is running Windows XP. I was raised on Apple computers from the Apple IIe up to PowerPCs. Since those days I have played around on my brothers G5 and friends MacBook Pro. I think that there will always be need for two different types of computers out there.
The Mac is an awesome computer that I would love to have, but they are too expensive and I have a good laptop already. They come standard with killer applications such as iPhoto, iCal, iMovie and many more. I just don’t know if all of that can command the premium that they are charging for it. It seems those who have them want some sort of elitess status.
PCs on the other hand have become a commodity and can be purchased for very cheap making them more appealing to the masses. Because of more people have PCs, more companies write software for them giving us more options. The problem is that Microsoft is always playing catch up so PCs will most likely not have the newest technology first. Microsoft seems to have be following the trends that others set for a long time, ever since both Steve Jobs and Bill Gates copied the GUI from Xerox.
I will always own a PC for three reasons; 1) everyone else has one, 2) they are cheaper, 3) they do all that I need them to do at a lower cost to me.
2 commentsWeb Analytics
I just left a kick off meeting for the Omniture Web Analytics Competition and I am convinced that web analytics provides companies with a lot of value added. With a growing number of websites and online retailers who all are trying to capture more market share there needs to be a way to target the customers and web analytics helps you figure out how to. With so many different pages and companies offering similar products how are customers going differentiate between the options? One reason I purchase things online is based on the company reputation and the look and feel of their site. This is exactly where analytics can come into play. With web analytic tools such as Omniture’s Site Catalyst and Google’s Analytics companies can see what their customers are doing. Before the dawn of online retailing there was no way to see what people were looking at and what prevented them from making their purchase. Now with tools in hand and some time to read reports you can determine what changes to your website that will improve your customer’s web experience which in turn will generate more sales.
No comments