MarcOnt/Projects/WMap/MRuleGenerator
From Corrib Clan Wiki
tadarri
Contents |
MRuleGenerator
MRuleGenerator is an interface for mobile devices with MIDP to RuleGenerator. Since RuleGenerator itself still lacks the capabality to permanently store the user work results (this feature is planed as an interface to MarcontPortal where the work will be stored), the mobile interface only allows to edit rules within HTTP session and after that it is discarded. This makes the application more a demo than useful tool, but gives valuable experience. The experience will be used to enhance RuleGenerator DHTML interface. Lastly it is a starting point for future development of the whole system with both interfaces (adding functionality to RuleGenerator can be easily mirrored in the mobile application).
Sources
Sources for both RuleGenerator and MRuleGenerator can be found on the project SourceForge repository (https://sourceforge.net/projects/marcont).
Compiling
It should be easy with any IDE like NetBeans MobilityPack or Wireless Tool Kit.
Compiling using command line:
javac -bootclasspath cldcapi10.jar:midpapi10.jar org/marcont/rulegenerator/mobile/RuleGeneratorMidlet.java preverify -classpath cldcapi10.jar:midpapi10.jar org/marcont/rulegenerator/mobile/RuleGeneratorMidlet
Create manifest file (manifest.mf):
MIDlet-1: RuleGeneratorMidlet, , org.marcont.rulegenerator.mobile.RuleGeneratorMidlet MIDlet-Vendor: Piotr Piotrowski MIDlet-Version: 1.0 MIDlet-Name: MobileRuleGenerator MicroEdition-Configuration: CLDC-1.0 MicroEdition-Profile: MIDP-1.0
Create JAR file (MobileRuleGenerator.jar):
jar cvfm MobileRuleGenerator.jar manifest.mf buil/dir
Create JAD file (MobileRuleGenerator.jad):
MIDlet-1: RuleGeneratorMidlet, , org.marcont.rulegenerator.mobile.RuleGeneratorMidlet MIDlet-Jar-Size: 26901 MIDlet-Jar-URL: MobileRuleGenerator.jar MIDlet-Name: MobileRuleGenerator MIDlet-Vendor: Piotr Piotrowski MIDlet-Version: 1.0 MicroEdition-Configuration: CLDC-1.0 MicroEdition-Profile: MIDP-1.0 serverUrl: http://127.0.0.1:8084/rulegenerator/servlet/org.marcont.rulegenerator.mobile.MobileServlet
Correct the MIDlet-Jar-Size property to the MobileRuleGenerator.jar file size.
Deployment
Since http://rulegenerator.marcont.org is not accessible for some time now the mobile application has the url set to http://127.0.0.1:8084/rulegenerator/servlet/org.marcont.rulegenerator.mobile.MobileServlet which can be changed to any address RuleGenerator will be under (http://host[:port]/[context/]servlet/org.marcont.rulegenerator.mobile.MobileServlet). The change can be done in the JAD file by changing the value for serverUrl property.
For the ease of testing I provide the binary package of the web server application and midlet:
- http://xinu5.eti.pg.gda.pl/~piotr/files/rulegenerator/rulegenerator.war
- http://xinu5.eti.pg.gda.pl/~piotr/files/rulegenerator/MobileRuleGenerator.jad
- http://xinu5.eti.pg.gda.pl/~piotr/files/rulegenerator/MobileRuleGenerator.jar
The easiest way to deploy the application with the binary packages is to deploy the WAR file in J2EE server (Tomcat) working on port 8084 and download the JAD and JAR file to cell phone or run it within emulator.
Running
To run the application using emulator one needs the emulator. Wireless Tool Kit (http://java.sun.com/products/sjwtoolkit/index.html) has one.
emulator -Xdescriptor:MobileRuleGenerator.jad
will execute the mobile aplication using emulator from Wireless Tool Kit.
Documentation
Since the mobile application was developed for course on GUT, there is some project documentation in Polish (not very useful for end user):
- spcecification: attachment:zti_spec.pdf
- project attachment:zti_analiza.pdf
- implementation report attachment:zti_raport.pdf
Any useful information will be placed on this page.



