Beginning VB 2008 Databases is for every VB programmer. This book assumes no prior database experience, and teaches, always through hands-on examples, how to create and use relational databases with the standard database language SQL and how to access them with VB. Almost every application needs to
Beginning VB 2008: From Novice to Professional
β Scribed by Christian Gross
- Publisher
- APRESS
- Year
- 2008
- Tongue
- English
- Leaves
- 472
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Beginning VB 2008 has been written to teach you how to use the Visual Basic programming language to solve problems. From the earliest chapters, and from the first introductory concepts, youβll be looking at real-world programming challenges and learning how Visual Basic can be used to overcome them. As you progress through the book the problems become more involved and interesting while the solutions become correspondingly more complex and powerful as Visual Basic features interact to achieve the results that you want.
By the time youβve finished reading this book and worked through the sample exercises, youβll be a confident and very competent Visual Basic programmer. You will still have many explorations of the .NET Framework API to look forward to in your future career, but you will have a firm foundation to build from and you will know exactly where to go to find the things that you need to progress confidently in your projects
Π‘ΠΊΡΠΈΠ½ΡΠΎΡΡ
------------------------------------------------------- -------------------------------------------------------β¦ Table of Contents
Beginning VB 2008: From Novice to Professional......Page 1
Contents at a Glance......Page 7
Contents......Page 9
About the Author......Page 17
About the Technical Reviewer......Page 19
Introduction......Page 21
Downloading and Installing the Tools......Page 23
Downloading Visual Basic Express......Page 24
Choosing the Application Type......Page 25
Creating the Windows Application......Page 26
Viewing the Source Code......Page 27
Saving the Project......Page 28
Running the Windows Application......Page 29
Making the Windows Application Say Hello......Page 30
Adding Comments to the Application......Page 33
Adding a Console Application Project to the Solution......Page 34
Running the Console Project......Page 35
Adding a Class Library Project to the Solution......Page 36
Defining References......Page 37
Calling Class Library Functionality......Page 38
Using Variables and Constants......Page 39
Understanding How the .NET Framework Works......Page 41
The Important Stuff to Remember......Page 43
Some Things for You to Do......Page 44
Focusing and Organizing Your Development......Page 47
Organizing the Calculator......Page 48
Focusing the Calculator......Page 49
Implementing the Class Library......Page 52
Writing the Add() Method......Page 55
Writing Code to Test the Add() Method......Page 57
Adding a Test Project to Your Solution......Page 58
Testing Simple Addition......Page 59
Testing the Addition of Two Very Large Numbers......Page 60
Understanding Problems with Numeric Numbers......Page 62
Understanding Value and Reference Types......Page 64
Understanding the CLR Numeric Types......Page 65
Finishing the Calculator......Page 69
Some Things for You to Do......Page 70
Organizing the Translation Application......Page 73
Creating the Translator Class......Page 74
Creating the Test Application......Page 75
Investigating the String Type......Page 77
The Basis of All Types: Object......Page 78
The Problem: Character-by-Character Comparison......Page 81
Trimming the Whitespace......Page 82
Finding a Substring......Page 83
Which Is the Best Solution?......Page 84
Writing the Tests Before Writing the Code......Page 85
Quoting Strings......Page 87
Character Mapping......Page 89
Setting Culture and Language in Windows......Page 90
Parsing and Processing Numbers......Page 91
Working with Cultures......Page 94
The Important Stuff to Remember......Page 96
Some Things for You to Do......Page 97
Understanding the Depth-First Search Algorithm......Page 99
Value Type Constraints......Page 103
The Effects of Copying Data......Page 104
Value Types That Contain Reference Types......Page 106
Value Types and Parameters......Page 107
Organizing the Search Algorithm......Page 109
Defining and Implementing the Data Structure......Page 111
Instantiating and Initializing a Node......Page 112
Examining the Problem of Referencing Using Value Types......Page 113
Switching to a Class to Define a Node......Page 116
Understanding Static Data Members and Methods......Page 118
Defining the Algorithm Test......Page 120
The Problem of Magic Data......Page 121
Getting the Found Route......Page 122
Implementing the Depth-First Search Algorithm......Page 124
The Keyhole Problem......Page 125
Using the For Loop......Page 126
Using the If Statement......Page 127
Running the Depth-First Search Algorithm......Page 132
The Important Stuff to Remember......Page 133
Some Things for You to Do......Page 134
Understanding Errors, Exceptions, and Exception Handling......Page 137
Running the Debugger......Page 138
Handling Exceptions......Page 139
Catching Exceptions......Page 140
Implementing Exception Handlers......Page 142
Safeguarding Against Stack Unwinding......Page 145
Using Finally to Process Unfinished Tasks......Page 146
Filtering Exceptions......Page 148
Writing Defensive Code......Page 151
Using Default State......Page 153
The Important Stuff to Remember......Page 155
Some Things for You to Do......Page 156
Learning the Basics of ObjectOriented Programming......Page 157
Understanding Currency Spreads......Page 158
Writing Tests for the Currency Exchange Application......Page 159
Understanding Base Classes......Page 160
Understanding Inheritance......Page 161
Using Visual Basic Properties......Page 163
Rewriting the Test Code to Use Properties......Page 164
Understanding the Problems with Properties......Page 165
Understanding Inheritance and Scope Modifiers......Page 166
Using Visual Basic Inheritance to Subclass Another Type......Page 167
Understanding Private, Protected, and Public Scope......Page 168
Using Conditional Statements......Page 170
Using Partial Classes for Verification......Page 172
Finishing the Base Class......Page 173
Adding a Constructor to ActiveCurrencyTrader......Page 174
Defining Informational Read-Only Properties......Page 175
Adding the Conversion Methods......Page 176
Adding a Constructor to HotelCurrencyTrader......Page 177
Adding the Conversion Methods to HotelCurrencyTrader......Page 178
More Preprocessor Directive Details......Page 179
The MustOverride Keyword......Page 181
The Important Stuff to Remember......Page 183
Some Things for You to Do......Page 184
Understanding Some Basic Tax Concepts......Page 185
Organizing the Tax Application......Page 186
Programming Using Ideas......Page 187
Representing Ideas Using Visual Basic Interfaces......Page 188
Illustrating Inheritance Using a Shape, Rectangle, and Square......Page 190
Illustrating Components Using a Shape, Rectangle, and Square......Page 193
Defining the Interfaces......Page 195
Implementing a Base Class Tax Engine......Page 196
Overriding for Specialized Functionality......Page 198
Abstracting Instantiations with Factories......Page 199
Using Default Implementations......Page 200
Implementing a Base Tax Account......Page 202
Implementing a Tax Engine and Tax Account......Page 204
Assigning State When the Interface Cannot......Page 205
Implementing Ideas with Specifics......Page 206
Using the Tax Engine......Page 209
More Inheritance Details......Page 210
More Type-Casting Details......Page 216
Some Things for You to Do......Page 217
Understanding Kernels......Page 219
Organizing the Lighting Application......Page 220
Defining the Interfaces......Page 221
Defining IRoom, a Placeholder Interface......Page 222
Defining the INoRemoteControlRoom Interface......Page 223
Defining the IRemoteControlRoom Interface......Page 224
Implementing the Kernel......Page 225
Storing a Collection Using a Linked List......Page 226
Creating a Linked List......Page 228
Inserting and Removing Linked List Items......Page 229
Testing the Linked List......Page 230
Implementing Room Groupings......Page 234
Adding a Room Grouping......Page 235
Finding a Room Grouping......Page 237
Adding Rooms to Groupings......Page 241
Defining the Kernel As an Interface Instead of a Class......Page 242
Defining Some Rooms......Page 244
Instantiating PublicRoom and PrivateRoom......Page 246
Private Classes......Page 247
Object Initialization with Nested Data Types......Page 248
The Important Stuff to Remember......Page 249
Some Things for You to Do......Page 250
Managing a Collection Before Visual Basic 2005......Page 251
The Problem of Mixed Types......Page 254
The Problem of Value Types......Page 255
Managing a Collection After Visual Basic 2005......Page 256
Adding Numbers and Finding Maximum Values......Page 257
Using Delegates......Page 261
Declaring the Delegate......Page 262
Implementing Methods That Match the Delegate......Page 263
Understanding Lambda Expressions......Page 265
Using a Plain-Vanilla List......Page 267
Using a Stack......Page 268
The Important Stuff to Remember......Page 269
Some Things for You to Do......Page 270
Organizing the Lottery-Prediction System......Page 271
Reading Data from the Console......Page 272
Piping Data......Page 273
Assembling the Pieces Using an Echo Program......Page 274
Reading and Writing to a Stream......Page 275
Implementing Stream Reading and Writing......Page 279
Implementing the TextProcessor Application......Page 282
Deciphering the Format......Page 285
Fixing the Stream......Page 287
Piping Binary Data......Page 290
Defining the Interfaces and Implementing the Shell......Page 292
Defining the Type......Page 294
Converting a Text Stream into a Binary Stream......Page 296
Converting a Binary Stream into a Text Stream......Page 297
Performing Custom Serialization......Page 299
Separating Data Objects from Action Objects......Page 300
Implementing GetHashCode()......Page 301
Implementing Equals()......Page 304
The Important Stuff to Remember......Page 305
Some Things for You to Do......Page 306
Why Use .NET Generics?......Page 307
The Theory of a Server-Side Spreadsheet......Page 310
Architecting a Server-Side Spreadsheet......Page 313
Defining the Debug Interface......Page 314
Defining the IWorksheetBase and IWorksheet Interfaces......Page 316
Defining the IWorkbook Interface......Page 320
Using Lambda Expressions in the Spreadsheet......Page 324
Assigning State Without Knowing the Type......Page 326
Overriding the ToString() Functionality......Page 329
Calculating an Average......Page 330
Understanding Why the Calculation Worked......Page 332
The Important Stuff to Remember......Page 333
Some Things for You to Do......Page 334
Convention over Configuration......Page 335
Decoupling Using a Convention Architecture......Page 337
Setting Up the Dynamic Loading Projects......Page 338
Signing an Assembly......Page 339
Setting the Output Path......Page 340
Creating an XML-Based Configuration File......Page 341
Reading a Configuration File......Page 343
Dynamically Instantiating a Type......Page 344
Using Singletons......Page 346
Using the Instantiated Type......Page 347
Enhancing the Configuration File......Page 348
Marshaling the Configuration File Data......Page 349
Reading the Enhanced Configuration File......Page 352
Loading a Strongly Named Assembly......Page 353
Using Version Numbers......Page 355
Understanding Version Numbers......Page 356
Versioning Assemblies......Page 357
Adding an Assembly Redirection to a Configuration File......Page 358
Implementing a Shared Typed Convention-Based Architecture......Page 359
The Important Stuff to Remember......Page 361
Some Things for You to Do......Page 362
Understanding Multitasking......Page 363
Time Slicing......Page 364
Using Threads......Page 366
Creating a New Thread......Page 367
Waiting for the Thread to End......Page 368
Implementing a ThreadStart Delegate......Page 369
Using a Thread Parameter......Page 370
Synchronizing Between Threads......Page 371
Using Exclusive Locks......Page 374
Synchronizing with Cloning......Page 376
How Not to Deadlock Your Code (Mostly)......Page 377
Implementing a Reader/Writer Threaded Architecture......Page 381
Using a Hidden Producer/Consumer Implementation......Page 385
Implementing a Generic Producer/Consumer Architecture......Page 386
Using an Asynchronous Approach......Page 389
The Important Stuff to Remember......Page 390
Some Things for You to Do......Page 391
Relational Database Tables......Page 393
Database Relations......Page 395
Accessing Relational Databases......Page 397
Configuring the Data Source......Page 399
Adding the Tables......Page 400
Draws Table......Page 401
Persons Table......Page 402
Winners Table......Page 403
Adding Table Data......Page 404
Selecting Data from a Table......Page 407
Recapping ADO.NET Usage......Page 408
Building Relations Between Tables......Page 409
Using the Generated Code......Page 413
The Important Stuff to Remember......Page 414
Some Things for You to Do......Page 415
Finding the Frequency of Winning Numbers......Page 417
Extending the Lottery-Prediction System......Page 418
Implementing a Frequency Solution......Page 422
Borrowing Code to Solve Another Problem......Page 423
Using LINQ......Page 424
Learning More LINQ Tricks......Page 427
Selecting and Altering Data......Page 430
Selecting with Anonymous Types......Page 431
Processing Multiple Streams......Page 432
Sorting the Results......Page 433
Performing Set Operations......Page 434
Using LINQ in Other Contexts......Page 435
The Important Stuff to Remember......Page 437
Some Things for You to Do......Page 438
Addition......Page 439
Bitwise Operators......Page 440
Modulus......Page 441
Overloading Operators......Page 442
The GoTo Statement......Page 444
Using the Type Constraint......Page 445
Using the Class Constraint......Page 447
Nullable Types......Page 448
Partial Classes and Methods......Page 449
The Important Stuff to Remember......Page 452
Some Things for You to Do......Page 453
Index......Page 455
π SIMILAR VOLUMES
This book is for anyone who wants to write good Visual Basic 2008 code β even if you have never programmed before. Writing good code can be a challenge, there are so many options, especially in a language like Visual Basic. If you want to really get the best from a programming language you need to k
<p><p>This book is for anyone who wants to write good Visual Basic 2008 code, even if you have never programmed before. </p><p>Writing good code can be a challenge, there are so many options, especially in a language like Visual Basic. If you want to really get the best from a programming language y
<p><p>This book is for anyone who wants to write good Visual Basic 2008 code, even if you have never programmed before. </p><p>Writing good code can be a challenge, there are so many options, especially in a language like Visual Basic. If you want to really get the best from a programming language y