Is there some hope for improvements in data binding?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there some hope for improvements in data binding?

elvanor
Hi all,

In theory, Grails data binding is cool, in practice it is
unfortunately unusable as soon as you deal with non trivial cases (eg,
associations, Sets, property editors) because there are tons of bugs
in the data binding cool. Recently that has been the number 1 cause
for lost productivity on our project (before it was GORM, which is
starting at last to become quite stable, except the documentation.)

Some particular issues that we would really like to be fixed:

http://jira.codehaus.org/browse/GRAILS-7237
http://jira.codehaus.org/browse/GRAILS-6480
http://jira.codehaus.org/browse/GRAILS-6423

Because of those, our data binding code is a mess and ugly because we
constantly have to workaround these bugs. Normally it should be as
simple as myObject.properties = params... but this is not the case at
all :(
We are even thinking of rewriting all our binding code manually and
not use Grails one at all.

Would it be possible to devote some time to fix those and make data
binding much better for 1.4? I had a look at the code myself but not
sure if I can do it, I am not very familiar with the underlying Spring
data binding.

Are other people encountering the same issues we are?

Jean-Noel

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Is there some hope for improvements in data binding?

Graeme Rocher
Administrator
I've upgraded the priority of these issues to give them more visibility

Cheers

On Wed, Feb 9, 2011 at 11:53 AM, Jean-Noël Rivasseau <[hidden email]> wrote:

> Hi all,
>
> In theory, Grails data binding is cool, in practice it is
> unfortunately unusable as soon as you deal with non trivial cases (eg,
> associations, Sets, property editors) because there are tons of bugs
> in the data binding cool. Recently that has been the number 1 cause
> for lost productivity on our project (before it was GORM, which is
> starting at last to become quite stable, except the documentation.)
>
> Some particular issues that we would really like to be fixed:
>
> http://jira.codehaus.org/browse/GRAILS-7237
> http://jira.codehaus.org/browse/GRAILS-6480
> http://jira.codehaus.org/browse/GRAILS-6423
>
> Because of those, our data binding code is a mess and ugly because we
> constantly have to workaround these bugs. Normally it should be as
> simple as myObject.properties = params... but this is not the case at
> all :(
> We are even thinking of rewriting all our binding code manually and
> not use Grails one at all.
>
> Would it be possible to devote some time to fix those and make data
> binding much better for 1.4? I had a look at the code myself but not
> sure if I can do it, I am not very familiar with the underlying Spring
> data binding.
>
> Are other people encountering the same issues we are?
>
> Jean-Noel
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Is there some hope for improvements in data binding?

BluSynergy
In reply to this post by elvanor
Are other people encountering the same issues we are?


Yup. Databinding breaks down once you get past the hello-world app :(
It turns into a trail-and-error model with spaghetti code to get those complex object graphs to bind. Sometimes we bind the top-level object, and then parse out the lower level entity properties.

--
Sunny Thandassery
www.BluSynergy.com
Solutions for Subscription Billing and Payment Processing

Sunny Thandassery
BluSynergy, Solutions for subscription billing and invoicing
Reply | Threaded
Open this post in threaded view
|

RE: Is there some hope for improvements in data binding?

Richard Bradley

Same here.

 

I have an open bug on databinding too: http://jira.codehaus.org/browse/GRAILS-6767

 

 

From: Sunny Thandassery [mailto:[hidden email]]
Sent: 11 February 2011 04:52
To: [hidden email]
Subject: Re: [grails-user] Is there some hope for improvements in data binding?

 

Are other people encountering the same issues we are?

 

Yup. Databinding breaks down once you get past the hello-world app :(

It turns into a trail-and-error model with spaghetti code to get those complex object graphs to bind. Sometimes we bind the top-level object, and then parse out the lower level entity properties.

 

--
Sunny Thandassery
www.BluSynergy.com
Solutions for Subscription Billing and Payment Processing


softwire        
Richard Bradley
Tel : 020 7485 7500 ext 230 | Fax : 020 7485 7575
Web : www.softwire.com | E-mail : [hidden email]   

Addr : 325 Highgate Studios, 53-79 Highgate Road, London NW5 1TL 

Softwire Technology Limited. Registered in England no. 3824658. Registered Office : 13 Station Road, London N3 2SB

Reply | Threaded
Open this post in threaded view
|

Re: Is there some hope for improvements in data binding?

Marc Palmer Local
In reply to this post by Graeme Rocher

On 9 Feb 2011, at 15:48, Graeme Rocher wrote:

> I've upgraded the priority of these issues to give them more visibility
>

Rob Fletcher and I discussed this a while back.

Spring Binding should be ditched frankly, we can almost certainly do something much simpler and much more effective with just a small bit of Groovy code instead of all the trouble the Spring Binding and its dependency on Java bean property editors causes.

There are lots more issues I'm sure I've created relating to binding in the past.

Challenge:

Write a custom date binder that applies to all Date properties in an inheritance hierarchy, and takes 3 fields from the input - a DD/MM/YYYY string and an HH and a MM, and binds them into a single date. Now make that return appropriate errors for each field if validation fails.

At the very least, can't we abstract binding so that we can supply different impls if we like?

I am pretty sure a pure groovy implementation would perform comparatively well (given not much goes through binding) and only be a few dozen lines...

Death to property editor!

Marc
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java)

Blog         > http://www.anyware.co.uk
Twitter      > http://twitter.com/wangjammer5
Grails Rocks > http://www.grailsrocks.com








---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email