Don't name classes after System classes

Do not create classes using standard object names!

Each defined object, custom or standard, is automatically represented by its own apex class.

It might be tempting to create class like this:

Don't do this
Don't name classes after System classes — screenshot 1

This will lead to unexpected results.

Each defined object, custom or standard, is automatically represented by its own apex class.

When we overwrite this default class, each existing or new reference is replaced by the new class, which is usually lacking a lot of implementation.

In the best-case scenario, you will see something like this:

Don't name classes after System classes — screenshot 2

In the worst-case scenario, your entire Salesforce instance might have problems operating!

Text and code were extracted from the original slide. Plain-text version of the whole catalog