We’ve had a few new articles hit the wiki recently which highlight very technical aspects of Apex. Apex is a very flexible language that can accomplish quite a bit with only a few lines of code – but that ability means that developers often don’t have a lot of experience that leads up to architecting large applications on the platform. Here are some words of wisdom which can help an Apex developer navigate some of the issues when creating more complex applications.
Apex Enterprise Design Patterns
FinancialForce.com is no stranger to creating large, complex, powerful Force.com applications and in this series of articles, Andrew Fawcett will walk you through some of the design patterns they have used in Apex to keep these applications sane. It’s an important look into how Apex can go from being a single class that controls a Visualforce page to a language capable of maintaining an entire modern web application. There are four articles, which walk you through the various parts of a design model called Separation of Concerns, of which these three design patterns were originally defined by the accomplished software consultant and speaker Martin Fowler:
- Apex Enterprise Patterns – Separation of Concerns
- Apex Enterprise Patterns – Service Layer
- Apex Enterprise Patterns – Domain Layer
- Apex Enterprise Patterns – Selector Layer
Also check out this wiki article on Apex Design Patterns from a Dreamforce 2012 session.
Application Performance Profiling in Force.com
Once you’ve got your application designed and are on the way to coding and implementation, you’ll want to keep an eye on performance. Simple interfaces and application logic usually run as expected, but as you crank the complexity you are also potentially going to open yourself up to bottlenecks and slowdowns. Right from your browser, via the Developer Console, Force.com has tools to help you debug your code and see where things are speedy and things are not.
Read all about in Daisuke Kawamoto‘s excellent wiki article A Guide to Application Performance Profiling in Force.com - which will walk you through how to use the Developer Console to pinpoint issues in both Apex and Visualforce.
Creating a Spreadsheet with Apex and Visualforce
Here is smaller, simpler concept – how to create spreadsheet like functionality on a Visualforce page … but the design is a good reminder that you can accomplish a relatively complex interface with an equally simple design. Riezel Ramos develops prototypes here at Salesforce.com and this article walks you through the basics and links to a package you can install to try out the code yourself.
So there you go – lots of reading material for your Apex benefit. Always keep an eye on developer.force.com for more feature articles, and if you’ve got any ideas or suggestions for new material – feel free to add them to the boxes below, or catch me on twitter.