function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
saleforce beesaleforce bee 

Design pattern for APEX coding

Do we have any design pattern for salesforce data(model) accessing.


In .NET we do have enterprise library to access the data model.. here we have such design patterns


Go to setup-->App Setup-->Schema Builder


i think schema builder can help you.

saleforce beesaleforce bee


A design pattern is a general repeatable solution to a commonly occurring problem in software design.


For example, Fetching data from Data model is a repeated task for all the applications, in this scenario we should have a common class to do this activity without writing the bunch of code to do it

Anyone help me here to provide some design pattern for custom application design




Actually, the built in DML functions take care of all your database needs. Your CRUD functions are built at the object level. You insert an instance of an object and, using SOQL, you query an instance of an object.


You don't have to built table level functions to save and retrieve object data and then populate your objects, for your data layer. It is provided for you in the DML statements.