Visual Basic

  1. Home
  2. Computing & Technology
  3. Visual Basic
Visual Basic .NET for Beginners
You're Not a Beginner Anymore!
 More of this Feature
• Part 2: Serialization ... What is it?
• Part 3: XML Serialization
• Part 4: The Completed Program
 
 Join the Discussion
Log into the About VB Forum Here!
 
 Elsewhere on the Web
• Get the .NET Framework SDK
• The Visual Studio Icons Explained
 

Once you get past the very beginning, learning VB.NET becomes more complex in part because there are so many different directions that you can go. And every one can have a whole book written about it. (And a lot of books have! Check out the The Guide to the VB.NET Books).

  • There's the data direction (ADO.NET)
  • There's the web direction (ASP.NET)
  • Going deeper into the OOP (Object Oriented Programming) of VB.NET has launched dozens of books by itself! (.NET Framework)

To select the right example for this lesson, I decided to re-examine what an example should accomplish. This is what I decided an example should be:

  • Something that has real value
  • Something that emphasizes the future of programming, not the past
  • Something that will help you develop a better understanding of .NET objects
  • Something that you can do with any of the 'cheap' development environments we have discussed

The application that seems to meet all of those goals also has another real plus! If you're just starting out, you probably haven't seen it before! (I mean, Get out! How many "Hello World" apps have you seen already?)

In this lesson, we develop an application that serializes some sample data to a file and then deserializes that data back again. If you have no idea what 'serialize' means, I'll explain more about it in just a few paragraphs.

Our application has real value.

I can't count how many times I have worked with new programmers on the same problem: How to save text information to a simple file so it can be used again. Early versions of Basic could only save information in simple files. It's the natural way that beginning programmers think of when they run into a problem that must be solved by saving information and they often get frustrated when they discover that advanced languages like VB.NET don't improve much on the relatively primitive capability of the earliest versions of Basic.

One reason is that there really isn't much that can be done to improve simple file access. (How much can you really improve stone axes?)

Another is that there are much better ways to do it which depend on more specific requirements of the system you want to create. So making a poor way to create simple files a little better really doesn't help much. (It's like making it easier to chip flint for better stone axes.)

We're going to see a better way!

Our application emphasizes the future of programming, not the past.

To understand how future oriented this is, you have to have a quick preview of coming attractions. Again, I'm going to use terms that you may not understand right now. That's OK. I'm just making a point about VB.NET.

A principal way to serialize objects is to embed them in XML (Extensible Markup Language) and that's one way that we're going to do it.

Every new version of software, from both Microsoft and other technology leaders, seems to involve more and more XML. .NET uses XML constantly to maintain project information internally and as a primary way to manage data in programs. In fact, the focus on XML is one of the primary features of the new ADO.NET.

The very latest technology announcements from Microsoft ... the new Longhorn operating system, along with Avalon, WinFS, and Indigo ... are totally dependent on XML. In fact, the new programming technology is XAML - Extensible Application Markup Language, an implementation of XML.

In short, although serialization is a technique inherently embedded in both past and future technologies, XML might be the fastest rising star of any new technology.

Our application will help you develop a better understanding of .NET objects.

The programming code necessary to serialize objects can be very sophisticated, and there's no reason why everyone has to reinvent the code when they need it because Microsoft has already done the programming in .NET. We'll see how easy it is to simply use the serialization built into .NET objects.

And last ... especially for starving programmers (Hey! I've been there!) ... we'll do it with the 'cheap' development environments we have discussed.
Next page > Serialization ... What is it? > Page 1, 2, 3, 4

Explore Visual Basic

By Category

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Visual Basic

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2009 About.com, a part of The New York Times Company.

All rights reserved.