On Feb 13, Vincent Massol wrote :
I really don't think we should use ORO at all, now that Regexp is included in the JDK (since 1.4). We should really get rid of ORO.
If you have decided that the minimum requirements for XWiki are 1.4, then it probably makes sense to keep only java.util.regex. In this case there are quite a few places in XWiki where we should replace ORO by util.regex. And some places where we should optimize the regex handling: for example this code in XWikiDocument.java: String htmlregexp = "</?(html|body|img|a|i|b|embed|script|form| [...]; try { Util util = new Util(); List list = util.getMatches(content2, htmlregexp, 1); if (list.size() > 0) { return true; } } catch (MalformedPatternException e) { } return false; is really inneficient since we construct a list with all the html matches in the document when a single match would have accomplished the desired result.
I think it's going to be hard not to use any 1.4 features, especially as XWiki is based on 1.4 right now. We've already decided to stay 1.4 compatible. I don't think we can decide to stay 1.3 compatible...
Sure, i'm not asking for 1.3 compatibility ;) I was just trying to evaluate how hard it would be porting some parts to CDE so we can build a lighter version. I agree with Ludovic in that technology evolves fast and we should try to anticipate it. That's why I think 1.4 (and at a point 1.5) features will surely make they way into some J2ME future specs. I believe that j2me will need to keep the pace with j2se api or it.
As Ludovic was saying, if we plan ahead, all mobiles devices will have a JDK 1.4 compliance level in not too long...
Sure. Well I was justing toying with the J2ME possibility (which manages to run some impressive applications like Jetty 6 and some of the Velocity examples in my preliminaries tests). Yet you realize that if our policy is wait for more memory in mobiles, and wait for a decent 1.4 SE JDK in mobiles, there is not much work to do on porting XWiki on mobiles (and there is a lot of work to make mobiles faster ;). In that case I will refocus on user interface and useability concerns in the mobility context...
Note sure how this will help you though Pablo. We need to find a solution. Has anyone researched if there's a java.util.regexp implementation for 1.3?
I searched for a java.util.regexp for j2me and did not found one, it appears to be the same for 1.3. Regards, Pablo