Code simple, Code right. – simple code, correct code. (Part 2)

To recap from my last post:

 

Best Practices.

– know how to name the class, its variables, constants, methods…

– know how to comment and not create an explanatory book or not comment on anything

– knowing that the method should only perform one thing in each method

– know that the variables have to be based on the intent of your need

– know that the use of constants should be minimalist and private

– knowing that not only do we have to create the code but that we really care about the coverage of this code.

 

Another super important point is the separation of points of attention. (SOC – separation of concerns).

Why use declarative mode of code mode.

Oops, but we are developers and we want to code. Developers don’t always code in the Salesforce world!!!

But that’s a conversation for another time.

This point of attention is what separates the impact of your work in an org, what makes it relevant and well structured.

Here we talk about what to do and not how to do it.

For example.

Visual presentation mode.

Declarative – layouts, flow, record type, formulas, reports, dashboards.

Coding – Apex, Visualforce page, lightning component.

What this example tells us, tells us how the developer should know how to choose the best way to build the requested functionality.

In the best way to use what the system provides, in the fastest and most acceptable way of structural architecture.

That’s why I always say that a developer shouldn’t just think like a developer and execute.

We have to have a critical and questioning point, like an architect has.

Thus, the combination of best practices and HOW-TO will transform us into Solution Developers and not requirements deliverers.