Microsoft Visual Basic for Applications and Windows DNA 2000

Ari Bixhorn
Microsoft Corporation

January 2000

Summary: This article describes the role of Visual Basic for Applications (VBA) in customizing and extending the functionality of Windows DNA applications. It provides a high-level overview of Microsoft’s framework for distributed systems and outlines the architecture and benefits of using VBA to tailor these applications. (6 printed pages)

The Need for Middle-Tier Customization

In today’s dynamic business environment, professional software applications demand not only functionality, but also flexibility.  For an organization to remain competitive, its IT systems must be responsive to changes in business and user requirements.  Microsoft® Visual Basic® for Applications (VBA) addresses this need by enabling applications to be customized and integrated with one another.  The requirements for customization become more complex, however, when traditional rich-client applications are factored across multiple tiers and moved into a distributed environment.  Not only must the developer be able to tailor the look and feel of the local client, or presentation tier, but they must also be able to customize the business logic, now isolated in discrete components and stored in a separate logical location—the middle tier.

VBA 6.0 enables developers to seamlessly bridge the gap from client to middle tier customization.  This document provides a high-level overview of Microsoft’s framework for distributed systems and outlines the architecture and benefits of using VBA to tailor these applications.

VBA Licensing: Background

VBA, the premier technology for application customization – familiar to over 3 million developers worldwide, has long played a key role in the customization and integration of rich client-based applications such as Microsoft Office. 

Microsoft founder and CEO Bill Gates first introduced the concept of Visual Basic for Applications over ten years ago in his Byte Magazine article, “Beyond Macro Processing.”  In the article, Gates articulated his vision of a sophisticated and consistent development environment being integrated directly into powerful application software.  VBA, the culmination of his vision, was first released as part of Microsoft Excel in 1993.

Broadly licensing VBA has always been part of Microsoft’s vision for the IT community and with the release in 1997 of VBA version 5.0 this vision became a reality.  Today, VBA’s rich customization environment is not only implemented throughout Microsoft Office, but also in the applications of over 200 Independent Software Vendors (ISVs) and corporations spanning a broad range of industries.

With the release of VBA 6.0 in 1999, Microsoft has made available an even more powerful version of the development environment that greatly extends both the functionality and scope of the technology.  This has enabled VBA 6.0 to expand its traditional strength from the client to multi-tier application architectures, providing the foundation for distributed application customization.

Windows DNA

As organizations migrate client products into a distributed environment, they face additional application requirements that make development and deployment more challenging:

To respond to the challenges posed by distributed systems, Microsoft introduced the Windows® DNA platform.  Windows DNA is Microsoft’s platform for building, deploying, and managing robust multi-tier applications.  It is a well integrated set of best-of-breed products that provide building blocks for solution developers.  By logically separating the presentation, business logic, and data storage layers Windows DNA enables organizations to integrate the Internet, client/server, and PC models of computing into a single framework (see figure 1).

Figure 1. Logical separation of presentation, business logic, and data storage

A key enabling feature of Windows DNA is the integration of Web and client/server application models through the use of a common component model across all application layers—the Component Object Model (COM).  COM provides an object-oriented mechanism for developers to customize and extend not only the client side of Windows DNA-based applications, but also the business logic residing on the middle tier.

VBA for Windows DNA Customization

As the presentation, business logic, and data storage components of business applications are distributed across multiple tiers, so too should the customization engine.  By leveraging Windows DNA COM components and the multi-threaded capability of VBA 6, user customizations can now be extended from the client into the middle tier. 

The key to customizing the middle tier lies in VBA’s facility to deploy multi-threaded DLLs (MT DLLs).  This new capability, introduced in VBA 6.0, enables developers to create the DLLs in the VBA development environment and then deploy them to the middle tier where they are tightly integrated with the system’s business logic.  An example of this process, based on Microsoft’s Duwamish Books release, illustrated in Figure 2, is described below:

Figure 2. VBA customization of a Windows DNA COM object

Developers wanting to customize the business logic of a Windows DNA COM object would invoke the VBA IDE on their system.  To ease the authoring and deployment of customization code to the middle tier, the IDE would be integrated into the application client.  Alternatively, organizations may choose to leave the client application unchanged and introduce an “admin workbench” (see figure 2).  The workbench is aware of the remote location of the business logic and allows for seamless deployment and registration of the customization code.

Once this code is written and ready for deployment, the admin workbench uses its knowledge of the system architecture to automatically save and register the code on the middle tier.  This entire process is transparent to a client accessing the system.  Although a component of the business logic has been customized, the interfaces to the user remain unchanged.

After the code has been compiled and deployed on the middle tier, client requests to the application will begin making use of the now customized COM object.  As requests to this COM object are received, the VBA Run-time loads and executes the customized code as part of the business logic.

It is important to note that the client applications in this model can still be fully customized using VBA.  Whether the clients in the scenario are rich or thin, their customization code can be stored locally as part of client documents or centrally on the Data Services Tier.

Benefiting from VBA

“VBA’s straightforward integration and seamless deployment to the middle tier enable our developers to quickly and effectively extend the business logic of SalesPage.”
–Greg Ozuzu, Unitrac President and CEO

VBA provides the crucial element of flexibility to the Windows DNA platform—the platform for making companies more successful by tying together organizational information systems.  Customizing Windows DNA solutions with VBA enables companies to do this quickly and easily by integrating multiple applications with corporate data, messaging, and web resources.  Using VBA as your customization engine for Windows DNA solutions offers the following benefits:

Putting the Idea to Work

“Integration of VBA with Insight II has enabled our clients to fully customize Lawson’s enterprise applications in a Windows DNA environment.”
—Paul Mockenhaupt, Vice-President, Lawson Microsoft Business Practice

Today’s widespread availability of low-cost computers and access to global connectivity have fueled the demand for highly distributed applications.  The Microsoft Windows DNA platform answers many challenges posed by multi-tier systems using a logical, component-based model.  As applications are factored across multiple tiers, the capability to customize the business logic should not be compromised.  VBA, while still supporting full client customization, enables developers to tap into Windows DNA components and tailor the business logic to their specific needs.

VBA provides the integral component of flexibility to Windows DNA solutions.  As organizations migrate applications to multiple tiers, VBA will continue to be the premier customization technology for software products and services.  Third-party VBA licensees are already taking advantage of VBA’s rich customization capabilities to provide customers with the technology to tailor Windows DNA applications.

And it will only get better.  Microsoft is dedicated to making VBA the customization technology for Windows DNA applications.  Future versions of VBA will be dedicated to enabling seamless Windows DNA customization, while still focusing on VBA’s rich user experience on the client.  For future case studies, sample applications, and more information on how VBA can make your Windows DNA solutions infinitely customizable, visit the Microsoft VBA website:  http://msdn.microsoft.com/vba/.