<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Edson Tirelli wrote:
<blockquote
 cite="mid:e6dd5ba30808271614n29771d67sd6d523eae31b95c@mail.gmail.com"
 type="cite">
  <div dir="ltr">&nbsp;&nbsp; There are a few issues on how templates were
implemented. The main one, and probably the main reason we did not
extended the functionality to support any underlying fact format, is
the syntax support on semantic code blocks. I.e. dialect support,
specially on consequences. <br>
  </div>
</blockquote>
Yes, I thought $person.getFieldValue("age") was a bit annoying...<br>
<br>
But the more I look into the code and interfaces around FactTemplate,
the more I like it's approach and it's fit for ontological (dynamic
model/schema) data models.&nbsp; <br>
<ol>
  <li>MVEL etc needs to reflect on methods to give the dialect support
to POJOs</li>
  <li>To make an dynamic model fit to OO, TypeDeclarations would need
to be able to generate interfaces, an a proxy mechanism would be needed
for the map-backed model - this just seems too retarded<br>
  </li>
  <li>Surely TypeDeclaration should be an interface with methods to
gain method information and types etc.&nbsp; PojoTypeDeclaration would
implement this using the reflective model as current.&nbsp;
TemplateTypeDeclaration would use the FactTemplate to do it (if it was
being continued).&nbsp; This way maximum pluggability is maintained.</li>
  <li>Isn't this what FactTemplate does?&nbsp; I see the problem is that
FactTemplate was an add-on, instead of a super set / *the* way of
accessing fact type information.</li>
  <li>Is this idea awesome? Calling TypeDeclaration.execute("getAge")
does not seem any different to how it is now - how "compiled" are these
rules?&nbsp; If they are byte-compiled, then that optimisation could be done
for PojoTypeDeclaration.</li>
</ol>
How correct am I on these points?<br>
<br>
Cheers<br>
<br>
Stephen<br>
</body>
</html>