Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Moving from XMLBeans to JAXB or rather EMF ?(Looking for advice)
Moving from XMLBeans to JAXB or rather EMF ? [message #531773] Thu, 06 May 2010 06:52 Go to next message
Philipp Kutter is currently offline Philipp KutterFriend
Messages: 306
Registered: July 2009
Senior Member

JAXB or EMF for XML creation, serialization and deserialization[ 0 votes ]
1.JAXB 0 / 0%
2.EMF 0 / 0%

Hi.
I started in a new project at a large investment bank.

The use up to now XML beans to create XML complying to FpML with a generated API and then serializing it.

I of course suggested them to use EMF for this, as I do this for years.

They plan to go for JAXB which they claim does the same, and is more "mainstream" as it is built into Java 6.

Are there reasons to use JAXB instead of EMF for this?

Does anyone know what features of EMF (besides the generated editors, and the reflective API) we are missing by using JAXP?

Any input and suggestions are welcome.

Regards,
Philipp

[Updated on: Tue, 11 May 2010 18:13]

Report message to a moderator

Re: Moving from XMLBeans to JAXP or rather EMF ? [message #531794 is a reply to message #531773] Thu, 06 May 2010 08:32 Go to previous messageGo to next message
Jan Reimann is currently offline Jan ReimannFriend
Messages: 140
Registered: July 2009
Senior Member
Hi Philipp,
in my opinion JAXP is just XML processing, i.e. serializing and
deserializing, and finally persisting it as XML. EMF is more than this.
Primarily, EMF is modeling, as you already know! The advantage is that
you are not dependent of the serialization - as a side effect you can of
course serialize your models as XMI. But: you can define a textual
syntax for example, generate a graphical editor and a lot of other
stuff. Another fact is that you could easy integrate model refactoring
if you do the work EMF based. Check out this:
http://emftext.org/refactoring/

best regards,
Jan


Philipp W. Kutter wrote:
> Hi.
> I started in a new project at a large investment bank.
>
> The use up to now XML beans to create XML complying to FpML with a
> generated API and then serializing it.
>
> I of course suggested them to use EMF for this, as I do this for years.
>
> They plan to go for JAXP which they claim does the same, and is more
> "mainstream" as it is built into Java 6.
>
> Are there reasons to use JAXP instead of EMF for this?
>
> Does anyone know what features of EMF (besides the generated editors,
> and the reflective API) we are missing by using JAXP?
>
> Any input and suggestions are welcome.
>
> Regards,
> Philipp
Re: Moving from XMLBeans to JAXP or rather EMF ? [message #531829 is a reply to message #531773] Thu, 06 May 2010 09:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010100020701000800080801
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Philipp,

Comments below.

Philipp W. Kutter wrote:
> Hi.
> I started in a new project at a large investment bank.
>
> The use up to now XML beans to create XML complying to FpML with a
> generated API and then serializing it.
So why aren't they happy with what they have already?
>
> I of course suggested them to use EMF for this, as I do this for years.
>
> They plan to go for JAXP which they claim does the same, and is more
> "mainstream" as it is built into Java 6.
Do you mean JAXB? JAXP is really just DOM and they could have used
that years ago...
>
> Are there reasons to use JAXP instead of EMF for this?
They might want to have a look at

Binding XML to Java
< http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>

We concluded that in terms of the generated API, simple schemas produce
effectively the same APIs.
>
> Does anyone know what features of EMF (besides the generated editors,
> and the reflective API) we are missing by using JAXP?
I often encounter folks busy doing a JAXBotomy. They complain about
things like the fact that JAXB don't properly maintain containment the
way DOM and EMF do. So you can easily end up with a cyclic graph
instead of a tree. Building a UI around JAXB artifacts is challenging
because the instances don't notify. You won't be able to use things
like CDO, GMF/Graphiti. So basically you can generate an API just like
the EMF one, and then you'll spend the rest of your budget writing all
other things from scratch the plain old tedious way.
>
>
> Any input and suggestions are welcome.
>
> Regards,
> Philipp

--------------010100020701000800080801
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Philipp,<br>
<br>
Comments below.<br>
<br>
Philipp W. Kutter wrote:
<blockquote cite="mid:hrtovn$r7g$1@build.eclipse.org" type="cite">Hi.
<br>
I started in a new project at a large investment bank.
<br>
<br>
The use up to now XML beans to create XML complying to FpML with a
generated API and then serializing it.
<br>
</blockquote>
So why aren't they happy with what they have already?<br>
<blockquote cite="mid:hrtovn$r7g$1@build.eclipse.org" type="cite"><br>
I of course suggested them to use EMF for this, as I do this for years.
<br>
<br>
They plan to go for JAXP which they claim does the same, and is more
"mainstream" as it is built into Java 6.
<br>
</blockquote>
Do you mean JAXB?   JAXP is really just DOM and they could have used
that years ago...<br>
<blockquote cite="mid:hrtovn$r7g$1@build.eclipse.org" type="cite"><br>
Are there reasons to use JAXP instead of EMF for this?
<br>
</blockquote>
They might want to have a look at <br>
<blockquote><a target="_out"
href=" http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava">Binding
XML to Java</a><br>
</blockquote>
We concluded that in terms of the generated API, simple schemas produce
effectively the same APIs.<br>
<blockquote cite="mid:hrtovn$r7g$1@build.eclipse.org" type="cite"><br>
Does anyone know what features of EMF (besides the generated editors,
and the reflective API) we are missing by using JAXP?</blockquote>
I often encounter folks busy doing a JAXBotomy.  They complain about
things like the fact that JAXB don't properly maintain containment the
way DOM and EMF do.  So you can easily end up with a cyclic graph
instead of a tree.  Building a UI around JAXB artifacts is challenging
because the instances don't notify.  You won't be able to use things
like CDO, GMF/Graphiti.  So basically you can generate an API just like
the EMF one, and then you'll spend the rest of your budget writing all
other things from scratch the plain old tedious way.<br>
<blockquote cite="mid:hrtovn$r7g$1@build.eclipse.org" type="cite"><br>
<br>
Any input and suggestions are welcome.
<br>
<br>
Regards,
<br>
Philipp
<br>
</blockquote>
</body>
</html>

--------------010100020701000800080801--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Moving from XMLBeans to JAXP or rather EMF ? [message #532980 is a reply to message #531829] Tue, 11 May 2010 18:16 Go to previous message
Philipp Kutter is currently offline Philipp KutterFriend
Messages: 306
Registered: July 2009
Senior Member
I meant JAXB, not JAXP, sorry, but you already found out.

I will try to explain them the advantages. There are numerous message formats and systems sending them around, so I think they will really need EMF, as with EMF the non-IT guys like me can manage the Schema, create instances for examples and tests, and validate output. Otherwise, the IT is always needed..

Previous Topic:EList ordered or not
Next Topic:how to save a list of DataObjects linked to another DataObject
Goto Forum:
  


Current Time: Fri Apr 19 23:35:24 GMT 2024

Powered by FUDForum. Page generated in 0.03968 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top