[xwiki-devs] [Proposal] Do not use dom4j anymore and instead use JDOM2
Hi devs, I’d like to propose that we agree about: * using JDOM2 when needing to parse/output XML files * moving away existing code gradually from DOM4J to JDOM2 Rationale: * It would be nice to pick one fwk and have more consistency * DOM4J seems not maintained anymore: https://sourceforge.net/projects/dom4j/files/ * JDOM2 seems maintained: http://jdom.org/news/ WDYT? Thanks -Vincent
I can testify that jdom2 is maintained and quite professionally. It's not very live but it's nicely maintained. Today, on the list, for example, a team submitted performance test results and Rolf (the main maintainer currently) discussed it. paul On 10/06/15 17:07, vincent@massol.net wrote:
Hi devs,
I’d like to propose that we agree about: * using JDOM2 when needing to parse/output XML files * moving away existing code gradually from DOM4J to JDOM2
Rationale: * It would be nice to pick one fwk and have more consistency * DOM4J seems not maintained anymore: https://sourceforge.net/projects/dom4j/files/ * JDOM2 seems maintained: http://jdom.org/news/
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
+1 for removing DOM4J, it's been dead for 10 years. But why do we need a non w3c library at all? Why is JDOM better than DOM? The main reason is that it is supposedly easier to use for Java programmers, but is it that much easier to justify having different APIs? The standard DOM is part of the Java language. On 06/10/2015 11:07 AM, vincent@massol.net wrote:
Hi devs,
I’d like to propose that we agree about: * using JDOM2 when needing to parse/output XML files * moving away existing code gradually from DOM4J to JDOM2
Rationale: * It would be nice to pick one fwk and have more consistency * DOM4J seems not maintained anymore: https://sourceforge.net/projects/dom4j/files/ * JDOM2 seems maintained: http://jdom.org/news/
WDYT?
Thanks -Vincent
-- Sergiu Dumitriu http://purl.org/net/sergiu
On 10/06/15 21:47, Sergiu Dumitriu wrote: > +1 for removing DOM4J, it's been dead for 10 years. > But why do we need a non w3c library at all? Why is JDOM better than DOM? > The main reason is that it is supposedly easier to use for Java > programmers, but is it that much easier to justify having different > APIs? The standard DOM is part of the Java language. Well... my experience in the ActiveMath group with quite several developers is that JDOM is way easier at representing properly the fine details of XML in its completeness than DOM. Also, we ran experiment with the Xerces DOM implementation around 2005 or so, and basically got the following time factors - Xerces DOM: 4 - Xerces SAX with JDOM: 2 - Saxon SAX with JDOM: 1 So we kept the latest. Note that Xerces is what's inside Oracle's JVM (or used to be). Memory was also considerably better using JDOM. The modern way would be to go for StAX but that is a huge programming change. paul
Note that we started using StAX in recent stuff like Filter module but yes it's a big change for existing code. On Wed, Jun 10, 2015 at 9:53 PM, Paul Libbrecht <paul@hoplahup.net> wrote: > > > On 10/06/15 21:47, Sergiu Dumitriu wrote: >> +1 for removing DOM4J, it's been dead for 10 years. >> But why do we need a non w3c library at all? Why is JDOM better than DOM? >> The main reason is that it is supposedly easier to use for Java >> programmers, but is it that much easier to justify having different >> APIs? The standard DOM is part of the Java language. > Well... my experience in the ActiveMath group with quite several > developers is that JDOM is way easier at representing properly the fine > details of XML in its completeness than DOM. Also, we ran experiment > with the Xerces DOM implementation around 2005 or so, and basically got > the following time factors > - Xerces DOM: 4 > - Xerces SAX with JDOM: 2 > - Saxon SAX with JDOM: 1 > So we kept the latest. Note that Xerces is what's inside Oracle's JVM > (or used to be). > Memory was also considerably better using JDOM. > > The modern way would be to go for StAX but that is a huge programming > change. > > paul > > > _______________________________________________ > devs mailing list > devs@xwiki.org > http://lists.xwiki.org/mailman/listinfo/devs > -- Thomas Mortagne
A quick code search on openhub and github: * library | openhub | github * org.w3c.dom | 180k [1] | 1.1m [2] * jdom 1 | 35k [3] | 112k [4] * stax | 25k [5] | 127k [6] * jdom 2 | 2k [7] | | 20k [8] It seems that jdom2 is not that popular, at least not in the projects tracked by openhub or hosted on github. [1] http://code.openhub.net/search?s=%22import%20org.w3c.dom%22 [2] https://github.com/search?q="import+org.w3c.dom"&type=Code [3] http://code.openhub.net/search?s=%22import%20org.jdom%22 [4] https://github.com/search?q=%22import+org.jdom.%22&type=Code [5] http://code.openhub.net/search?s=%22import%20javax.xml.stream%22 [6] https://github.com/search?q=%22import+javax.xml.stream%22&type=Code [7] http://code.openhub.net/search?s=%22import%20org.jdom2%22 [8] https://github.com/search?q=%22import+org.jdom2%22&type=Code On 06/10/2015 03:53 PM, Paul Libbrecht wrote: > > > On 10/06/15 21:47, Sergiu Dumitriu wrote: >> +1 for removing DOM4J, it's been dead for 10 years. >> But why do we need a non w3c library at all? Why is JDOM better than DOM? >> The main reason is that it is supposedly easier to use for Java >> programmers, but is it that much easier to justify having different >> APIs? The standard DOM is part of the Java language. > Well... my experience in the ActiveMath group with quite several > developers is that JDOM is way easier at representing properly the fine > details of XML in its completeness than DOM. Also, we ran experiment > with the Xerces DOM implementation around 2005 or so, and basically got > the following time factors > - Xerces DOM: 4 > - Xerces SAX with JDOM: 2 > - Saxon SAX with JDOM: 1 > So we kept the latest. Note that Xerces is what's inside Oracle's JVM > (or used to be). > Memory was also considerably better using JDOM. > > The modern way would be to go for StAX but that is a huge programming > change. > > paul > > > -- Sergiu Dumitriu http://purl.org/net/sergiu
On 11 Jun 2015 at 16:17:59, Sergiu Dumitriu (sergiu@xwiki.com) wrote: A quick code search on openhub and github: * library | openhub | github * org.w3c.dom | 180k [1] | 1.1m [2] * jdom 1 | 35k [3] | 112k [4] * stax | 25k [5] | 127k [6] * jdom 2 | 2k [7] | | 20k [8] It seems that jdom2 is not that popular, at least not in the projects tracked by openhub or hosted on github. It’s very recent compared to JDOM1. IMO you should count JDOM1+JDOM2 = 37k. Thanks -Vincent [1] http://code.openhub.net/search?s=%22import%20org.w3c.dom%22 [2] https://github.com/search?q="import+org.w3c.dom"&type=Code [3] http://code.openhub.net/search?s=%22import%20org.jdom%22 [4] https://github.com/search?q=%22import+org.jdom.%22&type=Code [5] http://code.openhub.net/search?s=%22import%20javax.xml.stream%22 [6] https://github.com/search?q=%22import+javax.xml.stream%22&type=Code [7] http://code.openhub.net/search?s=%22import%20org.jdom2%22 [8] https://github.com/search?q=%22import+org.jdom2%22&type=Code On 06/10/2015 03:53 PM, Paul Libbrecht wrote: > > > On 10/06/15 21:47, Sergiu Dumitriu wrote: >> +1 for removing DOM4J, it's been dead for 10 years. >> But why do we need a non w3c library at all? Why is JDOM better than DOM? >> The main reason is that it is supposedly easier to use for Java >> programmers, but is it that much easier to justify having different >> APIs? The standard DOM is part of the Java language. > Well... my experience in the ActiveMath group with quite several > developers is that JDOM is way easier at representing properly the fine > details of XML in its completeness than DOM. Also, we ran experiment > with the Xerces DOM implementation around 2005 or so, and basically got > the following time factors > - Xerces DOM: 4 > - Xerces SAX with JDOM: 2 > - Saxon SAX with JDOM: 1 > So we kept the latest. Note that Xerces is what's inside Oracle's JVM > (or used to be). > Memory was also considerably better using JDOM. > > The modern way would be to go for StAX but that is a huge programming > change. > > paul > > > -- Sergiu Dumitriu http://purl.org/net/sergiu _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
That's because it is rather new and the xml flurry has been quite sleepy (e.g. the general xml mailing list at apache.org is dead). A better measure stab would be to estimate how central the role of XML is in these projects. DOM and SAX is typically used when one has to parse just a bit. Paul On 11/06/15 16:19, Sergiu Dumitriu wrote: > A quick code search on openhub and github: > > * library | openhub | github > * org.w3c.dom | 180k [1] | 1.1m [2] > * jdom 1 | 35k [3] | 112k [4] > * stax | 25k [5] | 127k [6] > * jdom 2 | 2k [7] | | 20k [8] > > It seems that jdom2 is not that popular, at least not in the projects > tracked by openhub or hosted on github. > > [1] http://code.openhub.net/search?s=%22import%20org.w3c.dom%22 > [2] https://github.com/search?q="import+org.w3c.dom"&type=Code > [3] http://code.openhub.net/search?s=%22import%20org.jdom%22 > [4] https://github.com/search?q=%22import+org.jdom.%22&type=Code > [5] http://code.openhub.net/search?s=%22import%20javax.xml.stream%22 > [6] https://github.com/search?q=%22import+javax.xml.stream%22&type=Code > [7] http://code.openhub.net/search?s=%22import%20org.jdom2%22 > [8] https://github.com/search?q=%22import+org.jdom2%22&type=Code > > On 06/10/2015 03:53 PM, Paul Libbrecht wrote: >> >> On 10/06/15 21:47, Sergiu Dumitriu wrote: >>> +1 for removing DOM4J, it's been dead for 10 years. >>> But why do we need a non w3c library at all? Why is JDOM better than DOM? >>> The main reason is that it is supposedly easier to use for Java >>> programmers, but is it that much easier to justify having different >>> APIs? The standard DOM is part of the Java language. >> Well... my experience in the ActiveMath group with quite several >> developers is that JDOM is way easier at representing properly the fine >> details of XML in its completeness than DOM. Also, we ran experiment >> with the Xerces DOM implementation around 2005 or so, and basically got >> the following time factors >> - Xerces DOM: 4 >> - Xerces SAX with JDOM: 2 >> - Saxon SAX with JDOM: 1 >> So we kept the latest. Note that Xerces is what's inside Oracle's JVM >> (or used to be). >> Memory was also considerably better using JDOM. >> >> The modern way would be to go for StAX but that is a huge programming >> change. >> >> paul >> >> >>
On 10 Jun 2015 at 21:45:30, Sergiu Dumitriu (sergiu@xwiki.com(mailto:sergiu@xwiki.com)) wrote:
+1 for removing DOM4J, it's been dead for 10 years.
But why do we need a non w3c library at all? Why is JDOM better than DOM?
The main reason is that it is supposedly easier to use for Java programmers, but is it that much easier to justify having different APIs? The standard DOM is part of the Java language.
The DOM API was complex enough that several people created frameworks providing alternatives. JDOM is one. That says a lot to me :) And indeed I find it easy to use. Ok so I’ changing the proposal from use JDOM2 to not using DOM4J. If a dev in XWiki needs to manipulate an XML structure he should use one of: * The W3C DOM API * JDOM2 (or XStream, Stax, etc. Note that JDOM is not an XML parser, it uses available JAXP parser) Thanks -Vincent
On 06/10/2015 11:07 AM, vincent@massol.net wrote:
Hi devs,
I’d like to propose that we agree about: * using JDOM2 when needing to parse/output XML files * moving away existing code gradually from DOM4J to JDOM2
Rationale: * It would be nice to pick one fwk and have more consistency * DOM4J seems not maintained anymore: https://sourceforge.net/projects/dom4j/files/ * JDOM2 seems maintained: http://jdom.org/news/
WDYT?
Thanks -Vincent
-- Sergiu Dumitriu
+1 Thanks, Marius On Thu, Jun 11, 2015 at 9:11 AM, vincent@massol.net <vincent@massol.net> wrote:
On 10 Jun 2015 at 21:45:30, Sergiu Dumitriu (sergiu@xwiki.com(mailto:sergiu@xwiki.com)) wrote:
+1 for removing DOM4J, it's been dead for 10 years.
But why do we need a non w3c library at all? Why is JDOM better than DOM?
The main reason is that it is supposedly easier to use for Java programmers, but is it that much easier to justify having different APIs? The standard DOM is part of the Java language.
The DOM API was complex enough that several people created frameworks providing alternatives. JDOM is one. That says a lot to me :)
And indeed I find it easy to use.
Ok so I’ changing the proposal from use JDOM2 to not using DOM4J.
If a dev in XWiki needs to manipulate an XML structure he should use one of: * The W3C DOM API * JDOM2
(or XStream, Stax, etc. Note that JDOM is not an XML parser, it uses available JAXP parser)
Thanks -Vincent
On 06/10/2015 11:07 AM, vincent@massol.net wrote:
Hi devs,
I’d like to propose that we agree about: * using JDOM2 when needing to parse/output XML files * moving away existing code gradually from DOM4J to JDOM2
Rationale: * It would be nice to pick one fwk and have more consistency * DOM4J seems not maintained anymore: https://sourceforge.net/projects/dom4j/files/ * JDOM2 seems maintained: http://jdom.org/news/
WDYT?
Thanks -Vincent
-- Sergiu Dumitriu
devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
+1, note that we are not going to get rid of it anytime soon since it's used a lot but it's good we officially don't use it more On Thu, Jun 11, 2015 at 10:50 AM, Marius Dumitru Florea <mariusdumitru.florea@xwiki.com> wrote:
+1
Thanks, Marius
On Thu, Jun 11, 2015 at 9:11 AM, vincent@massol.net <vincent@massol.net> wrote:
On 10 Jun 2015 at 21:45:30, Sergiu Dumitriu (sergiu@xwiki.com(mailto:sergiu@xwiki.com)) wrote:
+1 for removing DOM4J, it's been dead for 10 years.
But why do we need a non w3c library at all? Why is JDOM better than DOM?
The main reason is that it is supposedly easier to use for Java programmers, but is it that much easier to justify having different APIs? The standard DOM is part of the Java language.
The DOM API was complex enough that several people created frameworks providing alternatives. JDOM is one. That says a lot to me :)
And indeed I find it easy to use.
Ok so I’ changing the proposal from use JDOM2 to not using DOM4J.
If a dev in XWiki needs to manipulate an XML structure he should use one of: * The W3C DOM API * JDOM2
(or XStream, Stax, etc. Note that JDOM is not an XML parser, it uses available JAXP parser)
Thanks -Vincent
On 06/10/2015 11:07 AM, vincent@massol.net wrote:
Hi devs,
I’d like to propose that we agree about: * using JDOM2 when needing to parse/output XML files * moving away existing code gradually from DOM4J to JDOM2
Rationale: * It would be nice to pick one fwk and have more consistency * DOM4J seems not maintained anymore: https://sourceforge.net/projects/dom4j/files/ * JDOM2 seems maintained: http://jdom.org/news/
WDYT?
Thanks -Vincent
-- Sergiu Dumitriu
devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Added some info in our top level POM: http://git.io/vI7Ke Thanks -Vincent On 11 Jun 2015 at 08:11:22, vincent@massol.net (vincent@massol.net) wrote: On 10 Jun 2015 at 21:45:30, Sergiu Dumitriu (sergiu@xwiki.com(mailto:sergiu@xwiki.com)) wrote:
+1 for removing DOM4J, it's been dead for 10 years.
But why do we need a non w3c library at all? Why is JDOM better than DOM?
The main reason is that it is supposedly easier to use for Java programmers, but is it that much easier to justify having different APIs? The standard DOM is part of the Java language.
The DOM API was complex enough that several people created frameworks providing alternatives. JDOM is one. That says a lot to me :) And indeed I find it easy to use. Ok so I’ changing the proposal from use JDOM2 to not using DOM4J. If a dev in XWiki needs to manipulate an XML structure he should use one of: * The W3C DOM API * JDOM2 (or XStream, Stax, etc. Note that JDOM is not an XML parser, it uses available JAXP parser) Thanks -Vincent
On 06/10/2015 11:07 AM, vincent@massol.net wrote:
Hi devs,
I’d like to propose that we agree about: * using JDOM2 when needing to parse/output XML files * moving away existing code gradually from DOM4J to JDOM2
Rationale: * It would be nice to pick one fwk and have more consistency * DOM4J seems not maintained anymore: https://sourceforge.net/projects/dom4j/files/ * JDOM2 seems maintained: http://jdom.org/news/
WDYT?
Thanks -Vincent
-- Sergiu Dumitriu
participants (5)
-
Marius Dumitru Florea -
Paul Libbrecht -
Sergiu Dumitriu -
Thomas Mortagne -
vincent@massol.net