What is the relationship between generator-angular and generator-angular-fullstack?
Asked Answered
D

2

6

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?

Devilish answered 6/7, 2014 at 23:35 Comment(0)
K
7

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

Kain answered 22/7, 2014 at 21:23 Comment(1)
Thanks, Josue. From what you've written, I can't see any advantage of generator-angular over generator-angular-fullstack, yet there must be some because people are using it. "Is more suitable for creating just the client side code" is a qualitative statement. Without using adjectives, what are the actual benefits that make it more suitable and weaknesses that make the other less suitable? Is "it's maintained by the yeoman team" an advantage? Why is that an advantage? I don't understand how it "depends on whether you need the backend code". I can use the fullstack one without the backendDevilish
U
1

I am building a generator-ember-fullstack.

The main reason i started this is, at first i wanted a full stack environment.

First step is to build the project workflow. I choose gulp and started a project template.

Then it grow, then i decided to add scaffolding, and i ended up working on generator-ember-fullstack.

The main decision for building generator-ember-fullstack was to have a full stack environment, this includes server side scaffolding as well as client side.

And i really didn't like grunt-connect plugin that basically fires up a fake server to serve your app. I needed a project that had single commands for build and deploy.

I didn't know what to do with public folder that produces with grunt build.command.

And with ember there is ember-cli which is generator-ember on steroids. Again it lacks the server side and it's too customized.

But ofcourse generator-ember-fullstack only supports nodejs on server side. Which is perfect for me.

Underpinning answered 22/7, 2014 at 23:23 Comment(6)
That does not quite answer OP's question about the difference between the two.Kain
If you must use Ember, why not just contribute a backend and gulp build script to the existing ember generator? github.com/yeoman/generator-ember Do you understand the insanity of creating more and more and more independent alternatives?Devilish
gulp build script is the half of the project. The other half is scaffolding. I tried to clone much of the generator-ember and ember-cli where i see fit. Some boilerplate files differ index.html is replaced with index.hbs which is served with express3-handlebars view engine, Directory structure is slightly different. I use requireJS so file contents differ that's the main reason. I have to clone and extend the generator-ember anyway so starting from scratch is fine.Underpinning
I did this for my specific fullstack project. I am not sure if people would need an ember app with express server but it's mainly for myself. Why do you think it would be a bad idea, it's not that hard to build a yeoman generator I suggest you should try a generator-angular-rails, It would be so popular I bet..Underpinning
I am not trying to become popular. I am trying to reduce wasted energy spent by beginners agonizing over the choices and by experts doing work that someone else already did in another project instead of solving yet-unsolved problems. My complete answer to your question is here docs.google.com/spreadsheets/d/…Devilish
I am really beginner, i learned the concept of gulp, requireJS, ember, yeoman generators, in this project. I didn't know generator-angular-fullstack existed, until i decided to build generator-ember-fullstack. Everybody has their own tweaks for their build workflow. yeoman is a great tool for building your own custom workflow. I had so much fun, and learned many things along using it.Underpinning

© 2022 - 2024 — McMap. All rights reserved.