What It's All About: Visual Basic Express Takes A

What It's All About: Visual Basic Express Takes A

05_597051 ch01.qxd 10/20/05 1:21 PM Page 13 Chapter 1 What It’s All About: Visual Basic Express Takes a Bow In This Chapter ᮣ Understanding why VB Express exists ᮣ Discovering VB Express’s goals ᮣ Organizing via the user interface ᮣ Programming for the Internet isual Basic Express is the only popular computer programming language Vavailable today. By popular, I mean “for the people” — novices, small- business people, amateurs — anyone other than professional programmers. VB Express is the language for the rest of us. It’s not yet popular in the sense of selling well — but I hope that soon changes. Whether it will become popular in the other sense of the word, only time will tell. But there are far more small-business people, beginners, and enthusiasts than there are professionals, just as amateur cooks outnumber professional chefs. That’s why VB Express’s predecessor, Visual Basic, was for a decade the world’s most popular computer language by a wide margin. Small-business people need an efficient, understandable programming lan- guage to write quick utilities to solve problems unique to their work. A surf- board makerCOPYRIGHTED may often need to calculate MATERIAL polyester catalyst ratios, or dad might want to write up a quick history quiz to help with Laura’s homework. A hobbyist may enjoy creating a coin collection management program. Whatever your personal needs, knowing how to program a computer — and thus how to perfectly customize its behavior — is a useful and often enjoy- able skill. 05_597051 ch01.qxd 10/20/05 1:21 PM Page 14 14 Part I: The Basics of Visual Basic Express Something Strange Happened in Orlando Visual Basic, VB .NET, and now Visual Basic Express — all these versions of Microsoft’s Basic language can be confusing. Before you get started writing programs with VB Express, you may find it helpful to understand why Visual Basic Express was even created. After all, Visual Basic .NET already existed, so why a new version of VB? In the following sections, I explain how VB has changed over the years, so that you can understand just how VB Express fits into the picture and what VB Express can do for you. Visual Basic through the years When Microsoft introduced Visual Basic in 1991, VB was primarily a procedure- oriented language (organizing its programs via Events, subroutines, and functions. To make it easily understood, Visual Basic was designed to be as close to English as possible. Its punctuation, diction, and syntax are familiar — easily understood, remembered, and read — because VB is like a natural human language. Someone creating VB would choose the word stop, for example, when they wanted the computer to stop. Makes sense to me. But in July 2000, something astonishing happened in Orlando. Visual Basic .NET was unveiled in front of an audience of many of the world’s best Visual Basic programmers. But VB .NET was so unlike what Basic has always stood for that I heard people around me gasp. VB .NET changed Basic from its traditional role as the fastest route from idea to application to a jumbled, tortuous programming style with an immense, impenetrable, disorganized library of functions called the .NET Framework. It was oxymoronic in the extreme. It was as though you decided to rewrite the phone book for clarity and hired the IRS to do it. My informed guess is that Microsoft became confused and lost sight of the nature and purpose of the Basic language — clarity and efficiency. It brought in a team of managers and programmers who apparently had little, if any, experience with Basic. Instead, these people’s expertise was in C-type lan- guages and object-oriented programming (OOP). One stated purpose of .NET was to bring all Microsoft’s computer languages into line. Visual Basic, for example, had traditionally allowed you to start counting lists from 1 (as in: I took my first trip to Spain last summer).This is the way people think of lists: the first item is item 1. But the C languages start 05_597051 ch01.qxd 10/20/05 1:21 PM Page 15 Chapter 1: What It’s All About: Visual Basic Express Takes a Bow 15 counting from zero (so you’d have to say: I took my zeroth trip to Spain last summer). But counting nothing first is pretty counterintuitive for everyone but programmers. Makes no sense, but they do it that way. With .NET, Visual Basic was asked to abandon its traditional, sensible count-up-from-one prac- tice and get into line with the C zeroth approach. The C languages embrace precisely what Basic avoids — complexity, ineffi- ciency, redundancy, and jargon. OOP/C-style language is to Basic what acade- mic theorizing is to practical action. The result: Visual Basic nose-dived in popularity when .NET was forced on the VB audience. For the first time, there was no popular (for-the-people) computer language. Visual Basic today Visual Basic was the world’s most popular programming language for over a decade, but when Visual Basic .NET appeared, things changed. Because of the .NET framework’s added complexity, Visual Basic lost its appeal for begin- ning, amateur, and small-business programmers. Its popularity has declined. In this newest iteration of Visual Basic — Visual Basic Express 2005 — Microsoft has tried to win back this segment of programmers. It is, after all, the largest segment of programmers, considerably outnumbering professional develop- ers working in large organizations. Visual Basic 2005 comes in two versions: Visual Basic 2005 for Developers and Visual Basic 2005 Express Edition. Because you bought this book, I assume you have the Express Edition. VB for Developers focuses on technologies that assist people working in groups on the same program (OOP has many such features). But for people programming alone, VB Express should be everything you need. VB Express is a subset of VB for Developers, but little of significance is left out for those programming solo. What Does Visual Basic Express Have to Offer? Nobody knows whether it’s too little, too late, but VB Express is designed to rescue Visual Basic, and maybe it will. I hope so. The world needs a computer language for the rest of us — for those who aren’t professional programmers. (For professionals, complexity and obscurity often help ensure job security.) 05_597051 ch01.qxd 10/20/05 1:21 PM Page 16 16 Part I: The Basics of Visual Basic Express VB Express is simpler on the surface than its big brother Visual Basic .NET, but the entire, massive .NET Framework (library of objects) is at your dis- posal in VB Express. So you’ll find all the power you need under the hood. Defaults that serve a purpose Some C-language complexity and verbosity does give you additional control over the task (if you’re specifying, for instance, a new font size). But this con- trol is also available in Basic. If you want to get particular about formatting, you have that option in Basic — you can write some additional code. There’s a default Basic print format, however. Most printing jobs are just fine with the default typeface, type size, margins, and black as the color for the text. In C and similar languages, however, there usually is no simple default behav- ior for common tasks like printing. Instead, you must write lots of tangled, complicated code specifying all kinds of things about line size, lines per page, typeface, and so on. In other words, C/OOP places two burdens on the pro- grammer: You usually must manipulate a large number of properties, and you must work in a language so alien, so counterintuitive, that it takes most people years to achieve competence. Few ever achieve actual mastery. Remember that professional programmers are only a fraction of the program- ming public. Amateurs, novices, small-business people, and others like to make computers do things (it’s often fun to program). It’s also useful to be able to write a quick sales-tax calculator or a small diary program for little Ashley. When you write your own programs, you can quickly modify them to adapt to changing conditions: adding, for instance, a password feature to Ashley’s diary program when she grows old enough to have secrets worth concealing. The Express initiatives I believe Microsoft understands that there is a problem (how many copies of VB .NET are selling?). Is VB Express the answer? I hope so. VB Express inter- acts with beginning programmers differently than VB .NET does, but with varying degrees of success: ߜ The My object achieves some abstraction (reducing your need to write huge amounts of code to accomplish some common tasks). As you see in Chapter 6, My improves a relatively small number of tasks. ߜ The startup screen (see Figure 1-1) appears to contain welcomed simpli- fications and assistance. But I find much of the content behind the links on this “Welcome to Visual Basic Express” portal deceptive. The “Create 05_597051 ch01.qxd 10/20/05 1:21 PM Page 17 Chapter 1: What It’s All About: Visual Basic Express Takes a Bow 17 Your First Program” step-through leads you to think that you can create “powerful programs . quickly and easily.” You can’t, and the example browser trick is hardly a program. The My Movie “starter kit” is far from useful as a learning tool. It’s quite advanced actually, and certainly off- putting to all but the Einsteins among novice programmers. Figure 1-1: Looks inviting, but are the examples understand able and promises kept? ߜ The menus in VB Express are abbreviated.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    10 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us