Wednesday, September 03, 2008

Exploring new technologies part of Ganymede-Release Train

I took myself some time the last days exploring new technologies available with Ganymede 3.4:

  • Eclipse-Databinding and its new features

  • EMF-Databinding (Provisional but working very smoothly)

  • Teneo: Persist your model via hibernate in a SQL-Database

  • CDO: Share your model between different clients and persist it into an SQL-Database (with Revision support)

  • New Extension Points to enhance the Expression Framework

  • Spring & OSGi

  • P2 to install the Products using the P2-Agent

I did this to understand those technologies better because we at my company have to decide which technologies our next generation of products is built on (The current ones are based on selfwritten libs because at that time there was no Eclipse-Databinding, Teneo and CDO or we didn't knew about it).

As always when learning new technologies I created an example application but before I started I defined some goals I think are curcial to all Enterprise Datacentric Desktop Applications:

  • Nice L&F (as good as I can make an UI Look without a designer)

  • Plugable storage technology

  • Undo/Redo Support

Then I started hacking, creating an Ecore-Model, some plugins, extension points, browsing documentation and noticed that there are no examples around for most of the things I wanted use:

  • How to create an EditingDomain myself when not using the generated editor-classes from EMF?

  • How to use the new org.eclipse.ui.services-Extension point to enhance the expression framework?

  • Best strategy to use Extension Points when bundles are installed/uninstalled/updated while the application is running


All those things are not hard if you know how to do it but if you don't it's quite tricky to solve these problems. It even gets harder if the technologies you plan to use are quite new and/or are not used together and because of this bugs arise.

So the immediate output of my work was that 2 bugs [239015, 245183] in Eclipse-Databinding got fixed in 3.4.1.

The longterm output for me is:

  • I now have a good picture how our next technology stack looks like

  • I have an example application (I will add other things in the next weeks) to teach my co-workers the technologies

  • I had a lot of fun (besides struggeling with P2)

The longterm output for you is:

  • You have a small application showing you a lot of different concepts around RCP+EMF+Databinding applications

    • EMF-Ecore

    • Usage/Creation of your own Extension Points

    • Using EditingDomain outside the scope of EMF-Generated artefacts

    • Using Teneo

    • Using CDO

  • I started summerizing all the ideas, technologies and concepts combined in this example in a document, I'm working on from time to time. So maybe some time you'll get a "book" explaining you everything

  • Some nice reusable classes e.g. one to use EMF/Databinding-LabelProviders with cool features, a new drop down widget showing a Tree in the popup, ...


This is the application:


If you want to run it locally get a copy of the P2-Agent and point the metadata repository and artifacts repository to this location.

To use the CDO-Version you also need a server component which can be installed when pointing the agent to this location. After having installed the CDO-Server you also have to create a CDO-Configuration (cdo-server.xml) in the installations "configuration" directory which you can fetch from here.

The repository name in the above config "CDO-1" has to be the id of the CDO-Configuration you create in your application.

Finally if you are interested only in the sources then install a subversion plugin in your eclipse and use one of te Team-ProjectSet files from here to check out the necessary projects.

If you want to learn more about these cool technologies. I've proposed beside a talk about E4 - The new platform-ui concepts a talk about this example application on ESE.

33 comments:

SeuAndré said...

Excellent! All this new technologies seem very promising!!

Just a question: why not EclipseLink instead of Hibernate?

Tom said...

I would not mind using EclipseLink but I'm using Teneo and it uses Hibernate I think.

Anonymous said...

Hi,

I also try to evaluate the new technologies. What I try do is to create a multi user client server application that uses equinox security for authentication. My client connects to a Geronimo JEE server.

Maybe we can put these things together ...
Feel free to contact me.

Mark

Michael said...

I believe that Teneo is about to support EclipseLink as well

Anonymous said...

Sounds interesting, but I have problems during the download of the two plugins at.bestsolution.soccer.core.datasource.teneo.derby_1.0.0.jar and org.hibernate.eclipse_3.2.2.Beta1.jar from your repository (message: Unexpected error. File contents could not be restored from local history during undo/redo.).

Tom said...

Ok I readded the modules looks like I had check-in a broken export :-(

Anonymous said...

Thanks, downloading works now. But I still get error in the p2-agent during the install, my env is MacOSX:

Cannot complete the request. See the details.
Unsatisfied dependency: [toolingorg.eclipse.swt.gtk.linux.x86 3.4.0.v3448f] requiredCapability: osgi.bundle/org.eclipse.swt.gtk.linux.x86/3.4.0.v3448f
Unsatisfied dependency: [toolingorg.eclipse.core.filesystem.linux.x86 1.2.0.v20080604-1400] requiredCapability: osgi.bundle/org.eclipse.core.filesystem.linux.x86/1.2.0.v20080604-1400
Unsatisfied dependency: [at.bestsolution.soccer.app.product 1.0.0] requiredCapability: org.eclipse.equinox.p2.iu/toolingorg.eclipse.swt.win32.win32.x86/[3.4.0.v3448f,3.4.0.v3448f]
Unsatisfied dependency: [at.bestsolution.soccer.app.product 1.0.0] requiredCapability: org.eclipse.equinox.p2.iu/toolingorg.eclipse.core.filesystem.win32.x86/[1.1.0.v20080604-1400,1.1.0.v20080604-1400]
Unsatisfied dependency: [at.bestsolution.soccer.app.product 1.0.0] requiredCapability: org.eclipse.equinox.p2.iu/toolingorg.eclipse.swt.gtk.linux.x86/[3.4.0.v3448f,3.4.0.v3448f]
Unsatisfied dependency: [at.bestsolution.soccer.app.product 1.0.0] requiredCapability: org.eclipse.equinox.p2.iu/toolingorg.eclipse.core.filesystem.linux.x86/[1.2.0.v20080604-1400,1.2.0.v20080604-1400]
Unsatisfied dependency: [toolingorg.eclipse.swt.win32.win32.x86 3.4.0.v3448f] requiredCapability: osgi.bundle/org.eclipse.swt.win32.win32.x86/3.4.0.v3448f
Unsatisfied dependency: [toolingorg.eclipse.core.filesystem.win32.x86 1.1.0.v20080604-1400] requiredCapability: osgi.bundle/org.eclipse.core.filesystem.win32.x86/1.1.0.v20080604-1400

Tom said...

F... P2 generator task I regenerated the artifacts but forgot to fix them when doing a multiplatform export

Tom said...

I fixed the content.xml

Anonymous said...

Thanks for the quick fix. I can (nearly) see the light now! But still get one error message:

Cannot complete the request. See the details.
Unsatisfied dependency: [toolingorg.eclipse.swt.gtk.linux.x86 3.4.0.v3448f] requiredCapability: osgi.bundle/org.eclipse.swt.gtk.linux.x86/3.4.0.v3448f
Unsatisfied dependency: [at.bestsolution.soccer.app.product 1.0.0] requiredCapability: org.eclipse.equinox.p2.iu/toolingorg.eclipse.swt.gtk.linux.x86/[3.4.0.v3448f,3.4.0.v3448f]

Tom said...

fixed thanks for the patient, I hope it works now

Anonymous said...

It works! Thanks.
I will have a closer look now, becuase we used a similar setup (RCP, EMF, Teneo) in a customer project. But we used older versions (3.2, 2.2, 0.7.5) and no p2 but the update manager of course.

Tom said...

It's really only a first step the more interesting thing is the code used to write it (EMF-Databinding, ...).

Knut Wannheden said...

Looks interesting. But I got these unsatisfied dependencies during the installation. Seem to be missing artifacts...


Cannot complete the request. See the details.
Unsatisfied dependency: [at.bestsolution.soccer.app.product 1.0.0] requiredCapability: toolingat.bestsolution.soccer.app.product/at.bestsolution.soccer.app.product.config/[1.0.0,1.0.0]
Unsatisfied dependency: [at.bestsolution.soccer.app.product 1.0.0] requiredCapability: toolingat.bestsolution.soccer.app.product/at.bestsolution.soccer.app.product.ini/[1.0.0,1.0.0]
Unsatisfied dependency: [at.bestsolution.soccer.app.product 1.0.0] requiredCapability: toolingat.bestsolution.soccer.app.product/at.bestsolution.soccer.app.product.launcher/[1.0.0,1.0.0]

Tom said...

Did you create a new config in the P2-Agent. Which OS did you try?

Knut Wannheden said...

Hi Tom

All I did was to download the p2 agent (OSX) and after firing it up I added the specified URL as a metadata and artifact repository. When I then try to install the application from the metadata repository I get those errors.

I'm not sure what the config is you're referring to?

Thanks!

Tom said...

at the bottom of you can create profiles you should create a new one and the use it when installing.

Knut Wannheden said...

Hi Tom. I tried that but I still get the same error. Is it maybe an OSX issue or are there some specific settings required for the new profile. I just specified an empty folder for its install folder and bundle pool location.

Thanks for the support!

Tom said...

You need to point both!!!!:
- MetaData Repository
- Artifacts Repository
to http://publicsvn.bestsolution.at/repos/java/examples/EMF-Databinding/releases/1.0.0/client-repository/

Knut Wannheden said...

That much I gathered from the blog post already. Still no luck. I'll try it on Windows instead. But thanks for the help.

Tom said...

I'm also on OS-X so it should work! I could provide you a compiled OS-X version if you want simply send me a mail to tom.schindl(a)beststolution.at.

Knut Wannheden said...

I just tested the same thing on my Intel OSX system (other was PPC). There it worked like a charm. I wonder what the problem is... Anyway, glad that it works now!

Tom said...

Ah I only exported for intel-osx!

Tom said...

So the repo is for:
- intel OS-X
- GTK 32 bit
- Win32 bit
I got errors for the other systems when exporting

Tom said...

Th repo is now updated and holds the artifacts for all platforms beside Linux-Motif.

kygoh said...

How do you handle changes in the Soccer model and there are already existing data persisting in CDO?

Tom said...

Do you talk about:
* Structural Model changes (e.g. attribute is added removed?)

I really haven't explored CDO this deep yet and don't know how it handles such a thing, sorry. You'd better ask at the emf-newsgroup so that Eike or Simon can answer this

* Passive CDO-Updates

For passive CDO-updates I already talked with Eike and Ed, and maybe we can introduce this feature so that no extra infrastructure is needed. If that's not possible I also thought about setting up a new project deal with this issue and integrates in the current EMF-Databinding-Solution.

sud said...

Any idea when we can expect a "tutorial" on how to get all these technologies working together.

If you have a draft, I'd be more than happy to work through it and provide any editing feedback if that will help save you some time.

I think this would be helpful to whole lot of people who want to use RCP + EMF + Data-Binding + Teneo + Database

Tom said...

I'm giving a talk on ESE in Nov on this application show until then at least a set of powerpoint slides should be available.

This will give you a highlevel overview. The more detail explanation is already part of repository (http://publicsvn.bestsolution.at/repos/java/examples/EMF-Databinding/at.bestsolution.soccer.doc/) but this a real step by step introduction and as you could imagine this is a lot of work and my time very limited.

sud said...

Tom,

Thanks for pointing me to the .doc . From looking at it, you are attempting to cover the wider gamut of technologies that goes into creating an Eclipse RCP application.

I was looking for something a little more focused on just EMF + Databinding + Teneo . This would assume that the user has prior experience with Eclipse RCP using SWT, JFace and OSGi.

I will take a look at your code and see if I can't come up with a tutorial that would talk about just these pieces.

Tom said...

The ESE presentation-slides will give you what you want and I'll start preparing them soon (ESE is on 19th-20th of Nov).

Anonymous said...

Dear Tom,

i try to install the application but no chance. My env: XP

I download the P2 agent, and add your Link in the metadate and the fragments. I install the application with the standard profile and it's run, but I can't add new datasources.

If I create a complely new profile, it doesn't run.

Fabian said...

Hello Tom,

I also tried installed your App via P2 but the time I try to add a new Datasource it does just nothing.

The following exception is beeing logged:

AssertionFailedException: null argument:Validation realm cannot be null

The Stacktrace points to your code at at.bestsolution.soccer.ui.datasource.AbstractConfigurationDialog.createDialogArea(AbstractConfigurationDialog.java:86)