-
Notifications
You must be signed in to change notification settings - Fork 14
Tutorial 04 02 Add Traditional Bridge Project

This tutorial assumes that you have already followed the Building a Service From Scratch tutorial, and have an existing and working Harmony Core service that does not include a Traditional Bridge environment.
Adding Traditional Bridge to an existing solution typically involves adding a new traditional Synergy project to the solution, as well as adding code into several of the existing .NET projects in the solution, specifically the Services and Services.Controllers projects, and maybe also the Services.Models project.
On the traditional Synergy side, a Traditional Bridge environment is usually implemented within a simple console application (DBR) that we refer to as the Traditional Bridge host program. But you might also choose to organize and deploy some of the code via additional ELB projects, it really depends on how complex your environment is.
The Traditional Bridge host program will:
- Listen for request messages from Harmony Core, sent via
standard in(TT:). - Decode requests to determine which routine is to be called, and to determine values for any inbound parameters.
- Execute subroutines and functions as directed, passing all appropriate parameters.
- Based on the return values and.or the value of any out parameters, construct an appropriate response message.
- Send the response back to Harmony Core via
standard out(TT:).
The format of the request and response messages is defined by a standard protocol called JSON RPC 2.0, and this mechanism is described in more detail in the Dynamic Call Protocol topic.
In this tutorial, the Traditional Bridge environment will be implemented on Windows, in the same solution as the Harmony Core services, but remember that in some cases this will not be the case. The Traditional Bridge code could be built and run on Windows, UNIX, Linux, or OpenVMS.
- Start Visual Studio and open the Harmony Core solution that you want to add a Traditional Bridge environment to.
-
In
Solution Explorer, right-click on the main solution then selectAdd > New Project.... -
At the top of the
Add New Projectdialog, enterSynergy DBRin the search box, then locate and select the project template namedTraditional Application (DBR). -
Click the
Nextbutton. -
In the
Project namefield, enterTraditionalBridge. -
Press the
Createbutton to create the new project and add it to the solution.
You will notice that a sample program named Program.dbl has been included in the new project. There is no rule for what a Traditional Bridge host program should be named, but we suggest TraditionalBridgeHost.
-
In
Solution Explorer, in the newTraditionalBridgeproject, right-click on theProgram.dbl, selectRename, and change the name of the file toTraditionalBridgeHost.dbl. -
Although not absolutely required, open the source file and add the name
TraditionalBridgeHostto themaincompiler directive also.
Unless you have changed it, the .NET code in your solution is probably defaulting to being built for Any CPU, and the new TraditionalBridge project that you just added is probable defaulting to being built for x86 (32-bit). Again, not an absolute requirement, but we'll change the environment to build the code for x64 (64-bit).
- In
Solution Explorer, right-click on the main solution and selectConfiguration Manager....
Next topic: Add Traditional Bridge Library Code
-
Tutorial 2: Building a Service from Scratch
- Creating a Basic Solution
- Enabling OData Support
- Configuring Self Hosting
- Entity Collection Endpoints
- API Documentation
- Single Entity Endpoints
- OData Query Support
- Alternate Key Endpoints
- Expanding Relations
- Postman Tests
- Supporting CRUD Operations
- Adding a Primary Key Factory
- Adding Create Endpoints
- Adding Upsert Endpoints
- Adding Patch Endpoints
- Adding Delete Endpoints
-
Harmony Core CLI Tool
-
OData Aware Tools
-
Advanced Topics
- CLI Tool Customization
- Adapters
- API Versioning
- Authentication
- Authorization
- Collection Counts
- Customization File
- Custom Field Types
- Custom File Specs
- Custom Properties
- Customizing Generated Code
- Deploying to Linux
- Dynamic Call Protocol
- Environment Variables
- Field Security
- File I/O
- Improving AppSettings Processing
- Logging
- Optimistic Concurrency
- Multi-Tenancy
- Publishing in IIS
- Repeatable Unit Tests
- Stored Procedure Routing
- Suppressing OData Metadata
- Traditional Bridge
- Unit Testing
- EF Core Optimization
- Updating a Harmony Core Solution
- Updating to 3.1.90
- Creating a new Release
-
Background Information