Page #5 (Visual Basic Developers Guide to ASP and IIS -)

Introduction -

Visual Basic Developers Guide to ASP and IIS
A. Russell Jones
  Copyright 1999 SYBEX Inc.

Introduction
This book shows you how to use Visual Basic (VB) to tap into the Web, a computing model that is rapidly replacing all older models for building programs. It's not replacing the older models because building programs is easier for the Web than for standard networks (although in some ways it is). It's not replacing the older models because the Web is faster (it's not) or more robust (it's less robust—at least so far). No, it's replacing them because it's a better model.
As developers, we'll see some new languages appear that are suited to the new model. In fact we already have—Java is the prime example. We'll see others disappear, because languages rise, conquer, and decline like civilizations. Those languages that still have sufficient vigor will adapt to the new model, just as they have adapted to other model changes in the past.
VB is one of those adaptive languages. Basic has its roots deep in the beginnings of personal computers. It has grown as the PC has grown, gaining speed and power. Basic has been able to evolve by adding new programming paradigms as they became available: features such as named subroutines, functions, structured programming, strong variable typing, long variable names, optional parameters, variants, and objects. When Microsoft released VB in 1990, it quickly became the preferred method for creating Windows programs. Forms, event-driven programming, and, above all, the capability to easily encapsulate useful functionality in easy-to-use and commercially available third-party controls have made VB the most popular programming language in history; and VB isn't through yet.
The latest release of the language, version 6, extends VB into a new realm: Web programming. In the process, Microsoft has provided developers with a way of applying both their expertise and the full development power of VB—including its debugger—to the new computing model.
The scope of programming has been increasing almost as fast as the capabilities of computers themselves. Just a few years ago, developers targeted most programs to run on a single computer; the application's code and data all resided on a hard drive. Most applications fit on just a few floppy disks. To share information, people would copy data files from one computer to another. Almost as soon as this model became common, small networks became ubiquitous. Although their initial usefulness was limited to extending storage, not computing capability, people began to understand how sharing data among many people could improve business responsiveness. This was such an attractive capability that soon most business programs began to provide access to business information from individual PCs.
This central-data-to-client computing model drove the development of early client-server applications. A "fat" client, containing all the user-interface code and all the business rules, could connect to a central data-store to let business people access the corporate data in near real-time. Unfortunately, the model was expensive, because you had to attach the client computers to a private network to use the application. In addition, the network vendors all had different—and proprietary—methods for letting remote clients attach to their networks; in fact, the networks were generally incompatible because computers had no standard way to communicate. The code to access the databases and display information on the computer screen was proprietary. There was no standard interface. Each company and application had different keystroke actions and menu items. Programmers coded every screen differently. There were no standard keys to pull down menus, move a cursor, or cut and paste information. You couldn't cut and paste information between programs at all; instead, you had to export and import information in plain text files. Programs all had proprietary file formats. You couldn't mix and match program components because there was no standard way to communicate between languages. There wasn't even a standard way for a computer to print a file—you had to install a custom printer driver for each program that you used.
Into this Tower of Babel came Windows 3. Despite its sometimes-awkward interface, Windows captured the desktop of almost every computer on the market within two years. DOS was dead; Windows was king. Moreover, with Windows came standards: standard menus; standard windowing interfaces; standard keystrokes; one printer driver per printer rather than one per program; standard network interfaces; the capability to cut and paste not only within, but also between, programs. Command-line interfaces nearly disappeared; the visual interface had won. But behind all this beauty and ease of use was a ferociously complicated programming model, all written in C. As a programmer, if you wanted to tap into the power of Windows, you had to learn C. Fortunately, VB appeared just in time to save us all from going crazy and introduced a new programming paradigm—visual programming. Rather than spending hours calculating pixel values, recompiling, and checking placement of objects on the screen, you could drag and drop the objects into place at design time. Now it's difficult to find a programming environment that doesn't advertise itself as "visual."
Yes, VB spawned a revolution in programming, but the revolution wasn't visual programming, it was code reuse. Programming texts have paid lip service to code reuse for more than 20 years, but it took lowly Basic to make widespread code reuse a reality. VB did this by introducing the VBX-based control. VBX files were special DLLs that had a visual component you could drag and drop onto a form. The functionality these DLLs encapsulated spanned everything from simple text controls to database connectivity to entire word processors, and everything in between. Because VBXs were so powerful, easy to use, and saved so much time, an entire industry grew up around them.
VBXs quickly gave way to OCXs, a better technology but an unfortunate name change that quickly gave way to ActiveX controls. By Visual Basic version 5, you could create your own ActiveX controls. Much more important, by version 5, Microsoft had completely rewritten Visual Basic and added support for classes and interfaces.
Most recently, VB 6 has introduced a special kind of class called a WebClass designed to work with Internet Information Server (IIS) and Microsoft's Active Server Pages (ASP) technology. Together with Microsoft Transaction Server (MTS), WebClasses are a powerful tool for building stable and scaleable Web sites.
Why Am I Writing This Book?
I'm writing this book because I believe that we're in the middle of a computing revolution that in many ways is much more important than the development of the PC. I've been writing computer programs since 1979, when using Apple Basic on an 8K Apple II computer was state-of-the-art program development. I've worked in many languages besides VB (among them C, SmallTalk, and several "authoring" languages such as ToolBook and TenCORE) to develop computer-based training programs and corporate applications. For the past several years I've been writing Internet programs—initially with DOS CGI programs, then VB running through an ISAPI DLL, and finally with Visual InterDev and ASP. I'm excited about VB's new capabilities because I think the language is on track to simplify development of Web applications.
Web application development so far has been, at best, an awkward marriage of formatting code (HTML) and back-end programming. The server and client haven't communicated with each other well, other than for the client to request "pages" of formatted content, and the server to provide them. Although formatted content can be extremely useful, an essential component of computing has been missing—interaction between the user and the computer. Static pages aren't enough. Web development is now at the stage where we can begin to add some of the interactivity back into the client.
In addition, no single environment has emerged that can help develop all the components of a complete Web application: the client interface, the business logic, and the data access components. We've had HTML editors such as HotMetal Pro, Hotdog, and FrontPage; CGI-type languages such as Perl; client-side scripting in JavaScript and VBScript; and a number of custom solutions to tie things together, among them Visual InterDev and ColdFusion. Then there's Sun Microsystems, which touts Java as the solution for everything, including running your toaster for you. Java's a great language with an unfortunate syntax. Fortunately, the Visual Basic development team has stepped forward to save us from having to switch languages by providing a unified development environment in which we can connect HTML-based front ends, running in any browser, to a robust set of VB classes and objects running on one or more servers.



Visual Basic Developer[ap]s Guide to ASP and IIS
Visual Basic Developer[ap]s Guide to ASP and IIS
ISBN: 782125573
EAN: N/A
Year: 2005
Pages: 98

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net