Last week after writing my update I thought I had the best idea - hey why don't I create an example page with my data grid in that I can show off to people, it should be great - nowhere near done, but great! That is where the pain truly began.
I think with every bit of coding I have done in professional and non-professional career I have hit that week - and I hope that people can relate with me here, where everything seems to be ending up at a complete and utter wall. Your code doesn't work and everything you search is not giving you any clue as to how to fix your problem and you realize that you have to do the worst thing ever - take time out of the project and do some research, where you most likely have to take ten steps back just to take two steps forwards - this for me is the fork in the road of the project all of those assumptions and blurry eyed quick things you did at the start come to bite you in the ass. Most importantly this for me is do or die time for many projects, and one of the reasons I wanted to start this blog, I wanted for once to do and not die.
So let me take you through some of the hangups that I have had this week, sit back relax and just take a trip.
Highlights from this week
- Created my first example with the project
- Started with network code
- Finally got npm test working
Things that could have gone better
- The time it took to learn the difference between CommonJs/AMD/UMD
- The time it took to fix most of the tests
- The time it took to finally decide to get rid of handlebars
Goals for this week
- Get the network code done
- Get some styling stuff and attribute stuff finished
- Start mapping out pager buttons
So from research this is my breakdown of these three technologies
Not surprisingly when talking about space UMD is the inferior option here as it has to be compatible with both programming models so it has to play nice with two ways of doing things and the more things you have to be compatible with the more code you have to write to be compatible (I'm sure Microsoft will tell you all about that). But even with that in mind, this is the way I have decided to progress with my application, why do you ask? No reason, I thought it would be cool if people could use this in both scenarios, before I was compiling down to CommonJs and this caused a lot of headaches.
Did you know there is no window.document in NodeJs
I know I there a lot of people yelling at their monitors, "of course there isn't, it's on the server, dummy". I sort of thought NodeJs would have mocked this out in some way and basically allowed users to store variables there, what this meant was that I was using JsDom to provide me with a fake window.document. Some very exciting news came of this (after 3-4 hours of researching) is that I no longer have to use this framework because I am compiling down to client side I can use the actual window.document which makes like so much easier!
Did you know that some libraries don't work/don't support UMD/AMD
LOOKING AT YOU HANDLEBARS
Thanks to Karma I can now say that most of my tests work (I think as I write this that 2 of them are failing and hopefully I will get them working really soon) and it means that people can start actually collaborating on the project as they have a reasonable way of testing their code.
It's been a productive week, which is weird to say seeing as I spent most of it on google, stack overflow and fixing tests but I feel like I've crossed the first major hurdle and am now in a position where I can sit down and just write tonnes of code and get it into a good place. I'm really hopping that by the next update I will have made some major, major strides into the code and can talk about some of the decisions I have made there. Stay tuned this is going to be good.
Project github page: https://github.com/joro550/bear-bones/tree/dev