There ain't any bible related to Salesforce lightning as of yet, as this is still under user/client adaption. Salesforce is pushing Lightning to their customers. Here are few best practices currently available from the salesforce official docs (first two points).
- Events Best Practices
- Best Practices for Conditional Markup
- if you are using jQuery, check this out.
I found this link quite useful while learning basics about lightning.
Edit
After going through few examples in lightning, lightning trailhead explains the required
attribute in the following way
The <lightning:input>
tag has its required attribute set to
true. This illustrate only one meaning of required, which is “set the
user interface of this element to indicate the field is required.” In
other words, this is cosmetic only. There’s no protection for
the quality of your data here.
So, if the required
attribute is only cosmetic, when and how it is used. This attribute is useful when used in conjunction with your JS controller function.
var validExpense = component.find('expenseform').reduce(function (validSoFar, inputCmp) {
// Displays error messages for invalid fields
inputCmp.showHelpMessageIfInvalid();
return validSoFar && inputCmp.get('v.validity').valid;
}, true);
The JavaScript reduce()
method reduces the array to a single value
that’s captured by validSoFar, which remains true until it finds an
invalid field, changing validSoFar to false. An invalid field can be a
required field that’s empty, a field that has a number lower than a
specified minimum number, among many others.
The word “required” is nowhere to be seen in the above JS code, but that’s what the validation logic enforces. You must set a value for the expense name field.