AW: PropertyModels *without* strings

2009-11-26 Thread Giambalvo, Christian
Lombok looks preety cool.
I think i will use it cause it saves a lot of typing and holds equals and 
hashcode in sync.


-Ursprüngliche Nachricht-
Von: Gerolf Seitz [mailto:gerolf.se...@gmail.com] 
Gesendet: Donnerstag, 26. November 2009 19:36
An: users@wicket.apache.org
Betreff: Re: PropertyModels *without* strings

that's why i was wondering about a lombok based bindgen implementation,
since
lombok is available as apt processor  and eclipse plugin :)

On Thu, Nov 26, 2009 at 5:13 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you guys are missing the point. Bindgen is a *standard apt processor*.
 it is not an eclipse plugin. all major IDEs have support for
 annotation processors baked in.

 refactoring support is definetely *possible*, but it would require an
 actual IDE pliugin.

 -igor

 On Thu, Nov 26, 2009 at 5:20 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
  Ah.. the next big thing, (in) refactoring (bindings?)!!! All glory to
  the person that does it.
 
  **
  Martin
 
  2009/11/26 Johan Compagner jcompag...@gmail.com:
 
 http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ltk/core/refactoring/participants/package-summary.html
 
  On Thu, Nov 26, 2009 at 13:52, James Carman 
 jcar...@carmanconsulting.comwrote:
 
  Refactoring could definitely be supported in IDEA.  With the Hibernate
  support, when you change a property name it will change your mapping
  hbm.xml (yes, we still use them) files for you automatically.  Same
  thing happens with the Spring support.  The configuration files are
  changed for you.  I don't know how eclipse works with this kind of
  stuff, but IDEA definitely has hooks for this kind of stuff.
 
  On Thu, Nov 26, 2009 at 2:28 AM, Martin Makundi
  martin.maku...@koodaripalvelut.com wrote:
   If refactoring is not supported it is just easier to use string
   constants, which do not break.
  
   **
   Martin
  
   2009/11/26 Gerolf Seitz gerolf.se...@gmail.com:
   as far as i have read, the binding methods aren't automatically
  refactored
   (eg. renamed),
   but you get compiler errors in the code where you use the old
 names.
  so it
   should be
   fairly easy to fix your own code (in contrast to some strings)
  
   On Thu, Nov 26, 2009 at 8:04 AM, Giambalvo, Christian 
   christian.giamba...@excelsisnet.com wrote:
  
   Is refactoring available for bindgen?
  
   -Ursprüngliche Nachricht-
   Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
   Gesendet: Mittwoch, 25. November 2009 22:56
   An: users@wicket.apache.org; d...@wicket.apache.org
   Betreff: PropertyModels *without* strings
  
  
  
 
 http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/
  
   -igor
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




AW: PropertyModels *without* strings

2009-11-25 Thread Giambalvo, Christian
Is refactoring available for bindgen?

-Ursprüngliche Nachricht-
Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Gesendet: Mittwoch, 25. November 2009 22:56
An: users@wicket.apache.org; d...@wicket.apache.org
Betreff: PropertyModels *without* strings

http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/

-igor

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AW: PropertyModels *without* strings

2009-11-25 Thread Giambalvo, Christian
Ok thanks.
 
-Ursprüngliche Nachricht-
Von: Gerolf Seitz [mailto:gerolf.se...@gmail.com] 
Gesendet: Donnerstag, 26. November 2009 08:19
An: users@wicket.apache.org
Betreff: Re: PropertyModels *without* strings

as far as i have read, the binding methods aren't automatically refactored
(eg. renamed),
but you get compiler errors in the code where you use the old names. so it
should be
fairly easy to fix your own code (in contrast to some strings)

On Thu, Nov 26, 2009 at 8:04 AM, Giambalvo, Christian 
christian.giamba...@excelsisnet.com wrote:

 Is refactoring available for bindgen?

 -Ursprüngliche Nachricht-
 Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Gesendet: Mittwoch, 25. November 2009 22:56
 An: users@wicket.apache.org; d...@wicket.apache.org
 Betreff: PropertyModels *without* strings


 http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/

 -igor

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




AW: PropertyModels *without* strings

2009-11-25 Thread Giambalvo, Christian
You're right, it's an improvment. And will use it.
I just wanted to know is refactoring is supported.
Anyway it's a nice thing.
Thanks for that :)
Greets

-Ursprüngliche Nachricht-
Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Gesendet: Donnerstag, 26. November 2009 08:44
An: users@wicket.apache.org
Betreff: Re: PropertyModels *without* strings

the whole point is that strings brake, whether they are constants or not.

eg

add(new Label(parentName, new PropertyModel(person, parent.name)));

suppose you rename Person.getName() to Person.getFullName(). now you
have to find all places in your code where you have referenced name
as part of a string property expression and change it to fullName.
if you miss somewhere you wont know until runtime. in my projects a
lot of objects have a name field, so the process of identifying all
the places that need to be updated involves sifting through a bunch of
strings and figuring out if what is before the .name is of type
Person. tedious and error-prone.

although bindgen does not support refactoring, as soon as the change
is made all the places that need to be updated will be reported by the
compiler. that is an *enormous* improvement in non-trivial
applications.

another big advantage is that bindings carry type information, eg:

add(new TextFieldInteger(age, new PropertyModel(person, age)));

there is no way to verify that age expression is of type Integer and
not a value object or a string, but bindgen bindings are typesafe and
a non-Integer binding would cause a compilation error.

i am actually somewhat shocked that someone can look at this and not
see the value. this fills in a huge gap in java until methods and
fields become first-class citizens. but, maybe im just weird.

-igor

On Wed, Nov 25, 2009 at 11:28 PM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 If refactoring is not supported it is just easier to use string
 constants, which do not break.

 **
 Martin

 2009/11/26 Gerolf Seitz gerolf.se...@gmail.com:
 as far as i have read, the binding methods aren't automatically refactored
 (eg. renamed),
 but you get compiler errors in the code where you use the old names. so it
 should be
 fairly easy to fix your own code (in contrast to some strings)

 On Thu, Nov 26, 2009 at 8:04 AM, Giambalvo, Christian 
 christian.giamba...@excelsisnet.com wrote:

 Is refactoring available for bindgen?

 -Ursprüngliche Nachricht-
 Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Gesendet: Mittwoch, 25. November 2009 22:56
 An: users@wicket.apache.org; d...@wicket.apache.org
 Betreff: PropertyModels *without* strings


 http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/

 -igor

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org