+ Start a Discussion

Best way to model discrete class libraries in Apex?

Is there a prescribed best practice to segmenting portions of your code artifacts into discrete class libraries?  For example, we have Apex utility classes, reusable custom VisualForce components (including their components, controller classes, etc.), and general-purpose business objects and their logic classes.  The applications themselves are built on top of those reusable layers.  The only support for packing/namespacing is through published managed packages (for example, I've installed apex-lang and can access those classes through the "al" namespace), so I was wondering if there's a set of prescribed best practices for this typical component-oriented organization of business logic artifacts.


I'd like to get my arms around this before our org really starts cranking so we're organizing well from the start.  Any pointers?