-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
95 lines (85 loc) · 2.81 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
layout: default
---
<section class="intro">
<div class="grid">
<div class="unit whole center-on-mobiles">
<p class="first">Retaking rules for developers</p>
</div>
</div>
</section>
<section class="features">
<div class="grid">
<div class="unit whole">
Rules can greatly simplify business logic, but often come in the form of limited mini-languages and complex tools. Let's take them back.
</div>
</div>
</section>
<section class="features">
<div class="grid">
<div class="unit half">
<h2>Simple</h2>
<p>
Clara offers a simpler way to express domain knowledge in code, without the weight of an enterprise rule system.
</p>
</div>
<div class="clear"></div>
<div class="unit half">
<h2>Expressive</h2>
<p>
Simple rules stay simple, but users can write rich logic or invoke external libraries when they need to.
</p>
</div>
</div>
<div class="grid">
<div class="unit half">
<h2>It's just Clojure</h2>
<p>Rules are just Clojure code, and can be managed and reused like anything else.</p>
{% highlight clojure %}
(defrule work-approval
"Check order approval."
[WorkOrder (= type :repair)
(= ?order-id order-id)]
[:not [ApprovalForm (= ?order-id approved-id)
(= formname "27B-6")]]
=>
(insert! (->MissingApproval ?id "No 27B-6.")))
{% endhighlight %}
Check out the <a href="/docs/firststeps/">developer guide</a>.
</div>
<div class="unit half">
<h2>Easily used from Java</h2>
<p>Just include your rules as a resource and use Java Beans or Clojure records as facts.</p>
{% highlight java %}
List<QueryResult> results =
RuleLoader.loadRules("clara.examples")
.insert(facts)
.fireRules()
.query("clara.examples/approvals");
for (QueryResult result: results)
System.out.println(result.getResult("?id"));
{% endhighlight %}
See the <a href="/docs/java/">Java documentation for more</a>.
</div>
</div>
<div class="grid">
<div class="unit half">
<h2>Drawn from multiple worlds</h2>
<p>
Clara aims to combine the best ideas from expert systems, functional programming, and the best known develpment practices.
</p>
<p>
<a href="/docs/approach/">Learn more about Clara's approach</a>.
</p>
</div>
<div class="unit half">
<h2>And many other features...</h2>
<p>Clara supports the features you'd expect from a rule engine, such as support for <a href="/docs/truthmaint">truth maintenance</a>,
<a href="/docs/durability">durability</a>,
<a href="/docs/inspection">rule activation explanations</a>, <a href="/docs/accumulators">accumulators to reason across sets of facts</a>,
and others.
</p>
</div>
</div>
<span class="take-action"><a href="/docs/firststeps/">Get Started</a></span>
</section>