Skip to main content

Posts

Showing posts with the label args

Args and the Axapta Construction Pattern

When looking through Axapta code you will see a lot of references to the type Args. This type is used as a general method for sharing construction parameters. It works well because in the Axapta usage pattern because 1.the typical number of parameters is small 2.the types of parameters used is very similar 3.construction of the main objects often entails constructing multiple collaborating objects that need access to the same shared constructor arguments. In traditional OO code each object will have one or more constructors. These constructors would have different numbers of arguments and types, as required. For example, a class representing a form might have a default constructor that would simply show all the items in the table. It could also have a constructor that accepted a string that was used to highlight the row with a matching primary key, newSelect(str key). Or one that filtered all the values to match the provided range, newMinMax(str smin, str smax). Side note:...