I believe the best way to go about this is by reading and learning from other frameworks and learning how others implement core aspects of a particular approach or routine by building dynamic web frameworks.
This will not only will help you learn from a working example but you will also learn how to improve upon things and make improvements over time. I would start with a simple framework like flask. Flask is extremely simple easy to use and high extendable.
If one wanted to learn about building cars they wouldn't start off with spare car-parts and a engine manual -- you would be better of taking apart an old Civic and learning about the inner workings and try putting it back together this is just my 2 cents.