You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2006/07/18 16:16:16 UTC

Re: Resource Type / Document expires [was: svn commit: r422950 - in /lenya/trunk/src: ]

Doug Chestnut wrote:

[...]

>> The code below would be moved to the DocumentImpl class.
>> IMO the approach below is that it is not really object oriented:
>> The document and resource type objects serve only as "data providers",
>> but the logic is executed by the input module. I'd prefer to
>> encapsulate the logic and the data in the Document object.

> Totally agree, any better now?  I moved the conversion from seconds to a 
> date string to the document and resourcetype.

That looks great, thanks a lot! :)

Just one more issue:

IMO the Document.getExpires() and ResourceType().getExpires() shouldn't
return a formatted string, but rather either an integer (number of
seconds) or a Date object. The date format is specific to the particular
usage scenario (HTTP headers), which might be seen as closely related to
the  input module functionality - so IMO the date formatting could be
done by the input module.

WDY (and the others) T?

-- Andreas


-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
andreas.hartmann@wyona.com                     andreas@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Resource Type / Document expires [was: svn commit: r422950 - in /lenya/trunk/src: ]

Posted by Doug Chestnut <dh...@virginia.edu>.
Opps, I meant tab.meta usecase.  It's not dublin core metadata (didn't 
see any dc elements that fit the need).  The expires value is stored in 
the lenya:expires element.

--Doug

Doug Chestnut wrote:
> Ok, now that those issues have been addressed.
> How should we make the experation of a document editable?  via the 
> tab.overview usecase?
> 
> --Doug
> 
> Andreas Hartmann wrote:
> 
>> Doug Chestnut wrote:
>>
>>>
>>>
>>> Andreas Hartmann wrote:
>>
>>
>>
>> [...]
>>
>>>> IMO the Document.getExpires() and ResourceType().getExpires() shouldn't
>>>> return a formatted string, but rather either an integer (number of
>>>> seconds) or a Date object. The date format is specific to the 
>>>> particular
>>>> usage scenario (HTTP headers), which might be seen as closely 
>>>> related to
>>>> the  input module functionality - so IMO the date formatting could be
>>>> done by the input module.
>>>>
>>>> WDY (and the others) T?
>>
>>
>>
>>> I agree, I prefer the Date object over the number of seconds,
>>
>>
>>
>> OK, I think this is the better solution (no javadocs needed to
>> understand the method)
>>
>>> thanks for the review!
>>
>>
>>
>> Thanks for the quick response! :)
>>
>> -- Andreas
>>
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Resource Type / Document expires [was: svn commit: r422950 - in /lenya/trunk/src: ]

Posted by Doug Chestnut <dh...@virginia.edu>.
Ok, now that those issues have been addressed.
How should we make the experation of a document editable?  via the 
tab.overview usecase?

--Doug

Andreas Hartmann wrote:
> Doug Chestnut wrote:
> 
>>
>>
>> Andreas Hartmann wrote:
> 
> 
> [...]
> 
>>> IMO the Document.getExpires() and ResourceType().getExpires() shouldn't
>>> return a formatted string, but rather either an integer (number of
>>> seconds) or a Date object. The date format is specific to the particular
>>> usage scenario (HTTP headers), which might be seen as closely related to
>>> the  input module functionality - so IMO the date formatting could be
>>> done by the input module.
>>>
>>> WDY (and the others) T?
> 
> 
>> I agree, I prefer the Date object over the number of seconds,
> 
> 
> OK, I think this is the better solution (no javadocs needed to
> understand the method)
> 
>> thanks for the review!
> 
> 
> Thanks for the quick response! :)
> 
> -- Andreas
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Resource Type / Document expires [was: svn commit: r422950 - in /lenya/trunk/src: ]

Posted by Andreas Hartmann <an...@apache.org>.
Doug Chestnut wrote:
> 
> 
> Andreas Hartmann wrote:

[...]

>> IMO the Document.getExpires() and ResourceType().getExpires() shouldn't
>> return a formatted string, but rather either an integer (number of
>> seconds) or a Date object. The date format is specific to the particular
>> usage scenario (HTTP headers), which might be seen as closely related to
>> the  input module functionality - so IMO the date formatting could be
>> done by the input module.
>>
>> WDY (and the others) T?

> I agree, I prefer the Date object over the number of seconds,

OK, I think this is the better solution (no javadocs needed to
understand the method)

> thanks for the review!

Thanks for the quick response! :)

-- Andreas




-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
andreas.hartmann@wyona.com                     andreas@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Resource Type / Document expires [was: svn commit: r422950 - in /lenya/trunk/src: ]

Posted by Doug Chestnut <dh...@virginia.edu>.

Andreas Hartmann wrote:
> Doug Chestnut wrote:
> 
> [...]
> 
>>> The code below would be moved to the DocumentImpl class.
>>> IMO the approach below is that it is not really object oriented:
>>> The document and resource type objects serve only as "data providers",
>>> but the logic is executed by the input module. I'd prefer to
>>> encapsulate the logic and the data in the Document object.
> 
> 
>> Totally agree, any better now?  I moved the conversion from seconds to 
>> a date string to the document and resourcetype.
> 
> 
> That looks great, thanks a lot! :)
> 
> Just one more issue:
> 
> IMO the Document.getExpires() and ResourceType().getExpires() shouldn't
> return a formatted string, but rather either an integer (number of
> seconds) or a Date object. The date format is specific to the particular
> usage scenario (HTTP headers), which might be seen as closely related to
> the  input module functionality - so IMO the date formatting could be
> done by the input module.
> 
> WDY (and the others) T?
I agree, I prefer the Date object over the number of seconds, thanks for 
the review!

--Doug
> 
> -- Andreas
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org