Alex,

In my experience, yes.  Though it depends a lot on the project.  

Some of the projects I have been on leverage a lot of structured data for 
building out pages and the process of  building out the DAO/DTO layer gets 
rather tedious, especially when you have to retrieve multiple resources to 
retrieve the data required.  

-Dan

-----Original Message-----
From: Alexander Klimetschek [mailto:aklim...@adobe.com] 
Sent: Tuesday, April 02, 2013 8:19 AM
To: dev@sling.apache.org
Subject: Re: Sling Dynamic Proxy

On 29.03.2013, at 20:14, Dan Klco <dan.k...@sixdimensions.com> wrote:

>                 @SlingProperty(name="jcr:created")
>                 public Date getCreationDate();

Is this really worth the additional complexity compared to the following?

public Date getCreationDate() {
    return properties.get("jcr:created", Date.class); }

This is far more flexible in case you want to do more complex things for 
certain getters...

Granted, you also need an adapter factory for that, but once that's set up, 
it's easy to add new adapters.

Cheers,
Alex

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3267 / Virus Database: 3161/6217 - Release Date: 03/31/13

Reply via email to