> 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 have a constant PERSON.NAME all you need to do is refactor the
constant and change the constant value. Instead of going through
hundreds of broken lines of code, which is a mess even just in
principle.

I would say that refactoring calls for improvement in the bindgen
approach. Is it theoretically possible to facilitate refactoring with
bindgen? Is it practically possible to facilitate refactoring with
bindgen?

> add(new TextField<Integer>("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.

This is a great big plus.

> 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.

I'm just saying that it should be made even better.

**
Martin


>
> 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

Reply via email to