MURACH'S
VISUAL BASIC 2015
This
is my review of the book that was sent to me by Murach
Publishing in
the United States.
My
last experience of using Visual Basic was Visual Basic 3.0, which
came out in the mid 1990's. I had great fun learning that program and
even developed a Poker playing program with it. It also helped me to
get started learning VBA (Visual Basic for Applications), which I
found very useful when I started working with Microsoft Access. So I
have had a bit of history with Visual Basic.
So
when I got hold of this book, which is 900 pages long, I was
intrigued to know what I would find that is new. Clearly, a lot has
changed since I last used Visual Basic.
I
downloaded the Community Edition, which is free. I am glad that I
didn't have to pay for it.
Section
1. Introduction to Visual Basic programming.
Chapter
1: How to get started with Visual Studio.
Pages
4-5. An introduction to .NET Development
These
pages provided a good introduction to new things like web
forms, ASP.NET,
ASP.NET MVC,
the WPF
and the differences between them.
The
obvious thing about Visual Basic (VB) today is that Microsoft have
reinvented it as a web programming language.
Pages
6-7. Visual Studio and the .NET programming language.
I
installed the Visual Studio Community Edition. For a free program, it
is very comprehensive. I can see where this will be a bit daunting to
first time users. I don't think that I will bother learning C#,
C++ or
F# at this stage.
I
will look forward to using learning about the SQL Server Express
Local DB.
Pages
8-9. The .NET Framework.
The
diagram on page 9 is very clear. The explanation on page 8 is easy to
follow and it all makes sense.
Pages
10-11. The Visual Studio IDE.
I
am familiar with the Visual Studio IDE. I can see where this would
be daunting to new comers.
Pages
12-13. How a VB application is compiled and run.
This
process is familiar to me. I am glad that the author explained that a
solution can hold one or more projects.
Pages
14-15. A tour of the Visual Studio IDE.
Easy
enough to understand. I am eager to find out more about Microsoft
Azure.
Pages
16-17. How to open and close an existing project.
I
have just downloaded your project files from
www.murach.com. I am
pleased to see that your Chapter 1 example worked well.
I
did not realize that solution can contain projects written in both in
VB, C++ and
other languages. I thought that was a revealing point.
Pages
18-19. How to use the Form Designer.
I
opened up the project in Chapter 01. I eventually realized that I had
to click in the Solution Explorer to get the form designer to open
up.
Pages
20-21. How to use the Code Editor.
The
code editor works like any other text editor. Clicking on any control
brings it up.
Pages
22-23. How to use the Solution Explorer.
By
clicking around in this window made everything understandable.
Pages
24-25. How to work with Visual Studio Windows.
Clicking
on the Auto-hide button on the Toolbox window produced interesting
results.
I
am glad that you mentioned the Reset Window Layout Command. I think
that it is best to keep my layout as the default layout from now on.
Pages
26-27. How to test a Project.
The
start button is definitely the best method. Pressing F5 works as
well.
Pages
28-31. How to upgrade Projects and change .NET Framework versions.
As
I have not previously created .NET projects, these pages were of
little use to me.
Perspective
This
chapter seems to deal essentially with the concepts of the .NET
framework and how VB seems to fit into the framework. This might be a
bit overwhelming for a total newcomer, although for some one with
previous VB experience, it is good to find these things out.
Chapter
2: How to design a Windows forms application.
Pages
36-37. How to set options and create a new project.
These
steps were easy to follow.
Pages
38-39. How to create a new project.
On
my PC, at first I could not find the “Create
Directory for Solution Check Box”
or the “Add to Source
Control Check Box”. I
only found them when I clicked on the Web link on the left pane.
Pages
40-41. How to design a form.
I
am quite familiar with VB forms so this was easy to follow.
Pages
42-43. How to add controls to a form.
I
played around with the controls for a while and found them easy to
manipulate. Your text explains them quite well.
Pages
44-45. How to set properties.
This
was well explained. It is rather easy to work out after clicking
around and experimenting with the various buttons and controls.
Pages
46-47. Common properties for forms and controls.
As
I have leaned VB previously, I found these pages self-explanatory.
But I can see where a total newcomer might get a bit confused just
here.
Pages
48-49. How to add Navigation Features.
Setting
the Tab order was easy. The other items make more sense with
practice.
Pages
50-51. The property settings for the Invoice Total Form.
I
went through all the properties on page 51 and got all the properties
types in.
It
was easy to follow.
Pages
52-53. How to add and save all the files of a project.
It
is useful to know how to use the Solution Explorer window to change
the various names of the project.
Perspective.
This
chapter provided the reader with a good overview of how to add
controls to a form and how to set properties. I am starting to see
where a brand new user might find this book a little bit heavy going.
Chapter
3. How to code and test a Windows Forms application.
Pages
58-59. An introduction to coding.
Introduction
to object-oriented programming.
As
I am an experienced programmer, I am familiar with these concepts and
found your explanations a good overview. But I am starting to fee
that this might be a bit heavy for a complete newcomer.
Pages
60-61. How to properties, methods and events.
This
was interesting. I think a few more visual examples would be good
here.
Pages
62-63. How an application response to events.
This
was well explained.
Pages
64-65. How an add code to a form.
This
makes more sense the more you do it.
Pages
66-67. How Intellisense help you enter the code in a form.
I
find Intellisense
very useful, but like everything else, it takes time to get used to
using it.
Pages
68-69. Coding rules for VB statements.
This
makes more sense with practice. It is good to be able to break up
long lines of code on other lines.
Pages
70-71. The event handlers for the Invoice Total Form.
As
an experienced programmer, I found this code easy to understand. But
I can see where some body new to programming would struggle with it..
Pages
72-73. How to code a readable style.
From
a coding point of view, this makes good sense.
Pages
74-75. How to code comments.
I
generally find using comments to be very helpful.
Pages
76-77. How to detect and correct syntax errors.
I
found the light bulb
feature very useful. I also found that I did not really need the
Error List Window
after a while.
Pages
78-79. More skills for working with code.
Learning
how to comment out and uncomment whole lines of code was useful.
I
had not used the Text Editor toolbar before! Being able to zoom in
and out is very useful, particularly with my ageing eyeballs.
Clicking
on an object and highlighting it is a great idea.
Pages
82-83. How to use Code Snippets.
It
was useful to learn about code
snippets, even though most
editors now use them. They are a very useful feature as they save
lots of time.
Pages
84-85. How to refactor code.
I
found that being able to rename all occurrences of a variable in your
code is a great tool as it will save the user a lot of mistakes.
Pages
86-87. How to perform quick actions with light bulbs.
Covered
this previously.
Pages
88-89. How to use the annotations in the scroll bar.
I
can see where Map Mode
would be useful for helping with very long lines of code.
Pages
90-91. How to use the My feature.
This
will make more sense as we go on with VB.
Pages
92-93. How to get Help information
I
visited the website at msdn.microsoft.com and found it to be very
comprehensive.
Pages
94-95. How to run, test and debug a VB project.
It
was interesting to find there is more than one way to run and debug a
project.
I
won't comment about testing and debugging. I have learned that you
become good at these things with practice.
Perspective.
What
I found interesting about this chapter was the little tricks I
learned about for the first time such as refactoring code, how to use
Map Mode and using the light bulb feature. It has helped me to be
more confident with the newer features of Visual Basic.
Section
2 The Visual Basic language essentials.
Chapter
4: How to work with numeric and string data.
Pages
106 – 107. How to work with the built-in value types.
I
am familiar with the concept of data types. The Sbyte,
Ushort, Uinteger and ULong
are new to me.
Pages
108 – 109. How to declare and initialize variables.
The
concept of using C
and D
after assigning variables is new to me.
Pages
110 – 111. How to declare and initialize constants.
The
concept of using C and D after assigning variables is new to me.
I
had not heard of Pascal
notation before.
Pages
112 – 113. How to code arithmetic expressions.
I
am familiar with all the operators here, having previously used
Qbasic for years.
I
hadn't heard of the words binary
and unary
operators before.
Pages
114 – 115. How to code assignment statements.
It
is interesting to see that VB has adopted the shortcut
assignment operators.
Pages
116 – 117. How to work with the order of precedence.
I
found that this is important to know when doing mathematical
operations. It is always useful to know that using parentheses
overrides the order of precedence.
Pages
118 – 119. How to use casting.
This
was well explained, although I am never sure why you would want to
cast data from one type to another.
Pages
120 - 121. How to change the type semantics.
It
is probably a good idea to use the Strict Type all the time in order
to catch errors.
Pages
122 – 123. How to use the Math Class.
I
tried all your examples and they worked fine. I can see where you
need to be careful about rounding.
Pages
124 – 125. How to work with strings.
I
am familiar with using strings. The Nothing
keyword was new to me as
was using &= to
append strings.
Pages
126 – 127. How to convert data types.
I
have never heard of these things referred to as Structures
and Classes
before.
Pages
128 – 129. How to use Visual basic functions to convert data types.
I
found that all your type conversion examples worked well. I used the
Console Application to experiment on them.
Pages
130 – 131. How to use methods of the .NET data structures to
convert data types.
I
tried out your examples using the Console Application and everything
came out as expected.
Pages
132 – 133. How to use methods of the Convert class to convert data
types.
Again,
I types in all your examples on page 133 and they all worked OK.
Pages
134 – 135. How to use the formatting functions.
Again,
I types in all your examples on page 135 and they all worked just
fine.
Pages
136 – 137. How to use methods to convert numbers to formatted
strings.
I
just read through these pages and did not type in any of the
examples. It just seems to me there are a number of different ways to
do the same thing in VB.
Pages
138 – 139. Three more skills for working with data.
How
to work with Scope.
You
did a good job of explaining the difference between Module Scope and
Procedure Scope.
Pages
140 – 141. How to declare and use enumerations.
This
seems to be just another way of using Constants.
Pages
142 – 143. How to work with nullable types.
This
seems to be just another way of using Constants.
I
am not sure of the point of nullable types for numeric values
although I can see their usefulness with strings.
Pages
144 – 145. Two versions of the Invoice Total application.
I
typed this program in and everything worked well. Everything is easy
to understand.
Pages
146 – 147. The enhanced Invoice Total application.
This
program was a lot more advanced and I was impressed with how it added
things up and kept track of all the invoices.
Perspective.
There
was a lot to take in here. It all makes sense but it was interesting
to see all the different ways that we can do things in VB. It gave me
a good handle on using the various data types and converting them.
Chapter
5 How to code control structures.
Pages
152 – 153. How to code Boolean expressions.
I
am familiar with comparison operators. It was interesting to read
that if we compare data values of different data types, VB casts the
value of the lesser type to the more precise type.
Pages
154 – 155. How to use the logical operators.
I
have never heard of AndAlso and OrElse before. I do
feel that some better examples here would have been useful.
It
was worth noting that NOT operations are performed first,
followed by AND then OR operations.
Pages
156 – 157. How to code conditional statements.
I
am quite familiar with If statements. Your examples were quite good.
Pages
158 – 159. How to code Select Case statements.
I
am also quite familiar with Select Case statements. Your examples
were easy to follow.
Pages
160 – 161. An enhanced version of the Invoice Total application.
I
types in your example on page 161 and it ran the first time. It was
interesting to see the use of AndAlso
instead of And.
Pages
162 – 163. How to code loops.
How
to code For loops
I
am familiar with the various loops used in BASIC. All your examples
worked well. I tried them out in the Console Window.
Pages
164 – 165. How to Do loops.
I
tested out your programs in the Console Window and they produced
identical results.
Pages
166 – 167. How to use the Exit and Continue statements.
Both
of your examples worked well. I can see the value of the Exit
For statement but I am not
sure of the point of the Continue
For statement.
Pages
168 – 169. Debugging techniques for programs with loops.
I
did not pay much attention to debugging programs. I find that
debugging is a skill that you develop as you progress.
Pages
170 - 173. The future value application.
I
types in the program and it worked well. It was interesting to see
how you used a For loop to calculate the value.
Perspective
The
AndAlso and OrElse operators were new to me. Otherwise,
there was nothing really new here as far as the Control structures of
BASIC are concerned. It was interesting to see how you used a For
Loop to in the Invoice Application at the end of the chapter.
Chapter
6. How to code procedures and event handlers.
Pages
178 – 179. How to code and call procedures.
I
am familiar with the concept of procedures. It was important to make
the distinction between Public
and Private
access modifiers. It is also important to notice that ByRef
changes the values in the
calling procedure.
Pages
180 – 181. How to call Sub procedures.
Using
the Me keyword is useful. This was easy to follow.
Pages
182 – 183. When and how to pass arguments by reference and by
value.
I
do wonder about the wisdom of calling something by reference. It
might be risky to change the value in the calling procedure,
particularly if you are using that procedure regularly.
Pages
184 – 185. How to code function procedures.
Functions
always seem to me to be more useful and Sub procedures.
Pages
186 – 187. How to use optional parameters.
There
are clearly a few different ways to use parameters. I am not sure why
some of
these
get used at all.
Pages
188 – 189. How to use refactoring to create a new procedure and
it's calling statement.
The
refactoring method worked well. I was surprised to see how easy it
was to create a new function.
Pages
190 – 191. How to work with events.
By
this stage, this was easy to follow.
Pages
192 – 193. How to handle multiple events with one event handler.
I
did not know that this feature existed.
Pages
194 – 195. How to use the Code Editor to start an event handler.
Using
the Drop Down box was interesting. It is intriguing to see there are
so many available events.
Pages
196 – 197. How to add and remove event wiring.
I
am not sure why you would add or remove events while the program is
running.
I
am sure it will make more sense when we get into using data sources.
Pages
198 – 199. Another version of the Future value application.
I
eventually got this code to work after cleaning up my typing errors.
It is always interesting to see how sub routines and functions
operate.
Perspective.
It
was cool to learn about a few new things such as code refractoring
and using multiple events with one event handler. This program is
starting to get a bit complicated though.
Chapter
7: How to handle exceptions and validate data.
Pages
204 – 205. How to use the IsNumeric function for data
validation.
I
tried your example on page 205 and it worked well. I can see the
sense of the IsNumeric function.
Pages
206 – 207. How to display a dialog box for error messages.
The
basics of dialog boxes was well explained.
Pages
208 – 209. How exception handling works.
These
pages did a fine job of explaining the concepts of the Exception
classes and their various sub classes.
Pages
210 – 211. How to use structures exception handling.
Again,
your example on page 211 worked well and was easy to follow.
Pages
212 – 213. How to use the properties and methods of an exception.
I
tried out your example on page 213. It certainly threw up an
impressive error message.
I
hope I won't get that in my applications!
Pages
214 – 215. How to catch specific types of exceptions.
In
your example on page 215, the format
exception and the overflow
exception all showed up as expected.
Pages
216 – 217. How to “throw”
an exception.
I
am not real sure of what “throwing”
an exception does or for that matter, what is the idea of
“rethrowing”.
Pages
218 – 219. The Future Value application with exception handling.
Your
example on page 219 worked well. It caught all the exception and
overflow errors.
It
is easy to see the value of good data validation.
Pages
220 – 221. How to validate data.
Your
examples on page 221 all worked well. You obviously cannot
underestimate the value of good data validation.
Pages
222– 223. How to generic procedures to validate an entry.
I
can see the value of using generic procedures that can work with any
textbox.
Pages
224 – 225. How to validate multiple entries.
I
wonder if throwing it all together like this is the best way to do
validation. I am sure it will make more sense when we get to the
program.
Page
226 – 229. The Future Value application with data validation.
It
took me a while to type this one in but thankfully, all the data
validation worked.
Pages
230 – 231. Two other ways to validate data.
Using
the Validating event.
I
think it makes more sense to do the validating while the data is in
the control.
Pages
232 – 233. How to use the masked text box.
I
can see where using a mask would be great for phone numbers and dates
in particular.
Perspective.
This
chapter was very comprehensive. It took me a while to get through it.
I can see why data validation is critical and you did a good job of
exploring the various aspects of the topic.
Chapter
8: How to use arrays and collections.
Pages
238 – 239. How to work with one-dimensional arrays.
I
am quite familiar with arrays. What is new here is the New
keyword and using a text box to get the upper bound of the array.
I
take it that the New
keyword allows us to have multiple instances of an array with the
same name?
Pages
240 – 241. How to assign values to the elements of the array.
Page
241 helped make more sense as to what the New
keyword is about. The Option
Infer keyword is also a new
concept here.
Pages
242 – 243. How to use For Loops to work with arrays.
Your
examples on page 243 all worked very well.
Pages
244 – 245. How to use For each loops to work with arrays.
It
was interesting to see how the For each loop simplified the code. I
noticed that we do not need to use subscripts when using this loop!
Pages
246 – 249. How to work with rectangular arrays.
It
was interesting to see the different ways a two dimensional array can
be created.
Your
examples on page 249 all worked well. It was interesting to see just
how you worked out the rows and columns of the array.
Pages
250 – 253. How to work with jagged arrays.
I
am not sure of the value of a jagged array, but your example worked
well when I tried them.
Pages
254 – 255. More skills for working with arrays.
I
tried out your examples on page 255 and they all worked well. I found
at first your BinarySearch method a bit confusing! It is important
that both arrays be of the same length.
Pages
256 – 257. How to refer to, copy and resize arrays.
I
typed in your examples on page 257 and they all worked. I did not
realise that you can do so much with an array.
Pages
258 – 259. How to code procedures that work with arrays.
Again
all your examples on page 259 worked well. I am finding that to
understand this subject, you must type them all in to get a handle on
the subject.
Pages
260 -261. How to use the null-conditional operator.
I
am not sure why you would want to use a null-conditional operator in
an array. I am sure I will soon find out.
Pages
262 – 269. How to work with collections.
I
read through these pages and did all the examples. They all worked
well. I can see where collections are more versatile than arrays.
Pages
270 – 273. How to work with a sorted list.
This
was really easy to follow.
Pages
274 – 275 How to work queues and stacks.
Again
all these examples were easy to follow.
Pages
276 – 277 How to work with an array list.
Again
all these examples worked well and were easy to follow.
Perspective.
Before
I read this chapter, I felt that I was very familiar with arrays. It
was fascinating to find out the many different ways of working with
arrays and also collections.
I
can see where collections would be a bit faster, although it will
take time to get used to using them. This chapter explains the
concepts very well.
Chapter 9: How to work with dates
and strings.
Pages
282 - 285. How to get the current data and time.
All
your examples worked well.
Pages
286 - 287. How to get information about dates and times.
The
information on these pages was so clear that I did not see any need
to type the examples in.
Pages
288 - 289. How to perform operations on dates and times.
Again
everything was explained clearly and all your examples worked well.
Pages
290– 291. How to the VB properties and functions to work with dates
and times.
Your
example worked well. I think a few more examples might have been good
just here as there are a lot of properties and functions involving
dates and times.
Pages
292 – 295. How to work with strings.
I
coded these examples in using the Console application. All worked
well.
Pages
296 – 297. More examples that work with strings.
I
did all the examples on page 297 and everything worked well. I was
impressed with how much easier it was to use the Split method.
Page
298 – 299. How to use the Parse and TryParse methods to validate
numeric input.
This
made for some very interesting reading.
Pages
300 – 301. How to use the StringBuilder class.
Just
why you would use the StringBuilder class, I am not sure. Made for
interesting reading though!
Pages
302 – 303. How to use VB functions to work with strings.
I
am used to working with VB functions from working with VBA. It is
worth noting that these
functions
use 1 as the first index, not zero.
Pages
304 – 307. How to format numbers, dates and times.
This
made for more complicated reading. I am not sure why anybody would go
to the trouble of using these formats, although I can see the sense
of formatting dates.
Pages
308 – 309. How to use interpolated strings.
I
am used to working with VB functions from working with VBA. It is
worth noting that these
functions
use 1 as the first index, not zero.
Perspective
Clearly,
the string and data handling functions in VB have changed a lot in
recent years.
This
chapter certainly provided a comprehensive look at these functions
and formats. I doubt if I would ever use them all but it is good to
know that they exist.
.
Chapter 10: More skills for working
with Windows forms and controls.
Pages
316 – 319. How to work with Combo boxes and List boxes.
I
have used Combo boxes and List boxes previously and it was
interesting how to use VB to load information into them.
Pages
320 – 321. How to work with check boxes and radio buttons.
It
is good to know how to use VB with these things.
Pages
322 – 323. How to use the tab Order view to set the tab order.
This
was easy to understand.
Pages
326 – 333. How to work with multi-form projects.
I
just read through these pages and they were easy to understand.
Pages
334 – 337. How to use the MessageBox class.
Again,
this was easy to understand.
Pages
338 – 347. The Payment application.
I
typed this example in and it worked first time. It was impressive to
see how you can swap data between two forms.
Perspective
I
have used VB forms and controls previously, but this was the first
time I ever saw how to swap data between two forms. This something to
keep in mind if I ever have to build a large application.
Chapter 11: How to create and learn
classes.
Pages
352 – 353. An introduction to classes.
This
was a good intro to the idea of three layers and how classes are used
in them.
Pages
354 – 355. The members you can define within a class.
This
provided a good description of what you can do within a class. I had
not been sure what Encapsulation was until I read this article.
Pages
356 – 357. The code for the Product class.
I
found this a bit tricky to understand at first! I am sure it will
make more sense as I go on.
Pages
358 – 359. How instantiation works.
I
had to read through this very carefully. This seemed quite tricky at
first. It always gets more complicated when there are more than one
way to do things.
Pages
360 – 361. How to create a class.
This
was easy to understand.
Pages
362 – 363. How to code fields.
I
did not understand at first why the examples use m_
at the beginning of the field name.
Again,
this takes some reading to understand properly.
Pages
364 – 365. How to standard properties.
I
found these pages fairly heavy going and I am not sure I fully
understood it all.
Pages
366– 367. How to code auto-implemented properties.
Again,
I found these pages fairly heavy going and I am not sure I fully
understood it all.
Pages
368 – 369. How to code methods.
Thankfully,
methods are similar to functions and sub procedures.
Pages
370 – 371. How to code constructors.
This
part was fairly straightforward as long as you think of a constructor
as a sub routine.
Pages
372 – 373. How to code shared members.
Easy
enough to understand.
Pages
374 – 375. How to generate code stubs.
I
just read through this without paying too much attention to it.
Pages
376 - 383. The Product Maintenance application.
Frankly,
this was a bit confusing. I looked at the example files that I
downloaded from your site. The chapter 11 file included a project
called “Customer
Maintenance”. When I ran
it, it was full of bugs and did not run properly.
On
the other hand there is a “Product
Maintenance” project in
the Chapter 12 folder of your files. This ran perfectly.
I
have to say that as an introduction to Classes, I found this chapter
a bit heavy and a little bit confusing. To get a better understanding
of the idea of classes, I had to look elsewhere for a few simpler
examples to help me get started.
A
good example of this was
http://www.tutorialspoint.com/vb.net/vb.net_classes_objects.htm.
This
provided some simple examples that were a good introduction to the
concept of classes.
Pages
384 - 389. How to browse, display and edit classes.
I
just read through these pages and did not study them in great detail.
Pages
390 - 393. How to work with structures.
Again,
I only read through these pages and did not study them in great
detail.
Perspective.
I
found this chapter rather complicated. Your explanations were not
straightforward.
I
had to look to other sources to get help with understanding classes,
although I can see why they are used.
Chapter
12: How to debug an application.
I
did not study this chapter at all as I have found that you only pick
up debugging by practice.
Section
3 Database programming.
Chapter
13: An introduction to database programming.
Pages
428 – 429. An introduction to client/server systems.
As
an experienced database developer (using Microsoft Access), I already
knew this. Your explanation of the topic was very clear though.
Pages
430 – 431. The software components of a client/server system.
You
made this topic very clear.
Pages
432 – 433. An introduction to relational databases.
Generally,
a good explanation of this topic. I am not sure where we will use a
composite key?
Pages
434 – 435. How the tables in a database are related.
It
is important to understand the concepts of primary
keys and foreign
keys as well as the concept
of relationships between
tables. This was well explained although I thought it was a bit brief
for such an important topic.
Pages
436 – 437. How the tables in a column are defined.
Again,
this is a very important topic and I thought your explanation was bit
brief.
It
is important to explain the various data types involved with SQL
Server.
Pages
438 – 439. The design of the MMABooks database.
This
looks like being an interesting database. It will be interesting to
see how the composite key in the InvoiceLineItems
table will work.
Pages
440 – 441. How to use SQL to work with a relational database.
These
pages did a very good job of explaining the SELECT statement.
Pages
442 – 443. How to join data from two or more tables.
I
the past I have always found joining tables, a little bit tricky. I
feel that you did a good job here of explaining how an inner join
works.
Pages
444 – 445. How to add, update and delete data in a table.
These
pages did a fine job of explaining how to update, edit and delete
data.
It
should be noted that it is easy to get into into trouble with updates
and deleted because it can be too easy to update the wrong
information or delete the wrong data.
Pages
446 – 447. An introduction to ADO.NET.
This
was a good introduction to the concepts of .NET. I get the feeling
that .NET is going to be a huge topic and that it will take me a long
time to get good with it.
Pages
448 – 449. How the basic ADO.NET components work.
This
was well explained.
Pages
450– 451. Concurrency and the Disconnected data architecture.
The
issue of concurrency
was well explained.
Pages
452 – 453. How a dataset is organised.
The
issue of a constraint
was well explained.
Pages
454
– 455.
How to work with data
without using a data adopter.
I
am sure that this will make more sense with practice.
Pages
456
– 457.
How to create ADO.NET
objects.
This
was interesting reading but it will only make more sense when we get
into the habit of building a databases and datasets.
Perspective
This
chapter was all theory and no practice. As an experienced database
manager (I do a lot of work with Microsoft Access), this all makes
sense to me. But I can see where a computer novice would struggle
with this.
Chapter
14: How to work with data sources and datasets.
Pages
460 – 463. How to create a data source.
All
very straightforward. It is always interesting to see three different
ways to do the same thing.
Pages
464 – 465. How to choose the database model for a data source.
I
played around with this for a while and it eventually came up OK.
Pages
466 – 469. How to create a connection to a database.
I
performed all the operations first and then read through them. This
will make more sense with practice, I am sure.
Pages
470 – 471. How to choose database objects for a data source.
When
this screen came up, I just clicked Finish
and read about it later.
Pages
472
– 473.
The schema file created
by the Data Source configuration wizard.
Everything
shows up successfully.
Pages
474 – 475. How to use a date source.
I
dragged the dataset to my form and everything worked as planned. I
spent time reading and playing with it to understand it all properly.
Pages
476 – 477. A Product Maintenance application that uses a
DataGridView
control.
I
am glad that I did not have to write this code by ourselves.
Pages
478 – 481. How to change the controls associated with a data
source.
When
I clicked on the Details option from the drop down list and moved the
Customers table to the form, I noticed that everything worked as
planned. But when I ran the form and tried to move from record to
record, the dataset did not update.
Pages
482 – 483. A Customer Maintenance application that uses TextBox
controls.
I
am glad you posted the code here, because I was able to go fix the
problem by going into code and it all worked.
Pages
484 – 485. How to handle data errors.
When
I typed in the Try Catch and End Try, all I got was an error message
saying VB did not like SQLException?,
“as this type was not defined”.
Pages
486 – 489. How to handle ADO.NET errors.
I
only read through this. I always find that error handling is
something you learn with experience.
Pages
490 - 491. How to use the Dataset designer.
I
read through these pages and they made sense.
Pages
492 - 493. How to use the Query Builder.
I
read through these pages and after playing around with the Query
Builder, I got it to work properly.
Pages
494 – 495. How to preview data for a query.
After
I finally worked out how to preview the data for my query, it was
nice to see the query
display
as I wanted it. I had sorted the names into descending order and they
came up the right way.
Pages
496 - 497. How to interpret the generated SQL statements.
As
I am familiar with SQL, I was readily able to understand what was
involved here.
Perspective.
I
found this chapter a bit of a challenge! I had to read through it
twice to really get a handle on it. I found that I had to go into the
code and delete a few statements after I deleted the grid view and
then added the Details view to my form as VB left some unwanted
statements in there!
But
all up, it did give me a handle on using databases in VB.
Chapter
15: How to work with bound controls and parameterised queries.
Pages
502 – 503. How to work with bound text boxes and combo boxes.
It
was interesting to see how to use the Formatting and Advanced Binding
dialog boxes.
Pages
504 – 505. How to bind a combo box to a data source.
Using
Smart tags is a different way of doing things.
Pages
506 – 507. How to use code to work with a binding source.
The
code is looking a bit complicated.
Pages
508 – 509. How to work with parameterized queries.
It
was interesting to see how VB creates queries for the database.
I
noticed that Murach did not supply an example for Chapter 15 to work
with so I did not go on with the rest of this chapter.
Chapter
16: How to use ADO.NET to write your own data access code.
Pages
538 – 539. How to work with connections and commands.
Having
worked with ASP previously, this all made sense.
Pages
540 – 541. How to create and work with commands.
This
made for interesting reading. It will make more sense when we get
into it< I am sure.
Pages
542– 543. How to create and work with Parameters.
A
good explanation of the whole concept of parameters.
Pages
544 – 545 How to create parameters.
I
am not sure just what DbType and SqlDbType are there
for.
Pages
546 – 547. How to work with Parameters.
I
am sure that this will make more sense with practice.
Pages
548 – 549. How to execute commands.
I
am sure that this will make more sense as I do it for real.
Pages
550 – 551. How to execute queries that return a single value.
The
author did a good job of explaining the difference between scalar
values and action queries.
Pages
552 – 571 A Customer maintenance application that uses commands.
I
am afraid that I could not get this database program to work. The
example program that you provided did not work properly either.
Perspective.
It
seems to me that putting a database program together in VB.NET is a
bit of a complicated exercise. I am a Microsoft Access developer and
I am frankly wondering why anybody would bother with VB.NET when you
can do things so simply in Access?
Section
4. Object Oriented programming.
I
should point out at this point that I found these following topics
very advanced and frankly in some cases, right over my head.
Chapter
17. How to work with default properties, events and operators.
I
did not go through this chapter in depth. I honestly found it a bit
heavy. Thankfully your example worked well.
Chapter
18. How to work with inheritance.
I
found this chapter rather heavy in theory. I found that I could only
read through it and take it in as best I could. When I tried to run
your example, it threw up a lot of errors.
Chapter
19. How to work with generics.
Again,
I read through this chapter and tried to make sense of it as best I
could.
Chapter
20. How to organise and document your classes.
Once
again, I could only read through this and try to make sense of it.
Some of these topics are a little two advanced for me just yet. I am
still trying to come to grips with the concept of classes.
Chapter
21. How to work with files and data streams.
I
found this chapter very verbose. I will study it in a bit more depth
when I need to read text files. Your example worked well.
Chapter
22. How to work with XML files.
Again,
all I could do was read through this chapter. I will study it in
depth if I ever need to work with XML.
Chapter
23. How to use LINQ.
Again,
I could only read through it and try to make sense of this chapter. I
can see that LINQ is a query language that works with all the .NET
languages. Your example program did not work either.
Chapter
24. How to work use the Entity Framework.
Once
again, I could only read through it and try to make sense of this
chapter.
Chapter
25. How to enhance the user interface.
I
am surprised that you left it this late to talk about Tabs and
Toolbars?
The
same goes for the status bar and the timer control, as well as the
tool tips and the context sensitive help.
The
Depreciation program took a long time to load up but it worked
quite well.
The
FinancialCalculationsSDI program did nothing. The buttons on
the form took me nowhere! Even the Exit button did not work!
The
FutureValue program worked well.
Once
again, I could only read through this chapter and tried to make sense
of this chapter.
Chapter
26. How to deploy an application.
As
I am not planning on deploying a VB application soon, I only read
through this once.
Final
Perspective
If
I had to sum this book up in one word, it would be “comprehensive”.
The book does a good job of explaining what VB has become. As you
would expect, it has certainly come a long way from Visual Basic 3.0,
which I first experienced back in the 90's. But what do I think of
the book itself.
Firstly,
this is NOT a beginners book. If I was not used to VB or programming
in general, I would have been overwhelmed. This book is clearly for a
more experienced programmer who seeks to get a handle on VB.NET. It
certainly does a good job of being a reference book bur I feel that
it falls down somewhat as a training book.
For
example, the sample programs tended to concentrate on the accounting
side of things.
There
were many examples of things like calculating Future Value and
Product Maintenance etc. If I was looking to develop my
own Accounting software, this book would be helpful.
Unfortunately,
you said nothing about the multimedia capabilities of VB, which are
impressive. There are some brilliant videos on Youtube that
demonstrate how to make great multimedia programs with VB.
You
also said nothing about the Console Application in VB. I often found
it easier to type some examples into the Console to test them out
rather than going into the form itself.
You
also did not mention the Microsoft Store. I understand that VB can be
used to make apps for the Microsoft Windows Store.
I
also learned that some of your later chapters were a bit over my head
and that I could only read through them and try to make sense of them
as best I could. While this does demonstrate how powerful VB has
become, these will have to be topics for a later date.
My
next point and perhaps my most important is what I leaned about
database programming. I discovered that to put a database together in
VB is a rather “verbose”
exercise.
I should point out here that I come from a Microsoft Access
background and have done a lot of work in that program. This book did
not encourage me to drop Access and go over to VB as I feel that
developing in Access is much more straightforward.
Perhaps
this highlights a problems. I feel that VB is trying to be the jack
of all trades whereas Access is a master of one.
My
last point is that other VB books that I have looked at tend to use a
more “visual” style
eg
they use a lot of images and type in their examples in a point form,
eg:
1.
Click New project
2.
Choose Visual Basic….
3.
Verify that the…..
4.
Type in My-Roll_The_Dice……..
And
so on.
Murach's
style tends to be a bit word heavy which does perhaps does not suit
this topic.
In
summary, I feel that while this book certainly filled in a lot of
gaps in my understanding of VB, it falls down as a training book I
often had to look to other sources to get a better understanding of
topics like Classes, Inheritance and Encapulation.
Thank
you so much to the good folks at Murach for sending me this book and
giving me the chance to review it.
I
look forward to dealing with you again in the future.
Cheers
Gerry
Gates
No comments:
Post a Comment