Skip to content

Architecture Overview

Mathieu Guindon edited this page Jan 5, 2020 · 8 revisions

Rubberduck is broken down into multiple projects and meta-projects. The Rubberduck.Deployment project should be the solution's startup project for debugging purposes, but the multiple other projects form several layers of high-level abstraction for various specific functionalities.

architecture overview

Main

Rubberduck.Main is the add-in's entry point, the Rubberduck.dll project: that's where Rubberduck is loaded and unloaded in the VBE. It's also where we have our dependency injection configured.

SettingsProvider

Rubberduck.SettingsProvider comes into play very early in the startup sequence (we have configuration settings to determine whether or not to display a splash screen while Rubberduck is initializing), and is referenced by every project that needs to read from or write to the configuration settings.

VBEditor

Rubberduck.VBEditor defines the wrapper interfaces and COM interop management - its role is to make the rest of Rubberduck ignore the existence of the VBIDE Extensibility API, and to abstract away all the very low-level COM and Win32 magic going on here. Because Visual Studio 6.0 differs in several significant ways, the wrapper interfaces are implemented in two separate libraries, Rubberduck.VBEditor.VBA and Rubberduck.VBEditor.VB6.

Parsing

Rubberduck.Parsing is where Rubberduck's understanding of VBA code really happens. The role of this assembly is to provide the rest of Rubberduck with a friendly API to analyze VBA code.

Core

Rubberduck.Core is the central backbone where Rubberduck comes together. It's where we find the various user interfaces and functionalities.

Others

The other projects encapsulate specific functionalities; for example we'll find the code metrics, inspections, and quickfixes in the Rubberduck.CodeAnalysis assembly; the refactorings are obviously found in Rubberduck.Refactorings; the Smart Indenter port is in its own Rubberduck.SmartIndenter assembly, the VBA unit testing API is in Rubberduck.UnitTesting; there's a regular expression analyzer tool in Rubberduck.RegexAssistant, and more features might eventually end up extracted from the Core assembly.

Clone this wiki locally