The VDF will feel a lot different than the rest of the Vault API. It’s almost as if it was built by a completely different team. The reason is because it was built by a completely different team. There are other reasons too. Working with UI components is different than working with server calls. Also, the VDF is able to follow a more object oriented approach than the web service layer.
But I'm getting ahead of myself. This post is about getting to know the VDF. No talk of commitment or marriage or anything. It's just a nice casual tour of the major components.
The DLLs
There are 4 DLLs that make up the VDF. They are the ones that start with Autodesk.DataManagement.
Autodesk.DataManagement.Client.Framework.dll - This contains components that are not Vault-specific and do not contain UI. Features include logging and error parsing.
Autodesk.DataManagement.Client.Framework.Forms.dll - This contains UI components that are not Vault-specific. Features include an error dialog and progress dialog.
Autodesk.DataManagement.Client.Framework.Vault.dll - This contains Vault utilities but no UI. Features include Connection management, download/upload workflows, working folder information, and Entity objects.
Autodesk.DataManagement.Client.Framework.Vault.Forms.dll - This contains Vault UI. Features include the login dialog, browse control, and checkout dialog.
Entry Points
Each DLL has a Library object which contains a set of static methods. The methods themselves are dependent on the feature set of the DLL. The other major entry point is the Connection object, which has a set of managers. Each manager contains methods for invoking high level workflows. There is some overlap between VDF managers and web service managers. For example, you can add a category through Connection.CategoryManager.AddCategory or Connection.WebServiceManager.CategoryService.AddCategory.
Currency and Services
The VDF has its own set of currency objects. These are basic objects used only for structured data. Objects that perform actions are referred to as services (aka. managers). VDF currency is similar to the Web Service currency, but there is usually more information in the VDF currency. For example, the VDF’s FileIteration object has object references to the parent Folder and Category object reference. The web service equivalent, File, has only ID references to parent Folder and Category.
You will frequently have to convert between the VDF and web service currency. You can construct a VDF object from a web service object. You can also cast down from VDF to web service object. So it’s not too bad, but you still have to keep track of the different sets of currency.
Settings and Results
The VDF supports many complex workflows, which may have multiple configuration options. Instead of having functions with 20+ inputs, the VDF uses a settings object instead. If you want the default behavior, you can just new up a settings object and pass it in to the workflow or UI. Alter the settings object if you want non-default behavior.
The results of a workflow can be just as complex as the inputs, which is where the results object comes in. If something goes wrong, don’t assume you will get an exception. In many cases, you need to check the results object to see if there were failures or not. Also, when UI is involved, you can’t assume that the user did what they were supposed to do.