Saturday, August 13, 2011

HTML5 Cool Features

HTML5 has come up with lot of features but coolest of them are MathML and SVG support. Tried few quick examples, they make web designing more fun:




If you don't see a green circle, red rectangle and a blue line then your browser does not support HTML5, visit following URL to check your browser:

http://html5test.com/

Good luck for rich GUI's.



Thursday, June 16, 2011

View Drools Generated Code

When we execute rules, behind the scene java code is generated which is actually getting executed, to see this java code you need to set configuration path where you want java code generated by drools to be stored.

PackageBuilderConfiguration configuration = new PackageBuilderConfiguration();
configuration.setDumpDir(new File("XYZ"));

final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder(configuration);

Set XYZ as a directory path where you would like drools to store generated code. e.g. XYZ = "c:/drools/codegen"

When you run your program the java classes generated for the .drl files are stored at the path XYZ.

This generated code is really helpful to understand the behavior in lot of situations.