4 ms·
"Zero configuration" But, you can install express, copy paste the getting started code and be up and running at a similar level in 5 minutes. I...guess I don't
by BinaryIdiot 8y ago
"Zero configuration"
But, you can install express, copy paste the getting started code and be up and running at a similar level in 5 minutes. I...guess I don't understand why I should trade something super simple and easy to use for this additional level of abstraction magic.
There is such a thing as too much abstraction.
- asadlionpk 8y agoTry doing the same for React (in the same express project). With SSR enabled :)
- deleted 8y ago[deleted]
- brillout 8y agoDepending on what you need, setting up a React app is super complicated and time consuming. Especially when you need SSR. There is a reason why frameworks such as Next.js, Reframe, and now this one are being used. I'd actually say the opposite, it's tools like Webpack that don't have enough abstraction. I don't care how source maps are being generated, why on earth is it a good idea for Webpack to force me to dig into that? (If at least Webpack's default source map config would work out of the box but it doesn't.) Parcel hits the right abstraction level much better. Disclaimer: I'm Reframe's author (https://github.com/reframejs/reframe https://github.com/reframejs/reframe).
- coolmitch 8y agothere's already a very popular react (cljs) framework called reframe https://github.com/Day8/re-frame https://github.com/Day8/re-frame
- franciscop 8y agoNo, you cannot, not in an easy way. I've taught many people Node.js/express and they always struggle with all of those copy/pasted configuration bits. Now if I add them, I tell them something along the lines This is just magic, copy/paste it to make your app work. Some day you will understand. Once you get used to them it's easy, but to get started it's a nightmare. I started with PHP back in the day, and even though it's hated around here the bar to getting started there is amazingly low in a good way.
- asadlionpk 8y agoExactly this! An experienced developer might take configuration and setup for granted. I also teach sometimes and all this friction to get started just makes it harder to get into web development these days.
- Waterluvian 8y agoThat feeling of discomfort and tinge of frustration means you're learning. I feel like this is helping people to skip over a really useful lesson.
- franciscop 8y agoIt means you are getting frustrated, evaluating your life choices and whether Node.js is really for you. The lesson they get is that Node.js is not for them! I prefer those who are new to any webdev to get started by creating a simple CRUD, not with the grunt details like parsing a JSON body or what is this session stuff. Those IMHO should be optional optimization details to apply later on if you wish, but not mandatory for everyone.
- asadlionpk 8y agoYou don’t need to teach all the hard lessons at the beginning. If that was the case, we should all be programming in Rust/Wasm from Web101.
- jjcm 8y agoI'll echo this. I was hired by Atlassian to join and "make prototyping better". Part of this meant enabling designers to more easily create code based prototypes. I learned very early on that if creating something in code means learning/entering cryptic code just to start (that is, before any work gets done), then you lose people very quickly. Inexperienced developers can easily express, "Hey if I click this button and a field has the word 'bubblegum', I want a popup to show", and likely can figure out the js necessary for it. But if you say, "Ok, before you write that javascript you have to configure a package.json and install all necessary pages, but also make sure your version of node is the correct version for our internal libs", their excitement to dive into a project is ruined.
- austincheney 8y agoI wrote a shallow http.createServer abstraction for one of my projects that works directly from the terminal and takes a port number as its only argument. I just copy/paste this every time I need a web server. Its literally like 2 minutes of effort and has no dependencies.