Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » E4 RCP and Database(I want to persist the data from the views into database.Any suggestions)
E4 RCP and Database [message #1423019] Sat, 13 September 2014 20:14 Go to next message
Praveen Banthia is currently offline Praveen BanthiaFriend
Messages: 30
Registered: September 2014
Member
Hi,
I am new to this forum as well as rcp development. I wanted to know how to connect a e4 rcp application to do CRUD on data entered in view.
Can someone guide me in right direction
Re: E4 RCP and Database [message #1424821 is a reply to message #1423019] Tue, 16 September 2014 13:07 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 14-09-14 19:44, Praveen Banthia wrote:
> Hi,
> I am new to this forum as well as rcp development. I wanted to know how
> to connect a e4 rcp application to do CRUD on data entered in view.
> Can someone guide me in right direction
Hey Praveen,
This forum is really about e4 technology which doesn't include Data
persistences. If you use JFace in your RCP app, there is JFace
databinding, to bind UI widget events to Objects. You can find stuff here:
http://wiki.eclipse.org/index.php/JFace_Data_Binding
(Or checkout the JFace forum).

On the persistence side, you can really use any ORM Java solution,
Perhaps even combined with

http://en.wikipedia.org/wiki/List_of_object-relational_mapping_software#Java

Some might even nicely play with JFace Databinding
HTH
Christophe
Re: E4 RCP and Database [message #1427746 is a reply to message #1424821] Sat, 20 September 2014 18:38 Go to previous messageGo to next message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 225
Registered: July 2009
Senior Member
Am 16.09.2014 um 15:07 schrieb Christophe Bouhier:
> On 14-09-14 19:44, Praveen Banthia wrote:
>> Hi,
>> I am new to this forum as well as rcp development. I wanted to know how
>> to connect a e4 rcp application to do CRUD on data entered in view.
>> Can someone guide me in right direction
> Hey Praveen,
> This forum is really about e4 technology which doesn't include Data
> persistences. If you use JFace in your RCP app, there is JFace
> databinding, to bind UI widget events to Objects. You can find stuff here:
> http://wiki.eclipse.org/index.php/JFace_Data_Binding
> (Or checkout the JFace forum).
>
> On the persistence side, you can really use any ORM Java solution,
> Perhaps even combined with
>
> http://en.wikipedia.org/wiki/List_of_object-relational_mapping_software#Java
>
>
> Some might even nicely play with JFace Databinding
> HTH
> Christophe
>
Hi Praven,
I'm using Gemini DbAccess in conjunction with Gemmini JPA for
persistence. Look at http://www.eclipse.org/gemini/dbaccess. For
Dependency Injection you can use
https://github.com/muuki88/org.eclipse.gemini.ext.di.

Greetz.
Ralf.
Re: E4 RCP and Database [message #1431045 is a reply to message #1427746] Thu, 25 September 2014 06:29 Go to previous messageGo to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 49
Registered: July 2009
Member
Don't use JFace DataBinding on the client side. This stuff is very very ugly and low level. Have a look at emf datamodels and create them out of your db data.

[Updated on: Thu, 25 September 2014 14:33]

Report message to a moderator

Re: E4 RCP and Database [message #1431499 is a reply to message #1431045] Thu, 25 September 2014 19:33 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
"Do not use JFace DataBinding... very very ugly and low level"?

Do you have any concrete examples to share with us which show what you mean?

philipp huebner wrote on Thu, 25 September 2014 08:29
Don't use JFace DataBinding on the client side. This stuff is very very ugly and low level. Have a look at emf datamodels and create them out of your db data.

Re: E4 RCP and Database [message #1435493 is a reply to message #1431499] Wed, 01 October 2014 15:24 Go to previous messageGo to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 49
Registered: July 2009
Member
It's too much boilderplate:
DataBindingContext ctx = new DataBindingContext();  
 IObservableValue widgetValue WidgetProperties.text(SWT.Modify).observe(ageTxt); IObservableValue modelValue = BeanProperties.value(Person.class, "age").observe(person);   UpdateValueStrategy widgetStrategy = new UpdateValueStrategy(); widgetStrategy.setBeforeSetValidator(new AgeValidator()); widgetStrategy.setConverter(new StringToIntConverter());   UpdateValueStrategy modelStrategy = new UpdateValueStrategy(); modelStrategy.setConverter(new IntToStringConverter()); Binding bindValue = ctx.bindValue(widgetValue, modelValue, widgetStrategy, modelStrategy);


This what I need in .net:
//make a new source
  MyData myDataObject = new MyData(DateTime.Now);      
  Binding myBinding = new Binding("MyDataProperty");
  myBinding.Source = myDataObject;
  myText.SetBinding(TextBlock.TextProperty, myBinding);


plus some proper xml definitions. In QT there are signals and slots. Even better....


[Updated on: Thu, 02 October 2014 07:09]

Report message to a moderator

Re: E4 RCP and Database [message #1445286 is a reply to message #1431045] Wed, 15 October 2014 08:29 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 25-09-14 08:29, philipp huebner wrote:
> Don't use JFace DataBinding on the client side. This stuff is very ugly
> and low level.
That's the biggest bullsh*t I have heard in years.

Have a look at emf datamodels and create them out of your
And EMFDatabinding would help you there as well.
> db data...
Re: E4 RCP and Database [message #1445289 is a reply to message #1435493] Wed, 15 October 2014 08:33 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 01-10-14 17:24, philipp huebner wrote:
> Of course. I'm used to .net databinding and had to use jface stuff in a
> project. I was a little bit shocked. This is what I need in java:
>
>
> DataBindingContext ctx = new DataBindingContext(); IObservableValue
> widgetValue WidgetProperties.text(SWT.Modify).observe(ageTxt);
> IObservableValue modelValue = BeanProperties.value(Person.class,
> "age").observe(person); UpdateValueStrategy widgetStrategy = new
> UpdateValueStrategy(); widgetStrategy.setBeforeSetValidator(new
> AgeValidator()); widgetStrategy.setConverter(new
> StringToIntConverter()); UpdateValueStrategy modelStrategy = new
> UpdateValueStrategy(); modelStrategy.setConverter(new
> IntToStringConverter()); Binding bindValue = ctx.bindValue(widgetValue,
> modelValue, widgetStrategy, modelStrategy); - See more at:
> http://www.accso.de/wp/2013/03/annotationsgesteuertes-data-binding-in-java-rich-client-applikationen/#sthash.ro9PirYA.dpuf
>
You compare apples and bananas Valuestrategies are optional, you can
pass null for the default strategy.

>
>
> This what I need in .net:
why are you here then?
>
> //make a new source
> MyData myDataObject = new MyData(DateTime.Now); Binding myBinding =
> new Binding("MyDataProperty");
> myBinding.Source = myDataObject;
> myText.SetBinding(TextBlock.TextProperty, myBinding);
>
>
> plus some proper xml definitions. Do you see the difference?
No.
> This bunch of boilderplate stuff should me written ?! And maintained?
> And then it even doesn't work proper...
>
> Sorry but it's an api design anti pattern.
Re: E4 RCP and Database [message #1445293 is a reply to message #1423019] Wed, 15 October 2014 08:36 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6580
Registered: July 2009
Senior Member
Hi,

We have a framework named EMap [1] which allows one to map EMF-Objects
into a database very effeciently. We have not yet made this framework
very public but we use it internally with big success!

Combine this with EMF-Edit and ore EMF-Databinding and you have a world
class framework!

Tom

[1]https://github.com/BestSolution-at/emap/wiki/Basic-Introduction

On 14.09.14 19:44, Praveen Banthia wrote:
> Hi,
> I am new to this forum as well as rcp development. I wanted to know how
> to connect a e4 rcp application to do CRUD on data entered in view.
> Can someone guide me in right direction
Re: E4 RCP and Database [message #1449884 is a reply to message #1445293] Tue, 21 October 2014 23:18 Go to previous messageGo to next message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 225
Registered: July 2009
Senior Member
Am 15.10.2014 um 10:36 schrieb Tom Schindl:
> Hi,
>
> We have a framework named EMap [1] which allows one to map EMF-Objects
> into a database very effeciently. We have not yet made this framework
> very public but we use it internally with big success!
>
> Combine this with EMF-Edit and ore EMF-Databinding and you have a world
> class framework!
>
> Tom
>
> [1]https://github.com/BestSolution-at/emap/wiki/Basic-Introduction
>


Hi all,
is this a replacement for Texo / Teneo?

Ralf.
Re: E4 RCP and Database [message #1450236 is a reply to message #1449884] Wed, 22 October 2014 08:22 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6580
Registered: July 2009
Senior Member
More of a replacement for Teneo and more important for us Hibernate. We
had performance and more important JDBC-Connection issues with Teneo &
Hibernate 4.0.

Our startup performance improved by a factor of 500%, we have no
classloader problems anymore, we had some heavy FETCH JOIN and
LAZYLOADING issues and much more.

It is no replacement for Texo because Texo works with simple POJOs which
we don't - we require EObjects because we make use of the reflective
EObject API.

Tom

On 22.10.14 01:18, Ralf Heydenreich wrote:
> Am 15.10.2014 um 10:36 schrieb Tom Schindl:
>> Hi,
>>
>> We have a framework named EMap [1] which allows one to map EMF-Objects
>> into a database very effeciently. We have not yet made this framework
>> very public but we use it internally with big success!
>>
>> Combine this with EMF-Edit and ore EMF-Databinding and you have a world
>> class framework!
>>
>> Tom
>>
>> [1]https://github.com/BestSolution-at/emap/wiki/Basic-Introduction
>>
>
>
> Hi all,
> is this a replacement for Texo / Teneo?
>
> Ralf.
>
Previous Topic:Catch closing event of a part (Eclipse e4 RCP)
Next Topic:Is it possible to hide status bar items and free up the display space?
Goto Forum:
  


Current Time: Wed Jan 27 17:50:40 GMT 2021

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

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

Back to the top