Show Navigation Next Topic  »

Code Effects Implementation Examples

Code Effects engine supports all current .NET platforms. You can download and run demo projects that demonstrate Rule Editor and Rule Engine in action.

Note that even though Code Effects 5.0 supports older web platforms such as ASP.NET Webforms, your project still has to be compiled with at least .NET Framework 4.6.2.

One of the goals of Rule Editor development is to be completely independent from particular .NET web platform, whether it's ASP.NET, MVC, Core, newer .NET versions such as .NET 7.0, or any of the future web initiatives from Microsoft. Therefore, the basic steps of integration of Rule Editor in a web application has been simplified to the point where it becomes pretty much identical in all .NET environments. Note that below text is related ony to the Rule Editor; the Rule Engine can be referenced, initialized and used the same way on any of .NET platforms to evaluate your existing besiness rules agaist your data:

  • Reference Rule Editor's assembly from the NuGet. Code Effects has a separate rule editor assembly for each .NET web platform. Use NuGet manager in your copy of VS in each demo projcets to determine which Code Effects assembly is used for that specific version of .NET.
  • Reference two Code Effects CSS files in your markup: CodeEffects.Common.css and one of the default theme files. This step is optional; you can use your own styles if needed. Details on Code Effects styling can be found in this topic.
  • Reference the main Rule Editor script in your markup. This script declares the entire client-side functionality of the Rule Editor. Its API can be found in this topic.
  • Finally, you need to initialize the Rule Editor. To do that you must get two sets of client settings from the server (usually on page load) and pass it to the client. You also need to declare Save, Load and Delete client functions, too, in order to be able to manage your rules. All our demo projects declare the main.js (or site.js) local script that does all that.

Use our Support page to contact us should you have any implementation questions.

Post your questions on Stackoverflow and become a part of our growing community

Comments: 0