Features - March 2000 - Web Forms and Web Services
Dave Moss examines Web Forms and Web Services for users and developers

[an error occurred while processing this directive]

There’s an exciting new development for the web. Now, please don’t run away screaming. Seriously, this is very neat stuff, so make yourselves comfortable, and discover how cool life just became if you are a developer, and how better off you’ll be as a user when you see what this new technology can do. I’m here to talk to you about Web Forms and Web Services. Never heard of them? Well, you must have missed Steve Ballmer’s recent outstandingly upbeat Keynote speech that he recently gave in San Francisco addressing a crowd of Visual Basic developers who had come to see the grail, or more specifically, to see what Visual Basic 7.0 had in store for them. They weren’t disappointed by what they discovered, but covering all that’s new is for another article.

ASP+ Web Forms

To begin at the beginning, ASP+ (Active Server Pages) Web Forms is a technology that taken at the most basic level, allows us Visual Basic developers to create applications and then have the forms that make up those applications appear in a web browser in an HTML 3.2 compliant format. This means that pretty much every browser will be able to display them.From the point of view of a developer who produces a "normal" application to run on people’s systems, the ability to be able to have that application running through a web interface is extremely compelling. Obviously this won’t suit every application type, but there are many areas where this will be seen as an absolute boon, especially when Web Services are brought into the equation.

Web Services

Web Services are effectively custom controls that reside on web servers, and are available for use by any application that has the authority to use them. As a developer, you just have a kind of stub at your end that provides you with the ability to develop and test with the component. Basically, a type library provides the interface to the Web Service in XML format.A current example of a Web Service is Passport, which is the user identification service used by MSN, but available for use by any Web site if they chose to utilise it. Another example might be a Web Service provided by a trucking company that once added to your website, provides your users with the ability to see where their parcels are in the carriage chain.

How about Web Services supplied by airlines that provide flight information, and booking details? How about a similar set of service from a hire car company, yet another set from a hotel chain, and another set from a theatre-booking agency? Now think about a Web site that is actually a web application, built using all those services. You want to take the family on holiday, so you want the cheapest flights, the best prices on the car hire, the best prices on the hotels, and you might also fancy booking some entertainment at the same time.

Today, you would probably have to visit loads of different websites trying to find the best deals across the board. Wouldn’t you much rather visit a website that implemented Web Services from a number of different airlines, car hire agencies, hotel chains and so on? Wouldn’t you rather like to just tell the site when you want to travel, where you want to go, and a comfortable price range for your hotel accommodation? Then, it would just be up to the site to take that information, run it past the multitude of Web Services it utilises, and then pick the best deals for you across the board.

Thank you very much. Holiday sorted in no time at all, and your stress levels aren’t even on any scale known to man. I like that idea, and I like the idea of Web Services, and Web Forms that let me develop in Visual Basic, and with an absolute minimum of code, make my applications web-enabled. An absolute minimum of code? But is it complicated? See for yourself:

  1. Create a new Web Service project
  2. Write the code for the project (Let’s stay simple: One class, one function).
  3. Build the project
  4. Um, there is no step 4.

That was it. Finished. As soon as you tell Visual Basic 7.0 to build the project, it creates an XML file that provides a description of the functionality in the class. The Web Service obviously gets invoked via HTTP as with any other item on the Web, and XML becomes the transport for data to and from the Web application utilising the service.

Visual Basic 7.0

Visual Basic 7.0, I hear you cry? Yes, I know, Visual Basic 7.0 won’t be around until the end of this year, maybe even the beginning of next year. Can you wait that long? I can’t. I want this functionality now! Obviously Microsoft could see that sad people like me would feel this way because they are going to release a Web Services Toolkit for Visual Basic 6.0 in March.

What’s really key about all this, is that by enabling the developer to build applications that can be utilised by anyone with a Web browser, Microsoft has just given us all a tool that will let us provide applications that will run anywhere, on any device, and on any platform. Think about that for a moment - applications that will run anywhere, on any device, and on any platform. What’s just great is that if you are a Visual Basic developer, you already know how to do this. Design with the best GUI development tool out there, on the operating system you know, and have your applications appear in nice and simple HTML. You don’t have to know how to generate that HTML, or the XML, because Visual Basic is going to take care of all that stuff for you. You are going to be able to create your Web Services, and have developers working on other platforms, developing in different programming languages, just utilise them as they wish.

When Visual Basic creates the Web Service, it publishes the compiled component to your Web server, at the same time creating and publishing the XML file that carries the descriptions of the functionality within the service. That’s neat. What’s even neater is that because all of this is cross-platform, anyone running C++ on a Linux box will also be able to create Web Services, and I’ll be able to use those Web Services in my Web site application too.

Now, I know what you are going to say. You’re going to argue that having your application depend on a service running on a remote web server is not a good idea. Well, I disagree. Latency might be an issue of course, but as Visual Basic 7.0 is going to allow free threading, you’ll be able to put the Web Service call into a separate thread, and that should make sure that things happen a lot faster, and a hell of a lot smoother.

As I said before though, talk of Visual Basic 7.0 is for another time. For now, I hope this article has given you some of the flavour of just what Web Forms, and Web Services are going to mean to both users and developers. As Internet access gets cheaper and faster, it makes sense to start looking at this new form of application generation, and if you have a large intranet you’re probably wondering how you can get hold of a beta of Microsoft Visual Basic 7.0 tomorrow. As for me? I’ll see you later. I have this flight to Redmond to catch…

[an error occurred while processing this directive]