Re: New Intermediate Format: How to handle extension attributes?

2009-01-02 Thread Jeremias Maerki
On 28.12.2008 02:11:09 The Web Maestro wrote:
 On Tue, Dec 23, 2008 at 5:28 AM, Jeremias Maerki d...@jeremias-maerki.ch 
 wrote:
  3. The IFDocumentHandler/IFPainter pair gets access to a context
  object where it can access to the currently applicable extension
  attributes. The context object would play adapter for the two different
  extension sources: Map from the area tree and Attributes from the
  IFParser. That would avoid any additional processing especially if no
  extension objects are present. The context object would be set on the
  IFDocumentHandler at the beginning.
 
  4. is a variant of 3 in which case the foreign object adapter would be
  available through a ThreadLocal.
 
  Personally, I prefer option 3 as it's the easiest to understand. In this
  case, I'd probably remove set/getUserAgent() in favor of
  set/getIFContext() and provide access to the user agent through the
  IFContext to avoid cluttering the IFDocumentHandler interface.
 
  Any other opinions or additional ideas? If I hear nothing I'll implement
  option 3.
 
 Option 3 sounds the best to me, although I don't fully comprehend the
 ramifications of each choice. But does it make sense to retain the
 current, deprecated set/getUserAgent() for convenience, even if it's
 mapped to the set/getIFContext() method?

It's not necessary to deprecate anything here as the whole new IF is
still work-in-progress. geUserAgent() could be retained for convenience,
though, but as a protected method, i.e. not as part of the interface.

 Happy Christmas from Park City, Utah!

And a happy new year everyone!



Jeremias Maerki



Re: New Intermediate Format: How to handle extension attributes?

2008-12-27 Thread The Web Maestro
On Tue, Dec 23, 2008 at 5:28 AM, Jeremias Maerki d...@jeremias-maerki.ch 
wrote:
 3. The IFDocumentHandler/IFPainter pair gets access to a context
 object where it can access to the currently applicable extension
 attributes. The context object would play adapter for the two different
 extension sources: Map from the area tree and Attributes from the
 IFParser. That would avoid any additional processing especially if no
 extension objects are present. The context object would be set on the
 IFDocumentHandler at the beginning.

 4. is a variant of 3 in which case the foreign object adapter would be
 available through a ThreadLocal.

 Personally, I prefer option 3 as it's the easiest to understand. In this
 case, I'd probably remove set/getUserAgent() in favor of
 set/getIFContext() and provide access to the user agent through the
 IFContext to avoid cluttering the IFDocumentHandler interface.

 Any other opinions or additional ideas? If I hear nothing I'll implement
 option 3.

Option 3 sounds the best to me, although I don't fully comprehend the
ramifications of each choice. But does it make sense to retain the
current, deprecated set/getUserAgent() for convenience, even if it's
mapped to the set/getIFContext() method?

Happy Christmas from Park City, Utah!

Regards,

The Web Maestro
-- 
the.webmaes...@gmail.com - http://ourlil.com/
My religion is simple. My religion is kindness.
- HH The 14th Dalai Lama of Tibet