glDrawArrays(GL_LINES)

Could someone please either confirm that the following code either should work or tell me what I'm doing wrong? Assuming that the orthographic matrix calculation is correct and the shaders compile, link and bind.

Ok, thanks guys, there were a couple problems, I needed GL_LINE_STRIP and also both gl_FragColor and gl_Color are deprecated in version 330.
Unfortunately it still doesn't quite work but I have managed to boil it down to something I fundamentally do not understand about the new API.

If I wrap, what I call the VBO loading code, inside a VAO it works, but if I call the VBO loading code directly in the drawing code it does not. If it is not possible to draw without using a VAO, are there methods to dynamically change the buffer data in the drawing code? I have listed below some sample code. In the drawing there are commented lines which can be toggled use or not use the VAO.

glBufferSubdata still works. VAO's are basically a short cut to load all the states and bind the buffers in a more efficient method. They don't stop you from binding the buffer and updating the vertex data.