A general reusable solution to a commonly occurring problem within a given context in software design

learn more… | top users | synonyms

0
votes
0answers
21 views

Generic Trigger Pattern or Development Suggestion [duplicate]

I've been looking around the internet for a way to have a Generic Apex trigger that I could use on all Objects, but it seems like that is impossible. Basically, I wanted to build an app that would ...
2
votes
1answer
159 views

Tech Spec Template [closed]

Need to create a tech spec document for a project I am working on that makes some web service calls to a VF page. I have a few templates for generic Software development Tech Spec documents, but was ...
4
votes
3answers
351 views

How to best structure code so it can be run synchronously and in Batch

This question is somewhat related to my other open question on the asynch/synch topic. Assume I would have an algorithm that could tell me that for a given customer org (data volumes and other ...
4
votes
3answers
575 views

Static vs Singleton

In a recent post, someone asked about implementing the Singleton Pattern in Apex, and I offered this link as a resource, and there was also this session at DF 11 that talked about the Singleton ...
1
vote
1answer
245 views

Best way to implement a singleton class in Apex

I am trying to create a singleton class for one of my apex classes and i am running into challenges. I created some static variables to control the instances but still i am running into multiple ...
0
votes
1answer
90 views

is there a business object layer in apex

We are building a custom force.com site application which uses custom objects with master detailed relationship. An example is a household which would have a collection of individuals and each ...
1
vote
1answer
197 views

“Triggers should contain no real implementation code, only callouts to utility methods”: agree or disagree? [closed]

This idea is so frequently quoted that I wonder if sometimes it is being blindly followed without much thought. Here are some points in favor of triggers containing implementation code: Keeping the ...
1
vote
1answer
247 views

Getting revised map <id, string> data back into original list under same id

I seem to be having difficulty getting data from a map back into a list so that it corresponds to the correct Id and field it was originally associated with after it's been modified in a trigger. For ...
5
votes
3answers
290 views

Controller extension design pattern help needed

Objective I'm trying to create a series of inline charts to be displayed on the detail of a record using either Visualforce Charting or Highcharts. The charts do need to be dynamically rerendered ...
6
votes
1answer
620 views

What are good design patterns for dynamic visualforce components for a data-driven input form?

I am designing a custom input form that will be data-driven and will display things like input fields, input text components, custom inputs that I create, etc. The elements on the form will be largely ...
5
votes
2answers
906 views

How to implement hashCode cleanly?

Being able to write your own equals/hashCode for a custom class seems appealing - see Non-primitive Types in Map Keys and Sets. But with no hashCode method exposed in Apex string or decimal or any of ...
5
votes
1answer
1k views

Dynamic execution of classes in Apex

How can I dynamically execute classes in Apex? What if I don't know at compile time which class should be instantiated? Rather, I would like to decide at runtime which class would be appropriate to ...
2
votes
2answers
300 views

Using the Entity–attribute–value model for sparse data

I'm looking at a design specification of a work request object that would if implemented purely as a standard salesforce object would cause very sparse columns requiring tens of recordtypes and ...
8
votes
2answers
504 views

Unit test SOQL limit setting up data model

I have run in to this situation where the data model is very complex and since SF doesn't support mocks (e.g., Mockito) there are so many SOQL executions in just setting up the data model (triggers, ...