Migration from @Property

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Migration from @Property

graemer
Hello users,

I have upgraded the Groovy jar recently and what it means is that the
@Property syntax is no longer required (and will eventually
disappear). This is the last syntax change in the Groovy language
before 1.0, but it makes Grails development much nicer!

As an example defining actions within a controller is now:

def list = {}

instead of

@Property list = {}

And domain classes no longer need the @Property before each property:

class User {
       Long id
       Long version
}

I will be migrating the scaffolded templates across to the new syntax
shortly. For the moment current code will work without change, but the
plan is to eventually phase out the usage of @Property

Cheers,

Graeme

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Migration from @Property

Gregory Pierce-2
Too bad. I actually liked @Property because it was explicit. Oh well,  
I will adjust :)

Have they updated the classloader in their most recent release?



On Jun 12, 2006, at 12:45 PM, Graeme Rocher wrote:

> Hello users,
>
> I have upgraded the Groovy jar recently and what it means is that the
> @Property syntax is no longer required (and will eventually
> disappear). This is the last syntax change in the Groovy language
> before 1.0, but it makes Grails development much nicer!
>
> As an example defining actions within a controller is now:
>
> def list = {}
>
> instead of
>
> @Property list = {}
>
> And domain classes no longer need the @Property before each property:
>
> class User {
>       Long id
>       Long version
> }
>
> I will be migrating the scaffolded templates across to the new syntax
> shortly. For the moment current code will work without change, but the
> plan is to eventually phase out the usage of @Property
>
> Cheers,
>
> Graeme
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>    http://xircles.codehaus.org/manage_email
>


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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Migration from @Property

graemer
On 6/12/06, Gregory Pierce <[hidden email]> wrote:
> Too bad. I actually liked @Property because it was explicit. Oh well,
> I will adjust :)
Really? You're one of the few.. ;-)

>
> Have they updated the classloader in their most recent release?

There hasn't been a release I merely built Groovy from sources to get
the necessary changes, and yes one of the reasons for doing it is that
the classloader changes done by jochen are now available :-)

If you want to start looking at taking advantage of this to simplify
GORM let me know.

Graeme

>
>
>
> On Jun 12, 2006, at 12:45 PM, Graeme Rocher wrote:
>
> > Hello users,
> >
> > I have upgraded the Groovy jar recently and what it means is that the
> > @Property syntax is no longer required (and will eventually
> > disappear). This is the last syntax change in the Groovy language
> > before 1.0, but it makes Grails development much nicer!
> >
> > As an example defining actions within a controller is now:
> >
> > def list = {}
> >
> > instead of
> >
> > @Property list = {}
> >
> > And domain classes no longer need the @Property before each property:
> >
> > class User {
> >       Long id
> >       Long version
> > }
> >
> > I will be migrating the scaffolded templates across to the new syntax
> > shortly. For the moment current code will work without change, but the
> > plan is to eventually phase out the usage of @Property
> >
> > Cheers,
> >
> > Graeme
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >    http://xircles.codehaus.org/manage_email
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Migration from @Property

Gregory Pierce-2
Yep, I'll start taking a look. I need to see if Jochen's sample code  
is available.


On Jun 12, 2006, at 4:48 PM, Graeme Rocher wrote:

> On 6/12/06, Gregory Pierce <[hidden email]> wrote:
>> Too bad. I actually liked @Property because it was explicit. Oh well,
>> I will adjust :)
> Really? You're one of the few.. ;-)
>
>>
>> Have they updated the classloader in their most recent release?
>
> There hasn't been a release I merely built Groovy from sources to get
> the necessary changes, and yes one of the reasons for doing it is that
> the classloader changes done by jochen are now available :-)
>
> If you want to start looking at taking advantage of this to simplify
> GORM let me know.
>
> Graeme
>>
>>
>>
>> On Jun 12, 2006, at 12:45 PM, Graeme Rocher wrote:
>>
>> > Hello users,
>> >
>> > I have upgraded the Groovy jar recently and what it means is  
>> that the
>> > @Property syntax is no longer required (and will eventually
>> > disappear). This is the last syntax change in the Groovy language
>> > before 1.0, but it makes Grails development much nicer!
>> >
>> > As an example defining actions within a controller is now:
>> >
>> > def list = {}
>> >
>> > instead of
>> >
>> > @Property list = {}
>> >
>> > And domain classes no longer need the @Property before each  
>> property:
>> >
>> > class User {
>> >       Long id
>> >       Long version
>> > }
>> >
>> > I will be migrating the scaffolded templates across to the new  
>> syntax
>> > shortly. For the moment current code will work without change,  
>> but the
>> > plan is to eventually phase out the usage of @Property
>> >
>> > Cheers,
>> >
>> > Graeme
>> >
>> >  
>> ---------------------------------------------------------------------
>> > To unsubscribe from this list please visit:
>> >
>> >    http://xircles.codehaus.org/manage_email
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>    http://xircles.codehaus.org/manage_email
>


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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Migration from @Property

Jochen Theodorou
Gregory Pierce schrieb:
> Yep, I'll start taking a look. I need to see if Jochen's sample code is
> available.

you are speaking about the property injection? That's added as test case
and it is available in the issue in the groovy jira.

by blackdrag

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Migration from @Property

graemer
Hi Greg,

I've made a start on this, see
http://cvs.grails.codehaus.org/changelog/grails/grails?cs=MAIN:graeme:20060620142458

The interfaces defined should make it fairly easy and extensible to
add properties to classes in this way

Graeme

On 6/13/06, Jochen Theodorou <[hidden email]> wrote:

> Gregory Pierce schrieb:
> > Yep, I'll start taking a look. I need to see if Jochen's sample code is
> > available.
>
> you are speaking about the property injection? That's added as test case
> and it is available in the issue in the groovy jira.
>
> by blackdrag
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Migration from @Property

Jochen Theodorou
Graeme Rocher schrieb:
> Hi Greg,
>
> I've made a start on this, see
> http://cvs.grails.codehaus.org/changelog/grails/grails?cs=MAIN:graeme:20060620142458 
>
>
> The interfaces defined should make it fairly easy and extensible to
> add properties to classes in this way

but no injection is actually done, right? You have jsut commited
infrastructor?

bye blackdrag

--
Jochen Theodorou
Groovy Tech Lead

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Migration from @Property

graemer
On 6/20/06, Jochen Theodorou <[hidden email]> wrote:

> Graeme Rocher schrieb:
> > Hi Greg,
> >
> > I've made a start on this, see
> > http://cvs.grails.codehaus.org/changelog/grails/grails?cs=MAIN:graeme:20060620142458
> >
> >
> > The interfaces defined should make it fairly easy and extensible to
> > add properties to classes in this way
>
> but no injection is actually done, right? You have jsut commited
> infrastructor?
Yes thats right, no injection happening just yet.. this is just the
outline and interfaces of how it will work

Graeme

>
> bye blackdrag
>
> --
> Jochen Theodorou
> Groovy Tech Lead
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

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

    http://xircles.codehaus.org/manage_email