Introducing Code Effects 5.0 Beta!

New Core Features

.NET Core 2.0 and .NET Standard 2.0 Support

Prior to version 5.0 all functionality of the Code Effects component was delivered to the end user in a single assembly named CodeEffects.Rule.dll. Beginning from version 5.0, the Rule Editor and Rule Engine are split into several assemblies:

This change allows the use of rule Evaluators in distributed applications and services on any platform that supports .NET Standard 2.0 or .NET Core 2.0.

Namespaces that were used in previous versions of Code Effects were preserved in version 5.0 regardless of which of the new assemblies are referenced in your project. This ensures the smooth transition of any existing code to version 5.0.

Flexible Sources

In addition to existing Source Object and Source XML types of sources Code Effects 5.0 introduces new FlexSource. This source type allows you to build a source object on the fly without having it declared at design- or run-time. This is convenient when you have all your fields and their values stored in a database. Implementation of this type is simple; it follows the standard .NET Reflection design pattern and uses its main types such as PropertyInfo, MethodInfo as base types for properties, in-rule methods, etc. The Beta package available for download below includes the Asp.FlexSource.Demo project that shows how to use this new source type. Consult its ReadMe.txt file for details.

Cut, Copy and Paste Support

Version 5.0 supports the Cut, Copy and Paste for rule elements. Use Ctrl-click or Ctrl-arrow keys to select one or more rule elements. Hit Ctrl-x to cut or Ctrl-c to copy your selection. Click or use arrow keys to select the element after which you want to paste your selection. Hit Ctrl-v to paste.

Field Groups

Version 5.0 introduces Field Groups, a convenient way to group all or some of the in-rule methods, fields, and properties of your source objects in context menus. You can group your fields by setting the value of the new FieldAttribute.Group property of each field individually. The rule editor will display groups if at least one field or property of your source object has a Group value. All fields and properties that don't have the Group value are displayed in menus under the default group name OTHER set by the new "emptyGroup" label node of the "labels" section of HelpXML. The rule editor uses no grouping if none of the fields and properties of your source object have Group value.

Field Filters

This new feature allows you to filter the list of properties and in-rule methods that the editor offers to the end user as possible value selections.

For example, imagine that your source object declares several string properties: FirstName, LastName, Email and Phone. Without filters, if you select the FirstName field while creating a rule the editor displays the menu of LastName, Email and Phone as possible values since they are all of string type. But if you set the value of the new FieldAttribute.Filter to "person" for properties FirstName and LastName the editor displays only the LastName as a possible value when you select the FirstName and ignores those string fields that have different filters or no filter at all. Use all as a filter for those fields that need to be included in all filters.

Textbox Value Input and Updated Styles

At this point most of our large customers throughout the world dropped their requirements to support IE 9. This allowed us to finally replace the SPAN-based text input with the regular textbox control. Select the value element in the rule and press Ctrl-Enter to switch it into the Edit mode (textbox). Hit the Enter key when done editing the value.

For the same reason all context menus in Rule Editor are now DIV-based. If your project uses modified Code Effects styles then change the CSS class div.ceMenu table to div.ceMenu div. Class div.ceMenu table td can be deleted as it's no longer in use. The default font size for the most rule elements is changed from 12px to 13px.

In version 5.0, Code Effects styles have been split into two separate files - Common.css and (theme).css. We also greatly simplified our CSS classes. The main goal now is to allow your existing styles to have better control over how the Rule Editor is displayed in your markup. Of course, you can edit those CSS files to achieve your styling needs.

To use default Code Effects themes in version 5.0 you need to reference two CSS files in your page - the common and the theme. For example, reference the Common.css and Gray.css files if you want to use the Gray theme.

Implementation of Code Effects 5.0

Rule Evaluation and Data Filtering

Simply make sure your project is compiled with .NET Framework 4.6.2, .NET Core 2.0 or .NET Standard 2.0. and reference the CodeEffects.Rule.Common.dll and CodeEffects.Rule.Engine.dll assemblies. Then use Code Effects rule evaluation as usual. To upgrade the existing code, remove reference to the old CodEffects.Rule.dll and reference the above mentioned assemblies.

Rule Authoring

One of the goals of version 5.0 is to become completely independent from particular .NET web platform, whether it's ASP.NET, MVC, Core, or any of the future web initiatives from Microsoft.

The basic steps of implementing Code Effects 5.0 rule editor in any web application are as follows:

These are the only components you need to include in your web project. To intialize the editor, you must get two sets of client settings from the server (usually on page load) and pass it to the editor. You also need to declare Save, Load and Delete client functions and pass them to the editor, too, in order to be able to manage your rules. All demo projects available for download below declare the main.js script that completes this.

You can also update existing ASP.NET or MVC web projects to Code Effects version 5.0. Read the ReadMe.txt file included in each demo project to see more details.

New License Types

Since the introduction of Code Effects in May of 2011 our Unlimited license was by far the most popular among our customers. Because of this, beginning from version 5.0 we are no longer offering the Standard and Enterprise licenses. The updated list of available licenses for version 5.0 is as follows:

Pricing will be available at the time of the final release of version 5.0. Customers of existing Standard and Enterprise licenses who purchased them before January 19, 2018 will be able to upgrade to the Unlimited 5.0 license at discounted prices.

The current ETA for the final release is April of 2018.

Download Code Effects 5.0 Beta

Please click here to download DLLs, scripts, CSS, and demo projects of Code Effects 5.0 Beta. All copies of CodeEffects.Rule.Engine.dll assembly included in this download will act as Unlimited version until the end of April, 2018. They turn themselves into the Trial versions after that date.

Please use our Support page to submit your questions and feedback.