Wrapping SESSION system handle; good, bad or just plain ugly? - Forum - OpenEdge Development - Progress Community

Wrapping SESSION system handle; good, bad or just plain ugly?

 Forum

Wrapping SESSION system handle; good, bad or just plain ugly?

  • Subject says most of it: do you create wrapper objects for the built-in "handle objects" like SESSION or, I dunno, CLIENT-PRINCIPAL?

    I'm largely simply curious; I'm somewhat ambivalent: on the one hand, it allows me to extend that object and have a consistent interface; other other, it seems like make-work (doing it just for the sake of doing it).

    -- peter

  • There are those who seem to want to wrap everything, just in case they need it, but there is also a good argument that generalization hierarchies should be no deeper than they need to be.  My sense is that I wouldn't wrap it just for the sake of wrapping it, but if there is some real purpose, something accomplished, then fine.

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • On our site, I've created a custom additional session object to be able to add properties (e.g. current user) that aren't available in the SESSION.

  • dlauzon wrote:

    On our site, I've created a custom additional session object to be able to add properties (e.g. current user) that aren't available in the SESSION.

    So it's a complementary object for your custom stuff; you still use the SESSION handle for whatever it's got on it? (my thoughts lie in this direction).

    -- peter

  • I see this as a question of cohesion.  Would you put those properties together in the same object regardless of source or wouldn't you?

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • So it's a complementary object for your custom stuff; you still use the SESSION handle for whatever it's got on it?

    Exactly.