Creating Different code for different Clients
For software houses that maintain a product, there is the common problem of customer specific code.
Sometimes we need to create some specific implementation of a specific program for a specific client.
The migrated code is designed using a plugin architecture, that allows you to implement this with ease.
We'll start by creating a new exe project that the customer will use - and call the original Northwind application.
Then we'll create our own client specific implementation of the ShowCustomers
screen.
We'll register the new Controller with the AbstractFactory
to return the customer implementation.
Creating the Client specific exe project
- Add a new winforms project called 'Northwind.AClient'
- Delete 'Form.cs' and 'App.Config' as we don't need them.
- Delete the lines in the
Main
method in theProgram
class - we'll replace them later. - Change the build output to '..\bin' for both debug and release.
- Add references:
- From the
Browse
tab, select from the project'sbin
directory the following dlls:- ENV
- Firefly.Box
- NorthwindBase
- (Northwind.Share for larger migrated solutions)
- From the
For more information see: Adding a new project to a migrated solution
- change the program main to call the original Program main.
namespace Northwind.NewCustomer
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
- static void Main()
static void Main(string[] args)
{
Northwind.Program.Main(args);
}
}
}
- Adding a customer specific implementation of a controller
- Adding a customer specific implementation of smaller bits of code
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com