subschema copy

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

subschema copy

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:54 pm

by rob >> Sun, 16 Oct 2005 20:31:22 GMT

Methods are defined on the class to which they relate (encapsulation), but if the method is specific to a particular view, should it be defined in the model schema or the appropriate view schema (on a subschema copy class), e.g.

Transaction.displayForMarketingReport()
Customer.formatForBulkLoadTable()

I've seen subschema copy used for this purpose, but only very rarely. Is subschema copy all bad?

Thoughts appreciated ...

Cheers,
Robert

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: subschema copy

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:54 pm

by Robert >> Thu, 20 Oct 2005 23:27:05 GMT

Okay, I'll answer my own posting, if no-one else will.

The following follows a discussion with a Jade authority ... the bottom line is that using subschema copy classes to define methods in a specific view schema is a sound practice. These methods are usually doing some formatting specific to a particular form or report, and should be named as such (as per above examples), so they don't prevent later addition of generic methods in the model schema.

Some background on subschema copy methods - in the past there were limitations when accessing objects across peer schemas - these underlying limitations were removed when packages were introduced.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 5 guests