AngularJS and Rails – shared directory or not

I previously discussed how I thought it best to integrate rails and AngularJS.  I kicked off a process to build a standalone rails app and a standalone AngularJS app, with the two loosely coupled.  This I thought had a lot of benefits in terms of giving access to the best of the tooling of each framework, the rails and rspec tooling at the rails end, the grunt and karma tooling at the Angular end.  Having done that, I am now considering putting those two apps into the same directory for one key reason: my rails and my angular are in different git repositories, and it seems like I’m going to get the two out of synch.

Part of the answer is that if my app is loosely coupled that shouldn’t be a problem.  But in basic application development terms it’s actually easier if they’re in the same directory.  So, I’ve done a proof of concept of taking my existing tutorial and building instead in a single directory.  It works fine, and the two toolsets don’t seem to argue with each other.  So I think that can work, and it gives a single git repository.  I have seen reports that this gives problems with Rails 4 (Rails 4 has a bin directory, as does ng-boilerplate), and I have dealt with this in the Rails 4 version of this tutorial.

Continue reading

Advertisements