Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




Visual FoxPro 6.0 Eval Guide

software




Evaluation Guide

The fastest way for developers using Visual FoxPro® to build
state-of-the-art database components and solutions

September, 1998

© 1998 Microsoft Corporation. All rights reserved.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.

Microsoft, Active Server, ActiveX, BackOffice, FoxPro, the FoxPro head design, FrontPage, JScript, Visual Basic, Visual C++, Visual FoxPro, Visual InterDev, Visual J++, Visual SourceSafe, Visual Studio, the Visual Studio logo, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

Other product or company names mentioned herein may be the trademarks of their respective owners.

Microsoft Corporation . One Microsoft Way . Redmond, WA 98052-6399 . USA

Contents


Welcome i

What's New in Visual FoxPro 6.0 1

Evaluating Visual FoxPro 6.0 2

Visual FoxPro 6.0 Design Themes 3

Build High-performance, Scalable Components 3

Easier to Learn and Use 4

More Productive Development Environment 5

Enterprise Application Development 6

Build High-performance, Scalable Components 7

Improved Type Libraries 7

Build Web Applications 8

Active Server Pages 8

FoxISAPI 8

Microsoft Transaction Server Support 9

Easier to Learn and Use 12

Visual FoxPro Foundation Classes 12

Object-Oriented Application Framework 12

Application Wizard 13

Application Builder 13

New and Enhanced Wizards 14

Database Wizard 14

Web Publishing Wizard 14

More Productive Development Environment 16

Year 2000 Compliance 16

Active Documents 17

Component Gallery 18

Coverage Profiler 19

OLE Drag and Drop 20

Access and Assign Methods 21

Project Hooks 22

Enterprise Application Development 24

Windows Distributed interNet Applications Architecture 24

Visual Studio, Enterprise Edition 24

Universal Data Access 25

OLE DB and ODBC 25

ActiveX Data Objects 25

Visual Database Tools 26

Object Modeling 26

Visual FoxPro Connection Wizards 27

Data View 28

Query Designer 29

Database Designer 29

Stored Procedure Editor 30

Stored Procedure Debugging 30

Database Projects 30

Visual Component Manager 31

Conclusion 32

Features Overview 33

Build High-Performance, Scalable Components 33

Easier to Learn and Use 33

More Powerful and Extensible 33

Enterprise Application Development 34

Visual FoxPro 6.0 Frequently Asked Questions 35

Visual FoxPro 6.0 Customer Scenarios 38

Surplus Direct 38

State University of New York at Buffalo 38

Boeing 39

Open Software Solutions 39

Automated Regional Information Systems 39

Developer Community and Training 41

The Microsoft Developer Network 41

About MSDN 41

MSDN Online 41

MSDN Online Membership 41

The MSDN Subscription Program 41

Microsoft Mastering Series 42

For More Information 44

Welcome


Welcome to the Microsoft® Visual FoxPro® 6.0 Evaluation Guide. The guide is designed to help you understand the product design goals for the Visual FoxPro 6.0 database development system, as well as Microsoft's strategy for helping businesses build high-performance, state-of-the-art database components and solutions using Visual FoxPro.

The following sections are included in this guide to assist you in your evaluation:

What's New in Visual FoxPro 6.0

Evaluating Visual FoxPro 6.0

Visual FoxPro 6.0 Features Overview

Visual FoxPro 6.0 Frequently Asked Questions

Visual FoxPro 6.0 Customer Scenarios

Developer Community and Training

Visual FoxPro 6.0 Guided Tour

Visual FoxPro 6.0 is a member of the Microsoft Visual StudioT development tools suite. Microsoft Visual Studio is a complete development tools suite that provides corporations with easy-to-use tools for building solutions. Visual Studio, Professional Edition enables developers to take full advantage of the Microsoft Windows® operating system and Web development. It features the Microsoft Visual Basic development system, Microsoft Visual J++T development system, Microsoft Visual C++® development system, Microsoft Visual InterDevT Web development system, and the Visual FoxPro® database development system. Visual Studio, Enterprise Edition is the complete suite for rapidly building data-centric enterprise solutions. It includes enterprise and team development features, such as the Visual Database Tools, Microsoft Visual SourceSafeT version control system, the Microsoft Repository, Visual Component Manager, Microsoft Visual Modeler, and development versions of the Microsoft Backoffice® family of application servers. For complete evaluation information about Visual Studio 6.0, please refer to the Visual Studio 6.0 Evaluation Guide.

What's New in Visual FoxPro 6.0


Visual FoxPro 6.0 contains many new features designed to help developers build state-of-the-art client/server and Internet database applications, as well as build data-intensive components that can be used with a variety of front ends and back ends.

New Component/Feature

Description

Microsoft Transaction Server Support

COM components created with Visual FoxPro can be managed and scaled with Microsoft Transaction Server. Developers can build data-intensive middle-tier components and scale them to hundreds of users and more.

Active Documents

Active Documents provide an evolutionary step from pure Visual FoxPro client applications to applications that use a client interface based on HTML and bring the power of Visual FoxPro to the browser.

Easier to Learn and Use

Visual FoxPro 6.0 provides a set of prebuilt class libraries that developers can use as-is to provide common functionality to applications. The new Application Wizard uses these classes to create a fully object-oriented framework for building database solutions. The new Application Builder can be used to add forms and reports to applications that use this framework.

Better Management of Class Libraries

The Component Gallery provides a visual tool to organize and use classes. Components can be dragged from the Component Gallery and dropped onto design surfaces such as projects or forms.

Build Better Components and Applications

Developers can use the Coverage Profiler to check the validity of their test plans by checking which lines of code are being executed. They can also perform "profiling" to determine bottlenecks and other performance problems in their code.

Enterprise Application Development

Visual FoxPro 6.0 provides a range of new capabilities for building scalable, enterprise-wide Web applications: full participation in the Windows 454m122e Distributed interNet Applications (DNA) framework, improved creation of middle-tier, reusable business components, support for Universal Data Access, and better integration with middle-tier services such as Microsoft Transaction Server.

Evaluating Visual FoxPro 6.0


Microsoft Visual FoxPro 6.0 is the newest version of Microsoft's award-winning tool for creating high-performance, state-of-the-art database components and solutions. Visual FoxPro 6.0 gives developers the necessary tools to manage data-whether organizing tables of information and running queries, creating an integrated relational database management system (DBMS), or programming a fully developed data management application for end users.

Visual FoxPro 6.0 also provides tools to build applications that integrate client/server and the Internet. The Visual FoxPro design tools and object-oriented, data-centric language, fast data engine, and component creation capabilities make it an extremely powerful way for developers using FoxPro to participate in enterprise application development based on the Windows Distributed interNet Applications (DNA) framework.

Visual FoxPro 6.0 continues the evolution of FoxPro from a procedural desktop database development system to an object-oriented development environment with the tools developers need to build state-of-the-art client/server and Internet database components and applications.

Visual FoxPro has full object-oriented class design capabilities including inheritance, subclassing, encapsulation, and polymorphism. Reusable class libraries of both visual and nonvisual (code) classes can be built, dramatically reducing development time.

The Visual FoxPro remote views use ODBC (Open Database Connectivity) to talk to SQL databases, making Visual FoxPro an excellent tool for building client/server applications because there is no shift in approach when moving from a file server-based application to a client/server-based application.

Developers can use Visual FoxPro to create custom COM (Component Object Model) components. Developers can build data-intensive middle-tier business objects that can be used and reused easily by other applications, including Microsoft Office and the other tools in Visual Studio. In addition, components can be used to create Visual FoxPro-based Internet database applications.

Visual FoxPro 6.0 Design Themes


In response to feedback from developers, Microsoft concentrated on making the following improvements when developing Visual FoxPro 6.0:

Build high-performance reusable components. Visual FoxPro 6.0 is an excellent tool for building components that can be deployed and scaled in client/server, Internet, and intranet environments. These components will typically be middle-tier business rules servers and other components that work with local or remote data.

Easier to learn and use. Visual FoxPro 6.0 is easier to learn and use than ever, providing more built-in functionality and "no-sweat" reusable components for use in applications, thus reducing the learning curve for developers who currently use Microsoft FoxPro® 2.x.

More productive development environment. Visual FoxPro 6.0 has a more productive development environment. Enhancements to the developer environment and tool set provide developers using Visual FoxPro with an unprecedented level of productivity and ability to customize the environment.

Enterprise application development. Visual FoxPro 6.0 supports the Windows DNA framework as a member of Visual Studio. Developers using Visual FoxPro can build component-based applications and can use the tools available in Visual Studio Enterprise Edition to build enterprise applications.

Build High-performance, Scalable Components

"A quiet revolution is underway in the world of software development. Component software offers many advantages for users and developers alike. Changing business environments often required whole new systems in the past. But with components, only part of the system needs replacement. And the user can get the new component from the developer best suited for creation of that single component."

The benefits of component-based development are clear. Some challenges, however, are involved in moving to this new world:

How can developers using FoxPro continue using Visual FoxPro to build and use components?

How can they migrate existing applications and reuse existing code and data?

How can they move forward while protecting their existing investments?

The challenge for Microsoft in designing and building Visual FoxPro 6.0 was to provide answers to these questions. It is vitally important that Visual FoxPro provide the tools developers need to participate in the development of scalable, distributed, component-based applications that meet the evolving needs of businesses. Developers using FoxPro do not want to be left behind as the computing world changes.

With Visual FoxPro 6.0, Microsoft has focused on providing tools for developers to build components and to integrate client/server and the Web:

Create components that can be used and reused by others. Windows DNA applications are component-based systems consisting of multiple tiers, each providing a service. Developers can use COM to write middle-tier servers that link front ends to back-end data and provide business services such as data retrieval, manipulation, and validation. Because COM is language-neutral, developers can use the languages and tools they are familiar with to write components. They can reuse existing code and capitalize on their skills and investments to move their applications forward.

Provide a way to build Web database applications. Developers using Visual FoxPro have been building robust and powerful database applications for many years. With the proper tools and architecture, they can use this knowledge to build Internet database applications where Visual FoxPro code receives requests from browsers, retrieves and manipulates data, and then builds HTML to be sent back to the browsers. Developers can use existing code and skills to apply their talents to the Web.

Provide scalability of applications. Applications must be able to support hundreds of users calling on the services of a COM component. Microsoft Transaction Server can be used to handle multiple user requests for components-automatically, with no coding required. Support for Transaction Server is critically important if a COM component is going to be used in a distributed application.

Easier to Learn and Use

"You can look at the task of switching to Visual FoxPro from FoxPro 2.x as either an exciting path to the 21st century or as a trip to the dentist."

With each passing month, more and more developers using FoxPro are starting to use Visual FoxPro. Thirty-six percent of users of Visual FoxPro have been using it for less than six months. However, a common feeling among developers moving to Visual FoxPro is that although many things are unchanged from FoxPro 2.x, there are enough new features and enough of a change in the way applications are developed that it can sometimes feel like a different product. Forty-eight percent of developers using Visual FoxPro felt that learning the product was more difficult than they expected.

Visual FoxPro 6.0 makes it easier for all developers, particularly those new to the product, to use object-oriented programming when building applications:

Prebuilt class libraries provide common functionality. Object-oriented programming can greatly reduce development time because developers can reuse classes across applications. The key to achieving this reuse lies in having a broad collection of tested class libraries.

An object-oriented application framework. An object-oriented application framework consists of classes that provide core functionality used in every application. Because developers don't need to rewrite that code every time a new application is started, they can concentrate on writing application-specific code. Development and maintenance are easier because every application built using the framework shares similar structure and behavior.

An easy way to create applications based on the object-oriented framework. An object-oriented application should come with an easy way to "hook" elements like forms or reports into the application without requiring intimate, detailed knowledge of either object-oriented programming in general or the application framework's internal structure.

New and improved wizards. Wizards automate common and complex tasks, saving the developer time and drudgery. Wizards are particularly helpful for areas that may be new to developers, such as publishing data to the Web.

More Productive Development Environment

Developers expect that each release of Visual FoxPro will make the development process more productive and supply an improved set of tools for solving business problems. Microsoft added the following capabilities to Visual FoxPro 6.0, making it more productive and more extensible:

Year 2000 compliance. Safeguards built into Visual FoxPro 6.0 can help developers build Year 2000-compliant applications.

Easy migration of existing applications to the Web. The ability to build Visual FoxPro forms or complete applications as Active Documents that can be viewed in Microsoft Internet Explorer provides an easy way to migrate existing applications to the Web and bring the functionality of Visual FoxPro to the browser.

Better management of class libraries. Using the object-oriented programming capabilities in Visual FoxPro, developers can create libraries of reusable classes. But managing classes can be a very time-consuming chore. The tools in Visual FoxPro 6.0 simplify class library organization so developers can easily locate and use classes in application development.

Building better applications. Building solid and reliable applications becomes even more important as Visual FoxPro developers build and use components in client/server and Internet applications. The more stable and reliable the components, the easier it will be to build, test, and deploy component-based applications.

Better sharing of data between applications. Using OLE Drag and Drop to share data between applications contributes significantly to the ease of use of the Windows platform. Adding this type of data-sharing capability to Visual FoxPro enables developers to build more user-friendly applications. It also provides for additional ease of use in the development environment.

More control within applications. Developers using Visual FoxPro 6.0 can add validation code for properties to class definitions and exercise more control over user actions.

More control within the design time environment. Developers no longer have to access and modify project files manually in order to extend the features of the Project Manager. Project hooks give programmatic access to the Project Manager and create project-level events to which code can be attached.

Enterprise Application Development

As the use of information technology changes to meet new business needs, the very definition of "enterprise applications" is also evolving. While enterprise infrastructures and applications vary widely across organizations, common attributes of "enterprise" applications include:

Being component based for flexibility and scalability.

Requiring life cycle support, including design, development, management, and analysis.

Requiring more sophisticated database architectures.

Being developed by teams.

Being distributed in nature, integrated with disparate back-end systems.

Visual FoxPro developers purchasing Visual Studio, Enterprise Edition receive additional enterprise development features to address these needs including: a complete suite for component-based development, enterprise database features, enhanced lifecycle productivity inclusive of application design, performance analysis and deployment tools, team development support, and development versions of the Microsoft BackOffice family of applications servers.

Visual Studio provides a number of tools for enterprise application development. Developers using Visual FoxPro can use these tools to supplement the Visual FoxPro development environment.

Support for Universal Data Access. Visual FoxPro 6.0 developers can use both ODBC and OLE DB to query and manipulate data from multiple sources across the enterprise. In addition, Visual FoxPro data can be used from a variety of other tools.

Better tools for designing classes and components. With the tools in Visual Studio, developers can rapidly create distributed applications consisting of reusable components. As the number of components in an application increases, its complexity increases as well. Modeling is, therefore, essential to making component-based development scalable for enterprise and Internet applications.

Visual Database Tools. The ability to query, design, and change schemas and debug stored procedures is a boon for client/server development. Developers using Visual FoxPro can use the Visual Database Tools to work with SQL Server and Oracle databases.

Build High-performance, Scalable Components


As discussed throughout this guide, building high-performance, scalable, and robust components that work well with other applications is very important in Visual FoxPro-based development. Visual FoxPro 6.0 has several enhancements for building better COM components.

Improved type libraries ensure that Visual FoxPro components work well with other applications.

Support for building components that are used in Web applications offers scalability.

Full support for Microsoft Transaction Server makes managing and scaling Visual FoxPro components easy.

Component-based applications built using the Windows DNA framework consist of multiple tiers, each providing a service. Front ends provide the user interface. Middle tiers provide business services and handle tasks such as data retrieval, manipulation, validation, and enforcement of business rules. The final tier is where the data resides. The Component Object Model (COM) enables objects on the various tiers to talk to each other.

With its object-oriented, data-centric language and tools such as remote views for easy integration of remote data, Visual FoxPro 6.0 is an ideal tool for building data-intensive COM components. The components can be called from a wide variety of front ends and can talk to both FoxPro data and SQL databases, using either ODBC or Microsoft ActiveX® Data Objects (ADO).

Developers building components can reuse existing code. A Visual FoxPro COM component that works with data can use the same code as a stand-alone Visual FoxPro-based application working with the same data. Existing FoxPro-based applications do not have to be completely rewritten to be migrated to component-based applications.

Improved Type Libraries

Type libraries contain information about the properties and methods of a COM component. When a COM component is built, a type library is also created. Type libraries are extremely useful, as the following three examples illustrate:

The statement completion feature in Visual Basic for Applications relies on a component's type library. Statement completion automatically displays a pick list of a component's properties and methods when the user types the component's name followed by a period.

Visual J++ has the ability to import COM components into Java code. Visual J++ relies on the type library to accomplish this.

The Object Browser in Visual Basic for Applications provides an easy way to inspect the properties and methods of a component. The information displayed is read from the type library.

Visual FoxPro 5.0 type libraries did not contain complete information, which prevented the ease-of-use scenarios listed above. Visual FoxPro 6.0 creates complete and accurate type libraries.

Build Web Applications

Visual FoxPro COM components can be used as an integral part of Web-based applications. In a typical Web application the browser, in response to a user's actions, passes a request to the Web server. The Web server then makes calls to a COM component, which will typically retrieve data and create HTML on the fly based on the data. The Web server then passes the HTML back to the browser.

Scalability is particularly important in Web applications, where the server load can be unpredictable. Ten users may be hitting the Web site one minute and 100 the next. Internet Information Server 4.0 (IIS) and Visual FoxPro 6.0 COM components can take advantage of Microsoft Transaction Server to achieve scalability easily.

IIS can talk to COM components in two primary ways: with Microsoft Active Server Pages or through the Internet Server API (ISAPI).

Active Server Pages

Active Server Pages consist of script (Visual Basic, Scripting Edition or Microsoft JScriptT) that runs on IIS and dynamically builds HTML that is returned to the browser. The browser invokes the Active Server Page by sending a URL that references an ASP file to IIS. IIS then runs the script in the ASP file, and the results are sent back to the browser. Active Server Pages typically use ADO (ActiveX Data Objects) to retrieve data. They can use the Visual FoxPro ODBC driver to run queries against FoxPro data.

Active Server Pages can also call custom COM components to retrieve data and build HTML. Although this process can be more complex than using just ADO and scripting, Visual Basic, Scripting Edition and JScript are not as robust or as powerful as the full-featured languages found in Visual FoxPro or Visual Basic. Building a custom COM component to encapsulate business rules and to handle querying and data manipulation allows developers to write more complex routines and to reuse existing code across applications. This eases the burden of migrating existing applications to the Web, and eases maintenance of deployed applications.

FoxISAPI

Visual FoxPro ships with the FoxPro Internet Server API (FoxISAPI) library, which enables IIS to talk directly to Visual FoxPro COM components. These components can retrieve and manipulate data and combine it with HTML files to produce dynamically generated HTML pages that are returned to the browser.

With this approach the browser makes a request of the Web server, which then calls the Visual FoxPro COM component directly, rather than going through Active Server Pages. All of the application logic is contained in the component. The component handles all data manipulation and returns HTML to the Web server, which passes it back to the browser.

The FoxISAPI library allows for pooling of multiple Visual FoxPro COM components, providing impressive scalability. In addition, the FoxISAPI library can be managed with Microsoft Transaction Server. The FoxISAPI library has been enhanced in Visual FoxPro 6.0 to provide better performance and also to provide support for Internet Information Server 4.0.

Microsoft Transaction Server Support

Microsoft Transaction Server combines the flexibility and low cost of desktop applications with the mission-critical transaction-processing features normally found in high-end mainframe systems. Transaction Server is a component-based transaction processing system for developing, deploying, and managing high-performance, scalable, and robust enterprise, Internet, and intranet server applications. Transaction Server defines an application programming model for developing distributed component-based applications. It also provides a run-time infrastructure for deploying and managing these applications. Application developers who rely upon these services to make their applications scalable and robust can focus on solving their business problems rather than on developing a system infrastructure.


Figure 1: Use Microsoft Transaction Server to manage and scale Visual FoxPro COM components.

Microsoft Transaction Server provides scalability to applications by maintaining a pool of running instances of components. When a user requests the services of a middle-tier server, Transaction Server will satisfy that request with one of the instances from the pool. When the user is finished using the component it becomes available to others users. Both of these activities occur automatically, with no coding required.

For Transaction Server to create the pool of running instances, COM components must support apartment model threading. Visual FoxPro 6.0 COM components are apartment model threaded and fully support Transaction Server. Developers can build middle-tier COM components with Visual FoxPro 6.0 and scale them to hundreds of users and more.

Each Transaction Server object has an associated context object that contains information about the object's execution environment, including security and transaction information. It is also used by the component to communicate with Transaction Server. Once a reference to the object context is obtained, the component can use the SetComplete method of the context object to indicate that its work was completed successfully, or it can use the SetAbort method to indicate that the work was unsuccessful. Both of these methods also tell Transaction Server to release the object so that others can use it. If the component is participating in a transaction, SetComplete tells Transaction Server to commit the transaction, while SetAbort tells Transaction Server to roll it back.

The following code is taken from a component that is called when a customer deposits or withdraws money from a bank account. Two parameters are passed: nAccountNo contains the account number and nAmount is the transaction amount. The code first gets a reference to the context object and then connects to SQL Server to perform the deposit or withdrawal. The code then checks the current balance. If it is negative the transaction is rolled back.

* Get the object context

oMTX = CreateObject("mtxas.appserver.1")

oContext = oMTX.GetObjectContext()

* Connect to SQL Server using a database connection

nHandle = SQLConnect("cnMTXSamples")

* update the balance

cSQL = "UPDATE Account SET Balance = Balance + $" + ;

AllTrim(Str(nAmount, 10, 2)) + ;

" WHERE AccountNo = " + AllTrim(Str(nAccountNo))

nRet = SQLExec(nHandle, cSQL)

* get resulting balance which may have been further

* updated via triggers

cSQL = "SELECT Balance FROM Account " + ;

"WHERE AccountNo = " + AllTrim(Str(nAccountNo))

nRet = SQLExec(nHandle, cSQL, 'c_balance')

* check if account is overdrawn

If nBalance < 0 Then

cResult = "Error: Account " + AllTrim(Str(nAccountNo)) + ;

" would be overdrawn (" + AllTrim(Str(nBalance)) + ")."

oContext.SetAbort()

Return -1

EndIf

* Disconnect from SQL Server

SQLDisconn(nHandle)

* Everything worked so commit the transaction

oContext.SetComplete()

Easier to Learn and Use


Visual FoxPro is an extremely powerful application development tool. Its data-centric, object-oriented language offers developers a very robust tool set. Object-oriented programming provides a high degree of reuse and consistency across applications. However, many developers find that moving from procedural coding to object-oriented programming has a steep learning curve.

Visual FoxPro 6.0 reduces this learning curve and simplifies programming by providing a set of prebuilt class libraries that developers can use as-is to provide common functionality to applications. The new Application Wizard uses these classes to create a fully object-oriented framework for building database solutions. The new Application Builder is used to add forms and reports to applications that use this framework. Finally, new and enhanced wizards simplify the overall development process.

Visual FoxPro Foundation Classes

The reuse afforded by object-oriented programming can greatly reduce development time because classes can be used in multiple places within and across applications. The key to achieving this efficiency lies in building a broad collection of class libraries-when functionality is needed, a designed, written, and tested class is available. Creating such a collection can be difficult. Initial attempts by developers new to Visual FoxPro often result in class libraries that need improving. And if the class library must be rewritten after each use, the benefits of reuse are lost.

Visual FoxPro 6.0 ships with the Visual FoxPro Foundation Classes, over 100 prebuilt, reusable classes developers can easily add to applications. The Foundation Classes provide common functionality such as data manipulation, update conflict detection, data retrieval, searching, hyperlinks, and much more. Because these prebuilt classes cover functions needed in many or all applications, developers will realize significant time savings.

Developers can use these classes as-is or subclass them to add or modify functionality. In addition, the source code for the foundation classes is included so developers can change the base behavior of any of the classes.

Object-Oriented Application Framework

An object-oriented application framework consists of a generic set of classes that form the core, or foundation, of an application. The main benefit of an application framework is that developers do not need to rewrite this core code each time they build an application. And since the framework is a set of classes, it can be subclassed to provide application-specific functionality.

Creating a full-featured, robust, well-designed, and well-coded application framework can be a daunting challenge, especially for developers who are new to Visual FoxPro. Therefore, developers have too often missed out on the full benefits of object-oriented programming. They may have used object-oriented programming in an application, but the application itself was not fully object-oriented.

Visual FoxPro 6.0 ships with a default application framework that is part of the Visual FoxPro Foundation Classes. Developers can use the framework as-is or modify it as they see fit. The framework includes a main program, which starts the application, a main menu, and an application object that controls the application and is responsible for managing menus, forms, reports, and data.

Application Wizard

The Application Wizard has been rewritten to use the default application framework. The Application Wizard will build a fully object-oriented skeleton application, consisting of a main program and a main menu. Developers can then add the data, forms, reports, and so forth that provide the application's features.

The Application Wizard ensures that developers receive the benefits of the new application framework, even if they have not mastered object-oriented programming. Experienced developers can modify or extend the application's framework. In addition, applications built with the application framework are an excellent tool for learning object- oriented programming techniques.

Application Builder

The Application Builder provides an easy way to add data, forms, and reports to a project that is based on the new application framework. Forms and reports must be "hooked in" to the framework because routines in the framework call them. The Application Builder understands how to add project elements to projects that are based on the default framework.

The Application Builder's Data tab can be used to automatically generate new forms and reports and add them to the project. Simply select one or more tables and then check whether to create forms, reports, or both. Choose Generate to automatically invoke a wizard to build the forms and reports.

Figure 2: Use the Application Builder to quickly build forms and reports from your data.

The Application Builder's General and Credits tabs can be used to specify general information about the project, such as the name of the application and the name and company of the developer. The Forms and Reports tabs are used to add existing forms and reports to the application.

The combination of the application framework, the Application Wizard, and the Application Builder in Visual FoxPro 6.0 makes it easy for all developers, from novices to experts, to realize the benefits of object-oriented programming.

New and Enhanced Wizards

Visual FoxPro 6.0 ships with more than 20 wizards that automate common and complex tasks. Improvements have been made to existing wizards to provide more functionality and more choices for creating application elements such as forms and reports. In addition, there are new wizards for creating databases and publishing data to the Web.

Database Wizard

The Database Wizard uses templates to create databases and tables. Developers can choose from such templates as contacts, time and billing, order entry, and expenses and then create complete databases from the templates. The wizard helps the developer select the primary key for each table, choose which indexes to include to speed up searching, and determine the relationships between tables. The wizard can also populate the tables with sample data.

Web Publishing Wizard

The Web Publishing Wizard generates an HTML file created from records in a data source the user specifies. After selecting the data source, the fields to display, and a sort order, the wizard provides a choice of several different data layouts and visual styles to determine how the finished page looks. The user can preview the various layouts and styles and can then generate and save the HTML page.


Figure 3: The Web Publishing Wizard provides a variety of layouts and styles for creating HTML pages.

Included in the data layouts are "Static" layouts that work with any browser and "Tabular" layouts that utilize Internet Explorer 4.0 data binding with the Tabular Data Control. The Web Publishing Wizard has an open architecture that allows the developer to add layouts and styles. Therefore, if developers create data layouts that use Active Server Pages or the Remote Data Services of ActiveX Data Objects (ADO) or a visual style that uses XML, these can be easily added to the wizard for future use.

More Productive Development Environment


Developers will find that the enhanced set of tools in Visual FoxPro 6.0 provides them with a development environment that is even more productive and extensible than before.

Year 2000 Compliance

Visual FoxPro 6.0 has been enhanced to provide better Year 2000 date support. This is extremely important for database applications, which almost always handle dates.

The fundamental Year 2000 problem is created by the convenience of not having to specify all four digits of a year. For instance, consider the following code:

dBirthDate =

What date does this represent? Is it October 11, 1912, or is it October 11, 2012? Or is it November 10, 1912, November 12, 1910, or November 12, 2010? Because this date constant is ambiguous, the application is left to make the best guess it can.

This ambiguity can introduce errors into existing Visual FoxPro code wherever Date or DateTime constants or expressions are compiled or evaluated at run time, such as in report and object expressions. If an application containing the preceding code is written in the United States in 1999, but is recompiled in Italy in 2000, the behavior of the application can change because the meaning of the date will change.

To avoid this problem, a strict date format is now available in Visual FoxPro 6.0. A strict date always evaluates to the same Date or DateTime value regardless of the computer's date settings. The strict date format is:

^yyyy-mm-dd[,][hh[:mm[:ss]][a|p]]

The caret character (^) denotes the strict date format and causes Dates and DateTimes to be interpreted in a consistent YMD format. So if the preceding code were rewritten as follows, it would always represent the same date, October 11, 1912.

dBirthDate =

The General tab of the Options dialog box includes a Year 2000 Compliance drop-down list box that can be used to enforce Year 2000-compliant date constants and date strings. Setting the Strict Date Level to 1 requires that all Date and DateTime constants be in the strict date format. Any Date or DateTime constant that is not in the strict format or evaluates to an invalid value will generate an error, either during compilation or at run time. So a program or method that set the variable dBirthDate to an ambiguous date would not compile.

Figure 4: Set the Strict Date Level option to enforce automatic Year 2000 compliance in code.

Active Documents

An Active Document is a Windows-based, non-HTML application embedded in a browser. It provides a way to access the functionality of that application from within the browser interface. Visual FoxPro 6.0 Active documents can consist of single forms or entire applications. Visual FoxPro Active Document applications can run forms and reports, run code, and manipulate data, but they have the added advantage of being run in an Active Document container, such as Internet Explorer.

Active Documents provide an evolutionary step from pure Visual FoxPro client applications to applications that use a client interface based on HTML. They provide an easy way to migrate existing applications to the Web and bring the functionality of Visual FoxPro to the browser.

Active Documents also provide an easy mechanism for upgrading applications. When an Active Document is updated, users get the latest version automatically the next time they navigate to it.

Using an Active Document instead of script allows the code to be hidden from the user. In contrast, when users enter information in a form on an HTML page that uses Visual Basic, Scripting Edition or JScript to validate the their entries, they can easily view the source code for that page and see the rules used to validate the data.


Figure 5: Running a Visual FoxPro Active Document in Internet Explorer is an excellent way to migrate existing applications to the Web.

An Active Document host, such as Microsoft Internet Explorer, communicates with a Visual FoxPro Active Document by means of an ActiveDoc object, which is an instance of the new ActiveDoc base class. Event code contained in the ActiveDoc object controls what happens when various events occur. For instance, the following code in the Run event of the ActiveDoc object causes a form to appear when the user navigates to the Active Document.

Do Form customer

Read Events

The following code in the ContainerRelease event of the ActiveDoc object causes the form to go away when the user navigates away from the Active Document.

Clear Events

Component Gallery

Over time, developers can accumulate large libraries of reusable classes. They may create some themselves and inherit many others. And more than 100 reusable classes ship with Visual FoxPro 6.0.

Managing classes can be frustrating and time-consuming. Classes are stored in class library files that can contain multiple classes. They can be stored on the developer's machine or on another machine on the network. Some classes are used often, while others are used only occasionally.

The Component Gallery dramatically simplifies the management of class libraries by providing a visual way to organize and use classes. Developers can organize class libraries into groups called catalogs. These catalogs make it very easy to categorize, locate, and use classes in application development. The Component Gallery ships with several default catalogs that cover basic areas of functionality. It also ships with a catalog for the Visual FoxPro Foundation Classes. And of course, developers can create their own catalogs and add classes and other components to them.

Components can be dragged from the Component Gallery and dropped onto design surfaces such as projects or forms. They can also be added from shortcut menus. For example, a catalog in the Component Gallery could store a variety of data navigation buttons. When a particular set of buttons is needed for a form, rather than searching for it on disk or on the network, a developer can locate the desired class in the Component Gallery and then add it directly to the form.


Figure 6: Use the Component Gallery to organize class libraries and to make locating classes easier than ever. Once you locate the class you want, you can easily add it to a form or project.

Coverage Profiler

To test the code and performance of an application, the coverage logging option (introduced in Visual FoxPro 5.0) creates a text log file with information about lines of code as they are executed. The information in the log includes the line of code, its location, and its execution speed. But because the log file in version 5.0 contained only raw data, developers had to create their own applications to read and display it usefully.

In Visual FoxPro 6.0, the Coverage Profiler analyzes the raw performance data and presents information on which lines of code ran and how long they took, in a form that can be easily reviewed. Developers can test the validity of their test plans by checking which lines of code are being executed. They can also perform "profiling" to determine bottlenecks and other performance problems in their code. Developers can build applications and components that not only run faster, but also are better tested.


Figure 7: Find performance bottlenecks by using the Coverage Profiler to see how long each line of code took to run.

The Coverage Profiler consists of a two-paned window; objects and source files are displayed in the top pane, and the code for a selected object or source file in the bottom pane. In coverage mode, the bottom pane shows each line of code and includes a mark to indicate whether or not the line of code was run. In profile mode, the bottom pane shows each line of code and the number of times it was run, the time it took to execute the first time, and the average time it took to execute. Users can toggle between modes to see either view.

OLE Drag and Drop

The ability to share data between applications contributes significantly to the ease of use of the Windows platform. For example, data from Microsoft Excel can be added to a report in Microsoft Word by highlighting the cells and moving them into Word using a drag-and-drop operation. The spreadsheet file can also be dragged from the Windows Explorer into Word. Both of these actions embed the spreadsheet into the report document. Double-clicking the spreadsheet in Word launches Excel, where the data can be edited in its native format.

Visual FoxPro 6.0 now provides the same OLE Drag and Drop benefits to developers using Visual FoxPro. At run time, users can move data between controls in a Visual FoxPro-based application, or between controls and other Windows-based applications that support OLE Drag and Drop capabilities. For instance, text from Microsoft Word can be moved into a text edit region on a Visual FoxPro form.

Design-time support for OLE Drag and Drop in Visual FoxPro makes application development faster than ever before. For instance, dropping a file into the Project Manager adds the file to the project, while dropping a table into the Database Designer adds the table to the current database. In addition, text can be easily moved or copied from other applications, such as Word, to the Command window and the Visual FoxPro text editors.

Access and Assign Methods

Visual FoxPro has been enhanced to support Access and Assign methods that execute code when the value of a property is queried or when a user attempts to change the property's value. This feature allows developers to exercise more control over the users' actions. The code in an Access method is executed when a user reads the value of a property. The code in an Assign method is executed when a user attempts to change the value of a property.

Figure 8: Use Access and Assign methods to run code when properties are read or changed.

Access and Assign methods enable validation code for properties to be part of the class definition. For example, the following code uses DEFINE CLASS to create a custom class named Customer. Two user-defined properties are created for the customer class: CreditLimit and Password. An Access method for Password is created with the first PROCEDURE statement. When the Password property value is queried, the code in the Access method is executed. This code checks to see if the property is protected. If it is (the hidden property PasswordProtect is set to true), the user will not be allowed to see the password.

An Assign method for CreditLimit is also created, again with a PROCEDURE statement. This code is used to validate the credit limit. When an attempt is made to change the property value, the code in the procedure ensures that the credit limit does not exceed $2,500. If the user tries to set the credit limit to more than the allowed value, an error message is returned and the credit limit is set to its maximum value of $2,500.

Define Class customer As custom

CreditLimit = 0

Password = "secret"

Hidden PasswordProtect

PasswordProtect = .T.

Procedure Password_Access

If This.PasswordProtect

Return "The password is a secret."

Else

Return This.Password

EndIf

EndProc

Procedure CreditLimit_Assign()

LParameters nLimit

If nLimit > 5000

This.CreditLimit = 2500

MessageBox("Credit limit can't be more than $2500!")

Else

This.CreditLimit = nLimit

EndIf

Return This.CreditLimit

EndProc

EndDefine

The Access and Assign method code is part of the definition of the custom class and will run whenever these properties are used in code. The developer does not need to remember to write code to validate the credit limit-it happens automatically. If the maximum credit limit changes, the change needs to be made only in the Assign method code. It will then be in effect wherever the CreditLimit property is used.

Project Hooks

In previous versions of Visual FoxPro, the only access to projects was through direct manipulation of the project file (projects are stored in .pjx files, which are tables). Developers who wanted to build tools to extend the features of the Project Manager had to access and modify these tables manually. In addition, there were no project-level events that developers could use to take actions when files were added to or removed from a project.

To give programmatic access to the Project Manager and to create project-level events to which code can be attached, Visual FoxPro 6.0 has added project hooks. A ProjectHook is a simple, nonvisual Visual FoxPro base class that is associated by the developer with a project. Developers can create their own custom ProjectHook classes by subclassing the ProjectHook base class. The default ProjectHook class

or subclass to be used when creating new projects can be set through the Projects tab in the Options dialog box.

Figure 9: Use the Options dialog to specify the project hook to use the next time a new project is created.

Developers can attach code to the events contained in the ProjectHook class. This code is triggered whenever a project event occurs. Project events include adding, modifying, removing, and running files, as well as building the project or using OLE Drag and Drop to add files to the project. Whenever a Project is opened, its associated project hook is instantiated, and when events occur, the associated code is run.

Project hooks give developers the ability to take advantage of or control project actions. For example, code can be used to send an e-mail notification or add to a log file when files are added or removed in a project. Because the project uses the project hook, this code runs automatically whenever the appropriate actions occur. Developers don't have to remember to log file actions.

As another example, code in the project hook tied to the project's OLEDragDrop event would be called whenever OLE Drag and Drop is used to add a file to the project. This code could determine the type of file and launch a corresponding wizard.

Enterprise Application Development


Windows Distributed interNet Applications Architecture

In order to meet the needs of enterprise development, Microsoft introduced the Windows Distributed interNet Applications (DNA) framework. Using the DNA framework, customers can build scalable, multitier business applications that can be delivered over any network, provide open access to diverse data sources across different platforms, and be freely accessed by any client computing platform. In turn, Visual Studio, Enterprise Edition is the complete development tools suite for addressing all aspects of enterprise application development based on the DNA framework.


Figure 10: Visual Studio is the complete development tools suite for building enterprise applications for the Windows DNA framework. Windows DNA enables corporations to develop cross-platform applications that can access data sources on any server environment including Windows NT, UNIX, and SNA-based systems.

Visual Studio, Enterprise Edition

By acquiring Visual Studio, Enterprise Edition, developers using Visual FoxPro 6.0 receive important new enterprise development features for building Windows DNA-based applications. These features, integrated directly within the Visual Basic 6.0 development environment, include:

Enterprise database support, including the Enterprise Visual Database Tools for schema and stored procedure design on Oracle and SQL Server databases; a development version of SQL Server 6.5; and a development version of SNA Server 4.0 with connectivity to VSAM and DB/2 databases on AS400 and IBM mainframes.

Enhanced life cycle productivity, including Microsoft Visual Modeler 2.0 for designing multitier applications based on the Universal Modeling Language (UML); as well as Visual Studio Analyzer for performance profiling and analysis of multitier applications.

Team development support, including a distributed, team-based Web development system, Visual SourceSafe 6.0 source code control system, Microsoft Repository, and Visual Component Manager 2.0 for organizing and sharing reusable business components across teams.

Integrated application services, including a complete developer edition of Microsoft BackOffice 4.5

Universal Data Access

Universal Data Access is Microsoft's strategy for providing high-performance access to all types of information (including relational and non-relational data) across organizations, from the desktop to the enterprise. Universal Data Access enables all Visual Studio tools to access any data source on any platform. Universal Data Access consists of three core technologies: OLE DB, Open Database Connectivity (ODBC), and ActiveX Data Objects (ADO).

OLE DB and ODBC

OLE DB is Microsoft's system-level programming interface to diverse data sources. OLE DB specifies a set of Microsoft COM interfaces that encapsulate, or hide, various database management system services. OLE DB is designed for non-relational as well as relational information sources on disparate platforms. These include electronic mail and file system stores; text, graphical, and geographical data; and custom business objects.

ODBC continues to provide standard access to most relational database systems on the market. In addition, the OLE DB Provider for ODBC uses existing ODBC drivers to access relational data.

All Visual Studio 6.0 tools include new Microsoft-developed OLE DB providers and/or ODBC drivers to Microsoft SQL Server, Microsoft Access, Microsoft FoxPro®, Oracle, and AS/400 VSAM databases. In addition, third-party OLE DB providers and ODBC drivers are available for other database systems including Informix, Sybase, IBM DB/2, and most others. Independent software vendors can also easily create custom OLE DB providers to their own proprietary storage formats.

ActiveX Data Objects

ADO is Microsoft's strategic, high-level interface to data, completely isolating developers from the underlying OLE DB and ODBC technologies. ADO supplies an open, application-level data access object model that allows corporate programmers to write database applications over OLE DB data using any language. All of the Visual Studio tools can use ADO to access data. Through ADO, developers now have access to more types of data than ever before and will need to spend far less time writing complex client/server code.

Figure 11: The Universal Data Access Architecture provides a unified layer of interoperability across multiple, traditional and non-traditional data sources. These data sources can be located on any platform, such as Windows NT®, UNIX, and SNA-based host environments.

Visual Database Tools

The Microsoft Visual Database Tools, available in Visual Studio, Enterprise Edition, provide extensive support for building data-centric applications rapidly. The Microsoft Visual Database Tools include:

Data View. Connect to and explore any ODBC or OLE DB database.

Query Designer. Design, execute, and save complex SQL queries.

Database Designer. Create and modify Microsoft SQL Server and Oracle databases, including individual tables and entire database schemas.

Stored Procedure Editor. Create and edit Microsoft SQL Server and Oracle stored procedures using a color-coded editor.

Stored Procedure Debugging. Remotely debug stored procedures on Microsoft SQL Server 6.5 databases.

Database Projects. Manage databases from a central project, including integrated source code control for stored procedures, database scripts, and SQL queries.

Object Modeling

With Visual Studio and Visual FoxPro 6.0, developers can rapidly create distributed applications consisting of reusable components. To harness this power, developers need to think in terms of business components and software architectures. As the number of components in an application increases, its complexity increases as well. Modeling is a very important design tool for making component-based development scalable for enterprise and Internet applications.

Microsoft Visual Modeler makes it easy to create, enhance, and maintain applications by helping developers build models of their applications regardless of their complexity. Visual Modeler provides modeling tools for the analysis, design, and implementation of component-based applications. It provides a graphical user interface for constructing and modifying prototypes of projects, applications, components, or structures in order to create and manage reusable objects. Visual Modeler is available in Visual Studio, Enterprise Edition.


Figure 12: Get a better understanding of your applications by modeling them with Visual Modeler.

Visual FoxPro Connection Wizards

The Visual FoxPro Connection Wizards include the Code Generation Wizard and the Reverse Engineering Wizard. These wizards connect Visual FoxPro classes to the object model abstractions and tools of Visual Modeler. With the Code Generation Wizard, developers can import a Visual Modeler object model to Visual FoxPro. With the Reverse Engineering Wizard developers can export Visual FoxPro classes to a Visual Modeler object model.


Figure 13: Use the Connection Wizards to create Visual FoxPro classes from a Visual Modeler model, and vice versa.

These wizards enable developers to model objects in Visual Modeler and then create the code for the associated class libraries. They can also take existing class libraries and generate a model in Visual Modeler. The wizards also provide for round-trip engineering or code-to-model/model-to-code generation. Round-trip engineering takes two forms in Visual Modeler:

If developers do not have a design model of their system, they can reverse-engineer a new model from the code that was written prior to using Visual Modeler.

Developers can use the Reverse Engineering Wizard to round-trip engineer a model to synchronize it with existing Visual FoxPro code. Information entered into the code is generated into the model. Information entered into the model is generated into the code using the Code Generation Wizard.

Visual Modeler thus enhances the developer's ability to develop scalable applications. Round-trip engineering mirrors the way developers work by making a quick model of an application under development, implementing it, and then refining it based on an ever-increasing understanding of the problem. Visual Modeler and Visual FoxPro work back and forth in round-trip engineering as the model and code evolve.

Data View

Data View enables developers to examine all databases used in a project and quickly and easily integrate database objects into an application. Developers can use Data View to view table structures, database views, stored procedures, and other database objects directly within the development environment, as well as to view and change the actual data in a convenient grid pane.

Query Designer

The SQL Query Designer is a powerful tool that enables visual creation of ANSI SQL as well as back end-specific SQL statements. After establishing the connection to the desired database, developers can use the Query Designer to design, view, and execute the query, as illustrated in the figure below. By dragging and dropping tables to the Design pane, the SQL is automatically created. The Query Designer will automatically recognize database relationships and generate the appropriate join conditions. Developers can work directly in any pane (Diagram, Grid, SQL), and their changes will be reflected in the other panes. Queries can be directly tested and the results viewed in the Results pane.


Figure 14: The SQL Query Designer makes it easy to visually construct and test complex SQL statements against any data source.

Database Designer

Developers using Visual FoxPro 6.0 and Visual Studio, Enterprise Edition can use the Database Designer to visually create and modify SQL Server and Oracle databases. For example, developers can create, edit, or delete database tables using the graphical designer. Based on visual operations, the DDL scripts are automatically generated by the Database Designer. These scripts can be directly applied to the database (assuming the developer has the required access permissions), or saved to a file for review and execution by a DBA. Developers can also create database diagrams that graphically represent the tables and relationships in the database. These diagrams can be used to create, modify, or delete foreign-key relationships between tables, as well as any indexes and constraints attached to them. Developers can share database diagrams across teams to visualize the structure of the database tables and their relationships and to provide different visualizations of complex databases.


Figure 15: The Database Designer enables developers to graphically create and modify database schemas directly within the development environment.

Stored Procedure Editor

Developers using Visual Studio, Enterprise Edition can view, implement, edit, and test SQL Server stored procedures (T-SQL) and Oracle subprograms (PL/SQL) using a color-coded stored procedure editor.

Stored Procedure Debugging

Using integrated SQL debugging for Microsoft SQL Server, developers can also debug stored procedures from directly within the development environment. Developers can step directly from source code executing on a calling computer to Microsoft SQL Server 6.5 stored procedure source code executing on a remote server computer.

Database Projects

Database projects enable developers and database administrators to manage databases from directly within Visual Studio. Database projects organize database designs and database-related functions such as SQL queries, database scripts, stored procedures and database diagrams in one central project. New with Visual Studio 6.0, developers can place a database project under source control to enable versioning of common database objects such as SQL queries, stored procedures, and database scripts. This enables developers to easily roll back database changes to previous versions, or to quickly apply a common set of scripts across different databases to ensure they are synchronized.

Visual Component Manager

The Visual Component Manager (VCM) makes it easy for teams of developers to share a wide range of component types, enabling effective component and code reuse both within a development team and across an entire organization. The VCM allows developers to easily publish, find, and catalog components, including ActiveX controls, COM Components, Java Applets, HTML and ASP pages, and source code projects and snippets.


Figure 16: The Visual Component Manager catalogs components and makes it easy to reuse them.

The Visual Component Manager's native store is the Microsoft Repository 2.0, allowing components to be stored on either SQL Server or Microsoft Access databases. The VCM allows many repository databases to be open simultaneously, so the developer is able to maintain a set of component repositories-for example, a personal component repository on Access, a project team component repository on SQL Server, and an organization-wide repository on SQL Server. Both the VCM and the Repository will be extensible through SDKs, allowing third parties and end users to build repository applications and VCM handlers to manage their specific component types.

The VCM allows developers to manage their components using the familiar Explorer UI: a tree view of components, the component list view, the properties pane, and the component properties dialog. The Publish and Export Wizard enables the publishing, republishing, and extraction of components. A developer can also search for an existing component in the repository through the component manager. The Visual Component Manager enables teams of developers to reuse components in large development projects by being the "librarian" of components.

Conclusion


Visual FoxPro 6.0 continues the evolution of FoxPro from a procedural desktop database development system to an object-oriented development environment. It has the tools developers need to build state-of-the-art client/server and Internet database applications, as well as build data-intensive components that can be used with a variety of front ends and back ends. Version 6.0 adds several important enhancements designed to make the product capable of building high-performance, scalable components that are easier to learn and use, and more productive and extensible. Visual FoxPro 6.0 provides a very powerful tool for developers using FoxPro to participate in enterprise application development based on the Windows DNA framework.

Features Overview


Build High-Performance, Scalable Components

New Feature

Description

Improved Type Libraries

Create components with complete and accurate type libraries, ensuring that the components work well with other applications.

Build Web Applications

Use Visual FoxPro COM components as an integral part of Web-based applications where the COM component retrieves data, and creates HTML on the fly based on the data.

Microsoft Transaction Server Support

Build middle-tier COM components with Visual FoxPro 6.0 and use Microsoft Transaction Server to scale them to hundreds of users and more.

Easier to Learn and Use

New Feature

Description

Visual FoxPro Foundation Classes

Choose from more than 100 prebuilt, reusable classes that provide common functionality and that are easily added to applications.

Object-Oriented Application Framework

Build applications using an object-oriented application framework consisting of a generic set of classes that form the core, or foundation, of an application.

Application Wizard

Build a skeleton application based on the default object-oriented application framework.

Application Builder

Easily add data, forms, and reports to projects based on the new application framework.

Database Wizard

Create complete databases based on such templates as contacts, time and billing, order entry, and expenses.

Web Publishing Wizard

Generate an HTML file created from records in a data source.

More Powerful and Extensible

New Feature

Description

Year 2000 Compliance

Use the strict date format to avoid the problem of ambiguous dates.

Active Documents

Migrate existing applications to the Web and bring the functionality of Visual FoxPro to the browser.

Component Gallery

Simplify the management, organization, and use of class libraries.

Coverage Profiler

Test the validity of test plans by checking which lines of code are being executed and perform "profiling" to determine bottlenecks and other performance problems in code.

OLE Drag and Drop

Move data between Visual FoxPro controls and other Windows-based applications and enjoy easier application development.

Access and Assign Methods

Build validation code for properties into class and object definitions.

Project Hooks

Write code that is run when project-level events occur.

Enterprise Application Development

New Feature

Description

Windows Distributed interNet Architecture

Build component-based solutions that integrate client/server and the Web.

Universal Data Access

Connect to most major database systems through ODBC or OLE DB.

Object Modeling

Build better components and applications by modeling objects in Visual Modeler.

Connection Wizards

Create Visual FoxPro classes from an object model or generate an object model from classes.

Data View

Examine all databases used in a project and quickly and easily integrate database objects into an application.

Query Designer

Establish a connection to a database and then use the Query Designer to design, view, and execute queries.

Database Designer

Visually create and modify SQL Server databases.

Stored Procedure Editor

View, implement, edit, and test SQL Server stored procedures and Oracle subprograms.

Stored Procedure Debugging

Debug Microsoft SQL Server stored procedures from directly within the development environment.

Database Projects

Manage databases from directly within Visual Studio.

Visual Component Manager

Share a wide range of component types, enabling effective component and code reuse.

Visual SourceSafe Integration

Control source code with check-in/check-out and file locking.

Visual FoxPro 6.0 Frequently Asked Questions


What is the role of Visual FoxPro in Visual Studio?

Visual FoxPro can be used at any level of a distributed, multitier application. Visual FoxPro can supply the user interface. Forms and form controls are objects with a full range of properties, methods, and events. ActiveX controls can be used on forms and can even be subclassed to extend their features.

Visual FoxPro can be used to write middle-tier components. Data retrieval and manipulation, querying, and reporting have long been strengths of FoxPro. Visual FoxPro can be used to make data-intensive COM components, which can be called from any front end or Internet server. The components can talk to FoxPro databases and SQL databases through ODBC and OLE DB.

FoxPro can be used to store data. Visual FoxPro has a blazingly fast database engine and can handle huge amounts of data. In addition, Visual FoxPro and a SQL database make a great combination, with the SQL engine handling transaction processing and Visual FoxPro handling offloaded querying or batch processing.

How can I use Visual FoxPro with the other tools in Visual Studio?

Visual FoxPro 6.0 can be used to create data-intensive COM components that can scale to hundreds or thousands of users. These components can be used with the other tools in Visual Studio. For instance, a Visual Basic-based application may use a Visual FoxPro component that enforces business rules or performs data validation against SQL Server or Oracle data. In addition, a Web application built using Visual InterDev can use Visual FoxPro COM components.

Can I use Visual FoxPro to build Web applications?

Visual FoxPro COM components can be used with Internet Information Server (IIS) to build high-powered Internet database applications. Visual FoxPro components can be called from Active Server Pages. The components will typically retrieve and manipulate data and build some of the HTML returned to the user. A direct route is also available through the FoxISAPI library, whereby talks IIS directly to the component. In this case the component is responsible not only for working with data, but also for constructing the entire HTML page. And, of course, the two approaches can be combined.

Does Visual FoxPro support Microsoft Transaction Server?

Visual FoxPro 6.0 has full support for Microsoft Transaction Server. COM components built with Visual FoxPro 6.0 can be managed in the Microsoft Transaction Server Explorer and can be scaled to hundreds or thousands of users. They can also participate in transactions with other components.

Why would I build a component in Visual FoxPro when I can build the same component in Visual Basic, Visual C++, or Visual J++?

Visual FoxPro components are extremely fast, thanks to the data-centric language of Visual FoxPro and its ability to retrieve and manipulate data very quickly. Further, Visual FoxPro can build character strings very swiftly. A Visual FoxPro component that works with data and returns HTML will therefore typically be very fast.

Visual FoxPro also has object-oriented programming capabilities, including inheritance. This provides a high degree of reuse across applications. A Visual FoxPro developer could create a set of classes that includes the core functionality of a Web database component. That code would not need to be rewritten each time a component was needed in a Web application. The developer could merely create a component that inherits the base functionality and then add to it application-specific code.

Finally, building COM components in Visual FoxPro 6.0 is an excellent way to reuse existing code. Code that is already written and tested can be built into a component, rather than being recreated in another language.

What are Microsoft's plans for future versions of Visual FoxPro?

Visual FoxPro is an important part of Visual Studio and fully supports the Visual Studio vision of building multitier client/server and Web-based applications. Future versions of Visual Studio will take advantage of enhancements to Windows DNA provided by the Windows NT® operating system version 5.0 and COM+, a significant enhancement to the Component Object Model.

What is Microsoft's commitment to developers using Visual FoxPro?

Visual FoxPro is an important part of Visual Studio and fully supports Windows Distributed interNet Application (Windows DNA) architecture for creating modern, scalable, multitier business applications that can be delivered over any network. The Visual FoxPro design tools and its object-oriented, data-centric language, fast data engine, and component creation capabilities make it an extremely powerful way for developers to participate in Windows DNA application development.

The hundreds of thousands of developers worldwide using FoxPro have an enormous investment in code and existing applications. Visual FoxPro is the best way for these developers to move to the 32-bit Windows operating system and to take advantage of their existing investments. Visual Studio is the best way for developers to build applications using the Windows DNA framework. That is why Visual FoxPro ships in the Visual Studio box. Microsoft is fully committed to Visual FoxPro and to providing developers with a clear path forward for using it within the Visual Studio family.

How do you position Visual FoxPro in relation to Microsoft Access?

Microsoft Access, the database in Office, is the most broadly used and easiest-to-learn database tool Microsoft sells. If you are new to databases, if you are building applications that take advantage of Microsoft Office, or if you want an interactive product with plenty of convenience, then choose Access. Visual FoxPro is a powerful RAD tool for creating relational database applications. If you are a database developer who builds applications for a living and you want ultimate speed and power, then choose Visual FoxPro.

Is Microsoft planning to release Visual FoxPro version 6.0 for the Macintosh?

There will be no future Macintosh versions due to low sales volumes on that platform. For Macintosh environments we recommend using Internet Explorer on the clients and Visual FoxPro with Internet Information Server on the server, to access any data source.

Visual FoxPro 6.0 Customer Scenarios


Surplus Direct

Surplus Software sells refurbished computer hardware and previous-version software. Their Surplus Direct Web site, built with Visual FoxPro and other Microsoft Visual Tools, is one of the busiest hardware and software resellers on the Web, consistently rated as one of the 10 busiest consumer shopping Web sites. It serves a daily average of about 30,000 unique visitors, with recorded peaks of more than 80,000. The site generates an average of 85,000 to 120,000 database hits, with peaks of more than 225,000.

Customers use the Web site online store to shop, browse inventory, and research product offerings. The site provides quick access to regular items, special sale items, and constantly changing offers, so customers want to come back. A list of weekly specials, specials displayed on rotating banners, and other Java applets provide an interactive feel to the site. New and extra-hot items are readily accessible from the main page. The dynamic inventory is generated from database information stored in a SQL Server database.

One of the essential enablers for the site is the ability to achieve tight integration between Visual FoxPro and IIS. IIS makes available the Internet Server API (ISAPI), which is used to create an integration layer for Web pages to interact with Visual FoxPro. Through ISAPI, the Web pages talk to Visual FoxPro COM components. These components retrieve data-such as information about a particular product-and combine it with HTML files to produce pages that the users read. Incoming requests in HTML become Visual FoxPro database commands, and custom Visual FoxPro classes turn SQL Server data into HTML. Thanks to the speed of Visual FoxPro at retrieving data and building strings, response times are typically sub-second.

State University of New York at Buffalo

The State University of New York at Buffalo needed a way to report on transfer credit
to students and their advisors using data maintained in a proprietary mainframe
system. Extracting data and developing reports in the proprietary system proved too slow and expensive.

The team moved the entire database into Oracle, providing ODBC access to the data. To allow custom searches and provide general access to the data, they then built ARIES (Articulation Reporting Information and Evaluation System), a three-tier, Web-based, search engine. The system gives students and faculty an easy way to check on current status, and lets prospective students figure out the consequences of transferring.

Visual FoxPro forms the middle tier in this solution (as well as providing some data storage). It was chosen because of its ability to handle large data sets and because it can create ActiveX servers. The overall system also uses Microsoft FrontPage® Web site creation and management tool, Aegis' FoxWeb, FoxISAPI, and Microsoft Internet Information Server.

Boeing

Boeing is the world's largest manufacturer of aircraft. Tracking market conditions and aircraft under construction is a key factor in maintaining its leading position. Several key reports aid in this process. Over a period of years, a number of applications evolved to produce these reports, but they used a combination of desktop and mainframe applications, required redundant data entry, and generally took too long.

The Skyline Program replaces those applications with a single Visual FoxPro-based application that produces all the necessary reports. The Skyline Program is currently used for the Boeing 767 and 747 models and is being phased in for the 737 and 757 during 1998. Overall, the program is expected to save Boeing about three-quarters of a million dollars per year.

Visual FoxPro was chosen for its ability to produce data-driven graphics, the power and flexibility of the Report Designer, its ease of learning and use, and more. Using the Report Designer to producing visually appealing reports that could compete with those produced by graphics packages was the biggest challenge. Cracking this problem was the key to acceptance of the application.

Open Software Solutions

Many applications are labeled as "mission-critical," but few are truly "life-critical. Visual CAD (Computer Aided Dispatching) from Open Software Solutions fits in the latter category. The application supports 911 emergency centers in tracking calls, dispatching emergency vehicles, and more.

Visual CAD both keeps track of emergency data (to allow reporting) and aids dispatchers in handling emergencies. When a new call is received, basic information like the caller's name, address, and phone number is automatically inserted into the call record based on phone company information. When an operator sends the call to the appropriate dispatcher (fire, police, ambulance, and so forth), Visual CAD can recommend which units should be dispatched, based on location of the emergency, current location of units, the nature of the call, and so forth.

Visual FoxPro was chosen for Visual CAD for its data handling speed, critical to an application of this nature, and its object orientation, which helped to create a consistent user interface, key to an easy-to-use system. Since dispatching is a 24x7 operation, the application was designed so that it can be updated without requiring all users to exit.

Automated Regional Information Systems

The ARIS System, produced by Automated Regional Information Systems, Inc., is an all-in-one package for Real Estate Multiple Listing Services and its member realtors. The system provides members of the Multiple Listing Service with access to multiple listing and sales data, tax records, contracts and forms, and pictures of the listed properties. The application also provides users with e-mail and Internet capabilities. The system maintains a local data store for each user, which it synchronizes with the master data source on demand. Public access to multiple listing records is also available through the Internet.

The front end was originally developed in FoxPro 2.6 and has been migrated to Visual FoxPro. Visual FoxPro was chosen for the strength of the database engine, its native SQL support, scalability to a SQL database, and its strong client/server support. The back end uses various Microsoft BackOffice products including Windows NT 4.0 with Internet Information Server, SQL Server 6.5, Exchange Server 5.0, and Proxy Server.

The ability to work offline when a connection is unavailable plus the improved quality of documents and data integrity have made the realtors' jobs easier.

Developer Community and Training


The Microsoft Developer Network

About MSDN

MSDN, the Microsoft Developer Network, is Microsoft's broad program for providing developers with the tools, technologies, education, information, events, and other technical material they need. MSDN resources have helped millions of developers create applications and solutions for the Windows operating systems, the Microsoft BackOffice family server application suite, Microsoft Office desktop applications and the Internet. MSDN is the largest developer community in the world. MSDN provides access to these resources in a number of ways:

MSDN Online

MSDN Online, located at https://www.microsoft.com/msdn/, is Microsoft's home page for developers. It is where Microsoft delivers information on all the developer resources that are available, as well as news, product and platform information, technical articles, sample applications, and in-depth features.

MSDN Online Membership

A free online program that gives developers access to additional content, including the MSDN Library Online, product downloads from third parties, and discounts from book and magazine publishers.

The MSDN Subscription Program

The CD-ROM subscription program offers a range of products, from the MSDN Library (which includes all our product documentation as well as technical articles, sample code, and backgrounders), to developer versions of our server platforms. Subscribers can choose from three levels:

MSDN Library subscription

Boost your productivity by using the most comprehensive programming information available. The Library subscription delivers quality information through quarterly updates to the MSDN Library on CD-ROM. A fundamental reference for developers using Microsoft development tools or targeting any Windows or Internet platform. The MSDN Library (2-CD set) contains more than 1.1 GB of technical programming information, including:

Sample code

Developer Knowledge Base

Visual Studio 97 Documentation

SDK Documentation

Technical Articles

Conference and Seminar Papers

Technology Specifications

MSDN Professional subscription

The Professional subscription provides the latest Microsoft systems technology and convenient access to development kits so you can build the latest Microsoft systems technology into your applications. Professional subscribers get the quarterly MSDN Library plus the complete MSDN set of Microsoft operating systems, SDKs, and DDKs including:

Windows 95 and Windows 98

Windows NT Workstation 4.0 and 5.0 (beta)

Windows NT Server 4.0 and 5.0 (beta)

Platform SDK

BackOffice SDK

Windows CE SDK and DDK

Professional Subscribers will also receive the latest updates to the products listed above for a full year.

MSDN Universal subscription

This comprehensive subscription provides the information, testing platforms, and the suite of Microsoft developer tools for any developer looking to integrate client/server solutions with Internet technologies. Universal subscribers get everything in the Professional subscription, plus the BackOffice Test Platform family of server products, Visual Studio 6.0, Enterprise Edition development tools, Office 97, Developer Edition, Microsoft FrontPage 98, and more, including updates and new releases shipped throughout the subscription year.

Microsoft Visual Studio 6.0, Enterprise Edition, includes:

Visual Basic 6.0

Visual C++ 6.0

Visual FoxPro 6.0

Visual InterDev 6.0

Visual J++ 6.0

Visual SourceSafe 6.0

Visual Studio 6.0 enterprise development tools

Microsoft BackOffice Test Platform includes:

Windows NT Server with Internet Information Server

Microsoft SQL Server

Exchange Server, Enterprise Edition

SNA Server

Systems Management Server

Transaction Server

Message Queue Server

Site Server with Microsoft Commerce Server

Universal Subscribers will also receive the latest updates to the products above for a full year.

Microsoft Mastering Series

Developers are required to move faster than ever these days to incorporate new technologies and tools into their solutions. Training tools, such as the Microsoft Mastering Series, deliver the technology and information developers need to extend today's applications to incorporate client/server and Internet technologies. Microsoft Mastering Series is a line of professional-level, content-rich, interactive training CD-ROM products that take advanced learning out of the classroom and into the real world. Each title in the Series delivers over 40 hours of professional-level instruction, to help developers jump-start their expertise in the new features and technologies included in Microsoft Visual Studio.

Mastering Series titles are designed to be a multimedia learning experience, incorporating sound, video, and animation throughout. All Mastering titles include interactive lessons, narrated demonstrations and animations, labs, self-check questions, sample code, expert tips and techniques, and a library of valuable reference materials that supplement the lessons and exercises. A flexible browsing and searching system lets developers navigate directly to articles, white papers, and other resources relevant to the task at hand.

Developers can either use the tools in each Microsoft Mastering Series title to follow a linear course which will take them step-by-step through the key concepts and methods, or they can select specific topics and focus on what they want to learn, when they want to learn it. This means developers can use Mastering Series titles not just for training, but also to solve time-critical problems. Whatever approach a developer takes, completing a Microsoft Mastering Series self-paced course will give developers the training they need to successfully master challenging application development projects.

For developers who are looking for classroom based training, the Mastering Series titles are the basis for the courses taught by Microsoft Solution Provider and Authorized Technical Education Centers (ATECS). By using the Mastering Series Training, developers can also prepare themselves for Microsoft Solution Developer certification, which demonstrates a developer's expertise to their clients and customers.

The Mastering Series is designed for experienced developers, not beginners. Content in each title is designed to build on a base of expertise in Windows-based programming.

Mastering Series courses cover all the hot topics from building basic Windows-based applications all the way to creating client/server solutions incorporating the latest Internet and COM technologies. Titles in the series include:

Mastering Microsoft Office 97 Development

Mastering Visual Basic Fundamentals

Mastering Visual Basic 6.0 Development

Mastering Enterprise Development Using Microsoft Visual Basic 6.0

Mastering MFC using Microsoft Visual C++ Fundamentals

Mastering MFC using Microsoft Visual C++ Development

Mastering Web Site Fundamental

Mastering Web Applications Using Visual InterDev

For More Information

For the latest information on Visual FoxPro, check out our World Wide Web site at https://www.microsoft.com/vfoxpro.



Gary DeWitt of MedSoft Inc in FoxPro Advisor 8/97.

Tamar Granor in FoxPro Advisor 12/97.

Microsoft FoxPro User Study, Feb. 1997.

Ibid.


Document Info


Accesari: 4296
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )