Web applications with GUI generation via embeded EulerGUI
© Jean-Marc Vanel - $Date: 2012-02-12$ - under Creative Commons License by-nc-nd 3.0
TOC
The Rule based Swing applications includes a rule base generating forms form OWL ontologies. This rule base is designed to run with other GUI API's than Swing, like Java bindings to Qt, GTK, etc. There is a compatibility layer based on an ontology for generic GUI's.
However, it has never been used for anything else than Swing. A Web example is particuliarly interesting to develop a rule-based Web application with domain plus applicative logic.
We considered several object oriented Web page frameworks: GWT, Echo 3, Apache Wicket. The latter looks the most promising, because a part (only) of the HTML page can be managed by the Web page framework, and thus by the rule engine. Look at this, pasted from Apache Wicket introduction :
But Wicket applications are not like applications written in either Tapestry or Echo, because in Wicket you get the best of both worlds. You get the benefits of a first-class component model and a non-intrusive approach to HTML. In many situations, this combination may prove to be a significant development advantage.
svn co https://deductions.svn.sourceforge.net/svnroot/deductions
deductions/n3_nojs/person-app.n3p
( see here for details : Running the project with imported Déductions rules )
swing3.n3p
rule base:
deductions/n3_nojs/generic_to_java-rules.n3
It has a bunch of rules to generate Swing objects and adapt predicates representing method calls, like:
{ ?W a gengui:TextField.
javapr:thisApplication app:platform app:Java .
} => {
?W a java:javax-swing-JTextField } .
The highlighted URI representing classes have to be adapted to Wicket (
or Echo 3). Copy the original file as
generic_to_wicket-rules.n3
.
Save a copy of the swing3.n3p rule base with
generic_to_wicket-rules.n3
as wicket.n3p
.
Save a copy of the person-app.n3p project with wicket.n3p
instead of swing3.n3p
as person-app-wicket.n3p
.
( you may want to use richer Maven archetypes : More archetypes )
person-app-wicket.n3p
you just created .