.NET for Visual FoxPro Developers



Written by Kevin McNeish
Edited by Cathi Gero
ISBN: 1-930919-30-1
Length: 508 pages
Copyright © 2002 by Kevin McNeish
Published by: Hentzenwerke Publishing
Click the book image above to order a paperback printed version of this book which includes an electronic version in PDF format along with sample source code.


Summary

The complete 500 page .NET for Visual FoxPro Developers book written by Kevin McNeish and edited by Cathi Gero is now online. This book has been made available through the cooperation between Hentzenwerke Publishing, Microsoft Corporation, and the book author Kevin McNeish.

Visual FoxPro is one of the best Microsoft tools for creating desktop, client-server, and Web applications. However, it would be a mistake to ignore .NET. Microsoft has put a lot of resources into making .NET a revolutionary platform for creating both desktop and Internet application software.

If you’re simply curious about what .NET offers, this book provides a strong overview of the .NET Framework and the C# and Visual Basic .NET languages, helping you to assess these new technologies through the lens of Visual FoxPro. If you’re already “sold” and are ready to learn specifics about how to use .NET in your software development projects, this book provides plenty of “how to”, “step-by-step” and “best practices” information that will help you climb the .NET learning curve and get up and running quickly.

The first chapter sets the stage for the rest of the book by answering questions such as “What is .NET”? and “Why should I be interested in .NET”? Other chapters take you into the details of the C# and Visual Basic .NET languages to help you decide which is best for you. After learning the basics, other chapters take you step-by-step through the process of building your first .NET Windows application, Web Forms application and XML Web Service.


Table of Contents

Chapter 1 – Introduction to .NET

Every six or seven years Microsoft makes a quantum leap in technology. In February of 2002 that quantum leap was .NET. What is .NET and what does it mean for Visual FoxPro developers? This chapter provides an overview of .NET, the .NET Framework and languages, and helps explain why you should investigate .NET for your software development projects.

Chapter 2 - Visual Studio .NET

Visual Studio .NET is the latest incarnation of Microsoft’s suite of software development tools. The VS .NET team has done a great job providing a top-notch experience for the developer regardless of the .NET language they use. This chapter takes you on a tour of VS .NET, familiarizing you with its features so you can get up and running quickly.

Chapter 3 – Introduction to C#

Some developers are “afraid” of C# because C-based languages have a reputation for being advanced, and thus difficult to learn and use. This chapter aims to dispel any misgivings you might have by providing a side-by-side comparison of C# and Visual FoxPro—you’ll be amazed at their similarities. It helps you leverage your knowledge of Visual FoxPro in learning the basics of C#.

Chapter 4 – Introduction to Visual Basic. NET

Many Visual FoxPro developers have an aversion to anything that bears the name “Visual Basic”. This chapter aims to help you look past this prejudice and take a fresh look at the new incarnation of Visual Basic—Visual Basic .NET. As you read this side-by-side comparison of Visual FoxPro and Visual Basic .NET, you’ll see that Visual Basic has grown up and is a first-class citizen alongside C# and C++.

Chapter 5 – Object Orientation in C# and Visual Basic .NET

This chapter provides a look at object orientation in .NET by means of a side-by-side comparison of C# and Visual Basic .NET object-oriented features. It also compares Visual FoxPro’s object-orientation to that of the .NET languages and shows a number of advanced object-oriented features that are not currently available in Visual FoxPro.

Chapter 6 – Tour of the .NET Base Classes

Although there is a lot of heat generated in arguments regarding which .NET programming language is easier to use and learn, ultimately THE biggest learning curve is not C# or Visual Basic .NET—it’s the .NET Framework. This chapter takes you on a tour of some of the more interesting and useful namespaces and classes and shows you how you can use them in your applications.

Chapter 7 – Data Access with ADO.NET

To a Visual FoxPro developer, one of the most important aspects of a software development product is data access. This chapter shows you how to use Microsoft’s new universal data access technology, ADO.NET, to access and manipulate a wide variety of data—including VFP data. Since there are a number of different ways you can access data from ADO.NET, this chapter also provides information on best practices for data access. In addition, it also compares Visual FoxPro’s new xCursor technology to ADO.NET.

Chapter 8 - .NET Business Objects

The VFP community has known about the importance of business objects for several years now. They continue to be extremely important in all types of .NET applications including Web Forms, Window Forms and Web Services. This chapter explains what business objects are, why you should use them and how you to implement them in .NET.

Chapter 9 – Building .NET Windows Applications

Microsoft has placed a tremendous emphasis on .NET being a platform to create, consume, and deploy XML Web Services. I think this is a mistake. It has caused many developers among the uninitiated to believe that .NET is only for building applications that access the Internet. I’ve heard the question over and over again: “Why should I use .NET when I’m not creating applications that access the Internet”? This chapter aims to dispel this notion.

Chapter 10 – Building Web Applications with ASP.NET

If you’ve never created a Web application before because you didn’t have time to climb the learning curve, this could be your big chance. This chapter shows how you can put to use everything you learned in the previous chapter about building Windows Forms applications (plus a few extra twists) into building ASP.NET Web Applications. It also demonstrates how you can reuse the business objects created in the previous chapter by taking you step-by-step through the process of creating an ASP.NET Web Application.

Chapter 11 - .NET XML

XML has taken the software world by storm. Everything from configuration files, Visual FoxPro and databases (such as SQL Server) to Microsoft Office, and Web Services have the ability to work with XML. In many ways, the .NET Framework was built with XML in mind. This chapter discusses incorporating XML into your .NET applications and also provides an overview of XML base classes for reading, writing and manipulating XML.

Chapter 12 – XML Web Services

According to Microsoft, XML Web Services is what .NET is all about. This chapter provides a brief overview of XML Web Services, then provides step-by-step instructions for creating your first .NET Web service, and shows how to consume it and other XML Web Services in .NET.

Chapter 13 – Error Handling and Debugging in .NET

Error handling in .NET is quite a bit different than error handling found in previous versions of VFP. However, both .NET and Visual FoxPro 8 have try…catch…finally blocks that provide a far more powerful, and flexible way to handle errors in your application. This chapter also discusses Visual Studio .NET debugging tools. As you’ll see, many are similar to Visual FoxPro’s; some are better, and some are not!

Chapter 14 - .NET Security

One of the important features of .NET is its advanced security capabilities. This chapter discusses the built-in security features of .NET, including assemblies, code groups, permissions and security policies and shows you how to make use of these in your desktop and Internet applications.

Chapter 15 – Interoperability with Visual FoxPro

There’s no need to lose the time and money you have invested in your Visual FoxPro code. This chapter shows you how to make the best use of your existing Visual FoxPro applications by accessing them from .NET. It also turns the tables and shows you how to access .NET from within Visual FoxPro.

Appendix A - Language Comparison Tables

The tables in this appendix provide a side-by-side comparison of Visual FoxPro, C#, and Visual Basic .NET features.

Appendix B - Type Comparison Table

The tables in this appendix provides a side-by-side comparison of Visual FoxPro, C#, and Visual Basic .NET data types.

Appendix C - The Visual FoxPro Toolkit for .NET

This appendix discusses the Visual FoxPro Toolkit for .NET, which gives VFP developers a great boost up the .NET learning curve.


Author bio:
Kevin McNeish is President and Chief Software Architect of Oak Leaf Enterprises, Inc, and a Microsoft .NET/C# MVP.  He is a speaker with MSDN Canada Speaker’s Bureau and is also a well known speaker and trainer throughout North America and Europe. He is co-author of the book "Professional UML with Visual Studio .NET", author of the book ".NET for Visual FoxPro Developers", has authored several articles for CoDe magazine and has been interviewed on the .NET Rocks! Internet Radio Show. He is the Chief Software Architect of the Mere Mortals .NET Framework and spends about half his time on the road training and mentoring companies to build well-designed, high-performance .NET desktop, Internet and Smart Device applications. He has also helped many developers transition to the .NET development platform in his highly acclaimed .NET training classes. e-mail: kevinm@oakleafsd.com, Web: www.oakleafsd.com. Phone: 434-979-2417.

Editor bio:
Cathi Gero, C.P.A., is founder and development director of Prenia Corporation, providing custom software applications, training, and architectural designing to businesses and developers. Cathi is a Microsoft .NET/C# MVP and is an active member of the .NET community. She has extensive experience developing applications using the .NET Framework, SQL Server, Visual FoxPro, and Crystal Reports as well as other technologies. She is a member of the Microsoft .NET Advisory Council. She is an internationally known speaker at conferences and user groups, author of numerous articles for Microsoft, and technical editor for several .NET books, including ".NET for Visual FoxPro Developers". Her monthly column, “Cathi Gero’s .NET Tips” appears in Universal Thread Magazine. Her Weblog, featuring .NET Tips and Tricks, can be found at http://blogs.prenia.com/cathi. Most of the year Cathi travels to various companies providing onsite training, mentoring, and development experience. Contact Cathi via email at cgero@prenia.com.