I've just seen some very cool Node boilerplates out there, which, as a junior developer, would save a huge amount of time getting my project started. Do any of you hackers ever use boilerplates to get your project off the ground, or do you prefer to code from scratch?
Yes and no.
I didn't use anybody's "starter project" or anything like that. But I did use Phoenix. It's an MVC framework for Elixir, inspired by Ruby on Rails, and just like Rails, it has generators. So, I was typing single line commands to generate a schema, controller, view, template and database migration for a given thing I was adding to the app (e.g. "users", "episode pages", topics", etc).
That code generation saved a ton of time and handled a great deal of the boilerplate code that needed to be written, but it wasn't "a boilerplate" per se.
The closest equivalent to a Rails clone in JavaScript I know of is Sails. You also might consider checking out out Gatsby. It's a bit different but it can be a great fit for some kinds of projects.
Yeh i've had a dabble in Rails and love the ease and speed at which you can generate things.
Thanks for mentioning Sails! I've just had a look at it and it seems to be exactly what i'm looking for. Will definitely have a bit more of a look into that.
I have always written things completely from scratch. Mostly because I understand the code better when I wrote every line of it. But that's just my own way of doing things.
That's a great question. I used to overthink this a lot when starting new projects, there's just so many tradeoffs to think about.
I think it's totally fine to start your project with boilerplate (and I've done it myself on some very large, complicated projects). A few things to keep in mind:
css-modulestoi18n.Overall, I think it's worth trying out a template! Imagine the opposite case: where you built everything from scratch. Wouldn't you regret spending 100 hours on setup if you later realized a template was just fine?
Care to share your project idea? I'd be happy to discuss more specifically what might fit your needs if you like 😄
Thanks for the detailed reply, really appreciate it!
That's exactly what I was thinking. I was thinking I could use a boilerplate, strip out most of the bulk, and learn specific parts by trying to implement them.
I've just started learning Next in my 9-5 but i'm verrryy new to React so it's early days but I do see the pro's of it!
My idea is kind of along the same lines as Meetup.com, where users can create and join groups. With features like messaging and maps, etc, I know it's a bit of a beast of a project but I thought it would be a good project to learn with!
Next adds a lot of complexity you may or may not need!
If you're building an immersive app or anything behind a login wall, you probably don't care about SEO and could just do a front-end app.
If you're building a content-based site, then you likely don't need a full-blown front-end framework and could get everything built faster with either a backend MVC + turbolinks, WP, or a statically generated site.
It's only if you need both SEO and very complex JS on the same page that SSR makes much sense. I'd recommend taking a quick and dirty approach so you can ship something and see if the features are even something people want. If they do, you can take the time to do it "the right way", whatever you consider that to be.
I think that's a great strategy and like that your focus is on learning too. I feel like I always learn the most when I'm trying to bend boilerplate code to do what I want. That's how I really started to understand things like Grunt and Webpack
Nothing wrong with a big project! But I'd definitely recommend starting with the smallest usable version you can think of. My first big project was an event sharing platform and we let too many features kill the product...
Good luck!
https://cruip.com
More than enough for a landing page.
There are some great templates there! I meant something more along the lines of backend boilerplates that already have user authentication, CRUD actions, etc
You can find some backend boilerplate on Github. However they are usually centered on some specific technology like RoR or Node.
Another popular option is to use a BaaS - backend as a service. Firebase has authentication, CRUD, real-time notifications etc. The same can be done with a basket of AWS services. Both have iOS/Android SDKs and RESTful APIs.
Yeh I've found some really nice Node ones on Github that I'm quite keen on using as starting point for some ideas.
I had no idea you could use Firebase for CRUD, etc. I thought it was basically just an Auth service! Will look into that!
This comment was deleted 7 years ago
This comment was deleted 7 years ago