Force.com Design Patterns - Part 2

Learn about common (and not-so-common) design patterns on the Force.com platform, with in-depth tutorials of actual applications
Course info
Rating
(36)
Level
Intermediate
Updated
May 2, 2013
Duration
1h 45m
Table of contents
Description
Course info
Rating
(36)
Level
Intermediate
Updated
May 2, 2013
Duration
1h 45m
Description

Part 2 of this course covers test design patterns, Visualforce architecture and JavaScript Remoting using Knockout.js to demonstrate real-time data binding from DOM to SObject. It concludes with a unique Apex design pattern that's tailor made for the Force.com platform called the Flow Factory. This stateful pattern organizes the business logic of a conceptual flow chart by leveraging both the Strategy and the Factory Method design patterns while adding a few twists of its own.

About the author
About the author

Adam Purkiss is the Principal Architect at MondayCall Solutions in San Francisco. He spends most of his time designing and developing software in Apex and Visualforce and has been deeply involved in the Force.com community since 2008.

More from the author
Force.com Design Patterns - Part 1
Intermediate
3h 2m
Nov 27, 2012
Section Introduction Transcripts
Section Introduction Transcripts

Test Design Patterns
Welcome to part two of Force. com Design Patterns. In this first module, we're going to talk about various aspects of testing, monitoring, and debugging in Apex. As you probably know by now, unit tests are required in Apex and nothing less than 75% coverage is needed for your code to be deployed to production. So, writing unit tests gets a lot of attention. Not just because good tests are a good thing in general, but because they're not even optional. So we'll cover the process of writing effective tests in Apex, including the use of some of the latest features on the platform. And finally, we'll take a look at some helpful Apex design patterns that give you added control of your test executions, while also improving your visibility of problems when they arise.

Visualforce Architecture
In this module, we're going to take a look at the underlying architecture of Visualforce. With Visualforce, it's easy to get started, but equally easy to get lost down the road if you don't have an appreciation for some of its finer details, but understanding some of its more subtle technical nuances, you'll be empowered to produce great things on the platform and that is the goal of this module. After we cover Visualforce Architecture, I'll conclude with a walk-through and demo of an application that combines a popular JavaScript library called Knockout. js, with Visualforce and Apex.

Flow Factory Design Pattern
This final module of Force. com Design Patterns Part Two is dedicated to a hyper design pattern I came up with, in part out of necessity and also to produce more elegant code for dealing with flowchart style business logic, but the catalyst for designing this pattern was a response to one of the more challenging areas of Force. com development, namely managing more than one callout in a single execution context as part of a greater aggregate transaction, but regardless of callouts, Flow Factory organizes the business logic of a conceptual flow chart by leveraging both the strategy and the factory method design patterns in Apex, while adding a few twists of its own.