(More or Less) How PlanHW works.
Here’s how PlanHW works on a less technical level:
1. You write “Math Homework due Wednesday”
2. Angular.js lets my Javascript code know
3. I feed it through Chrono, which finds dates in your input.
4. My javascript creates a homework object
5. Angular shows you the homework object
6. You press create.
7. Angular tells me, and my Javascript code tells angular to send the homework object to my API.
8. Angular sends the homework to my api
9. Google Domains DNS routes my domain to Digital Ocean
9. Digital Ocean forwards traffic to my Ubuntu Droplet.
10. nginx takes that traffic, and sends it to one of 4 Unicorn workers.
11. Unicorn sends the request to Rack
12. Rack sends the request to Rails
13. Rails sends the request to my code
14. My code converts the Javascript homework object into a Homework model, which is then verified, and then sent to ActiveModel (part of Rails)
15. ActiveModel sends my data to ActiveRecord, which translates my new homework request to sql code, with is send to mysql.
16. ActiveRecord updates the homework object to include an id, and other things, and I respond with the created homework object.
17. I render the response with jbuilder
18. Rack sends the request to Unicorn
19. Unicorn sends the request to nginx
20. nginx sends the request through Digital Ocean to back to your compute
21. Your browser tells angular that a response has been received
22. Angular tells my javascript code that the homework object was created successfully
23. My javascript updates the homework object with the new information from the server, and puts it in the homework list
24. Angular renders the homework list.
25. You see the list, and your newly created homework.
And that happened in less then a second.
















