HOME | SIGN UP | ACCOUNT | SUBSCRIBE | STORE | WHAT'S NEW | TESTIMONIALS | TROUBLESHOOTING | SUPPORT AREA | SITE NEWS | LOGIN
Classes & methods · News · Jobs · Links · Downloads · Articles · Conferences · Magazines · Training · Consultants · Consulting · Blogs · FAQ
Books · Applications · Meetings · User groups · Speakers · User group leaders · Universal Thread Magazine · Coverages · Photos · Videos

Great Lakes Great Database Workshop 2002

Hentzenwerke presents the Great Lakes Great Database Workshop 2002. The Universal Thread reporting team will be on site for the official coverage of the event. The Great Lakes Great Database Workshop 2002 has been scheduled for November 17 - 20, 2002, at the Hyatt Regency in downtown Milwaukee. The sixth Great Lakes Great Database Workshop features internationally recognized Visual FoxPro and software development experts presenting sessions on Visual FoxPro 7.0, SQL Server 2000 and related areas.

Date: 
Location: 

This conference has 90 pictures. We display 12 randomly selected pictures here. You may click here to view the album thumbnails.

Great Lakes Great Database ...
Great Lakes Great Database ...
Great Lakes Great Database ...
Great Lakes Great Database ...

Great Lakes Great Database ...
Great Lakes Great Database ...
Great Lakes Great Database ...
Great Lakes Great Database ...

Great Lakes Great Database ...
Great Lakes Great Database ...
Great Lakes Great Database ...
Great Lakes Great Database ...

November 17

The first day of the conference starts early with registration. I had no problems meeting up with my reporting partner, Claudio Lassala on Saturday, and we soon began to plan our conference coverage. We had grand plans to start early Sunday morning to make the pre-conference sessions. The only problem was Claudio is a very heavy sleeper. He did not hear his PDA alarm, I did. He did not hear the regular clock alarm, I did. He did not hear my knocking about the room, the shower, or the banging of the drawers and doors. Ahh, rookies, eventually they learn. <bg> Since the kenote address was not until after lunch, I decided to cover a pre-conference session...

Cathy Pountney's Visual FoxPro Writer

by Mark McCasland

Author of Visual FoxPro Report Writer: Pushing it to the limits and beyond, Hentzenwerke Publishing.

Cathy started out discussing in great detail how to take full advantage of the Report Wizard. She pointed out one of the gotchas of the Wizard where if the planets are aligned just right, the wizard may create an extra index for a table that is not removed when the wizard finishes. So if you ever have a new index tag just appear and have no explanation for it, the Report Wizard may be the culprit.

She then explained how to add your own custom layouts to the rptstyle.dbf table. This table has a record for every style offered by the Wizard. The easiest way to create your own is to modify an existing report layout [frx] then save it under a different name. Next, open the rptstyle table, create a new record that duplicates the data in the last record in the table [See SCATTER/GATHER in VFP Help]. Then change the name of the layout name to your own in the StyleHFile, StyleVFile and StyleMFile fields. This table is found in the VFP Home, WIZARDS folder.

COOL TIP: New for VFP8 is the ability to turn off saving the printer environment to the EXPR, TAG and TAG2 fields in the FRX. If you turn it off, no printer specific information is stored in these fields. For the EXPR field, the useful lines like Orientation and Copies are not removed from the EXPR field. When you are modifying a report, you can turn this on or off for the current report only. To change the default option for all new reports, you can go to Options under the Tools menu, click the Reports tab [this is also new in VFP8], and check or uncheck the Save Printer Environment box. Way Cool!!!!!

To further expand on this tip, check out all the report designer options and defaults you can now set under this new Reports tab in the VFP Options under Tools.

NEW IN VFP8: When you add a Summary band, you can specify to print the page header and/or the page footer with the summary band if the summary overflows to a new pager or if you choose to print the entire summary on a new page.

After a short break, we were treated to an in-depth discussion of all the features of the report designer. Contrary to unpopular [or popular] belief, the much maligned report writer is still feature rich if you are willing to dig into all the features of all the possible objects you can add to a report. Another new feature in VFP8 with the designer in the Reports tab of Options is the default to add a label when you drop a new field on the report. You still have to beware that the designer will always prepend the alias to the field name. So if you need your fields to be independent of any alias, you have to manually remove the alias from the expression in the field's properties. Of course, you can only do this for fields from the cursor, view or table in the current workarea.

BUG: When you create a report variable and check the option to release it after the report finishes, the variable is not released. To help protect yourself from these lingering variables, you might want to begin the name of all your report variables with the letter "R".

NEW IN VFP8: Report errors can now be trapped by error handling! However, you still will not be able to use the debugger to trace through a report.

Ken Levy's Keynote Presentation

by Mark McCasland

Perhaps the most exciting news not related to VFP8 was Ken's announcement of changes in the Visual FoxPro and Visual Studio management structure. Ricardo Wenger is now the full time Developer Division Community Manager. Ricardo will be responsible for community efforts for all the Developer Division tools like VB .Net, C#, ASP.Net, VFP, etc.. There is a new Visual Data Tools Team [VDT} for Visual Studio. This team and VFP are now under the same manager - Y. Alan Griver [YAG]. For those of you who do not know YAG, he has very strong ties to the VFP developer community that go back many years. In just a little over 1 year, the Visual FoxPro team has added key figures in Ken Levy and Alan Griver. This leaves no doubt as to the strong role and partnership VFP has in Microsoft's suite of major development tools.

In a post keynote interview with Ken, he mentioned that Alan Griver is a great manager to work for based on his experience working directly for Alan at Flash Creative Management years ago.

Ken next introduced a new video that will be available soon on the Microsoft VFP web site. This video features a message from Eric Rudder, Sr VP Developer Platform and Evangelism, and emphasizes the executive support and enthusiasm of VFP 8.0 among top managers at Microsoft.

While numerous new feature sets were a major part of the keynote agenda, Ken first discussed the 4 major goals that were addressed during the development of VFP8.

  • Smart Client - Enhanced Windows Platform Support [i.e., the User Interface]
  • Distributed Client - Enhanced Web/COM, XML, SQL Server support
  • Developer Productivity - New base classes, new error handling methods, tools, etc.
  • Increased Discoverability - Navigation, documentation, additional efforts to aid new and existing VFP developers

The first, and most important addition to VFP8 was actually the re-introduction of - drum roll please - ACTIVATE WINDOW PUZZLE! Never let it be said that developers do not have a sense of humor, nevermind that no one else understands it. Ken said all the new productivity features allows more time solving the VFP puzzle. Now for the serious features, the following is by no means a complete list, but you should soon discover that this version is one of the most exciting ever.

  • Task Pane
  • Toolbox
  • Empty Class
  • AddProperty() and RemoveProperty()
  • Collection Class
  • Structured Error Handling - Try/Catch/Finally
  • Event Binding - BindEvent() and RaiseEvent()
  • Enhanced GetFile() dialogue
  • Auto Increment
  • Enhanced Table Designer
  • Enhanced View Designer
  • Child Member Subclasses [e.g., grid headers, page]
  • VCX Support for more classes
  • More Features for Grids [e.g., lock columns, row highlight, autosize columns]
  • Code Reference Tool
  • Major enhancements and improvements to the Report Writer
  • STABILITY IS A FEATURE!

New Data Features

  • DateEnvironment Subclassing and Builder
  • CursorAdapter Class and Builder
  • XMLAdapter Class
  • BindControls Property on Forms [allows late binding of data to form controls]
  • Enhanced VFP OLEDB Provider
  • VFP8 and .NET Interoperability

Fox Humor Rocks!

To demonstrate the universal language implications of the XML adapter, Ken ran a short video of 4 VFP Team members describing the great new feature. Four team members, one each from Russia, India, Argentina and the United States, gave very succinct yet detailed explanations of their parts of the overall process - in their own native languages.

There are also many enhancements for XML Web Services to support all sorts of technologies. These include, but not limited to, phones, Pocket PC, Tablet PC, Windows forms, ASP.NET and OLEDB. It also includes the free VS .Net add-on from Microsoft called the Mobile Toolkit for .NET which can be integrated with VFP 8.0.

There were 2 other major announcements made by Ken. The first was the presentation of the VFP Lifetime Achievement Award to Rick Strahl. This is the second time this award has been given. Last year, this award was presented to Whil Hentzen.

The second was a call to action and involvement in the community. VFP8 will be released in the first quarter of 2003. One of the best ways to keep current with the major developer tools is through the MSDN Subscription for Professionals. Ken also made a request for VFP 8 case studies and that a template for submitting these studies will be made available. This availability will be announced on FoxCentral very soon.

Doug Hennig's Data Strategies in VFP8

by Mark McCasland

This session was all about the new CursorAdapter class in VFP 8. Having worked with this class, I must agree with Doug that this is the most exciting and impressive addition to VFP. This class will virtually end all the past arguments about what is better - remote views or SPT because this class is both all rolled into one powerful data object.

For those of you who have followed the threads in the VFP 8 Beta category in the VFP forum, you will find many discussions there where I have either initiated or participated in regarding the CursorAdapter. I urge you to read through these and start getting familiar with this feature.

With just a few tweaks of some properties, a method call or two, and the executaion of a TABLEUPDATE() function, you can select, update, insert and delete data from any table that you have privileges to access. Your choices of data access include Native, ODBC, ADO and XML. If you think you might upsize your  VFP database and tables to a SQL database, just do not use the Native option to access your VFP tables. Your conversion [i.e., CursorAdapter revisions] to the SQL database will be trivial when you do upsize.

The reason I say the CursorAdapter will end the RV versus SPT argument is that you can either allow VFP to auto-Fox is Magic-ly handle the generation and execution of your insert, update and delete statements [the RV way], or you can populate the UpdateCmd, InsertCmd and DeleteCmd properties [plus a few others] with your own SQL [the SPT way]. If you do decide to use the InsertCmd, UpdateCmd and DeleteCmd and a few other associated properties, you can provide stored procedure calls instead to handle these functions.

Doug also demonstrated the CursorAdaptor builders that make adding these objects to the DataEnvironment a snap. But the icing on the cake was when he demonstrated the wizard that converts the cursors in the DE of your existing forms to CursorAdapters. Once you run the wizard, all you have to do is modify your forms, and run the CursorAdapter builder on each cursor to finish setting a few of the other properties that can not be derived from ordinary cursors.

The first day of the conference

by Claudio Lassala

Here we are in the so famous WhilFest conference! I was really anxious for the kick off of this conference, because I was sure I would meet a lot of people that I am used to talk to in the UT, as well as the speakers who I am so used to read their articles and books.

My initial plans was to wake up at 7 AM, take a bath, go for the registration, and then attend to Kevin McNish's session ".NET for Visual FoxPro Developers". However, I was so exhausted that I just woke up at 9 AM, and I just hated myself about that. Mark McCasland, my partner in this reporting coverage, told me that he did some noises in the morning, and tried to wake me up, but I heard nothing. <s>

Well, let's go to the conference!

Working with objects in VFP

by Claudio Lassala

Andy Kramek was the speaker for this session. I was really comfortable for attending to this session, because at the beginning of this year, Andy helped me a lot sending me some content from his OOP sessions, in order to let me prepare my own material and do some presentations in Brazil.

Andy is a really good speaker; it is a pleasure witnessing such a good speaker talking.

At the very beginning of his session, Andy told us that the so-waited MegaFox (1002 You Wanted to Know about VFP) book has been released. Then, he told us about how he classifies the level of his sessions: in a beginner lever session, if he is about to speak difficult terms, he explains them beforehand. In an intermediate session, he explains difficult terms just if someone ask him. And in an advanced session, you are on your own! <s> This session he classified as intermediate level.

He then started to talk about the basics of re-usability, and clarified when we should create a class. Basically, if we may need to re-use some code, that is a good moment to create a class. Or, if we have some complex code, and we need to make that code more maintainable, we may also create a class (even if we are not planning to re-use it). Finally, it must justify the effort for creating the class.

After that, he defined the three steps we must follow when we are about to create a class: identify responsibilities (what the class is responsible for), classify responsibilities (in order to be able to know which class must be responsible for each responsibility) and finally, define required structures. A note about classifying responsibilities: containers are responsible for child objects.

Andy followed by saying that there are some inheritance traps. Yes, inheritance is wonderful, but we need to be careful with it, because it does exist some traps that we can avoid.

For example, let's say you have defined a form class with some functionalities and appearance, and with an "Exit" command button on it. Then you start using this class in every place. All of a sudden, you need to create a form based on that class, because you need all of its functionalities, but you don't want that Exit button. If you try to remove it, VFP will tell you that you cannot remove it, because it is a part of a class. This is a trap. And how can we solve this problem?

The idea is: instead of having a form with an Exit button, an "Exit" command button class, and then creates a Form class with the functionality needed. That gives us the ability to drop the Exit button wherever we need it.

Following that, Andy told us about composition, which leads us to the containership issue. VFP strongly supports containership, which means that an object can contain another object, which can contain another object, and so on. This is good because once the "master" container is destroyed, all of its members are destroyed as well. Therefore, we don't need to worry about garbage collection. But, there is a problem with composition in some scenarios: we cannot add all classes to all containers. In order to address that, we make use of aggregation.

When we use aggregation, one object holds reference to another object. For example, we may have a form which need to access members of other form. We could just hold a reference for the second form in a property of the first form. However, we need to carefully control this reference. That's because we won't be able to destroy the second form while the first form is holding a reference for it. We really must be careful with this thing because it is a complete nightmare for debugging, plus we can have some problems with memory pointers, which will cause our application to crash.

Andy then started talking about the Access methods that we can have for the properties we need. Basically, if we set an Access method for a property, every time this property is accessed, the Access method fires, therefore we can run code on it.

One cool thing that we can do with the Access method is reduce considerably the amount of code in our application. For example, how many lines of code we have wrote for testing if a given variable is an object or if it is null, just before trying to create the object every time we need to use that object? If we have an Access method that holds the desired object, we can do that verification within it, so, we don't even need to create the object anymore in our code, because it gets instantiated as soon as we try to access it. I must also point out that Access methods are also useful for the "lazy instantiation" technique, where we delay the instantiation of object for the very moment they are needed.

Then it was time for the Assign method, which is the method that is fired every time we try to assign some value for a property. Andy told us about three main uses for it: first, the creation of read-only properties. Second, we can enforce data typing of properties (extremely useful as VFP is a weakly typed language, and also decrease the amount of code, as we don't need to test the property time every time needed), and finally, we can manage object actions (let's say we want to fire several methods when a property has a value assigned to it).

Andy showed also briefly some new classes in VFP 8, like the collection class, the empty class, some improvements for the Scatter Name command, etc.

This was the best session I have attended to today. Not just about the content, but also that I'll certainly improve my speaker's skill with what I learnt from Andy.

ADO.NET from a VFP View

by Claudio Lassala

In this session, Cathi Gero tried to show the most she could about ADO.NET for the VFP developers. Almost all of her session was carried just by using the PowerPoint presentation, because she tried to show most of the ADO.NET architecture.

She told us why ADO.NET is preferred instead of the traditional ADO: the traditional ADO requires COM, and the Recordsets don't travel very well across the Internet. On the other hand, ADO.NET solves there problems by the using of XML.

It was said that we can use the System.Data.OleDb class for accessing VFP 7 or later data, or we can use the System.Data.SQLClient for SQL Server 7 or later.

Cathi said that ADO.NET fits very well for distributed architecture, as it goes for the disconnected data approach.

She showed pieces of codes that uses several of the ADO.NET classes, like the Connection class, the Commands class, the DataReader class (which is a faster way for accessing data, by the using of a forward-only approach for reading the data), the DataAdapter class, the CommandBuilder class, and the DataSet class. There was some talking about the DataRows, DataView, DataTables and DataRelations objects, and also the working with the XML in ADO.NET.

In her samples of code, Cathi has used VB .Net, saying that that was her choice because it's supposed to be easier for VFP developers, given the similarities of both languages.

I have been playing a little bit with ADO.NET and it was not a pain to follow her session. But, I can feel how that hurts for the VFP developers who have never tried this technology. It (ADO.NET) can be really powerful, but it's a LOT of code, and it is not really straightforward for us, who are used to be lazy as our beloved tool (VFP, of course) does permit that.

In the end of her session, Cathi warned that VFP works very well with local cursors which contain a large amount of records (millions of records…), but, ADO.NET is NOT! It really cannot handle a large amount of data as VFP can.

But what does that MEAN?

by Claudio Lassala

It is a very nice title for a nice session. Barbara Peisch, has been quite awhile around, writing articles for the CoDe Magazine and FoxTalk, and also speaking at some local user groups. However, this is her first experience speaking in a conference, and I must say that she did a very good job. She speaks and conducts the session very well.

The main goal of this session is presenting for the attendees the real meaning of those messages that VFP just throws and drives us nuts.

For instance, how many times have you passed through a situation where a message like "Function Name is Missing )", or "ControlSource: Variable not Found"? We really never knows what these messages really means, and when we track down the problem, we ended up discovering that the problem had nothing to do with the message.

Besides showing us the gotchas of something of these misleading messages, Barbara also showed us how useful is the "Action Diagram" that the documenting wizard generates. For example, sometimes we have some complex code, with several structures like IF..ENDIF, DO CASE and DO WHILE all mixed up, and it gets really difficult to track down if all this structures has ending statements matching. With the action diagram, we can easily see this sort of thing.

Special VFP 8 is Magic Keynote

by Claudio Lassala

After dinner, we came back for this funny session. This was a session with several speakers, where each one presented 7 minutes about some new feature of VFP 8. There were several jokes and funny moments. As for the content, there is no need to relate them here, as they will be presented in the report for the full sessions about those features.

My conclusion of this first day

by Claudio Lassala

Well, it was a very nice first day. It was really cool meeting several people who I'm so used to because of their presence on the UT. People like Andy Kramek, Marcia Akins, Whil Hentzen, Andrew Coates, Mac Rubel, Ceil Silver, Craig Berntson, George Tasker, Cathy Pountney, Alex Sosa, Rick Borup, Ken Levy, and several others with whom I had some opportunity to talk to a little bit.

Now it's time to finish the report, merge it with Mark's, and post it to the UT, because we are eager to share this experience with you guys!

November 18

Another day starts. The first session begins at 8 o' clock. This time I managed to wake up in the right time (I wasn't as exhausted as yesterday). Let's go!

Using the VFP Debugger Effectively

by Claudio Lassala

This session is presented by Tamar Granor, the well-known co-author of the "Hacker's Guide to Visual FoxPro" books. The main idea of the session is provide the attendee with enough information in order to improve his debugger skills, and that we'll cause him becoming a better developer.

Tamar started by stating that the debugger can be running in two different modes: within the VFP window, or in its own window. She said that there are just a few differences between both modes, which really don't worth change one instead of another just because of these differences. Also, she said that there is no consensus about which one is the better one.

Then she started to explain which one of the five debug windows:

In order to show how to track down bugs, Tamar takes a project and broke its code, and then started to point out some ways to find several types of bugs.

Tamar said that one of her favorite tips is put the MESSAGE() function in the Watch window, because we always forget what the last error message was.

She also advocated that instead of using Messagebox() or WAIT WINDOW command for displaying "debug messages", we should use the DEBUGOUT command. That's good because this command runs very fast and just work in development time. In runtime, it shows nothing for the user, and also don't give any error, so we can leave these commands in our code (while leaving messageboxes and "wait window" shows unexpected messages for the end-user).

It was also showed how we can set breakpoints (which cause the program to stop execution) in several different ways. With the program stopped, step through the code, examine values, drag data into the Watch window for monitoring it, etc. Besides, we can change values of the properties and variables when the execution is stopped, and this way we can fix something on-the-fly.

Towards the end of the sessions, Tamar showed the Event Tracking (where we can keep track of which Events are being executed), the Coverage Logging (that helps us find bottle necks in our code, lines that are never executed, etc.). The ending slide said: "The Debugger is very powerful! Make it work for you!". I must say that I totally agree with that.

My partner has needed to go…

by Claudio Lassala

In the interval, my partner Mark told me that he needed to go back for Dallas, because of some personal problems. Everything is going to be fine, Mark!
I'll work hard to make the best report that I get.

Method Coding Done Right

by Claudio Lassala

In this session, Anthony Testi came to show us how we can improve our code writing. He started by saying that all he would say in the session is his own statements, and should not be consider those of the conference promoters, the hotel, Microsoft or anyone else. That's common for any person who tries to explain to another person what is considered "best practices and good programming". This is always a controversial subject, and I think that each developer should grasp anything that he thinks that fits to his own needs or preferences.

Anthony said that the well-written method code must be: complete, correct, readable, extensible, maintainable, scalable and testable.

On the other hand, we have the obfuscate code. For example, when we nest structures (if's, case's, etc.) as deep as possible, our code starts to be awfully complex for reading. Another obfuscating situation is that one where there is a totally weird number (a "magic" number) spread through our code (for example, the PI number). Instead of doing that, we should create a constant (with the DEFINE directive), and use that constant throughout our code. That would increase the readability of our code, plus it would also give us reusability for that value.

Something widely accepted for method's writing is that a method should do one thing, and one thing only! The "one thing" can be controversial, but the main idea is give a small responsibility for the method, and it most does it very well. Also, usually a well-written method has just a few lines, and never that huge amount of lines.

Another thing that should be considered is to "do not repeat your self". When we see ourselves copying and pasting, that is a signal that we should create a function or a method in a class.

Anthony said also something about comments: we must comment "why" and not "what". That means that comments like "scanning through table" for a SCAN…ENDSCAN is useless, because any programmer knows "what" that piece of code is performing. A much more useful comment should explain "why" the table is being scanned.

It was mentioned that we must look for keeping a consistent naming for methods. That helps understanding what a given method must perform.

He also showed his application called "Fox Lint", which performs verification through source-code and help determining if good programming is being practiced or not, for example, by showing how the public interface of the classes are exposed. If the public interface has too many public methods, that indicates bad encapsulation.

Finally, Anthony has indicated some good books for those who want to go deeper in this sort of concepts (books about Design Patterns and Refactoring were mentioned).

Visual Basic .NET and C# Side-by-side Comparison

by Claudio Lassala

As people had said that is already a tradition, Kevin McNish started this session by showing a very funny video extracted from some SNL (Saturday Night Live) episode.

This session's main goal was to provide the developers all the main info for choosing a .NET language. As the most likely choices must fall in VB .Net or C# .Net, Kevin kept stick to these ones.

He stated that each of these languages has some focus: C# focuses on performance and advanced object-oriented features, as well as RAD, while VB main focus is ease-of-use and RAD.

It was mentioned several times that C# is a stricter language, while VB is more lenient. For example, C# is case-sensitive, while VB is not. Another one: C# is strong-typed, while VB can have that feature turned off.

Kevin took care of saying the main features that one language may have while the other may not have. For example, VB .Net has a feature called "background compiling". What happens is that, as soon as we jump to the following line in the code editor, the line where we was is immediately compiled, and we know in that very moment whether that line has some compiler problem or not. On the other hand, the C# compiler catches several errors that the VB's compiler never knows about.

In general, C# forces the developer to write good code, while VB not. For example, if we declare in C# that a method must return an Integer, we really MUST to return an Integer, otherwise we'll have a compiler error. VB does not do that; it will let us compile the code even if we do not return the declared type of return. This is just an example; there is quite a few of other things like that.

One thing that VB has and VFP developers surely miss in C# is the With…EndWith structure.

Another thing that C# has and VB has not is something called "Operator Overloading". With this feature, for instance, we can add two "invoice" objects; the overloaded operator "+" would know how the total of these objects should be calculated.

Here goes something that confused me: in Markus Egger's book about OOP, he states that "operator overloading" is not an object-oriented feature. In this session, Kevin stated that this is "a powerful objected-oriented feature". Who's right?!?

Kevin made it clear that he prefers C#, as it provides the developer more features for good code writing, causing the creation of more reliable (bullet-proof) applications, as the compiler generates errors or warnings about potential problems.

A small note: during this session I discovered something that has ever bothered me - the IIF() function in VFP means "Intermediate If". I have never known what the heck that first "I" meant.

IntelliSense Inside and Out

by Claudio Lassala

I did know that this was meant to be another good session from Andy Kramek. And it was!

Andy categorized this sessions as "Advanced" level. He explained briefly the main features of the IntelliSense technology introduced in VFP 7, and then the best part came when he started to show us how we can customize and create new scripts in our IntelliSense.

The magic behind IntelliSense consists of three main parts: a VFP application called FoxCode.app, a table called FoxCode.dbf, and an object called FoxCode.

The IntelliSense implementation in VFP is extremely powerful, mainly because it is data-driven, which makes it highly customizable and extensible by the developer. It goes much further than a simple "auto-text" functionality.

The main resources for learning about how we can create our powerful scripts in the IntelliSense are an article co-wrote by Andy, that's available in the MSDN, and also the "MegaFox" book, also co-authored by him. I think this is a must for increasing our productivity.

Error Handling in VFP 8

by Claudio Lassala

Doug Hennig presented a very good session about this subject. It was particularly based on the new Structured Exception Handling, introduced in VFP 8.

Doug pointed out the main problems existent in the error handling capabilities present up to VFP 7, that are the ON ERROR command and the Error() method-event of all the objects. Then he told us about how the structured exception handling addresses the solution for those problems.

Basically, one of the main problems is that errors spread too much easily with Error() methods. Let's say that an error occurs in a given object, and then the Error() method of this object is trying to handle it. Then, this method may try to run some code in a method of another object; if this method of the other object generates an error as well, and it is not able to handle it, this second error will come back to the first object, which is bad, because it doesn't have idea or responsibility over how that error must be handled.

With the Try/Catch block, we can handle errors on the very place they are likely to occur. We first use the TRY block in order to "try" running some code. Then, if any error occurs, we use the CATCH block in order to "catch" the error. Finally, we can use the FINALLY block, that's supposed to runs every time, no matter if the code within the TRY block has succeeded or not.

With this new feature came also a new baseclass called Exception. When we "catch" errors "to" a variable, an Expection object gets created in this variable. This object has several properties that hold information about the exception that has occurred.

And we can also THROW exceptions. The idea is: if we can't handle the error in a given place, we bubble up (throw) the error for the next level, and keep doing that, until a TRY/CATCH, Error() method or ON ERROR routine handles the error. Of course, if no one of these does exists for handling the error, VFP will show the error.

For your information, several developers really think that this feature is the most important introduced in VFP 8.

Practical Use of Collections

by Claudio Lassala

A brand new baseclass introduced in VFP 8 is called Collections. Toni Feltman, from F1 Technologies, presented this session.

She started by saying that we have always been used with collections. For example, since we were kids, we used to have collections of stamps or coins, for example. Collection is that: a group of objects to be kept together.

Toni said that, no matter what's the programming language, if it has a Collection baseclass, it will certainly have a Count property, and the Item(), Add() and Remove() methods. The Count property is used for querying how many items a collection contains. The Item() method is used for accessing each individual item in a collection, while the Add() and Remove() methods are used for add or remove (respectively) items in a collection.

VFP developers are quite used with collections. For example, the Treeview ActiveX control has a Nodes collections, which has that interface mentioned in the paragraph above. However, until VFP 7, we didn't have a Collection baseclass. Alternatively, several developers overcome that inability by creating "array-based" collections, which are classes that keeps things grouped by the use of arrays.

This "array-based collection" approach actually works, but the main difference is that an array is NOT an object, while a Collection IS an object. As an object, we can, for example, pass it back and forth easily, even throughout COM objects.

Toni showed some samples of how to use the Collection baseclass, and gave us a good overview of it. If you are not used to, it's time to play around with this new class, because it is REALLY useful.

Fox is Magic: By the "Ain't Never Gonna Be Ready for Prime Time" Players

by Claudio Lassala

There has been some rumour about a funny thing that should happen tonight, involving the speakers of this edition of the conference. Well, I must say that it was a HILARIOUS surprise!!!

Whil Hentzen gives some announcements, and after that Cathy Pountney started a video in her notebook, that was plugged in the projectors. Well, what followed was a jingle using the "Fox is Magic" motto that has been present through all the conference. And singing the jingle was all the speakers.

I really hope that this video gets available anytime soon, because you all must see that. Well, firstly, that guys are very good speakers, but we can't say that they are good singers. Secondly, there is some funny parts, like the one where Mac Ruble comes walking and singing with both "Cath blond ladies" (Cathi Gero and Cathy Pountney), each blond on one of his sides.

There were some comments that this video must be launched in MTV any time soon. :)

Ah, I hope as well that the lyrics of this single get available online. ;)

VFP Tips, Tricks and Traps World Championship

by Claudio Lassala

Now, it's time for the championship. In this championship the players must go to the laptop and present for the attendees any cool tip, tricky or trap with VFP. There were eight players, fighting for three rounds. The attendees did cast their votes based on the most useful and interesting tips, tricks and traps. That was a really cool activity.

Ken Levy came in a hurry because he wanted to participate of the championship as well. He showed some tips and tricks of VFP 9 (codename Europa). Everyone liked it. <s> He showed basically three functionalities: the rotation of the text in a command button, the "anchoring" of controls in a form (like we have in WinForms of .NET) where the resizing of controls is done without code, just by setting some properties. The third feature was a very cool one: docking for user forms. Ken take a Class Browser window, and docked it in the Command Window.

The day was intense: I attended to 6 sessions, plus all the fun in the "Fox is Magic" and in the Championship.

Well, time to post this report and have some sleep, because today is another full day.

November 19

Intro to XML

by Claudio Lassala

Despite the fact that I don't consider myself as a beginner in XML (neither a master, as well ), I attended to this session because Mark McCasland advised me: "You MUST attend to any session presented by Mac Rubel".

Mac Rubel (from EPS Software), is a very good speaker (for quite a while now), and a very funny guy (who know even how to speak "good morning" in Portuguese, thanks for some fishing in Manaus). <s>

Mac started his presentation very direct. He said something like: if there is anyone here who knows anything about XML, get out!". That was because the session was really introductory for developers who knew nothing about XML.

He started by explaining about roots of XML, telling us that it is a child of SGML and a sibling of HTML. He gave emphasis to the fact that the XML specification is still in version 1.0, even after almost 5 years since it has been defined. In his point of view, that's because the XML specification is very well defined, and it's working very the way it is.

XML means eXtensibled Markup Language, and the reason it is called "extensible" is because we can create our own tags (which is not possible in HTML, for example).

He told us also about the XML parser from Microsoft (the MS XML Parser), and explained that a well-formed document is mandatory. Also, he told us about the document validation, by the using of DTDs or XML Schemas.

Another thing is the XML Namespaces, which helps us to protect naming convention collisions. Following, he talked briefly about XSL, XSLT, XPath and XQuery.

Then, it was time to show the VFP native functions that deals with XML, and talked about the new XMLAdapter function, introduced in VFP 8.

Finally, he said that the VFP Team is working hard to make VFP always compatible with .NET, and that XML fits very well in the middle tier data engine.

I think that this session was very good for those developers who are willing to give their first steps in the XML world.

Reusable Data Classes

by Claudio Lassala

Development in VFP usually means "Data!". This session presented by Toni Feltman was about how we can create reusable data classes.

Toni started by remembering as about some classes that most developers don't pay much attention: Data Environment, Cursor and Relation. The Data Environment class we'd cannot subclass until VFP 7, but now we can in VFP 8. But the Cursor and the Relation classes always were possible for deriving from them. And what is a Cursor and what is a Relation? You pretty much know that a cursor is a temporary table. And a relation is nothing more than a relation that we set between two tables.

Toni showed how we can make use of those classes, subclassifying then, and re-using them through our applications.

Then, he told us about how we can, in VFP 8, take a SCX-based form, and save its DataEnvironment as a new class. After that, she showed the new DEClass and DEClassLibrary properties of the Form baseclass, which we use to attach a DataEnvironment class to a form.

Also, Toni talked about the possibility of adding DataEnvironment objects as members of a Form. Doing like this, we can have several DataEnvironments in a single form.

She didn't enter in the new CursorAdapter class because Doug Hennig had presented a fully-dedicated session on this brand new class.

ASP.NET Pages for All VFP Ages

by Claudio Lassala

In this session, Cathi Gero has presented how VFP developers can make use of ASP.NET and VFP for building Web applications. This was another session that I was comfortable with, as I've presented such subject a few times in Brazil.

She started by giving a brief .NET overview, talking about standards like XML/SOAP and XML Web Services, and also talking about the Common Language Runtime (CLR).

After that, Cathi told us that ASP.NET is used both for the creation of Web Services and Web Forms. Web Forms are object-based server controls, that we use for creating web pages in a similar fashion to that that we are used to do in VFP. That means that we have things like properties, methods and events in pages that will be rendered as HTML.

An ASP.NET page can be either a single file, or separate files. On the second case, the HTML/XML content is stored in one file, and the logical code is stored in another file (which is called "Code Behind"). These pages can be written in any .NET language. Therefore, we are not limited to the scripting languages, as we were in the traditional ASP.

Cathi then gave a brief explanation about the ADO.NET; brief because most part of the attendees was present at her session fully-dedicated to the ADO.NET.

She mentioned some advantages of using ASP.NET with VFP: Platform independent deployment, remote access to information and multiple devices (cell phones, PDAs, etc.)

Following that, she said how we can access VFP data from ASP.NET: Using ADO.NET Dataset/DataReader directly (in a 2-tier scenario) using the VFP OLE DB Provider, calling COM components from ASP.NET or calling VFP-based XML Web Services.

Also, she said that we can consume data from ASP.NET, through XML Web Services or ADO.NET Datasets (that we can send as XML and consume with VFP's native XML functions).

Cathi then showed a few demos. First she showed how we can call VFP COM components from ASP.NET (it's just a matter of adding the reference for the component to the .NET project, import the namespace, instantiate the class, and start working with the object) and also how we can access VFP data via OLE-DB.

Then, she showed how we can consume Web Services. In her sample she accessed the FoxCentral.Net's Web Service.

Finally, she showed a cool real world application: it was designed for accessing through mobile devices, using the Mobile Toolkit in .NET.

ASP.NET is definitely an option that VFP developers must consider when they need to build Web applications, where they can have VFP data and VFP Business Objects, and a front-end built in ASP.NET, where they can develop in a same fashion they're used to in regular Windows applications.

Automation with VFP

by Claudio Lassala

Office Automation from VFP always was something tricky for the developers. In this session, Marcia Akins tried to show the main gotchas of automation.

She starting by saying that we can use the CreateObject() function for creating an instance of Word, Excel or Outlook (the classes are: Word.Application, Excel.Application and Office.application, respectively). She told us that we can use the GetObject() function in order to use an existing instance of a server ("automation" server).

It was explained how we must move code from VBA to VFP syntax. The main things to keep in mind: take care with named parameters (because VFP doesn't know anything about it), add parenthesis for methods, fully qualify objects, and verify the parameter positions.

Marcia showed how we can use Event Binding, in order to hook to events raised by COM objects. For example, we may need to keep track when we fire MS-Word from our application, and then we need to perform some action when the user tries to close Word. In order to do that we must use the EventHandler() function, and also "Implement" Word's interface. We can use the Object Browser to makes easier the creation of the code for interface implementation.

Marcia stepped through her data-driven code that automate Word's mail merge, and after that, started giving us some tips about Excel automation, focusing on charting generation.

Towards the end of the session, she showed the Outlook automation, like accessing the address book, reading email, and sending email.

This was a very nice session. Marcia is another great speaker, also very funny all the time.

A little bit of Mere Mortals…

by Claudio Lassala

Today's bonus session was basically vendor's sessions: Mere Mortals, FoxExpress and Visual MaxFrame. I chose Mere Mortals, because I was personally interested in its .NET version (you know, I'm constantly willing to know how those easy things in VFP are implemented in .NET <s>).

Well, first of all, Kevin played a few of his funny videos (he said that "some people send them to him"… in my opinion, he spends most of his days looking for these videos through the Internet).

All jokes aside, this session was really informal, where everybody could throw their questions.

Kevin asked about what version we were interested in hear about it, and mostly chosen the .NET version.

He stated that the .NET version will have the same look and feel, plus the functionality, that the VFP version has. Besides, a lot of importance is given to the business objects, since Kevin is a big advocate of them.

Among the session, Kevin announced that he's releasing a "Mere Mortals MVP Program", in order to recognize those member of the Mere Mortals community, who provides lots of help for Mere Mortals users through the Universal Thread (Kevin stated that the UT is the most valuable resource for getting help on his product). He also said that the .NET version of the framework must be released in January (but that's not confirmed yet).

This session was a very good talking with Kevin.

November 20

Using ActiveX Controls in VFP

by Claudio Lassala

Sometimes we do need to add some functionality to our applications that VFP doesn't have natively. A common way to address this issue is by the using of ActiveX Controls. In this session, Marcia Akins presented some gotchas about the using of some of those controls from within VFP.

The first thing she showed was how we can investigate PEMs of ActiveX Controls. Once again the Object Browser tool comes handy. By using it, we can locate the OCX and help files of the ActiveX control, and then investigate its PEMs, constants and Enums.

Another good way for investigating of those controls is by the using of the ActiveX property sheet (called by right-clicking on the control and choosing Properties…). That pops-up a dialog where we can set several properties of the control.

The first ActiveX control showed by Marcia was the ImageList Control. The reason for that is because Treeviews and Listviews controls uses images, but they cannot host images by themselves. Here the ImageList enters the picture. It stores images loaded on it that it's going to be used by other ActiveX controls.

We can load images in a Listview both in design time and in Runtime. In design time, we can use the property sheet of the control. One gotcha is that we must set the image size first, and just after that we must add the images. The reason for that is that after any image has been loaded, we cannot change the size of the images. That could be a pain if after has added several pictures we need to change its size; we would need to remove all images, change the size, and then add then again!

The next step is binding the ImageList control to the Treeview control. This MUST be done in runtime (the option to set this up in runtime does exist, but it does not work). In order to do the binding in runtime is just a matter of running the following code (sort of…): Thisform.oTreeview.ImageList = Thisform.oImageList.Object

Next, we need to add nodes to the treeview. That can be accomplished by the using of the Add() method of the Nodes collection (which is a member of the Treeview control).

Marcia showed her nice Treeview class that handles related tables in order to show their specified data. That's very cool.

Following that, Marcia showed how we can make use of the Listview control. One of the main things we usually do with this control is simulate a better "grid", using some images on it. Marcia said that with VFP 8 we may not be using Listviews like that very often. But, another cool thing with this approach is that we can set orders in columns without the needing of indexes (which has some overhead).

Then she showed how we can synchronize the Treeview and the Listview controls, and gets the same look and feel of the Windows Explorer. One benefit of doing this is that we don't need to teach the users to use that, because they must already be comfortable with that.

The third ActiveX Control showed was the ImageCombo control. This control can show images on each of its items, plus it shows the image of the selected item in the text part of the control. This is another thing introduced in the native combobox class of VFP 8, so we may no longer need this ActiveX control.

This session gave the attendees a very good overview and tips for using some ActiveX controls, which are helpful for providing enhanced functionalities for our VFP applications.

Accessing SQL Server-based Data in VFP

by Claudio Lassala

Almost every VFP developer some day faces up a situation when he need to access SQL Server-based data. In this session, Dan LeClair (from EPS Software), has presented some ways of how the developer can accomplish this.

Dan showed essentially four options: Remote views, SQL-Pass Through and ADO.

The basics behind SQL Server data manipulation is: Establish a connection with the backend, query data, change data, post changes and close the connection.

Remote view is a native option in VFP. Among its pros Dan mentioned the convenience and the fact that the ODBC driver handles differences in data types. As for the cons, Dan mentioned the needing of a DBC and the fact that it cannot call SQL stored procedures.

Another native option is the SQL-Pass Through. Among its pros is the fact that it does not require a DBC and it can call stored procedures. Among the cons is the fact that it requires more work for the developer and it requires more knowledge of the back-end data structures.

ADO (that stands for ActiveX Data Objects) is composed by a couple of COM classes that we can use for data access and handling within any COM client (like VFP, VB, etc.). Among its pros, Dan mentioned that most controls in VFP will work with and transaction processing and conflict detection are built in. Among the cons are the famous DLL issues and that the native VFP grid cannot work with it.

Then the question comes up: which one is the best one? Dan's opinion is: well, it depends on your immediate needs, on the amount of refactoring and on future scalability.

Another technique showed by Dan was the XML features that came with SQL Server 2000. We can output XML right from the SQL statements, and use VFP's built-in XML functions to work with the results, or doing direct manipulation of it by using the XMLDOM.

Towards the end of the session, Dan talked about new thing on this subject that comes with VFP 8: the new CursorAdapter class and the improvements on the View Designer.

Closing session

by Claudio Lassala

Everyone was curious to see what Whil and his crew had prepared for the closing session. Well, "Fox is Magic!", and that was what we get: Magic! Yes, we got a very nice Magician's show (really very good). All the attendees really enjoyed it. And in his final session, the magician put an empty box on the stage, and guess what appeared later from inside the box? He, Mr. Whil Hentzen! That was very cool.

Whil then said: "Thanks everyone for coming, and see you all next year!".

My impressions of this conference

by Claudio Lassala

This was my first big traditional VFP conference (I almost went to the last DevCon, but things didn't worked out timely). I must say that I'm REALLY happy with what I saw.

The conference was really amazing. The content for the sessions were very good chosen, and the speakers had done a very good job. I've been following these speakers in the last few years, by reading their articles, messages on the UT, public domain tools, etc., and it was really great meeting them all here, and having the chance of talking to them.

Another thing that I really enjoyed was the fact that I met several people with whom we are always hanging out online. It was really great to meet you all, guys (and gals!)!!

I'd like to send my apologies to the speakers which I can't report their sessions (Craig Berntson, Rick Borup, and a few others). There were a lot of sessions, and after my reporter partner Mark had needed to go, it was pretty much impossible for me covering all the sessions.

For those who followed this report through all the conference, I tried to do my best in reporting this conference. I know there are a lot of developers who would like to be here, but can't make that up, therefore I tried to provide you the most information I could in this tight timeframe that we have when reporting conferences. I really hope that this report had been helpful for you.

See you online!

Claudio Lassala

Claudio Lassala, EPS Software Corp
 
Claudio Lassala is a Senior Developer at EPS Software Corp. and a part time Universal Thread Consultant. He has presented several lectures at Microsoft events such as PDC and various other Microsoft seminars, as well as several conferences and user groups in Brazil and North America. He is a multiple winner of the Microsoft MVP award, holds the MCSD.Net certification, and is also a columnist at MSDN Brazil. He has articles published at several magazines, such as MSDN Brazil Magazine, FoxPro Advisor, CoDe Magazine, UTMag, Developers Magazine, and he is also the author of several training videos that can be found on the Universal Thread.

Mark McCasland

DevTeach 2004
DateContentDetail
08/09 17:50NewsSouthwest Fox Speaker Ch...
06/09 16:31MeetingSQL Server Tools, Strate...
02/09 00:44NewsPEM Editor 6 has been re...
27/08 17:57NewsSouthwest Fox 2010 Early...
25/08 04:30NewsCryptoLicensing For .Net...
22/08 09:58NewsWindows Phone 7 Gold Rush
16/08 03:05NewsVisual WebGui reveals it...
11/08 17:54MeetingSo You Think You Want To...
10/08 16:41News.NET Training for VFP Pr...
09/08 18:33MeetingLINQ & SQL Server Reporting
03/08 08:15JobsSQL/VFP Developer for Ma...
29/07 10:59News.NET 4 for VFP Developer...
26/07 10:13JobsVFP Developer (Two Perma...
25/07 06:44NewsWith Visual WebGui 6.4 R...
24/07 11:00JobsQuality Assurance Softwa...

Copyright © 1993 - 2010 Level Extreme Inc., All Rights Reserved · Telephone: 506-783-9007 Email: info@universalthread.com · Privacy & Security · Copyright · Terms & Conditions