I am looking at the fflib-apex-common-samplecode, and I see that the AccountsSelector uses an interface IAccountsSelector, see below:
public class AccountsSelector extends fflib_SObjectSelector implements IAccountsSelector
{
public static IAccountsSelector newInstance()
{
return (IAccountsSelector) Application.Selector.newInstance(Account.SObjectType);
}
// ...
}
Which are the benefits of using the interface IAccountsSelector? Why not just using:
public class AccountsSelector extends fflib_SObjectSelector
{
public static AccountsSelector newInstance()
{
return Application.Selector.newInstance(Account.SObjectType);
}
// ...
}