What is the relationship between generator-angular and generator-angular-fullstack?
angularjs, yeoman-generator-angular
Solution
I've used both generators for a bit now, choosing one over the other really depends on whether you need the backend code to provide you with data processing / session management or an API interface.
generator-angular
- Official Yeoman generator, this means it's maintained by the yeoman team.
- Is more suitable for creating just the client side code
- It's subgenerators only create client side components (angular controllers, routes and views)
- Does not have deployment generators, but a simple procfile goes a long way.
generator-angular-fullstack
- Is a fork from generator-angular by DaftMonk
- Is suitable to quickly start a fully fledged application
- Makes use of socket.io for quick data binds between server/clients
- It's subgenerators create client and server side code (API endpoints, models and even deployment configurations for Heroku and Openshift)
- The tests are much more thorough, makes use of PhantomJS, Karma and Protractor
- When starting a new project, you can add session and user management via OpenAuth providers like Google/Facebook/Twitter without any hassles or you can use your database schema to store your user's data.
Both
- Generate javascript or coffeescript versions for the frontend code only.
- Provide build scripts to safely minify. (Angular easily breaks under minification)
- Can be easily tested by `grunt test`
- Use grunt as the task runner
- Are deeply integrated with Bower, and adding dependencies is easy as pie. (fullstack's tests configuration needs to be updated though.)
- Generate a distribution directory with all files minified.
- Are single page applications, there is only one index.html file and the routes are all done with angular's $location
Demos
- Here's an example of a generator-angular: http://commitr.herokuapp.com/
- And here's a generator-angular-fullstack app I'm building right now: http://protected-shelf-3830.herokuapp.com/
Problem
I am writing this comparison to help people make some sense of all this nonsense and at the moment, it just looks like generator-angular's benefits and value are a subset of what you get with generator-angular-fullstack. I filled this stuff in myself and I'm no expert, so it is most likely full of dubious factuality. But it's been passed around a lot and nobody has cried foul yet, so maybe it's correct. If so, that would lead to the logical conclusion that one should just always use generator-angular-fullstack and delete the backend parts if one doesn't need them. But this can't be the case since many people are still using generator-angular. I see that generator-angular-fullstack was forked from generator-angular, but then what? I think I must be missing something. What does generator-angular give people that generator-angular-fullstack doesn't?