PDA

Click to See Complete Forum and Search --> : [RESOLVED] Does anyone Know of a code only Visual Basic Book


DeanMc
Jul 7th, 2008, 11:52 AM
Hello everyone,

I am wondering if anyone knows of a good visual basic book that teaches the language minus winforms or any other GUI technology. Basicly i would like a book that is full of coding examples relating to the visual basic language itself. I have been reading "Beginning VB2008" by christian gross. While it is a good book the author tends to use analogies to the extreme and interupts the flow of the book making it hard to learn from.

Any help would be much appreciated!
Thanks

RobDog888
Jul 7th, 2008, 12:02 PM
Creating GUIs is part of VB. I highly doubt you will find a learning book without WinForms as its ccenter of focus.

DeanMc
Jul 7th, 2008, 12:20 PM
I find this highly irritating as there are many other technologies other than winforms available. A book on writing VB code which is not tied to one specific technology is long ovedue.

Hack
Jul 7th, 2008, 12:27 PM
A book on writing VB code which is not tied to one specific technology is long ovedue.That may be true but I've yet to see one.

I agree with RobDog.

Knowing how to write VB code without knowing how to construct a GUI is kind of like knowing how to fix an automobile engine without knowing how to drive.

You can do it, but whats the point?

DeanMc
Jul 7th, 2008, 12:36 PM
I have to disagree with that. Consider the following, I am currently working on a small piece of code to act as an independent spell checker. I know of no books that teach you how to write code like this. I think one of the main issues that Visual Basic as a language has to overcome is this idea that it is tied to a GUI. While i agree the ultimate goal is GUI creation be it winforms WPF or even ASP.NET the reason for most poor Visual Basic programs is simply the lack of structure. This is because while visual basic follows the event driven model most programmers view this as a license to place code into files hap hazardously with no concept of organization.

While I understand this is not true for programmers who know the inns and outs of visual basic it is unfortunately how the vast majority of new programmers learn to cut code.

GaryMazzone
Jul 7th, 2008, 12:41 PM
WHo says it must be tied to a GUI? You can write classes with VB and they are not tied to the GUI.

Find a book on Classes with VB.Net

DeanMc
Jul 7th, 2008, 12:45 PM
Hi Gary, That is exactly the type of book i am looking for!

RobDog888
Jul 7th, 2008, 01:02 PM
Well without being specific we could only have mentioned the reasoning for learning GUIs. You stated you were learning so how are you going to implement your spellchecker without interacting with a GUI?

Now if you want to learn more advanced topics then a beginners book then you need to be more specific on what technology you are wanting to learn. There is soo much out there beyond WinForms but they are not really for beginners.

DeanMc
Jul 7th, 2008, 01:10 PM
Ah i see, well the concept of the spell checker is that i can make it GUI independent. I suppose im looking for a way of writing better code. For instance a C++ coder tends to know how to work with files and create complex custom objects before he even knows how to set up a window. I'm trying to learn Visual Basic properly, IE have my applications structured and methodically thought out rather than just having a lot of code that reacts to user events and handles the data in and unstructured way. I hope this makes more sense. I can see why you suggested what you did. Maybe the reason for not having these books out is because people want to work with GUI's ASAP.

RobDog888
Jul 7th, 2008, 01:45 PM
Its more of a learning issue and logic flow. If they learn WinForms (which is the most dominant used part of .NET (not taking into account ASP.NET)) the populous needs some way to interact with their program. Learning usually is focused on these first and expand out to classes, collections, services, databases etc.

You also have console apps without WinForms but having a console window is also still a GUI so to speak depending on how its used. Probably because you are coming from a C++ background you are having these issues. a utility like what you are writting could be done without a WinForm but at some point you will need to test it and test it by using a GUI. you sound like you are beyond the basic beginner stuff but to get a good grasp of VB you may want to just skim through your book and pickup the parts you are unffamiliar with. Getting a book on dlls will probably be better for your project too.

DeanMc
Jul 7th, 2008, 03:14 PM
Good Advice! Thank you! Further to that do you have any recommendations on books about DLL's?

RobDog888
Jul 7th, 2008, 09:14 PM
These two books seem to be popular.

http://visualbasic.about.com/library/blroman1-1a.htm

alex_read
Jul 8th, 2008, 05:46 AM
Ah i see, well the concept of the spell checker is that i can make it GUI independent. I suppose im looking for a way of writing better code. For instance a C++ coder tends to know how to work with files and create complex custom objects before he even knows how to set up a window. I'm trying to learn Visual Basic properly, IE have my applications structured and methodically thought out rather than just having a lot of code that reacts to user events and handles the data in and unstructured way. I hope this makes more sense. I can see why you suggested what you did. Maybe the reason for not having these books out is because people want to work with GUI's ASAP.
Wrox's ''Visual Basic.NET Class Design Handbook (http://www.devx.com/dotnet/article/9829) I can recommend too.

DeanMc
Jul 8th, 2008, 06:38 AM
Thanks for the suggestions guys. The only query i have is since these books where written 2002/2003 would they not be for VB.NET which from my understanding was different to vb 2005/2008. I can only seem to find one updated book which is on of robdogs (the first one).

si_the_geek
Jul 8th, 2008, 06:48 AM
VB 2002 and later are all VB.Net (the ".Net" part is not used in the name any more by Microsoft).

DeanMc
Jul 8th, 2008, 07:01 AM
Thanks for the reply, although they are all vb.net the code from 2005 up is slightly different to the code in 2003 down isn't it?

si_the_geek
Jul 8th, 2008, 07:13 AM
Yes, but in the same way that 2005 is slightly different to 2008.

There are obviously enhancements in each version, so there may be some differences - the important ones relate to different versions of the framework, but from what I understand that only affects which classes are built in, and should not affect normal code (loops and classes etc will be the same).

Given the choice, it would be better to get a book which is specific to the framework you are using, or at least recent enough to have notes about alternative methods etc.

DeanMc
Jul 8th, 2008, 07:31 AM
I see, the core language remains much the same for each version but the framework changes. Ok I am going to mark this thread as resolved. I have picked up some books that do indeed work with winforms as these seem to be the most recent editions I can find. One of the reasons I have decided this is because I feel that leveraging whichever version of the framework one uses represents the best way of coding rather that reinventing the wheel as it where.

DeanMc
Jul 8th, 2008, 07:32 AM
PS, Thanks for all your help guys! It is much appreciated!

alex_read
Jul 8th, 2008, 07:34 AM
Wow this took a while to find. On the whole, the greatest changes between versions of the .Net framworks have been additions.

There are a few deprecated methods, which are listed here http://msdn.microsoft.com/en-us/netframework/aa570326.aspx but when you consider how many classes and methods are in the framework, this is a tiny subset.

Because there's little change, especially to the most fundamental classes and methods, most sample code you will find written for the 2003 version (framework 1.0 or 1.1) will work with the later versions and for this reason many of the books you find simply don't need to be updated just for a front cover which lists "2008" on it. :)

DeanMc
Jul 8th, 2008, 07:40 AM
That is a very interesting list and an even more interesting comment. Previously I would have discarded any code written in 2003 as I was under the impression it was completely different! Thank you Alex.