Live data from Hacker News

Show HN: Mega Boilerplate

megaboilerplate.com

21–30 of 57 posts

Re: Show HN: Mega Boilerplate

#22
Awesome effort! I love the folder structure, very easy to follow.

A small feedback: I just generated a React-based stack with a few Auth options - Email, Facebook, Google and Twitter.

The resulting `user.js` controller is 550 LoC.

It would be great if by default some of these logic are encapsulated in a service layer rather than littered in the controller itself. :)

Re: Show HN: Mega Boilerplate

#23

Wow, as a long time RoR dev set in my ways, you may have finally given me the tool to overcome my laziness and check out this new fangled "server-side javascript" thing.

The server-side JavaScript hype is real and it is awesome! React option comes with Redux, React Router and with server-side rendering enabled. I have also gone through all the obstacles of setting up authentication with server-side rendering. If the code doesn't make sense, I will try to create a small diagram of the user auth flow.

Re: Show HN: Mega Boilerplate

#26
post #22

Awesome effort! I love the folder structure, very easy to follow. A small feedback: I just generated a React-based stack with a few Auth options - Email, Facebook, Google and Twitter. The resulting `user.js` controller is 550 LoC. It would be great if by default some of these logic are encapsulated in a service layer rather than littered in the controller itself. :)

Thanks for the feedback! Agreed, it makes sense to refactor those routes into its own Auth controller. I will open a GitHub issue. However, some of the code is intentionally written that way to keep things stupid simple and easy to understand for developers of all skill levels, which you would normally encapsulate into a service in your own app.

Re: Show HN: Mega Boilerplate

#27
That's really cool. Even if you don't find the project itself all that useful, bounce on over to the github and have a look. This is a good example of how to put a project together and share it with the world. Kudos.

Re: Show HN: Mega Boilerplate

#28
post #8

I hate to sound negative, but what does it offer over yeoman and the individual generators out there? If I use a Mega Boilerplate setup, I lose scaffolding post-setup stage, so what do I gain?

I agree that it serves almost the same purpose, but for a beginner, seeing all the layers, what they do, and choosing them piecemeal is a great way to learn quickly before graduating to the yeoman ecosystem.

There are a decent amount of yeoman generators that allow selections between the different layers. Plus I feel like beginners (certainly for me at least) generally struggle with this heavy boilerplate anyway.

Re: Show HN: Mega Boilerplate

#29
Good Job. Hope it gets traction... Looking forward to Angular2 and Meteor additions.

Express tip: add swig template engine

Angular tip: use a feature per folder structure for better componentization and "controller as" syntax (checkout John Papa's styleguide).

Post reply on HN