English Based Rules Using .NET and IronRuby– Details on my Codemash Talk this coming Friday
Posted by Keith Elder | Posted in .Net, Presentations, Speaking | Posted on 09-01-2012
Tags: codemash, csharp, ironruby
Geeks from all across the United States and across the pond with varying backgrounds will gather in Sandusky, OH during the heart of Winter once again, that’s right, it is CodeMash week. This year over 1,300+ attendees will be gathering for a new and improved experience that sold out in just a few hours. The Kalahari Resort has made some major upgrades (their ribbon cutting is even today!) to expand their conference center so CodeMash will be bigger than ever! And to top it off, they’ve asked me to be the MC again this year which is an honor within itself.
On Friday at 9:30 AM I’ll be speaking about how to represent business rules in plain English. I wanted to provide a few more details because honestly a one paragraph abstract doesn’t really explain what we’ll be covering and how excited I am about this talk. The cool factor and impact this could have on a business is pretty staggering. Here’s the abstract:
In this session we will explore writing an English-based rules engine that allows developers to create domain-specific rules for an application that can be easily understood by anyone. We will use a combination of C# and the DLR (dynamic language runtime) with IronRuby on the .NET platform to create a way to write, manage, and process rules for an application.
Ok, so what does that *really* mean? Well, it means a few things. For starters most all applications have rules of some sort. Some line of business applications have 1,000’s of rules. Imagine for a moment all of the rules needed to say… close a home loan, or process an insurance claim. In order to manage all of these rules businesses use what is called a “Rules Engine”. These rules engines are typically very expensive applications. They require lots of setup, training and offer many many features. With the majority of these one has to define a dictionary, vocabulary, and then write rules based on that. Managing these rules becomes very complex down the road.
What I am focusing on in this talk is taking something like plain old English (POE) that can be easily ready and understood and turn that into executable code. Here’s an example.
Let’s say we have this simple survey or set of questions or form data we are collecting.
Pretty simple form. But let’s say these are the rules your marketing department wanted you to implement (which you very well know are going to change at some point on a whim).
If answer to question 1 is Very Satisfied
And client is a repeat client
Then send them a discount coupon in the mail
If answer to question 1 is Very Unsatisfied
Then send survey via email to clientrelations@boyhowdy.com
If answer to question 3 is Yes
Then subscribe them to newsletter
If answer to question 4 is Yes
Then schedule a follow up call in 6 months
So you either A) hard code them or B) you use a rules engine. What we are going to do on Friday at CodeMash is take those plain English rules above and execute them using a combination of IronRuby and C# on the .NET platform dynamically.
Do I have your attention now? I hope so. See you on Friday.