To give some context, I've been a Ruby & Rails developer for the past few years, and just recently started doing quite a lot of JavaScript to add more responsiveness to the apps.When programming backend, it is quite easy (at least for me), to do most of the stuff test driven and just keep hammering out a bunch of code that works, while being able to focus.But I found that as I'm moving more towards the frontend, I am constantly context switching. Some JavaScript is easy to test (models), but the parts that are directly connected to the GUI seem just impossible to reasonably test automatically.This isn't as much of a deal when I first start with the GUI part with dummy data, but once it all gets connected, and the GUI is created based on data from a an external API and my machine is running two apps at the same time and I'm basically debugging both, it just seems like I'm constantly context switching, not really being able to focus on one thing.An example here might be a Node.js chat server that connects to another Rails application via some API. Now if the API was already done and set in stone, I could easily just focus on the Node.js part ... but trying to do the whole thing in some agile fashion, I just built the API as I build the Node.js app, which has a side effect on working on both Rails and Node (both backed up by different databases etc, ...).If I compare this to working on one small library or just some deep backend stuff, I find that my productivity basically non-existent, because I constantly switch around and find bugs in 50 different places, instead of just focusing on one.Is there something that I'm fundamentaly doing wrong?
How to avoid context switching while developing full stack web apps?
web applications;productivity