Chapter 9. Building Web Services with VB .NET

IN THIS CHAPTER

Microsoft likes to point out that part of the goal of .NET is to act like a huge operating system. In effect, the entire Internet becomes your operating system, or at least your network. This means that pieces of your applications can be distributed over the Internet, but your applications run as if the pieces were all on your local machine.

Imagine if you had told someone back in the early days of Visual Basic that someday they'd be writing their applications in a number of separate components and putting those parts on different machines. The application sitting on the user's desktop would call these components on other machines, and those components would access the data on still other machines. The data would be returned to these components and finally flow back to the client application.

Of course, this sounds quite normal today, but to a developer back in the days of Visual Basic 1.0, it would sound quite strange. However, now consider taking those components, and even the database, and removing them from your internal network. Spread them out all over the Internet, so that the only way with which you can communicate with them is HTTP. This is precisely what a Web service is all about.

The idea behind a Web service is to create a reusable component that can be called over standard HTTP. .NET allows you to create Web services that have the full power of a .NET application, including access to all the .NET Framework namespaces. These components are discoverable, which means that you can locate and call available components on other machines. The format for calling particular methods is exposed as well, so anyone can determine what methods are available and how to call them.

Web services, like COM components, can be called by any front-end application. Therefore, both Windows forms and Web forms can call the same Web services. Web services are free to call other Web services. Your .NET Web services are also callable by any non-Microsoft application as well because Web services are, by nature, callable by any client on any platform using just HTTP.

To learn more about Web services, you will dive in and create your first Web service. After that, you'll go back and learn more about how Web services work.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.9.138