Author Archives: Biswajeet

About Biswajeet

Biswajeet is my Name, Success is my Aim and Challenge is my Game. Risk & Riding is my Passion and Hard Work is my Occupation. Love is my Friend, Perfection is my Habit and Smartness is my Style. Smiling is my Hobby, Politeness is my Policy and Confidence is my Power.

Radio Button in Visualforce Page

<apex:page >
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:pageBlockSectionItem >Gender
                    <apex:selectRadio >
                        <apex:selectOption itemLabel="Male" itemValue="m"/>
                        <apex:selectOption itemLabel="Female" itemValue="f"/>           
                    </apex:selectRadio>     
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Salesforce Apex Design Patterns

  • Singleton: Minimizing object instantiation for improved performance and to mitigate impact of governor limits.
  • Strategy: Defining a family of algorithms, enscapsulating each one and making them interchangeable and selectable at runtime.
  • Decorator: Extending the functionality of an sObject in Apex.
  • Facade: Simplifying the execution of classes with complex interfaces (e.g. web service callouts).
  • Composite: Treating a group of objects in a similar manner to a single instance of that object.
  • Bulk State Transition: Efficiently tracking the change of a field value in a trigger and executing functionality based on this change.