On 04.04.2011, at 14:22, Marek Potociar wrote:
>
>
> On 04/04/2011 10:27 AM, Adam Bien wrote:
>> On 18.03.2011, at 11:23, Marek Potociar wrote:
>>> On 03/17/2011 10:05 PM, Adam Bien wrote:
>>>> IMHO readability of the code is the best without any annotations :-)
>>>
>>> What I mean by readability should be actually renamed to understandability. :)
>>> It means that one can look at the code and directly infer from it what it does, without a broader context or without
>>> having to consult additional information sources. Annotations bloat code to certain extent, but at the same time they
>>> provide useful additional meta data about the code to make it more understandable.
>>
>> Seriously: the context is JAX-RS. So we can assume that as general convention.
>
> My understanding is that there are very few, if any pure JAX-RS apps that would only contain JAX-RS resources. In that
> case it makes sense to be able to quickly distinguish JAX-RS artifacts from other code.
In demos - yes. In real world applications you will have a package with XYZResource classes which use services in the backend.
You are usually separating the communication protocol from the business logic (always did that).
>
>>>> Putting the name of the method inside @Path would violate the DRY principle.
>>>
>>> Not if it is considered just a coincidence, which is also our case.
>>
>> I have to disagree here. The method name in JAX-RS actually doesn't matters right now.
>> Putting a @Path("something") on a nameless method would be the DRY-est thing.Because it is not possible in Java, I would go with the convention.
>>
>> In JPA there are very similar conventions - the names of the attributes are just assumed as names of columns, what can be overridden.
>
> What I meant to say, that CURRENTLY it is just a coincidence as JAX-RS 1.x does not have any concept of CoC here. I
> don't have a strong opinion on this topic and I am open to discussion here. We need to look at various naming patterns
> people use and think about how to address them (getXxx vs. subXxx vs. xxx ...).
Even Bil Burke is convinced - and it was a hard talk :-)
>
>>>> *DRY + CoC should be a main theme across all specs in Java EE 7*
>>>
>>> I thought it is the Cloud... http://jcp.org/en/jsr/detail?id=342 ;)
>>>
>>> Marek
>>
>> My cloud is full of conventions - a convention cloud :-)
>
> You must be on cloud nine then :)