[Building Sakai] Java Help - Builder Pattern and Setters

Aaron Zeckoski azeckoski at unicon.net
Tue Aug 13 05:34:17 PDT 2013


We should probably discuss this before we start cramming in this
everywhere in Sakai. I actually am strongly against this and have seen
multiple new developers to Sakai confused by it. I get that using
eclipse to generated getters takes a few clicks and makes the code a
little longer... but is it really so hard to do? Sure this saves a few
lines of code but at the expense of requiring special eclipse (or
other IDE) configuration and extra maven build and special dev
knowledge of what is happening (so they know why they don't see any
get and set methods like... 99% of java projects. It also completely
breaks compile time code scanning (around anything it inserts) but
that is a lesser concern.

I am not sold on it and I would prefer this be discussed as a group
before we start inserting it throughout the Sakai codebase (like any
new tech that we are adding in).

If we are going to start requiring this then those who support it need
to make an effort to clearly document the requirement in the release
notes, confluence, and in the code so it is clear that this is being
used and is now required in order to build Sakai.
-AZ


On Tue, Aug 13, 2013 at 8:23 AM, Steve Swinsburg
<steve.swinsburg at gmail.com> wrote:
> It is too easy. Its built for people who love sexy code. You love sexy code,
> right? I have already polluted (read: made sexy) a good chunk of Sakai with
> it ;)
>
>
> On Tue, Aug 13, 2013 at 10:11 PM, Charles Severance <csev at umich.edu> wrote:
>>
>>
>> On Aug 12, 2013, at 11:19 PM, Steve Swinsburg <steve.swinsburg at gmail.com>
>> wrote:
>>
>> Hi Chuck,
>>
>> I'd encourage you to look at the Lombok annotations to make the code
>> neater (ie eliminating all getters and setters). Specifically for this
>> pattern you may be able to use:
>> http://projectlombok.org/features/experimental/Builder.html
>>
>> There is a video on the lombok site that might twist your arm as to its
>> appeal.
>>
>> cheers,
>> Steve
>>
>>
>> I have watched that video many times with interest.  I love Lombok - but
>> don't exactly know why I am not ready to go to the dark side in my own code.
>> It seems so powerful.  It seems too easy :)
>>
>> /Chuck
>>
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org
> with a subject of "unsubscribe"



-- 
Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile


More information about the sakai-dev mailing list