Friday 20 December 2013

Don't get Testy!


Actually, the complete opposite...

For YEARS now, I have meant to create code by first writing tests.  TDD.. Test Driven Development.

That's what James Shore teaches in his course I mentioned in the previous blog.

Anyway, Tom and I went back on forth on testing.  We've had some experience before with testing, but not with Javascript and/or browsers.

So we decided we should do this right and use a testing framework from the get-go.

Some of our discussions and links...

"""
http://abundantcode.com/javascript-unit-testing-tools/

http://stackoverflow.com/questions/300855/javascript-unit-test-tools-for-tdd
.
.
.
I had tried to use phantomJS to test our code, but couldn't get it to work.

It'll probably work better with angular than qooxdoo.

To me this is key stuff.

I've hear of mocha, it's at a different level than browserJS, I think.
I've also listened to "Javascript Jabber" a podcast on ... fishing.  Just kidding.
I've also heard of jasmine.

http://www.yuiblog.com/blog/2010/11/29/video-yuiconf2010-yuitest/.
.
.
.
http://www.youtube.com/watch?v=VSFGAl1BekY

http://www.youtube.com/watch?v=FYHChPsfVnw

http://docs.angularjs.org/guide/dev_guide.unit-testing

http://docs.angularjs.org/guide/dev_guide.services.testing_services
.
.
.
http://andyshora.com/unit-testing-best-practices-angularjs.html

http://www.yearofmoo.com/2013/09/advanced-testing-and-debugging-in-angularjs.html


Maybe we should both just look at a couple of these videos over the
next few weeks and
come back with our gut feeling on what we like... maybe a few choices
and then if something pops up for both of us, we run with that.

I mean, for testing, I think it is important it is something we
*like*, because then we are more likely to use it!  Of course, we have
each other to keep us on the good path too :)

.
.
.


This one is really good: looks like karma's the one for angular

http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-angularjs-and-karma.html
 
.
.
.

http://www.youtube.com/watch?v=MVw8N3hTfCI
 .
.
.
http://karma-runner.github.io/0.10/index.html
"""

Well, because of our decision to start with Angular.js, that might push us in a particular direction.

Anyway, lots of links and videos to check out....

Next Blog will probably be about setting up things like gradle and friends.  Or not.



Get Real


It's Alive!

sai> git clone https://github.com/nadgerz/satoyma.git
Cloning into 'satoyma'...
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.

The next blog, will just be detailing the discussion Tom and I had about testing frameworks.

We decided to watch a bunch of HOWTO YouTube videos over the holidays (fun guys!) and then
make a decision about what to go for.

I will list the articles/videos we checked out too.

Given we are starting from a fresh slate, we wanted to see how testing helped with the process.

I can *whole-heartedly* recommend James Shore's course, on http://www.letscodejavascript.com/

I think we kind of decided to go with whatever the 'recommended' one was for Angular, given we decided on that for the framework.

But, as we are a bunch off even doing anything for real yet, that could all change.

Mostly we are debating which tools to use, so we are in sync. Something about being prepared, or something, Tom said. I wasn't paying attention.

The git repo will have a docs subdir, with files in it like, BOOKS.txt, ARTICLES.txt, so we have a list of stuff we have read and found useful. YMMV





Thursday 19 December 2013

And we're off! (almost)


Over the last few years, whenever I have thought "I really must get up to speed on Technology X", I have done, nothing.

This time it will be different! (ok, I said that a lot too)

Most of my career has been involved in Mapping Software, primarily with Sam Six (http://www.samsix.com) so I thought I would start a long-term project that involves mapping, but using technologies we *don't* use at Sam Six (yet)

I wanted the project to be long so that it became something substantial; well substantial enough that I could point to it as something that indicated I *had* learned something.

I jotted down a bunch of "what about this?" technologies I thought would be interesting (having no clue if they would all be applicable to my project) and sent them off to my good friend Tom in the US to see what he thought and whether he wanted to be involved.

The list involved (roughly) and in no particular order:

  • NoSQL - I picked MongoDB (http://www.mongodb.org/) - mainly because I saw it had spatial capability
  • node.js (http://nodejs.org/) - was interested to see if it could server up either the map backgrounds or the map data itself
  • Hudson/Jenkins (http://jenkins-ci.org/) - for CI
  • Heroku -  (https://devcenter.heroku.com/) - To use that 'Cloud' thing :)
  • IntelliJ (http://www.jetbrains.com) - ok this a paid for IDE, but as I have paid for it, I figured I should learn it.  Helps that Tom uses it already :)
  • Groovy - because I like it
  • Grails - to see if it was useful for tabular data we generate
  • Git - of course! 
  • Github
  • Gradle - done with ant!
  • HTML5/CSS3/Responsive Web Design/LESS/SASS ...
  • Single Page Application - this came from reading - Single Page Web Applications
  • Javascript Frameworks - Angular.js/Knockout.js/Backbone.js/Ember.js ...
  • jQuery
  • and on...


Anyway, that sort of stuff. I am sure the list will change.

Tom's input was to perhaps use:

  • Vert.x (http://vertx.io/)
  • Travis instead of Jenkins

We also wanted to build everything using current 'Best Practices', so testing, testing, testing...  jslint/jshint/findbugs/PMD and whatever other tools we come across that make this all maintainable


In the end, just to have something to start with, we decided on the following:

  • MongoDB
  • Angular.js
  • To do a Single Page Application, rather than a website
  • Travis
  • Vert.x

Man, that is a list and a half... where to start?

And we still need a name for the app...