Update: Dreamforce is over for another year! Thanks to everyone who supported me and came along to the session. Salesforce have now uploaded a recording of the session here and can find the slides here.
As part of this years Dreamforce 2013 event I will be once again running a session on Apex Enterprise Patterns, following up on my recent series of developer.force.com articles. Here is the current abstract for the session, comments welcome!
Building Strong Foundations: Apex Enterprise Patterns “Any structure expected to stand the test of time and change, needs a strong foundation! Software is no exception, engineering your code to grow in a stable and effective way is critical to your ability to rapidly meet the growing demands of users, new features, technologies and platform features. You will take away architect level design patterns to use in your Apex code to keep it well factored, easier to maintain and obey platform best practices. Based on a Force.com interpreation of Martin Fowlers Enterprise Architecture Application patterns and the practice of Separation of Concerns.” (Draft)
I’ve recently started to populated a dedicated Github repository that contains only the working sample code (with the library code in separate repo). So that i can build out a real working sample application illustrating in practical way the patterns in action. It already covers a number of features and use cases such as…
- Layering Apex logic by applying Separation of Concerns
- Visualforce controllers and the Service Layer
- Triggers, validation, defaulting and business logic encapsulation via Domain layer
- Applying object orientated programming inheritance and interfaces via Domain layer
- Managing DML and automatic relationship ‘stitching’ when inserting records via Unit Of Work pattern
- Factoring, encapsulating and standardising SOQL query logic via Selector layer
The following are ideas I’ll be expanding on in the sample application in preparation for the session…
- Apex testing without SOQL and DML via the Domain Layer
- Exposing a custom application API, such as REST API or Apex API via Service Layer
- Reuse and testing SOQL query logic in Batch Apex context via Selector Layer
- Rich client MVC frameworks such as AngularJS and Service Side SOC
What do you think and what else would you like to see and discuss in this session?