Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've used Backbone for a handful of projects already and went through exactly what you're describing. As a result, all my projects look different, structure-wise.

I have started to standardize the way I use Backbone, though, with app directory structure, naming conventions, etc. I've also started using require.js which also provides the benefit of forcing you to write modular code.

I found myself writing the same stuff over and over and created a generator that has all these things I've learned over the last few projects: generating a 'shell' application, generating some models/collections/views with boilerplate code (along with some specs to go with them) putting everything in the corresponding directory.

I used Ben Nolan's `capt` as a starting point and added a bunch of stuff that suits my needs.

This may help you out :)

https://github.com/burin/capt

Example of an app generated using this tool:

https://github.com/burin/capt-generated-example



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: