This is a text designed primarily to teach sound programming fundamentals. This is an important point: many Visual Basic texts focus on the “cool Visual Basic gizmos” and in doing so, fail to teach the programming concepts that are common to all languages. That is why we titled our text Learning Programming Using Visual Basic .NET, not Learning Microsoft Visual Basic .NET. We think this distinction is important because languages come and go but the fundamental concepts underlying the programming process stay fairly constant. If teaching programming fundamentals is the primary goal, then why have we chosen Visual Basic .NET and not some other language? The rationale is simple – we feel that Visual Basic .NET is the language that facilitates our main goal by being relatively easy to learn without the overly complex syntax and semantic rules found in some other languages. We have been using various versions of Basic since the language was created at Dartmouth in the mid 1960’s because we have always felt that programming fundamentals are the most important concepts to teach a beginning developer. In fact, when Microsoft first introduced Visual Basic, we were initially hesitant to adopt it because it required us to attend to the graphical user interface and the components that the GUI is constructed with, and we felt that it would distract us from our primary goal. However, the excitement demonstrated by our students when they could build “real” applications using Visual Basic convinced us that we had to accept the challenge of focusing on programming fundamentals and include the additional instruction on the “gizmos” of the GUI. If you look at the table of contents you will see that we introduce Visual Basic .NET components in sections of the text where the underlying programming concepts are being discussed. For example, we talk about the RadioButton in the chapter on decision-making and we talk about the ListBox in the chapter dealing with iteration. We have found that students can better understand a control by seeing it in a context where its function makes sense.
Pedagogical Design
Having over 40 years of combined teaching experience in the programming field, we have developed a number of pedagogical philosophies that have found their way into this text. The first is the observation that one learns to program by programming. We tell our students, “This is not a spectator sport”. Therefore you will find a number of Examples throughout the text. The code for these Examples is available on the course web site as well as the CD that accompanies the book and we encourage students to run the Examples and to experiment. We would like to point out that when we create an Example it is generally designed to demonstrate a single concept. Therefore, the Examples are not bulletproof because the bulletproofing code would just distract from the concept being demonstrated. We have included 12 Projects throughout the text and 5 Comprehensive Projects at the end of the text that for the most part are small applications. Within these Projects we add the code that should make the application more robust and user-friendly. The Projects within each chapter generally focus on material presented in that specific chapter. In the earlier chapters these projects provide a great deal of help on how to solve the problem and how to write the code. In later chapters the amount of detailed help is gradually reduced, challenging the student to do more independent thinking. The Comprehensive Problems differ in two ways. First, they generally require material from several chapters. Second, they include less “help” in terms of explaining what to do and how to do it. This makes them more challenging than the projects within each chapter. We also include a number of Exercises within each chapter. These are either short-answer questions or questions that require a small amount of code to be written by the student. We find that giving students a chance to test their understanding of concepts every few pages helps them move through the material with a greater understanding. We include answers to selected Exercises in an appendix. Each chapter ends with a set of questions designed to review the new concepts introduced with the chapter and a set of end-of-chapter programming problems that again focus on the new material from the chapter. We have also chosen to link the topical material sequentially. That is, most chapters rely on an understanding of the preceding chapters. This allows us to go into greater depth and still retain our focus on fundamentals, because we need not wonder about the reader’s background at any point in the text.
Visual Basic .NET
Now that we have established that this is book is about programming fundamentals, we need to say some words about Visual Basic .NET. Visual Basic .NET is a significant update to the previous version and it is “cool”. It has been enhanced to make it as powerful as Microsoft’s other two major development languages – Visual C++ .NET and C# .NET. In making this decision, Microsoft chose to introduce some significant changes to Visual Basic .NET and had to balance the historical focus of Basic with the object paradigm. These changes impact those who are already familiar with Visual Basic 6.0, but for someone new to Visual Basic they make little difference. Since we assume that you are learning to program, you have likely not seen earlier versions of Visual Basic. But you should be aware that much of what you will be learning is different, and most feel better, than what those who used earlier versions of Visual Basic learned. Microsoft has chosen to configure Visual Basic .NET so that it is philosophically consistent with earlier versions. That is, they have set the default settings so that the beginner need not worry too much about data types. We have embraced this philosophy and have written all our code using the default settings. Instructors who wish to enforce stricter programming standards such as strong typing can do so by having their students change the default settings appropriately. Visual Basic .NET also provides the ability to create Web Applications using Microsoft’s ASP .NET technology. While we focus our attention on building Windows Applications (client solutions), we include a chapter that provides background and fundaments of building Web Applications.
Visual Basic .NET also includes a number of tools for building sophisticated enterprise-wide solutions. While these tools and features are very useful and powerful, they are beyond the scope and goals of this text.
Special Features
We have included material in this text that we think adds significantly to its value, particularly when using Visual Basic .NET to build solutions to business problems. This material includes a thorough presentation of relational databases and using Visual Basic .NET and ADO.NET to process relational databases. We have also included a chapter on XML (extensible Markup Language) and show how to process XML data as an alternative to data from a relational database. As mentioned earlier, we also include a chapter on building Web Applications with Visual Basic .NET and ASP .NET. When considering the design for this text, we initially considered building the entire text around Web Applications instead of Windows Applications. However, after considering the logistics of requiring access to IIS .NET to run the Web Applications and keeping our main goal of teaching programming fundamentals in mind, we elected to focus on Windows Applications and then include one chapter at the end of the text to introduce Web Applications. Ideally, students will have a firm understanding of the fundamentals at that point so that we can focus only on the differences between Windows and Web Applications. Finally, while we briefly cover the concepts relating to traditional arrays, we chose to go into more detail on three classes in Visual Basic .NET that provide a set of “collection” objects. These include the ArrayList, SortedList, and Hashtable collection classes. As software evolves and becomes more object-oriented, fewer developers will be building solutions from scratch and will instead be assembling solutions from predefined class libraries. We believe that our approach is consistent with this philosophy. |