Re: [xwiki-devs] [Proposal] Do not use dom4j anymore and instead use JDOM2

2015-06-11 Thread vinc...@massol.net



On 11 Jun 2015 at 16:17:59, Sergiu Dumitriu (ser...@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.domtype=Code 
[3] http://code.openhub.net/search?s=%22import%20org.jdom%22 
[4] https://github.com/search?q=%22import+org.jdom.%22type=Code 
[5] http://code.openhub.net/search?s=%22import%20javax.xml.stream%22 
[6] https://github.com/search?q=%22import+javax.xml.stream%22type=Code 
[7] http://code.openhub.net/search?s=%22import%20org.jdom2%22 
[8] https://github.com/search?q=%22import+org.jdom2%22type=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 
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


Re: [xwiki-devs] [Proposal] Do not use dom4j anymore and instead use JDOM2

2015-06-11 Thread Paul Libbrecht
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.domtype=Code
 [3] http://code.openhub.net/search?s=%22import%20org.jdom%22
 [4] https://github.com/search?q=%22import+org.jdom.%22type=Code
 [5] http://code.openhub.net/search?s=%22import%20javax.xml.stream%22
 [6] https://github.com/search?q=%22import+javax.xml.stream%22type=Code
 [7] http://code.openhub.net/search?s=%22import%20org.jdom2%22
 [8] https://github.com/search?q=%22import+org.jdom2%22type=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







signature.asc
Description: OpenPGP digital signature
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


Re: [xwiki-devs] [Proposal] Do not use dom4j anymore and instead use JDOM2

2015-06-11 Thread Sergiu Dumitriu
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.domtype=Code
[3] http://code.openhub.net/search?s=%22import%20org.jdom%22
[4] https://github.com/search?q=%22import+org.jdom.%22type=Code
[5] http://code.openhub.net/search?s=%22import%20javax.xml.stream%22
[6] https://github.com/search?q=%22import+javax.xml.stream%22type=Code
[7] http://code.openhub.net/search?s=%22import%20org.jdom2%22
[8] https://github.com/search?q=%22import+org.jdom2%22type=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


Re: [xwiki-devs] [Proposal] Do not use dom4j anymore and instead use JDOM2

2015-06-11 Thread Thomas Mortagne
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 p...@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
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


Re: [xwiki-devs] [Proposal] Do not use dom4j anymore and instead use JDOM2

2015-06-10 Thread Sergiu Dumitriu
+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, vinc...@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
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


Re: [xwiki-devs] [Proposal] Do not use dom4j anymore and instead use JDOM2

2015-06-10 Thread Paul Libbrecht


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



signature.asc
Description: OpenPGP digital signature
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


Re: [xwiki-devs] [Proposal] Do not use dom4j anymore and instead use JDOM2

2015-06-10 Thread Paul Libbrecht
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, vinc...@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




signature.asc
Description: OpenPGP digital signature
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


[xwiki-devs] [Proposal] Do not use dom4j anymore and instead use JDOM2

2015-06-10 Thread vinc...@massol.net
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