Web Services

What is a Web Service?
Loss of Control
The Dictionary Web Service
B2B - Business to Business
How Do I Build A Web Service Today?

What is a Web Service?

What is a web service? A web service is the next evolution of programming. First we had languages that used jumps (like Assembly) and GOTO (like Basic) in the 1960's. Then emerged procedural languages like Pascal and C in the 1970's. Subroutines and user-defined functions allowed for code reuse. The next step in the evolution of software development was object-oriented programming. Objects allowed classes to be reused through inheritance, like C++ in the 1980's and Java in the 1990's. Recently, we have seen components evolve as highly-reusable classes. OLE, COM and ActiveX are language independent component architectures of the early and mid 1990's. The JavaBeans component architecture was added to Java in 1997. This year, year 2001, C# was released as the first component-oriented language. So what is next? Web services.

Web services are the next step beyond components. The problem with components is that they must be purchased off the shelf, or downloaded from the internet, incorporated into an application, and redistributed as part of the final product. The component software is sold like a commodity, bread or automobile. Once the purchaser has your software component, they can do what they want with it. They may reverse engineer it, violate the distribution license, or sit on it and not use it wasting their money. Web services are software components that live behind your firewall. Developers can use your service, and pay per use.

Compare the answering machine to voice mail. You purchase an answering machine for $50.00. You install it, maintain it, if it breaks you have to fix it or buy another one. An answering machine is a commodity. Voice mail is a service. You pay less initially, $2.00 per month. After two years you have paid more then the answering machine, but you are relieved from maintaining it, fixing it, or buying another one if it can't be fixed. If you don't want the service anymore, you stop paying the extra $2.00 a month.

To a software developer or business owner, you can turn all of your objects, procedures, functions, databases, information, and content into a service. Compare purchasing a car versus renting a car from Hertz. Compare buying a Cannon or Xerox copier versus using Kinko's photocopy service. Compare selling encyclopedia's versus hosting it online. The web service consumer development is quite different from component consumer development because there is a loss of control.

Loss of Control

Developers like control. I want my code to work the way I wrote it. If I purchased a software component or used a Borland JavaBean that came with JBuilder Professional, I have tested it and know it works. It is now mine to redistribute (as long as I follow the license agreement.) No one is going to unplug my component from my 200 customer installations of my product. But if my application is built using (consuming) one or two web services, what happens to my 200 customers when one of the web services my program depends on stops operating or goes out of business?

Components will not become obsolete by web services, they will just be more focused. For example, if I sold a charting JavaBean or ActiveX control, for certain applications that component will not be replaced. A charting service could replace my component for web applications. But does the stock trading web site want to be dependant on my charting service when I go out of business? No, they would prefer to buy charting components. After they buy my components, if I go out of business, the components that they purchase don't disappear in a puff of smoke. They may be stuck to fend on there own if some bugs creep up in the components, but hopefully, their web site continues to produce great charts for their stock trading customers.

Let us examine another example. How about a dictionary, not just any dictionary, but a customized electronic dictionary and spellchecker that follows me around from my home to my car and to my office.

The Dictionary Web Service

A dictionary web service could be great for a doctor. They could plug it into their word processor and their Palm pilot. They could use it at home or at the office. Their custom words and medical terminology subscriptions could be maintained in cyberspace hosted by my service. But this requires a persistent network. One that is accessible from home, office, and the Palm pilot. Many people still use telephone line modems and have to go offline to use the telephone, bye bye dictionary. Few Palm pilots are always "live" on the net. The dictionary web service is a bit fictional, but should be a reality within 5 or 10 years when all devices, computers, appliances, cars, hotels, airports, and airplanes go "live" and become part of the persistent network.

B2B - Business to Business

Where web services are useful today is in the B2B market. A perfect example is UPS. Several "web experts" scoffed at United Parcel Service in 1997 for building their web site behind the scenes. It was all about hit-counts in the late 1990's, how many visitors came to my web site today. UPS built their web site so that visitors only came if they had a problem with a shipment. In fact, the site you purchased your product from provided the shipment tracking. So if I purchased a muffler from a car part site that was built with UPS tracking, as soon as I confirmed my order, my order number was linked to the UPS tracking number. If I had a problem or question about the delivery, I could go back to the car part site and it would use UPS's web service to give me live tracking information. UPS wins because they get more business by helping other businesses help their customers, not by handling unnecessary traffic to their web site which is an inconvenience to the end customer who must use two separate web sites to handle a purchase.

How Do I Build A Web Service Today?

The answer is SOAP. Microsoft .NET and C# have SOAP built in. Microsoft also has a SOAP Toolkit that can be used with Visual Studio 6.0 and Visual Basic. ActiveState ships Perl with built-in SOAP modules. Sun is working on JAXM, their SOAP implementation. Finally, Java programmers can use Apache SOAP, or use the early-access JAXM implementation. Read more about using C#, Perl, VB and Java to build Web services with SOAP.