Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

c# Allow users to add Additional logic to application (called Logic)  without access to Source

Posted on 2014-03-16
3
Medium Priority
?
262 Views
Last Modified: 2014-03-19
I have developed a c# application which allows users to define their own transactions by grouping SQL database records under a common transaction name. Effectively the application which runs the transactions is "dumb" with all of the logic residing in the database transaction records. By breaking any transaction down to its smallest elements and applying a sequence number and branching logic, they can define the processing flow required to run any transaction. Some of the database transactions are Input rules whilst other are Output rules, Logic/Decision rules, Constant rules, Update rules etc...

To enhance functionality each database transaction is capable of running pre-defined Commands either before , during or after the transaction record is processed. An example of this might be a Logic transactions which reads shop orders from an order master table via an SQL statement.  (select order_number from ShopOrder_Master)]. By having pre-defined Commands CLR_LIST1ADD_LIST1 specified, the array LIST1 can be cleared down and subsequently populated with the output of the SQL statement. Another Command DRPDWN_LIST1 could copy the list of shop orders to a drop down list in preparation for an Input statement.

I would like to be able to ship this software with an option for users to be able to develop their own Commands and utilize these within their own transactions.  Obviously the software shipped would just be the executable without source. I'm thinking along the lines of defining a class called "UserCommands", with source, where the users could define commands which would be called from the main application. However this would be a separate executable and I assume that it would not has access to the object instances of the main application.

Any insights into how I might be able to integrate user defined commands (ie commands yet to be defined) into the main application would be most welcome.

regards
Pat
0
Comment
Question by:pclarke7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Expert Comment

by:Michael Fowler
ID: 39933351
Why not have a database table to hold these commands with a column for command id and another to the command itself. This could created in local database file
http://msdn.microsoft.com/en-us/library/ms233763.aspx

Michael
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 1500 total points
ID: 39933549
Why not create a plugin architecture? This is a common way to allow end-users to extend the functionality of an application without actually modifying the application itself.

Additional tutorials:

http://www.codeproject.com/Articles/4691/Plugin-Architecture-using-C
http://www.codeproject.com/Tips/546639/How-to-create-an-easy-plugin-system-in-Csharp
0
 

Author Closing Comment

by:pclarke7
ID: 39939312
thanks and regards
Pat
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question