Tagged Questions

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

learn more… | top users | synonyms

0
votes
2answers
22 views

Patterns or options for public application, such as a discussion forum, without heavy license costs?

Does anyone know of any development patterns or platform features/options to allow a developer to create a Force.com application, such as a discussion forum, and not have to pay for each and every ...
8
votes
3answers
163 views

Checking 'Correct' Previous value method in Trigger design best practice

One of the most common questions on this forum is around trigger recursion. There are a few standard ways to prevent recursion. My method of choice when it comes to checking for field changes, is ...
4
votes
3answers
243 views

Are trigger frameworks ALWAYS necessary?

When working on a small org with a few simple triggers, I feel that using a trigger framework easily bloats the code base and a bit overkill as well. I admit this is short-sighted as requirements may ...
2
votes
0answers
40 views

How are real-world products modelled?

In Salesforce you define an object with a strongly typed set of properties and Salesforce will give you list views, details pages and create pages for free. By "reflecting" over the property types, it ...
2
votes
2answers
83 views

Salesforce design to support both Workflow field update and Trigger [duplicate]

I am having a use case where I've to do both Trigger and workflow field update. There are 2 objects. One is Case and other one is Case_child__c and Case is master and other is child. I'm having an ...
2
votes
1answer
28 views

functionality duplication design

We have developed one batch apex functionality along with some complex operations on custom object - Comp_Invest_DOC_process__c. Now user asking us to develop exact same functionality on another new ...
0
votes
0answers
30 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
289 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
536 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
769 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
306 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
102 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
230 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
325 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
323 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 ...
7
votes
2answers
820 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 ...
6
votes
2answers
1k 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 ...
6
votes
1answer
2k 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
353 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
642 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, ...