###Where I succeeded
-src | --js | ---1underscore.js ---2backbone.js ---3models.js ---4views.js ---5collection.js ---6router.js
note: I’m loading jQuery in separately from a CDN.
Structuring my project folder this way allows me to load the JS in the correct order. Now, when they get parsed by your task runner they’ll be in the correct order to run.
After a few false starts I had gotten the post feed into my view, and it is outputting as I wanted. This felt like such a victory! I can now see all of my posts and click through … but this simple bit of functionality is currently far from finished.
Where I have yet to succeed
- Documentation is patchy. I started off by being able to retrieve the basic JSON feed from
/wp-json/, but couldn’t find out why I can’t see the posts. After some digging, I found out that the JSON endpoints haven’t been implemented in Wordpress core yet. We still need to use the plugin. In fact, I enjoy what I do because I can research things easily on Stack Exchange. But there’s not many people using Backbone with Wordpress, and I was distinctly on my own trying to find this out.
- No links. If you click on one of the links in the list view, Wordpress takes over and you will be shown the posts’ PHP page. This is because I have yet to wrap my head around how routing works.
These are some of the things I can’t do yet. It really bothers me but until I find some time or it becomes a necessity, I can’t justify more time on this project.
I have not failed. I’ve just found 10,000 ways that won’t work.