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
sri123sri123 

Reg: Salesforce

What is the difference between Standard Controller & Controller?

Why "extensions"  helps in Apex?

 

please reply.....

 

Regards:

Sri

joshbirkjoshbirk

StandardControllers are prebuilt within Visualforce for standard and custom objects, so they don't require additional code on your part to perform basic functions.  See the doc page for specifics:

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_pages_standardcontroller.htm

 

Controllers and extensions are custom development.  A Visualforce page requires either a standardcontroller or controller to be interactive - so if the the standardcontroller won't do what you need, consider writing a new controller for the page.

 

Extensions allow you to write code which can be added to either a standardcontroller or controller.  For example, they're handy when you either need to a) add a little custom functionality to a standardcontroller but don't want to rewrite the whole thing or b) you have utility code that you need to apply to a variety of different pages:

 

http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_extension.htm

 

Hope that helps.