Now that the validation component has progressed, we can start mixing it in for usage.
This video is a part of a series, you'll want to watch the earlier lessons before this one.
One problem that I'm having with this series is keeping what you're saying... straight. What i mean is, its hard to visualize the code/execution flow of whats going on... when I'm writing code one thing I do to help other people keep track of how a class works is by creating a code flow diagram... which looks something like this:
| - spacer that imply's connection. used for readability.
|=> - is made of
---> - calls
=result= - end result of flow
|| - or
&& - and
UpperCase - Class
camelCase - method / closure
__privateCase -private function
Ex: (This is not going to be very accurate but should get point across)
BaseClass
|
|=> Validatable
|=> Errorable
|=> Cachable
Validatable
|
|=>Validator
|---> checkOptions ---> __selectValidationFunction ---> ValidationFn
|
|
|=>ValidationFn
|---> __checkOptionValidity ---> =throwError= || =returnValidity=
the purpose is just to show a 1000ft view of how the code flows; just helps someone see the structure of stuff. Kinda like a road map.
Thoughts?
(ps I'd have gone
Totally agree with Andrew here. It's very hard to follow the flow through all different kinds of factories. You should add some kind of diagram of the structure and data flow. Also, I feel the validation videos are a bit off topic. I wanted to see how the data model would handle requests etc. which is kind of its core function, but the series suddenly turned into a validation guide. I agree validation is an important feature to have, but I'd say it's something you add to the data model once it's completed. At least that would make these series easier to follow.